@shapediver/viewer.rendering-engine.light-engine 2.3.4 → 2.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. package/dist/implementation/AbstractLight.d.ts +1 -6
  2. package/dist/implementation/AbstractLight.d.ts.map +1 -1
  3. package/dist/implementation/AbstractLight.js +36 -17
  4. package/dist/implementation/AbstractLight.js.map +1 -1
  5. package/dist/implementation/types/AmbientLight.d.ts +4 -0
  6. package/dist/implementation/types/AmbientLight.d.ts.map +1 -1
  7. package/dist/implementation/types/AmbientLight.js +15 -0
  8. package/dist/implementation/types/AmbientLight.js.map +1 -1
  9. package/dist/implementation/types/DirectionalLight.d.ts +4 -4
  10. package/dist/implementation/types/DirectionalLight.d.ts.map +1 -1
  11. package/dist/implementation/types/DirectionalLight.js +33 -16
  12. package/dist/implementation/types/DirectionalLight.js.map +1 -1
  13. package/dist/implementation/types/HemisphereLight.d.ts +4 -1
  14. package/dist/implementation/types/HemisphereLight.d.ts.map +1 -1
  15. package/dist/implementation/types/HemisphereLight.js +21 -4
  16. package/dist/implementation/types/HemisphereLight.js.map +1 -1
  17. package/dist/implementation/types/PointLight.d.ts +4 -3
  18. package/dist/implementation/types/PointLight.d.ts.map +1 -1
  19. package/dist/implementation/types/PointLight.js +29 -12
  20. package/dist/implementation/types/PointLight.js.map +1 -1
  21. package/dist/implementation/types/SpotLight.d.ts +4 -6
  22. package/dist/implementation/types/SpotLight.d.ts.map +1 -1
  23. package/dist/implementation/types/SpotLight.js +41 -24
  24. package/dist/implementation/types/SpotLight.js.map +1 -1
  25. package/package.json +6 -6
  26. package/src/implementation/AbstractLight.ts +22 -22
  27. package/src/implementation/types/AmbientLight.ts +14 -0
  28. package/src/implementation/types/DirectionalLight.ts +21 -16
  29. package/src/implementation/types/HemisphereLight.ts +9 -4
  30. package/src/implementation/types/PointLight.ts +17 -12
  31. package/src/implementation/types/SpotLight.ts +29 -24
@@ -2,12 +2,7 @@ import { UuidGenerator } from '@shapediver/viewer.shared.services';
2
2
  import { AbstractTreeNodeData } from '@shapediver/viewer.shared.node-tree';
3
3
  import { ILight, LIGHT_TYPE } from '../interface/ILight';
