UNPKG

@aurigma/design-atoms-model

Version:

Design Atoms is a part of Customer's Canvas SDK which allows for manipulating individual design elements through your code.

60 lines 2.13 kB
export class ContainerVisualization { _copy(source, destination) { } } export class ColorContainerVisualization extends ContainerVisualization { constructor() { super(...arguments); this.type = ColorContainerVisualization.type; } _copy(source, destination) { super._copy(source, destination); destination.color = source.color.clone(); destination.opacity = source.opacity; destination.enableGlareEffect = source.enableGlareEffect; } toJSON() { return { type: this.type, color: this.color.getData(), opacity: this.opacity, enableGlareEffect: this.enableGlareEffect }; } clone() { const container = new ColorContainerVisualization(); this._copy(this, container); return container; } } ColorContainerVisualization.type = "ColorVisualization"; export class TextureContainerVisualization extends ContainerVisualization { constructor() { super(...arguments); this.type = TextureContainerVisualization.type; } _copy(source, destination) { var _a; super._copy(source, destination); destination.textureSource = (_a = source.textureSource) === null || _a === void 0 ? void 0 : _a.clone(); destination.textureName = source.textureName; destination.opacity = source.opacity; destination.enableGlareEffect = source.enableGlareEffect; } toJSON() { var _a; return { type: this.type, textureSource: (_a = this.textureSource) === null || _a === void 0 ? void 0 : _a.toJSON(), textureName: this.textureName, opacity: this.opacity, enableGlareEffect: this.enableGlareEffect }; } clone() { const visualization = new TextureContainerVisualization(); this._copy(this, visualization); return visualization; } } TextureContainerVisualization.type = "TextureVisualization"; //# sourceMappingURL=ContainerVisualization.js.map