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.

85 lines 3.8 kB
var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return extendStatics(d, b); }; return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); var ContainerVisualization = /** @class */ (function () { function ContainerVisualization() { } ContainerVisualization.prototype._copy = function (source, destination) { }; return ContainerVisualization; }()); export { ContainerVisualization }; var ColorContainerVisualization = /** @class */ (function (_super) { __extends(ColorContainerVisualization, _super); function ColorContainerVisualization() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = ColorContainerVisualization.type; return _this; } ColorContainerVisualization.prototype._copy = function (source, destination) { _super.prototype._copy.call(this, source, destination); destination.color = source.color.clone(); destination.opacity = source.opacity; destination.enableGlareEffect = source.enableGlareEffect; }; ColorContainerVisualization.prototype.toJSON = function () { return { type: this.type, color: this.color.getData(), opacity: this.opacity, enableGlareEffect: this.enableGlareEffect }; }; ColorContainerVisualization.prototype.clone = function () { var container = new ColorContainerVisualization(); this._copy(this, container); return container; }; ColorContainerVisualization.type = "ColorVisualization"; return ColorContainerVisualization; }(ContainerVisualization)); export { ColorContainerVisualization }; var TextureContainerVisualization = /** @class */ (function (_super) { __extends(TextureContainerVisualization, _super); function TextureContainerVisualization() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = TextureContainerVisualization.type; return _this; } TextureContainerVisualization.prototype._copy = function (source, destination) { var _a; _super.prototype._copy.call(this, 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; }; TextureContainerVisualization.prototype.toJSON = function () { 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 }; }; TextureContainerVisualization.prototype.clone = function () { var visualization = new TextureContainerVisualization(); this._copy(this, visualization); return visualization; }; TextureContainerVisualization.type = "TextureVisualization"; return TextureContainerVisualization; }(ContainerVisualization)); export { TextureContainerVisualization }; //# sourceMappingURL=ContainerVisualization.js.map