4
4
  export declare abstract class AbstractLight extends AbstractTreeNodeData implements ILight {
5
- private readonly _type;
6
- private _color;
7
- private _intensity;
8
- private _name?;
9
- private _order?;
10
- private _useNodeData;
5
+ #private;
11
6
  protected readonly _uuidGenerator: UuidGenerator;
12
7
  constructor(properties: {
13
8
  color: string;
@@ -1 +1 @@
1
- {"version":3,"file":"AbstractLight.d.ts","sourceRoot":"","sources":["../../src/implementation/AbstractLight.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAA;AAClE,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAA;AAG1E,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;AAExD,8BAAsB,aAAc,SAAQ,oBAAqB,YAAW,MAAM;IAG9E,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAa;IAEnC,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,UAAU,CAAS;IAC3B,OAAO,CAAC,KAAK,CAAC,CAAS;IACvB,OAAO,CAAC,MAAM,CAAC,CAAS;IACxB,OAAO,CAAC,YAAY,CAAkB;IAEtC,SAAS,CAAC,QAAQ,CAAC,cAAc,EAAE,aAAa,CAAmD;gBAMvF,UAAU,EAAE;QACpB,KAAK,EAAE,MAAM,CAAC;QACd,SAAS,EAAE,MAAM,CAAC;QAClB,IAAI,EAAE,UAAU,CAAC;QACjB,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,EAAE,CAAC,EAAE,MAAM,CAAA;KACd;IAaD,IAAW,KAAK,IAAI,MAAM,CAEzB;IAED,IAAW,KAAK,CAAC,KAAK,EAAE,MAAM,EAG7B;IAED,IAAW,SAAS,IAAI,MAAM,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AM,GAAG,SAAS,EAGxC;IAED,IAAW,KAAK,IAAI,MAAM,GAAG,SAAS,CAErC;IAED,IAAW,KAAK,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,EAGzC;IAED,IAAW,IAAI,IAAI,UAAU,CAE5B;IAED,IAAW,WAAW,CAAC,KAAK,EAAE,OAAO,EAEpC;IAED,IAAW,WAAW,IAAI,OAAO,CAEhC;CAGJ"}
@@ -1,4 +1,16 @@
1
1
  "use strict";
2
+ var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
3
+ if (kind === "m") throw new TypeError("Private method is not writable");
4
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
5
+ 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");
6
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
7
+ };
8
+ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
9
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
10
+ 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");
11
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
12
+ };
13
+ var _AbstractLight_type, _AbstractLight_color, _AbstractLight_intensity, _AbstractLight_name, _AbstractLight_order, _AbstractLight_useNodeData;
2
14
  Object.defineProperty(exports, "__esModule", { value: true });
3
15
  exports.AbstractLight = void 0;
4
16
  const viewer_shared_services_1 = require("@shapediver/viewer.shared.services");
@@ -9,53 +21,60 @@ class AbstractLight extends viewer_shared_node_tree_1.AbstractTreeNodeData {
9
21
  // #region Constructors (1)
10
22
  constructor(properties) {
11
23
  super(properties.id);
12
- this._useNodeData = false;
24
+ // #region Properties (6)
25
+ _AbstractLight_type.set(this, void 0);
26
+ _AbstractLight_color.set(this, void 0);
27
+ _AbstractLight_intensity.set(this, void 0);
28
+ _AbstractLight_name.set(this, void 0);
29
+ _AbstractLight_order.set(this, void 0);
30
+ _AbstractLight_useNodeData.set(this, false);
13
31
  this._uuidGenerator = tsyringe_1.container.resolve(viewer_shared_services_1.UuidGenerator);
14
- this._color = properties.color;
15
- this._intensity = properties.intensity;
16
- this._type = properties.type;
17
- this._name = properties.name;
18
- this._order = properties.order;
32
+ __classPrivateFieldSet(this, _AbstractLight_color, properties.color, "f");
33
+ __classPrivateFieldSet(this, _AbstractLight_intensity, properties.intensity, "f");
34
+ __classPrivateFieldSet(this, _AbstractLight_type, properties.type, "f");
35
+ __classPrivateFieldSet(this, _AbstractLight_name, properties.name, "f");
36
+ __classPrivateFieldSet(this, _AbstractLight_order, properties.order, "f");
19
37
  }
20
38
  // #endregion Constructors (1)
21
39
  // #region Public Accessors (9)
22
40
  get color() {
23
- return this._color;
41
+ return __classPrivateFieldGet(this, _AbstractLight_color, "f");
24
42
  }
25
43
  set color(value) {
26
- this._color = value;
44
+ __classPrivateFieldSet(this, _AbstractLight_color, value, "f");
27
45
  this.updateVersion();
28
46
  }
29
47
  get intensity() {
30
- return this._intensity;
48
+ return __classPrivateFieldGet(this, _AbstractLight_intensity, "f");
31
49
  }
32
50
  set intensity(value) {
33
- this._intensity = value;
51
+ __classPrivateFieldSet(this, _AbstractLight_intensity, value, "f");
34
52
  this.updateVersion();
35
53
  }
36
54
  get name() {
37
- return this._name;
55
+ return __classPrivateFieldGet(this, _AbstractLight_name, "f");
38
56
  }
39
57
  set name(value) {
40
- this._name = value;
58
+ __classPrivateFieldSet(this, _AbstractLight_name, value, "f");
41
59
  this.updateVersion();
42
60
  }
43
61
  get order() {
44
- return this._order;
62
+ return __classPrivateFieldGet(this, _AbstractLight_order, "f");
45
63
  }
46
64
  set order(value) {
47
- this._order = value;
65
+ __classPrivateFieldSet(this, _AbstractLight_order, value, "f");
48
66
  this.updateVersion();
49
67
  }
50
68
  get type() {
51
- return this._type;
69
+ return __classPrivateFieldGet(this, _AbstractLight_type, "f");
52
70
  }
53
71
  set useNodeData(value) {
54
- this._useNodeData = value;
72
+ __classPrivateFieldSet(this, _AbstractLight_useNodeData, value, "f");
55
73
  }
56
74
  get useNodeData() {
57
- return this._useNodeData;
75
+ return __classPrivateFieldGet(this, _AbstractLight_useNodeData, "f");
58
76
  }
59
77
  }
60
78
  exports.AbstractLight = AbstractLight;
79
+ _AbstractLight_type = new WeakMap(), _AbstractLight_color = new WeakMap(), _AbstractLight_intensity = new WeakMap(), _AbstractLight_name = new WeakMap(), _AbstractLight_order = new WeakMap(), _AbstractLight_useNodeData = new WeakMap();
61
80
  //# sourceMappingURL=AbstractLight.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"AbstractLight.js","sourceRoot":"","sources":["../../src/implementation/AbstractLight.ts"],"names":[],"mappings":";;;AACA,+EAAkE;AAClE,iFAA0E;AAC1E,uCAAoC;AAIpC,MAAsB,aAAc,SAAQ,8CAAoB;IAa5D,4BAA4B;IAE5B,2BAA2B;IAE3B,YAAY,UAOX;QACG,KAAK,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC;QAhBjB,iBAAY,GAAY,KAAK,CAAC;QAEnB,mBAAc,GAAiC,oBAAS,CAAC,OAAO,CAAC,sCAAa,CAAC,CAAC;QAe/F,IAAI,CAAC,MAAM,GAAG,UAAU,CAAC,KAAK,CAAC;QAC/B,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC,SAAS,CAAC;QACvC,IAAI,CAAC,KAAK,GAAG,UAAU,CAAC,IAAI,CAAC;QAC7B,IAAI,CAAC,KAAK,GAAG,UAAU,CAAC,IAAI,CAAC;QAC7B,IAAI,CAAC,MAAM,GAAG,UAAU,CAAC,KAAK,CAAC;IACnC,CAAC;IAED,8BAA8B;IAE9B,+BAA+B;IAE/B,IAAW,KAAK;QACZ,OAAO,IAAI,CAAC,MAAM,CAAC;IACvB,CAAC;IAED,IAAW,KAAK,CAAC,KAAa;QAC1B,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;QACpB,IAAI,CAAC,aAAa,EAAE,CAAC;IACzB,CAAC;IAED,IAAW,SAAS;QAChB,OAAO,IAAI,CAAC,UAAU,CAAC;IAC3B,CAAC;IAED,IAAW,SAAS,CAAC,KAAa;QAC9B,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC;QACxB,IAAI,CAAC,aAAa,EAAE,CAAC;IACzB,CAAC;IAED,IAAW,IAAI;QACX,OAAO,IAAI,CAAC,KAAK,CAAC;IACtB,CAAC;IAED,IAAW,IAAI,CAAC,KAAyB;QACrC,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,aAAa,EAAE,CAAC;IACzB,CAAC;IAED,IAAW,KAAK;QACZ,OAAO,IAAI,CAAC,MAAM,CAAC;IACvB,CAAC;IAED,IAAW,KAAK,CAAC,KAAyB;QACtC,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;QACpB,IAAI,CAAC,aAAa,EAAE,CAAC;IACzB,CAAC;IAED,IAAW,IAAI;QACX,OAAO,IAAI,CAAC,KAAK,CAAC;IACtB,CAAC;IAED,IAAW,WAAW,CAAC,KAAc;QACjC,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC;IAC9B,CAAC;IAED,IAAW,WAAW;QAClB,OAAO,IAAI,CAAC,YAAY,CAAC;IAC7B,CAAC;CAGJ;AAtFD,sCAsFC"}
1
+ {"version":3,"file":"AbstractLight.js","sourceRoot":"","sources":["../../src/implementation/AbstractLight.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,+EAAkE;AAClE,iFAA0E;AAC1E,uCAAoC;AAIpC,MAAsB,aAAc,SAAQ,8CAAoB;IAa5D,4BAA4B;IAE5B,2BAA2B;IAE3B,YAAY,UAOX;QACG,KAAK,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC;QAxBzB,yBAAyB;QAEzB,sCAA2B;QAE3B,uCAAe;QACf,2CAAmB;QACnB,sCAAe;QACf,uCAAgB;QAChB,qCAAwB,KA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IAED,IAAW,WAAW,CAAC,KAAc;QACjC,uBAAA,IAAI,8BAAgB,KAAK,MAAA,CAAC;IAC9B,CAAC;IAED,IAAW,WAAW;QAClB,OAAO,uBAAA,IAAI,kCAAa,CAAC;IAC7B,CAAC;CAGJ;AAtFD,sCAsFC"}
@@ -1,6 +1,7 @@
1
1
  import { IAmbientLight } from '../../interface/types/IAmbientLight';
2
2
  import { AbstractLight } from '../AbstractLight';
3
3
  export declare class AmbientLight extends AbstractLight implements IAmbientLight {
4
+ #private;
4
5
  constructor(properties: {
5
6
  color?: string;
6
7
  intensity?: number;
@@ -8,6 +9,9 @@ export declare class AmbientLight extends AbstractLight implements IAmbientLight
8
9
  order?: number;
9
10
  id?: string;
10
11
  });
12
+ get threeJsObject(): {
13
+ [key: string]: THREE.AmbientLight;
14
+ };
11
15
  clone(): IAmbientLight;
12
16
  }
13
17
  //# sourceMappingURL=AmbientLight.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AmbientLight.d.ts","sourceRoot":"","sources":["../../../src/implementation/types/AmbientLight.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAEhD,qBAAa,YAAa,SAAQ,aAAc,YAAW,aAAa;gBAGxD,UAAU,EAAE;QACpB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,EAAE,CAAC,EAAE,MAAM,CAAA;KACd;IAeM,KAAK,IAAI,aAAa;CAUhC"}
1
+ {"version":3,"file":"AmbientLight.d.ts","sourceRoot":"","sources":["../../../src/implementation/types/AmbientLight.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAEhD,qBAAa,YAAa,SAAQ,aAAc,YAAW,aAAa;;gBASxD,UAAU,EAAE;QACpB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,EAAE,CAAC,EAAE,MAAM,CAAA;KACd;IAeD,IAAW,aAAa,IAAI;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,KAAK,CAAC,YAAY,CAAA;KAAE,CAEhE;IAMM,KAAK,IAAI,aAAa;CAUhC"}
@@ -1,9 +1,16 @@
1
1
  "use strict";
2
+ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
3
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
4
+ 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");
5
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
6
+ };
7
+ var _AmbientLight_threeJsObject;
2
8
  Object.defineProperty(exports, "__esModule", { value: true });
3
9
  exports.AmbientLight = void 0;
4
10
  const ILight_1 = require("../../interface/ILight");
5
11
  const AbstractLight_1 = require("../AbstractLight");
6
12
  class AmbientLight extends AbstractLight_1.AbstractLight {
13
+ // #endregion Properties (1)
7
14
  // #region Constructors (1)
8
15
  constructor(properties) {
9
16
  super({
@@ -14,8 +21,15 @@ class AmbientLight extends AbstractLight_1.AbstractLight {
14
21
  order: properties.order,
15
22
  id: properties.id
16
23
  });
24
+ // #region Properties (1)
25
+ _AmbientLight_threeJsObject.set(this, {});
17
26
  }
18
27
  // #endregion Constructors (1)
28
+ // #region Public Accessors (1)
29
+ get threeJsObject() {
30
+ return __classPrivateFieldGet(this, _AmbientLight_threeJsObject, "f");
31
+ }
32
+ // #endregion Public Accessors (1)
19
33
  // #region Public Methods (1)
20
34
  clone() {
21
35
  return new AmbientLight({
@@ -27,4 +41,5 @@ class AmbientLight extends AbstractLight_1.AbstractLight {
27
41
  }
28
42
  }
29
43
  exports.AmbientLight = AmbientLight;
44
+ _AmbientLight_threeJsObject = new WeakMap();
30
45
  //# sourceMappingURL=AmbientLight.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"AmbientLight.js","sourceRoot":"","sources":["../../../src/implementation/types/AmbientLight.ts"],"names":[],"mappings":";;;AAEA,mDAAmD;AAEnD,oDAAgD;AAEhD,MAAa,YAAa,SAAQ,6BAAa;IAC3C,2BAA2B;IAE3B,YAAY,UAMX;QACG,KAAK,CAAC;YACF,KAAK,EAAE,UAAU,CAAC,KAAK,IAAI,SAAS;YACpC,SAAS,EAAE,UAAU,CAAC,SAAS,KAAK,SAAS,CAAC,CAAC,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG;YAC1E,IAAI,EAAE,mBAAU,CAAC,OAAO;YACxB,IAAI,EAAE,UAAU,CAAC,IAAI;YACrB,KAAK,EAAE,UAAU,CAAC,KAAK;YACvB,EAAE,EAAE,UAAU,CAAC,EAAE;SACpB,CAAC,CAAC;IACP,CAAC;IAED,8BAA8B;IAE9B,6BAA6B;IAEtB,KAAK;QACR,OAAO,IAAI,YAAY,CAAC;YACpB,KAAK,EAAE,IAAI,CAAC,KAAK,IAAI,SAAS;YAC9B,SAAS,EAAE,IAAI,CAAC,SAAS,IAAI,GAAG;YAChC,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,KAAK,EAAE,IAAI,CAAC,KAAK;SACpB,CAAC,CAAC;IACP,CAAC;CAGJ;AAlCD,oCAkCC"}
1
+ {"version":3,"file":"AmbientLight.js","sourceRoot":"","sources":["../../../src/implementation/types/AmbientLight.ts"],"names":[],"mappings":";;;;;;;;;AAEA,mDAAmD;AAEnD,oDAAgD;AAEhD,MAAa,YAAa,SAAQ,6BAAa;IAK3C,4BAA4B;IAE5B,2BAA2B;IAE3B,YAAY,UAMX;QACG,KAAK,CAAC;YACF,KAAK,EAAE,UAAU,CAAC,KAAK,IAAI,SAAS;YACpC,SAAS,EAAE,UAAU,CAAC,SAAS,KAAK,SAAS,CAAC,CAAC,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG;YAC1E,IAAI,EAAE,mBAAU,CAAC,OAAO;YACxB,IAAI,EAAE,UAAU,CAAC,IAAI;YACrB,KAAK,EAAE,UAAU,CAAC,KAAK;YACvB,EAAE,EAAE,UAAU,CAAC,EAAE;SACpB,CAAC,CAAC;QAtBP,yBAAyB;QAEzB,sCAAwD,EAAE,EAAC;IAqB3D,CAAC;IAED,8BAA8B;IAE9B,+BAA+B;IAE/B,IAAW,aAAa;QACpB,OAAO,uBAAA,IAAI,mCAAe,CAAC;IAC/B,CAAC;IAED,kCAAkC;IAElC,6BAA6B;IAEtB,KAAK;QACR,OAAO,IAAI,YAAY,CAAC;YACpB,KAAK,EAAE,IAAI,CAAC,KAAK,IAAI,SAAS;YAC9B,SAAS,EAAE,IAAI,CAAC,SAAS,IAAI,GAAG;YAChC,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,KAAK,EAAE,IAAI,CAAC,KAAK;SACpB,CAAC,CAAC;IACP,CAAC;CAGJ;AAhDD,oCAgDC"}
@@ -2,10 +2,7 @@ import { vec3 } from 'gl-matrix';
2
2
  import { IDirectionalLight } from '../../interface/types/IDirectionalLight';
3
3
  import { AbstractLight } from '../AbstractLight';
4
4
  export declare class DirectionalLight extends AbstractLight implements IDirectionalLight {
5
- private _castShadow;
6
- private _direction;
7
- private _shadowMapBias;
8
- private _shadowMapResolution;
5
+ #private;
9
6
  constructor(properties: {
10
7
  color?: string;
11
8
  intensity?: number;
@@ -25,6 +22,9 @@ export declare class DirectionalLight extends AbstractLight implements IDirectio
25
22
  set shadowMapBias(value: number);
26
23
  get shadowMapResolution(): number;
27
24
  set shadowMapResolution(value: number);
25
+ get threeJsObject(): {
26
+ [key: string]: THREE.DirectionalLight;
27
+ };
28
28
  clone(): IDirectionalLight;
29
29
  }
30
30
  //# sourceMappingURL=DirectionalLight.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"DirectionalLight.d.ts","sourceRoot":"","sources":["../../../src/implementation/types/DirectionalLight.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAGhC,OAAO,EAAE,iBAAiB,EAAE,MAAM,yCAAyC,CAAC;AAC5E,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAEhD,qBAAa,gBAAiB,SAAQ,aAAc,YAAW,iBAAiB;IAG5E,OAAO,CAAC,WAAW,CAAkB;IACrC,OAAO,CAAC,UAAU,CAAmC;IACrD,OAAO,CAAC,cAAc,CAAkB;IACxC,OAAO,CAAC,oBAAoB,CAAgB;gBAMhC,UAAU,EAAE;QACpB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,SAAS,CAAC,EAAE,IAAI,CAAC;QACjB,UAAU,CAAC,EAAE,OAAO,CAAC;QACrB,mBAAmB,CAAC,EAAE,MAAM,CAAC;QAC7B,aAAa,CAAC,EAAE,MAAM,CAAC;QACvB,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,EAAE,CAAC,EAAE,MAAM,CAAA;KACd;IAoBD,IAAW,UAAU,IAAI,OAAO,CAE/B;IAED,IAAW,UAAU,CAAC,KAAK,EAAE,OAAO,EAGnC;IAED,IAAW,SAAS,IAAI,IAAI,CAE3B;IAED,IAAW,SAAS,CAAC,KAAK,EAAE,IAAI,EAG/B;IAED,IAAW,aAAa,IAAI,MAAM,CAEjC;IAED,IAAW,aAAa,CAAC,KAAK,EAAE,MAAM,EAGrC;IAED,IAAW,mBAAmB,IAAI,MAAM,CAEvC;IAED,IAAW,mBAAmB,CAAC,KAAK,EAAE,MAAM,EAG3C;IAMM,KAAK,IAAI,iBAAiB;CAcpC"}
1
+ {"version":3,"file":"DirectionalLight.d.ts","sourceRoot":"","sources":["../../../src/implementation/types/DirectionalLight.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAGhC,OAAO,EAAE,iBAAiB,EAAE,MAAM,yCAAyC,CAAC;AAC5E,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAEhD,qBAAa,gBAAiB,SAAQ,aAAc,YAAW,iBAAiB;;gBAahE,UAAU,EAAE;QACpB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,SAAS,CAAC,EAAE,IAAI,CAAC;QACjB,UAAU,CAAC,EAAE,OAAO,CAAC;QACrB,mBAAmB,CAAC,EAAE,MAAM,CAAC;QAC7B,aAAa,CAAC,EAAE,MAAM,CAAC;QACvB,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,EAAE,CAAC,EAAE,MAAM,CAAA;KACd;IAoBD,IAAW,UAAU,IAAI,OAAO,CAE/B;IAED,IAAW,UAAU,CAAC,KAAK,EAAE,OAAO,EAGnC;IAED,IAAW,SAAS,IAAI,IAAI,CAE3B;IAED,IAAW,SAAS,CAAC,KAAK,EAAE,IAAI,EAG/B;IAED,IAAW,aAAa,IAAI,MAAM,CAEjC;IAED,IAAW,aAAa,CAAC,KAAK,EAAE,MAAM,EAGrC;IAED,IAAW,mBAAmB,IAAI,MAAM,CAEvC;IAED,IAAW,mBAAmB,CAAC,KAAK,EAAE,MAAM,EAG3C;IAED,IAAW,aAAa,IAAI;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,KAAK,CAAC,gBAAgB,CAAA;KAAE,CAEpE;IAMM,KAAK,IAAI,iBAAiB;CAcpC"}
@@ -1,4 +1,16 @@
1
1
  "use strict";
2
+ var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
3
+ if (kind === "m") throw new TypeError("Private method is not writable");
4
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
5
+ 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");
6
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
7
+ };
8
+ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
9
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
10
+ 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");
11
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
12
+ };
13
+ var _DirectionalLight_castShadow, _DirectionalLight_direction, _DirectionalLight_shadowMapBias, _DirectionalLight_shadowMapResolution, _DirectionalLight_threeJsObject;
2
14
  Object.defineProperty(exports, "__esModule", { value: true });
3
15
  exports.DirectionalLight = void 0;
4
16
  const gl_matrix_1 = require("gl-matrix");
@@ -17,49 +29,53 @@ class DirectionalLight extends AbstractLight_1.AbstractLight {
17
29
  id: properties.id
18
30
  });
19
31
  // #region Properties (4)
20
- this._castShadow = false;
21
- this._direction = gl_matrix_1.vec3.fromValues(-1, 0, 1);
22
- this._shadowMapBias = -0.003;
23
- this._shadowMapResolution = 1024;
32
+ _DirectionalLight_castShadow.set(this, false);
33
+ _DirectionalLight_direction.set(this, gl_matrix_1.vec3.fromValues(-1, 0, 1));
34
+ _DirectionalLight_shadowMapBias.set(this, -0.003);
35
+ _DirectionalLight_shadowMapResolution.set(this, 1024);
36
+ _DirectionalLight_threeJsObject.set(this, {});
24
37
  if (properties.direction)
25
- this._direction = properties.direction;
38
+ __classPrivateFieldSet(this, _DirectionalLight_direction, properties.direction, "f");
26
39
  if (properties.castShadow)
27
- this._castShadow = properties.castShadow;
40
+ __classPrivateFieldSet(this, _DirectionalLight_castShadow, properties.castShadow, "f");
28
41
  if (properties.shadowMapResolution)
29
- this._shadowMapResolution = properties.shadowMapResolution;
42
+ __classPrivateFieldSet(this, _DirectionalLight_shadowMapResolution, properties.shadowMapResolution, "f");
30
43
  if (properties.shadowMapBias)
31
- this._shadowMapBias = properties.shadowMapBias;
44
+ __classPrivateFieldSet(this, _DirectionalLight_shadowMapBias, properties.shadowMapBias, "f");
32
45
  }
33
46
  // #endregion Constructors (1)
34
47
  // #region Public Accessors (8)
35
48
  get castShadow() {
36
- return this._castShadow;
49
+ return __classPrivateFieldGet(this, _DirectionalLight_castShadow, "f");
37
50
  }
38
51
  set castShadow(value) {
39
- this._castShadow = value;
52
+ __classPrivateFieldSet(this, _DirectionalLight_castShadow, value, "f");
40
53
  this.updateVersion();
41
54
  }
42
55
  get direction() {
43
- return this._direction;
56
+ return __classPrivateFieldGet(this, _DirectionalLight_direction, "f");
44
57
  }
45
58
  set direction(value) {
46
- this._direction = value;
59
+ __classPrivateFieldSet(this, _DirectionalLight_direction, value, "f");
47
60
  this.updateVersion();
48
61
  }
49
62
  get shadowMapBias() {
50
- return this._shadowMapBias;
63
+ return __classPrivateFieldGet(this, _DirectionalLight_shadowMapBias, "f");
51
64
  }
52
65
  set shadowMapBias(value) {
53
- this._shadowMapBias = value;
66
+ __classPrivateFieldSet(this, _DirectionalLight_shadowMapBias, value, "f");
54
67
  this.updateVersion();
55
68
  }
56
69
  get shadowMapResolution() {
57
- return this._shadowMapResolution;
70
+ return __classPrivateFieldGet(this, _DirectionalLight_shadowMapResolution, "f");
58
71
  }
59
72
  set shadowMapResolution(value) {
60
- this._shadowMapResolution = value;
73
+ __classPrivateFieldSet(this, _DirectionalLight_shadowMapResolution, value, "f");
61
74
  this.updateVersion();
62
75
  }
76
+ get threeJsObject() {
77
+ return __classPrivateFieldGet(this, _DirectionalLight_threeJsObject, "f");
78
+ }
63
79
  // #endregion Public Accessors (8)
64
80
  // #region Public Methods (1)
65
81
  clone() {
@@ -76,4 +92,5 @@ class DirectionalLight extends AbstractLight_1.AbstractLight {
76
92
  }
77
93
  }
78
94
  exports.DirectionalLight = DirectionalLight;
95
+ _DirectionalLight_castShadow = new WeakMap(), _DirectionalLight_direction = new WeakMap(), _DirectionalLight_shadowMapBias = new WeakMap(), _DirectionalLight_shadowMapResolution = new WeakMap(), _DirectionalLight_threeJsObject = new WeakMap();
79
96
  //# sourceMappingURL=DirectionalLight.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"DirectionalLight.js","sourceRoot":"","sources":["../../../src/implementation/types/DirectionalLight.ts"],"names":[],"mappings":";;;AACA,yCAAgC;AAEhC,mDAAmD;AAEnD,oDAAgD;AAEhD,MAAa,gBAAiB,SAAQ,6BAAa;IAQ/C,4BAA4B;IAE5B,2BAA2B;IAE3B,YAAY,UAUX;QACG,KAAK,CAAC;YACF,KAAK,EAAE,UAAU,CAAC,KAAK,IAAI,SAAS;YACpC,SAAS,EAAE,UAAU,CAAC,SAAS,KAAK,SAAS,CAAC,CAAC,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG;YAC1E,IAAI,EAAE,mBAAU,CAAC,WAAW;YAC5B,IAAI,EAAE,UAAU,CAAC,IAAI;YACrB,KAAK,EAAE,UAAU,CAAC,KAAK;YACvB,EAAE,EAAE,UAAU,CAAC,EAAE;SACpB,CAAC,CAAC;QA7BP,yBAAyB;QAEjB,gBAAW,GAAY,KAAK,CAAC;QAC7B,eAAU,GAAS,gBAAI,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;QAC7C,mBAAc,GAAW,CAAC,KAAK,CAAC;QAChC,yBAAoB,GAAW,IAAI,CAAC;QA0BxC,IAAG,UAAU,CAAC,SAAS;YAAE,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC,SAAS,CAAC;QAChE,IAAG,UAAU,CAAC,UAAU;YAAE,IAAI,CAAC,WAAW,GAAG,UAAU,CAAC,UAAU,CAAC;QACnE,IAAG,UAAU,CAAC,mBAAmB;YAAE,IAAI,CAAC,oBAAo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AAI;YACf,KAAK,EAAE,IAAI,CAAC,KAAK;SACpB,CAAC,CAAC;IACP,CAAC;CAGJ;AArGD,4CAqGC"}
@@ -1,7 +1,7 @@
1
1
  import { IHemisphereLight } from '../../interface/types/IHemisphereLight';
2
2
  import { AbstractLight } from '../AbstractLight';
3
3
  export declare class HemisphereLight extends AbstractLight implements IHemisphereLight {
4
- private _groundColor;
4
+ #private;
5
5
  constructor(properties: {
6
6
  color?: string;
7
7
  groundColor?: string;
@@ -12,6 +12,9 @@ export declare class HemisphereLight extends AbstractLight implements IHemispher
12
12
  });
13
13
  get groundColor(): string;
14
14
  set groundColor(value: string);
15
+ get threeJsObject(): {
16
+ [key: string]: THREE.HemisphereLight;
17
+ };
15
18
  clone(): IHemisphereLight;
16
19
  }
17
20
  //# sourceMappingURL=HemisphereLight.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"HemisphereLight.d.ts","sourceRoot":"","sources":["../../../src/implementation/types/HemisphereLight.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AAC1E,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAEhD,qBAAa,eAAgB,SAAQ,aAAc,YAAW,gBAAgB;IAG1E,OAAO,CAAC,YAAY,CAAqB;gBAM7B,UAAU,EAAE;QACpB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,EAAE,CAAC,EAAE,MAAM,CAAA;KACd;IAiBD,IAAW,WAAW,IAAI,MAAM,CAE/B;IAED,IAAW,WAAW,CAAC,KAAK,EAAE,MAAM,EAGnC;IAMM,KAAK,IAAI,gBAAgB;CAWnC"}
1
+ {"version":3,"file":"HemisphereLight.d.ts","sourceRoot":"","sources":["../../../src/implementation/types/HemisphereLight.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AAC1E,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAEhD,qBAAa,eAAgB,SAAQ,aAAc,YAAW,gBAAgB;;gBAU9D,UAAU,EAAE;QACpB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,EAAE,CAAC,EAAE,MAAM,CAAA;KACd;IAiBD,IAAW,WAAW,IAAI,MAAM,CAE/B;IAED,IAAW,WAAW,CAAC,KAAK,EAAE,MAAM,EAGnC;IAED,IAAW,aAAa,IAAI;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,KAAK,CAAC,eAAe,CAAA;KAAE,CAEnE;IAMM,KAAK,IAAI,gBAAgB;CAWnC"}
@@ -1,4 +1,16 @@
1
1
  "use strict";
2
+ var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
3
+ if (kind === "m") throw new TypeError("Private method is not writable");
4
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
5
+ 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");
6
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
7
+ };
8
+ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
9
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
10
+ 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");
11
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
12
+ };
13
+ var _HemisphereLight_groundColor, _HemisphereLight_threeJsObject;
2
14
  Object.defineProperty(exports, "__esModule", { value: true });
3
15
  exports.HemisphereLight = void 0;
4
16
  const ILight_1 = require("../../interface/ILight");
@@ -16,19 +28,23 @@ class HemisphereLight extends AbstractLight_1.AbstractLight {
16
28
  id: properties.id
17
29
  });
18
30
  // #region Properties (1)
19
- this._groundColor = '#ffffff';
31
+ _HemisphereLight_groundColor.set(this, '#ffffff');
32
+ _HemisphereLight_threeJsObject.set(this, {});
20
33
  if (properties.groundColor)
21
- this._groundColor = properties.groundColor;
34
+ __classPrivateFieldSet(this, _HemisphereLight_groundColor, properties.groundColor, "f");
22
35
  }
23
36
  // #endregion Constructors (1)
24
37
  // #region Public Accessors (2)
25
38
  get groundColor() {
26
- return this._groundColor;
39
+ return __classPrivateFieldGet(this, _HemisphereLight_groundColor, "f");
27
40
  }
28
41
  set groundColor(value) {
29
- this._groundColor = value;
42
+ __classPrivateFieldSet(this, _HemisphereLight_groundColor, value, "f");
30
43
  this.updateVersion();
31
44
  }
45
+ get threeJsObject() {
46
+ return __classPrivateFieldGet(this, _HemisphereLight_threeJsObject, "f");
47
+ }
32
48
  // #endregion Public Accessors (2)
33
49
  // #region Public Methods (1)
34
50
  clone() {
@@ -42,4 +58,5 @@ class HemisphereLight extends AbstractLight_1.AbstractLight {
42
58
  }
43
59
  }
44
60
  exports.HemisphereLight = HemisphereLight;
61
+ _HemisphereLight_groundColor = new WeakMap(), _HemisphereLight_threeJsObject = new WeakMap();
45
62
  //# sourceMappingURL=HemisphereLight.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"HemisphereLight.js","sourceRoot":"","sources":["../../../src/implementation/types/HemisphereLight.ts"],"names":[],"mappings":";;;AAGA,mDAAmD;AAEnD,oDAAgD;AAEhD,MAAa,eAAgB,SAAQ,6BAAa;IAK9C,4BAA4B;IAE5B,2BAA2B;IAE3B,YAAY,UAOX;QACG,KAAK,CAAC;YACF,KAAK,EAAE,UAAU,CAAC,KAAK,IAAI,SAAS;YACpC,SAAS,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UAAU,CAAC,SAAS,KAAK,SAAS,CAAC,CAAC,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG;YAC1E,IAAI,EAAE,mBAAU,CAAC,UAAU;YAC3B,IAAI,EAAE,UAAU,CAAC,IAAI;YACrB,KAAK,EAAE,UAAU,CAAC,KAAK;YACvB,EAAE,EAAE,UAAU,CAAC,EAAE;SACpB,CAAC,CAAC;QAxBP,yBAAyB;QAEzB,uCAAuB,SAAS,EAAC;QACjC,yCAA2D,EAAE,EAAC;QAuB1D,IAAI,UAAU,CAAC,WAAW;YAAE,uBAAA,IAAI,gCAAgB,UAAU,CAAC,WAAW,MAAA,CAAC;IAC3E,CAAC;IAED,8BAA8B;IAE9B,+BAA+B;IAE/B,IAAW,WAAW;QAClB,OAAO,uBAAA,IAAI,oCAAa,CAAC;IAC7B,CAAC;IAED,IAAW,WAAW,CAAC,KAAa;QAChC,uBAAA,IAAI,gCAAgB,KAAK,MAAA,CAAC;QAC1B,IAAI,CAAC,aAAa,EAAE,CAAC;IACzB,CAAC;IAED,IAAW,aAAa;QACpB,OAAO,uBAAA,IAAI,sCAAe,CAAC;IAC/B,CAAC;IAED,kCAAkC;IAElC,6BAA6B;IAEtB,KAAK;QACR,OAAO,IAAI,eAAe,CAAC;YACvB,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,KAAK,EAAE,IAAI,CAAC,KAAK;SACpB,CAAC,CAAC;IACP,CAAC;CAGJ;AA9DD,0CA8DC"}
@@ -2,9 +2,7 @@ import { vec3 } from 'gl-matrix';
2
2
  import { IPointLight } from '../../interface/types/IPointLight';
3
3
  import { AbstractLight } from '../AbstractLight';
4
4
  export declare class PointLight extends AbstractLight implements IPointLight {
5
- private _decay;
6
- private _distance;
7
- private _position;
5
+ #private;
8
6
  constructor(properties: {
9
7
  color?: string;
10
8
  intensity?: number;
@@ -21,6 +19,9 @@ export declare class PointLight extends AbstractLight implements IPointLight {
21
19
  set distance(value: number);
22
20
  get position(): vec3;
23
21
  set position(value: vec3);
22
+ get threeJsObject(): {
23
+ [key: string]: THREE.PointLight;
24
+ };
24
25
  clone(): IPointLight;
25
26
  }
26
27
  //# sourceMappingURL=PointLight.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"PointLight.d.ts","sourceRoot":"","sources":["../../../src/implementation/types/PointLight.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAGhC,OAAO,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAEhD,qBAAa,UAAW,SAAQ,aAAc,YAAW,WAAW;IAGlE,OAAO,CAAC,MAAM,CAAa;IAC3B,OAAO,CAAC,SAAS,CAAa;IAC9B,OAAO,CAAC,SAAS,CAAkC;gBAMvC,UAAU,EAAE;QACtB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,QAAQ,CAAC,EAAE,IAAI,CAAC;QAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,EAAE,CAAC,EAAE,MAAM,CAAA;KACZ;IAkBD,IAAW,KAAK,IAAI,MAAM,CAEzB;IAED,IAAW,KAAK,CAAC,KAAK,EAAE,MAAM,EAG7B;IAED,IAAW,QAAQ,IAAI,MAAM,CAE5B;IAED,IAAW,QAAQ,CAAC,KAAK,EAAE,MAAM,EAGhC;IAED,IAAW,QAAQ,IAAI,IAAI,CAE1B;IAED,IAAW,QAAQ,CAAC,KAAK,EAAE,IAAI,EAG9B;IAMM,KAAK,IAAI,WAAW;CAa5B"}
1
+ {"version":3,"file":"PointLight.d.ts","sourceRoot":"","sources":["../../../src/implementation/types/PointLight.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAGhC,OAAO,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAEhD,qBAAa,UAAW,SAAQ,aAAc,YAAW,WAAW;;gBAYtD,UAAU,EAAE;QACtB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,QAAQ,CAAC,EAAE,IAAI,CAAC;QAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,EAAE,CAAC,EAAE,MAAM,CAAA;KACZ;IAkBD,IAAW,KAAK,IAAI,MAAM,CAEzB;IAED,IAAW,KAAK,CAAC,KAAK,EAAE,MAAM,EAG7B;IAED,IAAW,QAAQ,IAAI,MAAM,CAE5B;IAED,IAAW,QAAQ,CAAC,KAAK,EAAE,MAAM,EAGhC;IAED,IAAW,QAAQ,IAAI,IAAI,CAE1B;IAED,IAAW,QAAQ,CAAC,KAAK,EAAE,IAAI,EAG9B;IAED,IAAW,aAAa,IAAI;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,KAAK,CAAC,UAAU,CAAA;KAAE,CAE9D;IAMM,KAAK,IAAI,WAAW;CAa5B"}
@@ -1,4 +1,16 @@
1
1
  "use strict";
2
+ var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
3
+ if (kind === "m") throw new TypeError("Private method is not writable");
4
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
5
+ 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");
6
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
7
+ };
8
+ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
9
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
10
+ 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");
11
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
12
+ };
13
+ var _PointLight_decay, _PointLight_distance, _PointLight_position, _PointLight_threeJsObject;
2
14
  Object.defineProperty(exports, "__esModule", { value: true });
3
15
  exports.PointLight = void 0;
4
16
  const gl_matrix_1 = require("gl-matrix");
@@ -17,39 +29,43 @@ class PointLight extends AbstractLight_1.AbstractLight {
17
29
  id: properties.id
18
30
  });
19
31
  // #region Properties (3)
20
- this._decay = 2;
21
- this._distance = 0;
22
- this._position = gl_matrix_1.vec3.fromValues(0, 0, 0);
32
+ _PointLight_decay.set(this, 2);
33
+ _PointLight_distance.set(this, 0);
34
+ _PointLight_position.set(this, gl_matrix_1.vec3.fromValues(0, 0, 0));
35
+ _PointLight_threeJsObject.set(this, {});
23
36
  if (properties.position)
24
- this._position = properties.position;
37
+ __classPrivateFieldSet(this, _PointLight_position, properties.position, "f");
25
38
  if (properties.distance)
26
- this._distance = properties.distance;
39
+ __classPrivateFieldSet(this, _PointLight_distance, properties.distance, "f");
27
40
  if (properties.decay)
28
- this._decay = properties.decay;
41
+ __classPrivateFieldSet(this, _PointLight_decay, properties.decay, "f");
29
42
  }
30
43
  // #endregion Constructors (1)
31
44
  // #region Public Accessors (6)
32
45
  get decay() {
33
- return this._decay;
46
+ return __classPrivateFieldGet(this, _PointLight_decay, "f");
34
47
  }
35
48
  set decay(value) {
36
- this._decay = value;
49
+ __classPrivateFieldSet(this, _PointLight_decay, value, "f");
37
50
  this.updateVersion();
38
51
  }
39
52
  get distance() {
40
- return this._distance;
53
+ return __classPrivateFieldGet(this, _PointLight_distance, "f");
41
54
  }
42
55
  set distance(value) {
43
- this._distance = value;
56
+ __classPrivateFieldSet(this, _PointLight_distance, value, "f");
44
57
  this.updateVersion();
45
58
  }
46
59
  get position() {
47
- return this._position;
60
+ return __classPrivateFieldGet(this, _PointLight_position, "f");
48
61
  }
49
62
  set position(value) {
50
- this._position = value;
63
+ __classPrivateFieldSet(this, _PointLight_position, value, "f");
51
64
  this.updateVersion();
52
65
  }
66
+ get threeJsObject() {
67
+ return __classPrivateFieldGet(this, _PointLight_threeJsObject, "f");
68
+ }
53
69
  // #endregion Public Accessors (6)
54
70
  // #region Public Methods (1)
55
71
  clone() {
@@ -65,4 +81,5 @@ class PointLight extends AbstractLight_1.AbstractLight {
65
81
  }
66
82
  }
67
83
  exports.PointLight = PointLight;
84
+ _PointLight_decay = new WeakMap(), _PointLight_distance = new WeakMap(), _PointLight_position = new WeakMap(), _PointLight_threeJsObject = new WeakMap();
68
85
  //# sourceMappingURL=PointLight.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PointLight.js","sourceRoot":"","sources":["../../../src/implementation/types/PointLight.ts"],"names":[],"mappings":";;;AACA,yCAAgC;AAEhC,mDAAmD;AAEnD,oDAAgD;AAEhD,MAAa,UAAW,SAAQ,6BAAa;IAO3C,4BAA4B;IAE5B,2BAA2B;IAE3B,YAAY,UASX;QACC,KAAK,CAAC;YACJ,KAAK,EAAE,UAAU,CAAC,KAAK,IAAI,SAAS;YACpC,SAAS,EAAE,UAAU,CAAC,SAAS,KAAK,SAAS,CAAC,CAAC,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG;YAC1E,IAAI,EAAE,mBAAU,CAAC,KAAK;YACtB,IAAI,EAAE,UAAU,CAAC,IAAI;YACrB,KAAK,EAAE,UAAU,CAAC,KAAK;YACvB,EAAE,EAAE,UAAU,CAAC,EAAE;SAClB,CAAC,CAAC;QA3BL,yBAAyB;QAEjB,WAAM,GAAW,CAAC,CAAC;QACnB,cAAS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AAC;IAED,IAAW,KAAK,CAAC,KAAa;QAC5B,uBAAA,IAAI,qBAAU,KAAK,MAAA,CAAC;QACpB,IAAI,CAAC,aAAa,EAAE,CAAC;IACvB,CAAC;IAED,IAAW,QAAQ;QACjB,OAAO,uBAAA,IAAI,4BAAU,CAAC;IACxB,CAAC;IAED,IAAW,QAAQ,CAAC,KAAa;QAC/B,uBAAA,IAAI,wBAAa,KAAK,MAAA,CAAC;QACvB,IAAI,CAAC,aAAa,EAAE,CAAC;IACvB,CAAC;IAED,IAAW,QAAQ;QACjB,OAAO,uBAAA,IAAI,4BAAU,CAAC;IACxB,CAAC;IAED,IAAW,QAAQ,CAAC,KAAW;QAC7B,uBAAA,IAAI,wBAAa,KAAK,MAAA,CAAC;QACvB,IAAI,CAAC,aAAa,EAAE,CAAC;IACvB,CAAC;IAED,IAAW,aAAa;QACpB,OAAO,uBAAA,IAAI,iCAAe,CAAC;IAC/B,CAAC;IAED,kCAAkC;IAElC,6BAA6B;IAEtB,KAAK;QACV,OAAO,IAAI,UAAU,CAAC;YACpB,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,KAAK,EAAE,IAAI,CAAC,KAAK;SAClB,CAAC,CAAC;IACL,CAAC;CAGF;AAvFD,gCAuFC"}
@@ -2,12 +2,7 @@ import { vec3 } from 'gl-matrix';
2
2
  import { ISpotLight } from '../../interface/types/ISpotLight';
3
3
  import { AbstractLight } from '../AbstractLight';
4
4
  export declare class SpotLight extends AbstractLight implements ISpotLight {
5
- private _angle;
6
- private _decay;
7
- private _distance;
8
- private _penumbra;
9
- private _position;
10
- private _target;
5
+ #private;
11
6
  constructor(properties: {
12
7
  color?: string;
13
8
  intensity?: number;
@@ -33,6 +28,9 @@ export declare class SpotLight extends AbstractLight implements ISpotLight {
33
28
  set position(value: vec3);
34
29
  get target(): vec3;
35
30
  set target(value: vec3);
31
+ get threeJsObject(): {
32
+ [key: string]: THREE.SpotLight;
33
+ };
36
34
  clone(): ISpotLight;
37
35
  }
38
36
  //# sourceMappingURL=SpotLight.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SpotLight.d.ts","sourceRoot":"","sources":["../../../src/implementation/types/SpotLight.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAGhC,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAEhD,qBAAa,SAAU,SAAQ,aAAc,YAAW,UAAU;IAGhE,OAAO,CAAC,MAAM,CAAyB;IACvC,OAAO,CAAC,MAAM,CAAa;IAC3B,OAAO,CAAC,SAAS,CAAa;IAC9B,OAAO,CAAC,SAAS,CAAe;IAChC,OAAO,CAAC,SAAS,CAAmC;IACpD,OAAO,CAAC,OAAO,CAAkC;gBAMrC,UAAU,EAAE;QACtB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,QAAQ,CAAC,EAAE,IAAI,CAAC;QAChB,MAAM,CAAC,EAAE,IAAI,CAAC;QACd,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,EAAE,CAAC,EAAE,MAAM,CAAA;KACZ;IAqBD,IAAW,KAAK,IAAI,MAAM,CAEzB;IAED,IAAW,KAAK,CAAC,KAAK,EAAE,MAAM,EAG7B;IAED,IAAW,KAAK,IAAI,MAAM,C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AK,IAAI,MAAM,CAEzB;IAED,IAAW,KAAK,CAAC,KAAK,EAAE,MAAM,EAG7B;IAED,IAAW,QAAQ,IAAI,MAAM,CAE5B;IAED,IAAW,QAAQ,CAAC,KAAK,EAAE,MAAM,EAGhC;IAED,IAAW,QAAQ,IAAI,MAAM,CAE5B;IAED,IAAW,QAAQ,CAAC,KAAK,EAAE,MAAM,EAGhC;IAED,IAAW,QAAQ,IAAI,IAAI,CAE1B;IAED,IAAW,QAAQ,CAAC,KAAK,EAAE,IAAI,EAG9B;IAED,IAAW,MAAM,IAAI,IAAI,CAExB;IAED,IAAW,MAAM,CAAC,KAAK,EAAE,IAAI,EAG5B;IAED,IAAW,aAAa,IAAI;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,KAAK,CAAC,SAAS,CAAA;KAAE,CAE7D;IAMM,KAAK,IAAI,UAAU;CAgB3B"}
@@ -1,4 +1,16 @@
1
1
  "use strict";
2
+ var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
3
+ if (kind === "m") throw new TypeError("Private method is not writable");
4
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
5
+ 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");
6
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
7
+ };
8
+ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
9
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
10
+ 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");
11
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
12
+ };
13
+ var _SpotLight_angle, _SpotLight_decay, _SpotLight_distance, _SpotLight_penumbra, _SpotLight_position, _SpotLight_target, _SpotLight_threeJsObject;
2
14
  Object.defineProperty(exports, "__esModule", { value: true });
3
15
  exports.SpotLight = void 0;
4
16
  const gl_matrix_1 = require("gl-matrix");
@@ -17,69 +29,73 @@ class SpotLight extends AbstractLight_1.AbstractLight {
17
29
  id: properties.id
18
30
  });
19
31
  // #region Properties (6)
20
- this._angle = Math.PI / 4.0;
21
- this._decay = 1;
22
- this._distance = 0;
23
- this._penumbra = 0.5;
24
- this._position = gl_matrix_1.vec3.fromValues(-1, 0, 1);
25
- this._target = gl_matrix_1.vec3.fromValues(0, 0, 0);
32
+ _SpotLight_angle.set(this, Math.PI / 4.0);
33
+ _SpotLight_decay.set(this, 1);
34
+ _SpotLight_distance.set(this, 0);
35
+ _SpotLight_penumbra.set(this, 0.5);
36
+ _SpotLight_position.set(this, gl_matrix_1.vec3.fromValues(-1, 0, 1));
37
+ _SpotLight_target.set(this, gl_matrix_1.vec3.fromValues(0, 0, 0));
38
+ _SpotLight_threeJsObject.set(this, {});
26
39
  if (properties.position)
27
- this._position = properties.position;
40
+ __classPrivateFieldSet(this, _SpotLight_position, properties.position, "f");
28
41
  if (properties.target)
29
- this._target = properties.target;
42
+ __classPrivateFieldSet(this, _SpotLight_target, properties.target, "f");
30
43
  if (properties.distance)
31
- this._distance = properties.distance;
44
+ __classPrivateFieldSet(this, _SpotLight_distance, properties.distance, "f");
32
45
  if (properties.decay)
33
- this._decay = properties.decay;
46
+ __classPrivateFieldSet(this, _SpotLight_decay, properties.decay, "f");
34
47
  if (properties.angle)
35
- this._angle = properties.angle;
48
+ __classPrivateFieldSet(this, _SpotLight_angle, properties.angle, "f");
36
49
  if (properties.penumbra)
37
- this._penumbra = properties.penumbra;
50
+ __classPrivateFieldSet(this, _SpotLight_penumbra, properties.penumbra, "f");
38
51
  }
39
52
  // #endregion Constructors (1)
40
53
  // #region Public Accessors (12)
41
54
  get angle() {
42
- return this._angle;
55
+ return __classPrivateFieldGet(this, _SpotLight_angle, "f");
43
56
  }
44
57
  set angle(value) {
45
- this._angle = value;
58
+ __classPrivateFieldSet(this, _SpotLight_angle, value, "f");
46
59
  this.updateVersion();
47
60
  }
48
61
  get decay() {
49
- return this._decay;
62
+ return __classPrivateFieldGet(this, _SpotLight_decay, "f");
50
63
  }
51
64
  set decay(value) {
52
- this._decay = value;
65
+ __classPrivateFieldSet(this, _SpotLight_decay, value, "f");
53
66
  this.updateVersion();
54
67
  }
55
68
  get distance() {
56
- return this._distance;
69
+ return __classPrivateFieldGet(this, _SpotLight_distance, "f");
57
70
  }
58
71
  set distance(value) {
59
- this._distance = value;
72
+ __classPrivateFieldSet(this, _SpotLight_distance, value, "f");
60
73
  this.updateVersion();
61
74
  }
62
75
  get penumbra() {
63
- return this._penumbra;
76
+ return __classPrivateFieldGet(this, _SpotLight_penumbra, "f");
64
77
  }
65
78
  set penumbra(value) {
66
- this._penumbra = value;
79
+ __classPrivateFieldSet(this, _SpotLight_penumbra, value, "f");
67
80
  this.updateVersion();
68
81
  }
69
82
  get position() {
70
- return this._position;
83
+ return __classPrivateFieldGet(this, _SpotLight_position, "f");
71
84
  }
72
85
  set position(value) {
73
- this._position = value;
86
+ __classPrivateFieldSet(this, _SpotLight_position, value, "f");
74
87
  this.updateVersion();
75
88
  }
76
89
  get target() {
77
- return this._target;
90
+ return __classPrivateFieldGet(this, _SpotLight_target, "f");
78
91
  }
79
92
  set target(value) {
80
- this._target = value;
93
+ __classPrivateFieldSet(this, _SpotLight_target, value, "f");
81
94
  this.updateVersion();
82
95
  }
96
+ get threeJsObject() {
97
+ return __classPrivateFieldGet(this, _SpotLight_threeJsObject, "f");
98
+ }
83
99
  // #endregion Public Accessors (12)
84
100
  // #region Public Methods (1)
85
101
  clone() {
@@ -98,4 +114,5 @@ class SpotLight extends AbstractLight_1.AbstractLight {
98
114
  }
99
115
  }
100
116
  exports.SpotLight = SpotLight;
117
+ _SpotLight_angle = new WeakMap(), _SpotLight_decay = new WeakMap(), _SpotLight_distance = new WeakMap(), _SpotLight_penumbra = new WeakMap(), _SpotLight_position = new WeakMap(), _SpotLight_target = new WeakMap(), _SpotLight_threeJsObject = new WeakMap();
101
118
  //# sourceMappingURL=SpotLight.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SpotLight.js","sourceRoot":"","sources":["../../../src/implementation/types/SpotLight.ts"],"names":[],"mappings":";;;AACA,yCAAgC;AAEhC,mDAAmD;AAEnD,oDAAgD;AAEhD,MAAa,SAAU,SAAQ,6BAAa;IAU1C,4BAA4B;IAE5B,2BAA2B;IAE3B,YAAY,UAYX;QACC,KAAK,CAAC;YACJ,KAAK,EAAE,UAAU,CAAC,KAAK,IAAI,SAAS;YACpC,SAAS,EAAE,UAAU,CAAC,SAAS,KAAK,SAAS,CAAC,CAAC,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG;YAC1E,IAAI,EAAE,mBAAU,CAAC,IAAI;YACrB,IAAI,EAAE,UAAU,CAAC,IAAI;YACrB,KAAK,EAAE,UAAU,CAAC,KAAK;YACvB,EAAE,EAAE,UAAU,CAAC,EAAE;SAClB,CAAC,CAAC;QAjCL,yBAAyB;QAEjB,WAAM,GAAW,IAAI,CAAC,EAAE,GAAG,GAAG,CAAC;QAC/B,WAAM,GAAW,CAAC,CAAC;QACnB,cAAS,GAAW,CAAC,CAAC;QACtB,cAAS,GAAW,GAAG,CAAC;QACxB,cAAS,GAAS,gBAAI,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;QAC5C,YAAO,GAAS,gBAAI,CAAC,UAAU,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;QA2B/C,IAAI,UAAU,CAAC,QAAQ;YAAE,IAAI,CAAC,SAAS,GAAG,UAAU,CAAC,QAAQ,CAAC;QAC9D,IAAI,UAAU,CAAC,MAAM;YAAE,IAAI,CAAC,OAAO,GAAG,UAAU,CAAC,MAAM,CAAC;QACxD,IAAI,UAAU,CAAC,QAAQ;YAAE,IAAI,CAAC,SAAS,GAAG,UAAU,CAAC,QAAQ,CAAC;QAC9D,IA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vB,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,KAAK,EAAE,IAAI,CAAC,KAAK;SAClB,CAAC,CAAC;IACL,CAAC;CAGF;AA9HD,8BA8HC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shapediver/viewer.rendering-engine.light-engine",
3
- "version": "2.3.4",
3
+ "version": "2.4.0",
4
4
  "description": "",
5
5
  "keywords": [],
6
6
  "author": "Michael Oppitz <michael@shapediver.com>",
@@ -39,13 +39,13 @@
39
39
  "testEnvironment": "node"
40
40
  },
41
41
  "dependencies": {
42
- "@shapediver/viewer.rendering-engine.rendering-engine": "2.3.4",
42
+ "@shapediver/viewer.rendering-engine.rendering-engine": "2.4.0",
43
43
  "@shapediver/viewer.settings": "0.1.36",
44
- "@shapediver/viewer.shared.node-tree": "2.3.4",
45
- "@shapediver/viewer.shared.services": "2.3.4",
46
- "@shapediver/viewer.shared.types": "2.3.4",
44
+ "@shapediver/viewer.shared.node-tree": "2.4.0",
45
+ "@shapediver/viewer.shared.services": "2.4.0",
46
+ "@shapediver/viewer.shared.types": "2.4.0",
47
47
  "gl-matrix": "3.3.0",
48
48
  "tsyringe": "^4.5.0"
49
49
  },
50
- "gitHead": "d0b4323fb80afeb0dc5dcfbb0944193b45f9e5e9"
50
+ "gitHead": "b0bc626496adf01f9308b3b4557aa69cbb4fe52f"
51
51
  }
