UNPKG

@shapediver/viewer.viewport

Version:

This is the npm package for the ShapeDiver Viewer Viewport API. For more information on ShapeDiver, please visit our [homepage](https://shapediver.com/).

81 lines 5.04 kB
"use strict"; var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) { if (kind === "m") throw new TypeError("Private method is not writable"); if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; }; var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) { if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); }; var _AbstractLightApi_inputValidator, _AbstractLightApi_light, _AbstractLightApi_logger, _AbstractLightApi_viewportApi; Object.defineProperty(exports, "__esModule", { value: true }); exports.AbstractLightApi = void 0; const viewer_shared_services_1 = require("@shapediver/viewer.shared.services"); class AbstractLightApi { // #endregion Properties (5) // #region Constructors (1) constructor(viewportApi, light) { // #region Properties (5) _AbstractLightApi_inputValidator.set(this, viewer_shared_services_1.InputValidator.instance); _AbstractLightApi_light.set(this, void 0); _AbstractLightApi_logger.set(this, viewer_shared_services_1.Logger.instance); _AbstractLightApi_viewportApi.set(this, void 0); this.scope = "AbstractLightApi"; __classPrivateFieldSet(this, _AbstractLightApi_viewportApi, viewportApi, "f"); __classPrivateFieldSet(this, _AbstractLightApi_light, light, "f"); } // #endregion Constructors (1) // #region Public Getters And Setters (10) get color() { return __classPrivateFieldGet(this, _AbstractLightApi_light, "f").color; } set color(value) { const scope = "color"; __classPrivateFieldGet(this, _AbstractLightApi_inputValidator, "f").validateAndError(`${this.scope}.${scope}`, value, "color"); __classPrivateFieldGet(this, _AbstractLightApi_light, "f").color = value; __classPrivateFieldGet(this, _AbstractLightApi_logger, "f").debug(`${this.scope}.${scope}: ${scope} was set to: ${value}`); __classPrivateFieldGet(this, _AbstractLightApi_viewportApi, "f").update(); } get id() { return __classPrivateFieldGet(this, _AbstractLightApi_light, "f").id; } get intensity() { return __classPrivateFieldGet(this, _AbstractLightApi_light, "f").intensity; } set intensity(value) { const scope = "intensity"; __classPrivateFieldGet(this, _AbstractLightApi_inputValidator, "f").validateAndError(`${this.scope}.${scope}`, value, "number"); __classPrivateFieldGet(this, _AbstractLightApi_light, "f").intensity = value; __classPrivateFieldGet(this, _AbstractLightApi_logger, "f").debug(`${this.scope}.${scope}: ${scope} was set to: ${value}`); __classPrivateFieldGet(this, _AbstractLightApi_viewportApi, "f").update(); } get name() { return __classPrivateFieldGet(this, _AbstractLightApi_light, "f").name; } set name(value) { const scope = "name"; __classPrivateFieldGet(this, _AbstractLightApi_inputValidator, "f").validateAndError(`${this.scope}.${scope}`, value, "string", false); __classPrivateFieldGet(this, _AbstractLightApi_light, "f").name = value; __classPrivateFieldGet(this, _AbstractLightApi_logger, "f").debug(`${this.scope}.${scope}: ${scope} was set to: ${value}`); __classPrivateFieldGet(this, _AbstractLightApi_viewportApi, "f").update(); } get order() { return __classPrivateFieldGet(this, _AbstractLightApi_light, "f").order; } set order(value) { const scope = "order"; __classPrivateFieldGet(this, _AbstractLightApi_inputValidator, "f").validateAndError(`${this.scope}.${scope}`, value, "number", false); __classPrivateFieldGet(this, _AbstractLightApi_light, "f").order = value; __classPrivateFieldGet(this, _AbstractLightApi_logger, "f").debug(`${this.scope}.${scope}: ${scope} was set to: ${value}`); __classPrivateFieldGet(this, _AbstractLightApi_viewportApi, "f").update(); } get type() { return __classPrivateFieldGet(this, _AbstractLightApi_light, "f").type; } } exports.AbstractLightApi = AbstractLightApi; _AbstractLightApi_inputValidator = new WeakMap(), _AbstractLightApi_light = new WeakMap(), _AbstractLightApi_logger = new WeakMap(), _AbstractLightApi_viewportApi = new WeakMap(); //# sourceMappingURL=AbstractLightApi.js.map