@@ -8,13 +8,13 @@ import { ILight, LIGHT_TYPE } from '../interface/ILight'
8
8
  export abstract class AbstractLight extends AbstractTreeNodeData implements ILight {
9
9
  // #region Properties (6)
10
10
 
11
- private readonly _type: LIGHT_TYPE;
11
+ readonly #type: LIGHT_TYPE;
12
12
 
13
- private _color: string;
14
- private _intensity: number;
15
- private _name?: string;
16
- private _order?: number;
17
- private _useNodeData: boolean = false;
13
+ #color: string;
14
+ #intensity: number;
15
+ #name?: string;
16
+ #order?: number;
17
+ #useNodeData: boolean = false;
18
18
 
19
19
  protected readonly _uuidGenerator: UuidGenerator = <UuidGenerator>container.resolve(UuidGenerator);
20
20
 
@@ -31,11 +31,11 @@ export abstract class AbstractLight extends AbstractTreeNodeData implements ILig
31
31
  id?: string
32
32
  }) {
33
33
  super(properties.id);
34
- this._color = properties.color;
35
- this._intensity = properties.intensity;
36
- this._type = properties.type;
37
- this._name = properties.name;
38
- this._order = properties.order;
34
+ this.#color = properties.color;
35
+ this.#intensity = properties.intensity;
36
+ this.#type = properties.type;
37
+ this.#name = properties.name;
38
+ this.#order = properties.order;
39
39
  }
40
40
 
41
41
  // #endregion Constructors (1)
@@ -43,51 +43,51 @@ export abstract class AbstractLight extends AbstractTreeNodeData implements ILig
43
43
  // #region Public Accessors (9)
44
44
 
45
45
  public get color(): string {
46
- return this._color;
46
+ return this.#color;
47
47
  }
48
48
 
49
49
  public set color(value: string) {
50
- this._color = value;
50
+ this.#color = value;
51
51
  this.updateVersion();
52
52
  }
53
53
 
54
54
  public get intensity(): number {
55
- return this._intensity;
55
+ return this.#intensity;
56
56
  }
57
57
 
58
58
  public set intensity(value: number) {
59
- this._intensity = value;
59
+ this.#intensity = value;
60
60
  this.updateVersion();
61
61
  }
62
62
 
63
63
  public get name(): string | undefined {
64
- return this._name;
64
+ return this.#name;
65
65
  }
66
66
 
67
67
  public set name(value: string | undefined) {
68
- this._name = value;
68
+ this.#name = value;
69
69
  this.updateVersion();
70
70
  }
71
71
 
72
72
  public get order(): number | undefined {
73
- return this._order;
73
+ return this.#order;
74
74
  }
75
75
 
76
76
  public set order(value: number | undefined) {
77
- this._order = value;
77
+ this.#order = value;
78
78
  this.updateVersion();
79
79
  }
80
80
 
81
81
  public get type(): LIGHT_TYPE {
82
- return this._type;
82
+ return this.#type;
83
83
  }
84
84
 
85
85
  public set useNodeData(value: boolean) {
86
- this._useNodeData = value;
86
+ this.#useNodeData = value;
87
87
  }
88
88
 
89
89
  public get useNodeData(): boolean {
90
- return this._useNodeData;
90
+ return this.#useNodeData;
91
91
  }
92
92
 
93
93
  // #endregion Public Accessors (9)
@@ -5,6 +5,12 @@ import { IAmbientLight } from '../../interface/types/IAmbientLight';
5
5
  import { AbstractLight } from '../AbstractLight'
6
6
 
7
7
  export class AmbientLight extends AbstractLight implements IAmbientLight {
8
+ // #region Properties (1)
9
+
10
+ #threeJsObject: { [key: string]: THREE.AmbientLight } = {};
11
+
12
+ // #endregion Properties (1)
13
+
8
14
  // #region Constructors (1)
9
15
 
10
16
  constructor(properties: {
@@ -26,6 +32,14 @@ export class AmbientLight extends AbstractLight implements IAmbientLight {
26
32
 
27
33
  // #endregion Constructors (1)
28
34
 
35
+ // #region Public Accessors (1)
36
+
37
+ public get threeJsObject(): { [key: string]: THREE.AmbientLight } {
38
+ return this.#threeJsObject;
39
+ }
40
+
41
+ // #endregion Public Accessors (1)
42
+
29
43
  // #region Public Methods (1)
30
44
 
31
45
  public clone(): IAmbientLight {
@@ -8,10 +8,11 @@ import { AbstractLight } from '../AbstractLight'
8
8
  export class DirectionalLight extends AbstractLight implements IDirectionalLight {
9
9
  // #region Properties (4)
10
10
 
11
- private _castShadow: boolean = false;
12
- private _direction: vec3 = vec3.fromValues(-1, 0, 1);
13
- private _shadowMapBias: number = -0.003;
14
- private _shadowMapResolution: number = 1024;
11
+ #castShadow: boolean = false;
12
+ #direction: vec3 = vec3.fromValues(-1, 0, 1);
13
+ #shadowMapBias: number = -0.003;
14
+ #shadowMapResolution: number = 1024;
15
+ #threeJsObject: { [key: string]: THREE.DirectionalLight } = {};
15
16
 
16
17
  // #endregion Properties (4)
17
18
 
@@ -37,10 +38,10 @@ export class DirectionalLight extends AbstractLight implements IDirectionalLight
37
38
  id: properties.id
38
39
  });
39
40
 
40
- if(properties.direction) this._direction = properties.direction;
41
- if(properties.castShadow) this._castShadow = properties.castShadow;
42
- if(properties.shadowMapResolution) this._shadowMapResolution = properties.shadowMapResolution;
43
- if(properties.shadowMapBias) this._shadowMapBias = properties.shadowMapBias;
41
+ if(properties.direction) this.#direction = properties.direction;
42
+ if(properties.castShadow) this.#castShadow = properties.castShadow;
43
+ if(properties.shadowMapResolution) this.#shadowMapResolution = properties.shadowMapResolution;
44
+ if(properties.shadowMapBias) this.#shadowMapBias = properties.shadowMapBias;
44
45
  }
45
46
 
46
47
  // #endregion Constructors (1)
@@ -48,41 +49,45 @@ export class DirectionalLight extends AbstractLight implements IDirectionalLight
48
49
  // #region Public Accessors (8)
49
50
 
50
51
  public get castShadow(): boolean {
51
- return this._castShadow;
52
+ return this.#castShadow;
52
53
  }
53
54
 
54
55
  public set castShadow(value: boolean) {
55
- this._castShadow = value;
56
+ this.#castShadow = value;
56
57
  this.updateVersion();
57
58
  }
58
59
 
59
60
  public get direction(): vec3 {
60
- return this._direction;
61
+ return this.#direction;
61
62
  }
62
63
 
63
64
  public set direction(value: vec3) {
64
- this._direction = value;
65
+ this.#direction = value;
65
66
  this.updateVersion();
66
67
  }
67
68
 
68
69
  public get shadowMapBias(): number {
69
- return this._shadowMapBias;
70
+ return this.#shadowMapBias;
70
71
  }
71
72
 
72
73
  public set shadowMapBias(value: number) {
73
- this._shadowMapBias = value;
74
+ this.#shadowMapBias = value;
74
75
  this.updateVersion();
75
76
  }
76
77
 
77
78
  public get shadowMapResolution(): number {
78
- return this._shadowMapResolution;
79
+ return this.#shadowMapResolution;
79
80
  }
80
81
 
81
82
  public set shadowMapResolution(value: number) {
82
- this._shadowMapResolution = value;
83
+ this.#shadowMapResolution = value;
83
84
  this.updateVersion();
84
85
  }
85
86
 
87
+ public get threeJsObject(): { [key: string]: THREE.DirectionalLight } {
88
+ return this.#threeJsObject;
89
+ }
90
+
86
91
  // #endregion Public Accessors (8)
87
92
 
88
93
  // #region Public Methods (1)
@@ -8,7 +8,8 @@ import { AbstractLight } from '../AbstractLight'
8
8
  export class HemisphereLight extends AbstractLight implements IHemisphereLight {
9
9
  // #region Properties (1)
10
10
 
11
- private _groundColor: string = '#ffffff';
11
+ #groundColor: string = '#ffffff';
12
+ #threeJsObject: { [key: string]: THREE.HemisphereLight } = {};
12
13
 
13
14
  // #endregion Properties (1)
14
15
 
@@ -31,7 +32,7 @@ export class HemisphereLight extends AbstractLight implements IHemisphereLight {
31
32
  id: properties.id
32
33
  });
33
34
 
34
- if (properties.groundColor) this._groundColor = properties.groundColor;
35
+ if (properties.groundColor) this.#groundColor = properties.groundColor;
35
36
  }
36
37
 
37
38
  // #endregion Constructors (1)
@@ -39,14 +40,18 @@ export class HemisphereLight extends AbstractLight implements IHemisphereLight {
39
40
  // #region Public Accessors (2)
40
41
 
41
42
  public get groundColor(): string {
42
- return this._groundColor;
43
+ return this.#groundColor;
43
44
  }
44
45
 
45
46
  public set groundColor(value: string) {
46
- this._groundColor = value;
47
+ this.#groundColor = value;
47
48
  this.updateVersion();
48
49
  }
49
50
 
51
+ public get threeJsObject(): { [key: string]: THREE.HemisphereLight } {
52
+ return this.#threeJsObject;
53
+ }
54
+
50
55
  // #endregion Public Accessors (2)
51
56
 
52
57
  // #region Public Methods (1)
@@ -8,9 +8,10 @@ import { AbstractLight } from '../AbstractLight'
8
8
  export class PointLight extends AbstractLight implements IPointLight {
9
9
  // #region Properties (3)
10
10
 
11
- private _decay: number = 2;
12
- private _distance: number = 0;
13
- private _position: vec3 = vec3.fromValues(0, 0, 0);
11
+ #decay: number = 2;
12
+ #distance: number = 0;
13
+ #position: vec3 = vec3.fromValues(0, 0, 0);
14
+ #threeJsObject: { [key: string]: THREE.PointLight } = {};
14
15
 
15
16
  // #endregion Properties (3)
16
17
 
@@ -34,9 +35,9 @@ export class PointLight extends AbstractLight implements IPointLight {
34
35
  order: properties.order,
35
36
  id: properties.id
36
37
  });
37
- if (properties.position) this._position = properties.position;
38
- if (properties.distance) this._distance = properties.distance;
39
- if (properties.decay) this._decay = properties.decay;
38
+ if (properties.position) this.#position = properties.position;
39
+ if (properties.distance) this.#distance = properties.distance;
40
+ if (properties.decay) this.#decay = properties.decay;
40
41
  }
41
42
 
42
43
  // #endregion Constructors (1)
@@ -44,32 +45,36 @@ export class PointLight extends AbstractLight implements IPointLight {
44
45
  // #region Public Accessors (6)
45
46
 
46
47
  public get decay(): number {
47
- return this._decay;
48
+ return this.#decay;
48
49
  }
49
50
 
50
51
  public set decay(value: number) {
51
- this._decay = value;
52
+ this.#decay = value;
52
53
  this.updateVersion();
53
54
  }
54
55
 
55
56
  public get distance(): number {
56
- return this._distance;
57
+ return this.#distance;
57
58
  }
58
59
 
59
60
  public set distance(value: number) {
60
- this._distance = value;
61
+ this.#distance = value;
61
62
  this.updateVersion();
62
63
  }
63
64
 
64
65
  public get position(): vec3 {
65
- return this._position;
66
+ return this.#position;
66
67
  }
67
68
 
68
69
  public set position(value: vec3) {
69
- this._position = value;
70
+ this.#position = value;
70
71
  this.updateVersion();
71
72
  }
72
73
 
74
+ public get threeJsObject(): { [key: string]: THREE.PointLight } {
75
+ return this.#threeJsObject;
76
+ }
77
+
73
78
  // #endregion Public Accessors (6)
74
79
 
75
80
  // #region Public Methods (1)
@@ -8,12 +8,13 @@ import { AbstractLight } from '../AbstractLight'
8
8
  export class SpotLight extends AbstractLight implements ISpotLight {
9
9
  // #region Properties (6)
10
10
 
11
- private _angle: number = Math.PI / 4.0;
12
- private _decay: number = 1;
13
- private _distance: number = 0;
14
- private _penumbra: number = 0.5;
15
- private _position: vec3 = vec3.fromValues(-1, 0, 1);
16
- private _target: vec3 = vec3.fromValues(0, 0, 0);
11
+ #angle: number = Math.PI / 4.0;
12
+ #decay: number = 1;
13
+ #distance: number = 0;
14
+ #penumbra: number = 0.5;
15
+ #position: vec3 = vec3.fromValues(-1, 0, 1);
16
+ #target: vec3 = vec3.fromValues(0, 0, 0);
17
+ #threeJsObject: { [key: string]: THREE.SpotLight } = {};
17
18
 
18
19
  // #endregion Properties (6)
19
20
 
@@ -40,12 +41,12 @@ export class SpotLight extends AbstractLight implements ISpotLight {
40
41
  order: properties.order,
41
42
  id: properties.id
42
43
  });
43
- if (properties.position) this._position = properties.position;
44
- if (properties.target) this._target = properties.target;
45
- if (properties.distance) this._distance = properties.distance;
46
- if (properties.decay) this._decay = properties.decay;
47
- if (properties.angle) this._angle = properties.angle;
48
- if (properties.penumbra) this._penumbra = properties.penumbra;
44
+ if (properties.position) this.#position = properties.position;
45
+ if (properties.target) this.#target = properties.target;
46
+ if (properties.distance) this.#distance = properties.distance;
47
+ if (properties.decay) this.#decay = properties.decay;
48
+ if (properties.angle) this.#angle = properties.angle;
49
+ if (properties.penumbra) this.#penumbra = properties.penumbra;
49
50
  }
50
51
 
51
52
  // #endregion Constructors (1)
@@ -53,59 +54,63 @@ export class SpotLight extends AbstractLight implements ISpotLight {
53
54
  // #region Public Accessors (12)
54
55
 
55
56
  public get angle(): number {
56
- return this._angle;
57
+ return this.#angle;
57
58
  }
58
59
 
59
60
  public set angle(value: number) {
60
- this._angle = value;
61
+ this.#angle = value;
61
62
  this.updateVersion();
62
63
  }
63
64
 
64
65
  public get decay(): number {
65
- return this._decay;
66
+ return this.#decay;
66
67
  }
67
68
 
68
69
  public set decay(value: number) {
69
- this._decay = value;
70
+ this.#decay = value;
70
71
  this.updateVersion();
71
72
  }
72
73
 
73
74
  public get distance(): number {
74
- return this._distance;
75
+ return this.#distance;
75
76
  }
76
77
 
77
78
  public set distance(value: number) {
78
- this._distance = value;
79
+ this.#distance = value;
79
80
  this.updateVersion();
80
81
  }
81
82
 
82
83
  public get penumbra(): number {
83
- return this._penumbra;
84
+ return this.#penumbra;
84
85
  }
85
86
 
86
87
  public set penumbra(value: number) {
87
- this._penumbra = value;
88
+ this.#penumbra = value;
88
89
  this.updateVersion();
89
90
  }
90
91
 
91
92
  public get position(): vec3 {
92
- return this._position;
93
+ return this.#position;
93
94
  }
94
95
 
95
96
  public set position(value: vec3) {
96
- this._position = value;
97
+ this.#position = value;
97
98
  this.updateVersion();
98
99
  }
99
100
 
100
101
  public get target(): vec3 {
101
- return this._target;
102
+ return this.#target;
102
103
  }
103
104
 
104
105
  public set target(value: vec3) {
105
- this._target = value;
106
+ this.#target = value;
106
107
  this.updateVersion();
107
108
  }
108
109
 
110
+ public get threeJsObject(): { [key: string]: THREE.SpotLight } {
111
+ return this.#threeJsObject;
112
+ }
113
+
109
114
  // #endregion Public Accessors (12)
110
115
 
111
116
  // #region Public Methods (1)