@shapediver/viewer.rendering-engine.light-engine 2.12.7 → 3.0.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.
- package/dist/implementation/AbstractLight.d.ts +4 -4
- package/dist/implementation/AbstractLight.d.ts.map +1 -1
- package/dist/implementation/AbstractLight.js +13 -13
- package/dist/implementation/AbstractLight.js.map +1 -1
- package/dist/implementation/LightEngine.d.ts +1 -1
- package/dist/implementation/LightEngine.d.ts.map +1 -1
- package/dist/implementation/LightEngine.js +15 -15
- package/dist/implementation/LightEngine.js.map +1 -1
- package/dist/implementation/types/AmbientLight.d.ts +1 -5
- package/dist/implementation/types/AmbientLight.d.ts.map +1 -1
- package/dist/implementation/types/AmbientLight.js +1 -16
- package/dist/implementation/types/AmbientLight.js.map +1 -1
- package/dist/implementation/types/DirectionalLight.d.ts +2 -5
- package/dist/implementation/types/DirectionalLight.d.ts.map +1 -1
- package/dist/implementation/types/DirectionalLight.js +6 -10
- package/dist/implementation/types/DirectionalLight.js.map +1 -1
- package/dist/implementation/types/HemisphereLight.d.ts +1 -4
- package/dist/implementation/types/HemisphereLight.d.ts.map +1 -1
- package/dist/implementation/types/HemisphereLight.js +5 -9
- package/dist/implementation/types/HemisphereLight.js.map +1 -1
- package/dist/implementation/types/PointLight.d.ts +2 -5
- package/dist/implementation/types/PointLight.d.ts.map +1 -1
- package/dist/implementation/types/PointLight.js +6 -10
- package/dist/implementation/types/PointLight.js.map +1 -1
- package/dist/implementation/types/SpotLight.d.ts +2 -5
- package/dist/implementation/types/SpotLight.d.ts.map +1 -1
- package/dist/implementation/types/SpotLight.js +6 -10
- package/dist/implementation/types/SpotLight.js.map +1 -1
- package/package.json +7 -7
- package/src/implementation/AbstractLight.ts +21 -23
- package/src/implementation/LightEngine.ts +98 -83
- package/src/implementation/types/AmbientLight.ts +6 -22
- package/src/implementation/types/DirectionalLight.ts +15 -22
- package/src/implementation/types/HemisphereLight.ts +5 -13
- package/src/implementation/types/PointLight.ts +8 -15
- package/src/implementation/types/SpotLight.ts +11 -18
|
@@ -10,12 +10,12 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
10
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
11
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
12
12
|
};
|
|
13
|
-
var _PointLight_decay, _PointLight_distance, _PointLight_position
|
|
13
|
+
var _PointLight_decay, _PointLight_distance, _PointLight_position;
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.PointLight = void 0;
|
|
16
|
-
const gl_matrix_1 = require("gl-matrix");
|
|
17
|
-
const ILight_1 = require("../../interface/ILight");
|
|
18
16
|
const AbstractLight_1 = require("../AbstractLight");
|
|
17
|
+
const ILight_1 = require("../../interface/ILight");
|
|
18
|
+
const gl_matrix_1 = require("gl-matrix");
|
|
19
19
|
class PointLight extends AbstractLight_1.AbstractLight {
|
|
20
20
|
// #endregion Properties (3)
|
|
21
21
|
// #region Constructors (1)
|
|
@@ -33,7 +33,6 @@ class PointLight extends AbstractLight_1.AbstractLight {
|
|
|
33
33
|
_PointLight_decay.set(this, 0);
|
|
34
34
|
_PointLight_distance.set(this, 0);
|
|
35
35
|
_PointLight_position.set(this, gl_matrix_1.vec3.fromValues(0, 0, 0));
|
|
36
|
-
_PointLight_threeJsObject.set(this, {});
|
|
37
36
|
if (properties.position)
|
|
38
37
|
__classPrivateFieldSet(this, _PointLight_position, properties.position, "f");
|
|
39
38
|
if (properties.distance)
|
|
@@ -42,7 +41,7 @@ class PointLight extends AbstractLight_1.AbstractLight {
|
|
|
42
41
|
__classPrivateFieldSet(this, _PointLight_decay, properties.decay, "f");
|
|
43
42
|
}
|
|
44
43
|
// #endregion Constructors (1)
|
|
45
|
-
// #region Public
|
|
44
|
+
// #region Public Getters And Setters (6)
|
|
46
45
|
get decay() {
|
|
47
46
|
return __classPrivateFieldGet(this, _PointLight_decay, "f");
|
|
48
47
|
}
|
|
@@ -70,10 +69,7 @@ class PointLight extends AbstractLight_1.AbstractLight {
|
|
|
70
69
|
if (this.parentNode)
|
|
71
70
|
this.parentNode.updateVersion();
|
|
72
71
|
}
|
|
73
|
-
|
|
74
|
-
return __classPrivateFieldGet(this, _PointLight_threeJsObject, "f");
|
|
75
|
-
}
|
|
76
|
-
// #endregion Public Accessors (6)
|
|
72
|
+
// #endregion Public Getters And Setters (6)
|
|
77
73
|
// #region Public Methods (1)
|
|
78
74
|
clone() {
|
|
79
75
|
return new PointLight({
|
|
@@ -90,5 +86,5 @@ class PointLight extends AbstractLight_1.AbstractLight {
|
|
|
90
86
|
}
|
|
91
87
|
}
|
|
92
88
|
exports.PointLight = PointLight;
|
|
93
|
-
_PointLight_decay = new WeakMap(), _PointLight_distance = new WeakMap(), _PointLight_position = new WeakMap()
|
|
89
|
+
_PointLight_decay = new WeakMap(), _PointLight_distance = new WeakMap(), _PointLight_position = new WeakMap();
|
|
94
90
|
//# sourceMappingURL=PointLight.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PointLight.js","sourceRoot":"","sources":["../../../src/implementation/types/PointLight.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"PointLight.js","sourceRoot":"","sources":["../../../src/implementation/types/PointLight.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,oDAAiD;AAGjD,mDAAoD;AACpD,yCAAiC;AAEjC,MAAa,UAAW,SAAQ,6BAAa;IAO3C,4BAA4B;IAE5B,2BAA2B;IAE3B,YAAY,UAUX;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,CAAC;YACxE,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A,IAAI,4BAAU,CAAC;IACxB,CAAC;IAED,IAAW,QAAQ,CAAC,KAAW;QAC7B,uBAAA,IAAI,wBAAa,KAAK,MAAA,CAAC;QACvB,IAAI,CAAC,aAAa,EAAE,CAAC;QACrB,IAAI,IAAI,CAAC,UAAU;YAAE,IAAI,CAAC,UAAU,CAAC,aAAa,EAAE,CAAC;IACvD,CAAC;IAED,4CAA4C;IAE5C,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;YACjB,EAAE,EAAE,IAAI,CAAC,EAAE;YACX,OAAO,EAAE,IAAI,CAAC,OAAO;SACtB,CAAC,CAAC;IACL,CAAC;CAGF;AAzFD,gCAyFC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AbstractLight } from '../AbstractLight';
|
|
2
2
|
import { Color } from '@shapediver/viewer.shared.types';
|
|
3
3
|
import { ISpotLight } from '../../interface/types/ISpotLight';
|
|
4
|
-
import {
|
|
4
|
+
import { vec3 } from 'gl-matrix';
|
|
5
5
|
export declare class SpotLight extends AbstractLight implements ISpotLight {
|
|
6
6
|
#private;
|
|
7
7
|
constructor(properties: {
|
|
@@ -30,9 +30,6 @@ export declare class SpotLight extends AbstractLight implements ISpotLight {
|
|
|
30
30
|
set position(value: vec3);
|
|
31
31
|
get target(): vec3;
|
|
32
32
|
set target(value: vec3);
|
|
33
|
-
get threeJsObject(): {
|
|
34
|
-
[key: string]: THREE.SpotLight;
|
|
35
|
-
};
|
|
36
33
|
clone(): ISpotLight;
|
|
37
34
|
}
|
|
38
35
|
//# sourceMappingURL=SpotLight.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SpotLight.d.ts","sourceRoot":"","sources":["../../../src/implementation/types/SpotLight.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SpotLight.d.ts","sourceRoot":"","sources":["../../../src/implementation/types/SpotLight.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,KAAK,EAAE,MAAM,iCAAiC,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAE9D,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,qBAAa,SAAU,SAAQ,aAAc,YAAW,UAAU;;gBAcpD,UAAU,EAAE;QACtB,KAAK,CAAC,EAAE,KAAK,CAAC;QACd,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,CAAC;QACZ,OAAO,CAAC,EAAE,MAAM,CAAA;KACjB;IAsBD,IAAW,KAAK,IAAI,MAAM,CAEzB;IAED,IAAW,KAAK,CAAC,KAAK,EAAE,MAAM,EAI7B;IAED,IAAW,KAAK,IAAI,MAAM,CAEzB;IAED,IAAW,KAAK,CAAC,KAAK,EAAE,MAAM,EAI7B;IAED,IAAW,QAAQ,IAAI,MAAM,CAE5B;IAED,IAAW,QAAQ,CAAC,KAAK,EAAE,MAAM,EAIhC;IAED,IAAW,QAAQ,IAAI,MAAM,CAE5B;IAED,IAAW,QAAQ,CAAC,KAAK,EAAE,MAAM,EAIhC;IAED,IAAW,QAAQ,IAAI,IAAI,CAE1B;IAED,IAAW,QAAQ,CAAC,KAAK,EAAE,IAAI,EAI9B;IAED,IAAW,MAAM,IAAI,IAAI,CAExB;IAED,IAAW,MAAM,CAAC,KAAK,EAAE,IAAI,EAI5B;IAMM,KAAK,IAAI,UAAU;CAkB3B"}
|
|
@@ -10,12 +10,12 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
10
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
11
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
12
12
|
};
|
|
13
|
-
var _SpotLight_angle, _SpotLight_decay, _SpotLight_distance, _SpotLight_penumbra, _SpotLight_position, _SpotLight_target
|
|
13
|
+
var _SpotLight_angle, _SpotLight_decay, _SpotLight_distance, _SpotLight_penumbra, _SpotLight_position, _SpotLight_target;
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.SpotLight = void 0;
|
|
16
|
-
const gl_matrix_1 = require("gl-matrix");
|
|
17
|
-
const ILight_1 = require("../../interface/ILight");
|
|
18
16
|
const AbstractLight_1 = require("../AbstractLight");
|
|
17
|
+
const ILight_1 = require("../../interface/ILight");
|
|
18
|
+
const gl_matrix_1 = require("gl-matrix");
|
|
19
19
|
class SpotLight extends AbstractLight_1.AbstractLight {
|
|
20
20
|
// #endregion Properties (6)
|
|
21
21
|
// #region Constructors (1)
|
|
@@ -36,7 +36,6 @@ class SpotLight extends AbstractLight_1.AbstractLight {
|
|
|
36
36
|
_SpotLight_penumbra.set(this, 0.5);
|
|
37
37
|
_SpotLight_position.set(this, gl_matrix_1.vec3.fromValues(-1, 0, 1));
|
|
38
38
|
_SpotLight_target.set(this, gl_matrix_1.vec3.fromValues(0, 0, 0));
|
|
39
|
-
_SpotLight_threeJsObject.set(this, {});
|
|
40
39
|
if (properties.position)
|
|
41
40
|
__classPrivateFieldSet(this, _SpotLight_position, properties.position, "f");
|
|
42
41
|
if (properties.target)
|
|
@@ -51,7 +50,7 @@ class SpotLight extends AbstractLight_1.AbstractLight {
|
|
|
51
50
|
__classPrivateFieldSet(this, _SpotLight_penumbra, properties.penumbra, "f");
|
|
52
51
|
}
|
|
53
52
|
// #endregion Constructors (1)
|
|
54
|
-
// #region Public
|
|
53
|
+
// #region Public Getters And Setters (12)
|
|
55
54
|
get angle() {
|
|
56
55
|
return __classPrivateFieldGet(this, _SpotLight_angle, "f");
|
|
57
56
|
}
|
|
@@ -106,10 +105,7 @@ class SpotLight extends AbstractLight_1.AbstractLight {
|
|
|
106
105
|
if (this.parentNode)
|
|
107
106
|
this.parentNode.updateVersion();
|
|
108
107
|
}
|
|
109
|
-
|
|
110
|
-
return __classPrivateFieldGet(this, _SpotLight_threeJsObject, "f");
|
|
111
|
-
}
|
|
112
|
-
// #endregion Public Accessors (12)
|
|
108
|
+
// #endregion Public Getters And Setters (12)
|
|
113
109
|
// #region Public Methods (1)
|
|
114
110
|
clone() {
|
|
115
111
|
return new SpotLight({
|
|
@@ -129,5 +125,5 @@ class SpotLight extends AbstractLight_1.AbstractLight {
|
|
|
129
125
|
}
|
|
130
126
|
}
|
|
131
127
|
exports.SpotLight = SpotLight;
|
|
132
|
-
_SpotLight_angle = new WeakMap(), _SpotLight_decay = new WeakMap(), _SpotLight_distance = new WeakMap(), _SpotLight_penumbra = new WeakMap(), _SpotLight_position = new WeakMap(), _SpotLight_target = new WeakMap()
|
|
128
|
+
_SpotLight_angle = new WeakMap(), _SpotLight_decay = new WeakMap(), _SpotLight_distance = new WeakMap(), _SpotLight_penumbra = new WeakMap(), _SpotLight_position = new WeakMap(), _SpotLight_target = new WeakMap();
|
|
133
129
|
//# sourceMappingURL=SpotLight.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SpotLight.js","sourceRoot":"","sources":["../../../src/implementation/types/SpotLight.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"SpotLight.js","sourceRoot":"","sources":["../../../src/implementation/types/SpotLight.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,oDAAiD;AAGjD,mDAAoD;AACpD,yCAAiC;AAEjC,MAAa,SAAU,SAAQ,6BAAa;IAU1C,4BAA4B;IAE5B,2BAA2B;IAE3B,YAAY,UAaX;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,CAAC;YACxE,IAAI,EAAE,mBAAU,CAAC,IAAI;YACrB,IAAI,EAAE,UAAU,CAAC,IAAI;YACrB,KAAK,EAAE,UAAU,CAAC,KAAK;YACvB,EAAE,EAAE,UAAU,CAAC,EAAE;YACjB,OAAO,EAAE,UAAU,CAAC,OAAO;SAC5B,CAAC,CAAC;QAnCL,yBAAyB;QAEzB,2BAAiB,IAAI,CAAC,EAAE,GAAG,GAAG,EAAC;QAC/B,2BAAiB,CAAC,EAAC;QACnB,8BAAoB,CAAC,EAAC;QACtB,8BAAoB,GAAG,EAAC;QACxB,8BAAkB,gBAAI,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EAAC;QAC5C,4BAAgB,gBAAI,CAAC,UAAU,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EAAC;QA6BvC,IAAI,UAAU,CAAC,QAAQ;YAAE,uBAAA,IAAI,uBAAa,UAAU,CAAC,QAAQ,MAAA,CAAC;QAC9D,IAAI,UAAU,CAAC,MAAM;YAAE,uBAAA,IAAI,qBAAW,UAAU,CAAC,MAAM,MAAA,CAAC;QACxD,IAAI,UAAU,CAAC,QAAQ;YAAE,uBAAA,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AAC,OAAO;SACtB,CAAC,CAAC;IACL,CAAC;CAGF;AAnID,8BAmIC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shapediver/viewer.rendering-engine.light-engine",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"author": "Michael Oppitz <michael@shapediver.com>",
|
|
@@ -39,12 +39,12 @@
|
|
|
39
39
|
"testEnvironment": "node"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@shapediver/viewer.rendering-engine.rendering-engine": "
|
|
43
|
-
"@shapediver/viewer.settings": "0.
|
|
44
|
-
"@shapediver/viewer.shared.node-tree": "
|
|
45
|
-
"@shapediver/viewer.shared.services": "
|
|
46
|
-
"@shapediver/viewer.shared.types": "
|
|
42
|
+
"@shapediver/viewer.rendering-engine.rendering-engine": "3.0.0",
|
|
43
|
+
"@shapediver/viewer.settings": "1.0.1",
|
|
44
|
+
"@shapediver/viewer.shared.node-tree": "3.0.0",
|
|
45
|
+
"@shapediver/viewer.shared.services": "3.0.0",
|
|
46
|
+
"@shapediver/viewer.shared.types": "3.0.0",
|
|
47
47
|
"gl-matrix": "3.3.0"
|
|
48
48
|
},
|
|
49
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "b6b0010bf5d5652aa338df8016405d97f33fcabb"
|
|
50
50
|
}
|
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
import { ILight, LIGHT_TYPE } from '../interface/ILight'
|
|
6
|
-
import { Color } from '@shapediver/viewer.shared.types'
|
|
1
|
+
import { AbstractTreeNodeData, ITreeNode } from '@shapediver/viewer.shared.node-tree';
|
|
2
|
+
import { Color } from '@shapediver/viewer.shared.types';
|
|
3
|
+
import { ILight, LIGHT_TYPE } from '../interface/ILight';
|
|
4
|
+
import { UuidGenerator } from '@shapediver/viewer.shared.services';
|
|
7
5
|
|
|
8
6
|
export abstract class AbstractLight extends AbstractTreeNodeData implements ILight {
|
|
9
|
-
// #region Properties (
|
|
7
|
+
// #region Properties (8)
|
|
10
8
|
|
|
11
9
|
readonly #type: LIGHT_TYPE;
|
|
12
10
|
|
|
@@ -14,12 +12,12 @@ export abstract class AbstractLight extends AbstractTreeNodeData implements ILig
|
|
|
14
12
|
#intensity: number;
|
|
15
13
|
#name?: string;
|
|
16
14
|
#order?: number;
|
|
17
|
-
#useNodeData: boolean = false;
|
|
18
15
|
#parentNode?: ITreeNode;
|
|
16
|
+
#useNodeData: boolean = false;
|
|
19
17
|
|
|
20
18
|
protected readonly _uuidGenerator: UuidGenerator = UuidGenerator.instance;
|
|
21
19
|
|
|
22
|
-
// #endregion Properties (
|
|
20
|
+
// #endregion Properties (8)
|
|
23
21
|
|
|
24
22
|
// #region Constructors (1)
|
|
25
23
|
|
|
@@ -42,7 +40,7 @@ export abstract class AbstractLight extends AbstractTreeNodeData implements ILig
|
|
|
42
40
|
|
|
43
41
|
// #endregion Constructors (1)
|
|
44
42
|
|
|
45
|
-
// #region Public
|
|
43
|
+
// #region Public Getters And Setters (13)
|
|
46
44
|
|
|
47
45
|
public get color(): Color {
|
|
48
46
|
return this.#color;
|
|
@@ -51,7 +49,7 @@ export abstract class AbstractLight extends AbstractTreeNodeData implements ILig
|
|
|
51
49
|
public set color(value: Color) {
|
|
52
50
|
this.#color = value;
|
|
53
51
|
this.updateVersion();
|
|
54
|
-
if(this.parentNode) this.parentNode.updateVersion();
|
|
52
|
+
if (this.parentNode) this.parentNode.updateVersion();
|
|
55
53
|
}
|
|
56
54
|
|
|
57
55
|
public get intensity(): number {
|
|
@@ -61,7 +59,7 @@ export abstract class AbstractLight extends AbstractTreeNodeData implements ILig
|
|
|
61
59
|
public set intensity(value: number) {
|
|
62
60
|
this.#intensity = value;
|
|
63
61
|
this.updateVersion();
|
|
64
|
-
if(this.parentNode) this.parentNode.updateVersion();
|
|
62
|
+
if (this.parentNode) this.parentNode.updateVersion();
|
|
65
63
|
}
|
|
66
64
|
|
|
67
65
|
public get name(): string | undefined {
|
|
@@ -71,7 +69,7 @@ export abstract class AbstractLight extends AbstractTreeNodeData implements ILig
|
|
|
71
69
|
public set name(value: string | undefined) {
|
|
72
70
|
this.#name = value;
|
|
73
71
|
this.updateVersion();
|
|
74
|
-
if(this.parentNode) this.parentNode.updateVersion();
|
|
72
|
+
if (this.parentNode) this.parentNode.updateVersion();
|
|
75
73
|
}
|
|
76
74
|
|
|
77
75
|
public get order(): number | undefined {
|
|
@@ -81,28 +79,28 @@ export abstract class AbstractLight extends AbstractTreeNodeData implements ILig
|
|
|
81
79
|
public set order(value: number | undefined) {
|
|
82
80
|
this.#order = value;
|
|
83
81
|
this.updateVersion();
|
|
84
|
-
if(this.parentNode) this.parentNode.updateVersion();
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
public set parentNode(value: ITreeNode | undefined) {
|
|
88
|
-
this.#parentNode = value;
|
|
82
|
+
if (this.parentNode) this.parentNode.updateVersion();
|
|
89
83
|
}
|
|
90
84
|
|
|
91
85
|
public get parentNode(): ITreeNode | undefined {
|
|
92
86
|
return this.#parentNode;
|
|
93
87
|
}
|
|
94
88
|
|
|
95
|
-
public
|
|
96
|
-
|
|
89
|
+
public set parentNode(value: ITreeNode | undefined) {
|
|
90
|
+
this.#parentNode = value;
|
|
97
91
|
}
|
|
98
92
|
|
|
99
|
-
public
|
|
100
|
-
this.#
|
|
93
|
+
public get type(): LIGHT_TYPE {
|
|
94
|
+
return this.#type;
|
|
101
95
|
}
|
|
102
96
|
|
|
103
97
|
public get useNodeData(): boolean {
|
|
104
98
|
return this.#useNodeData;
|
|
105
99
|
}
|
|
106
100
|
|
|
107
|
-
|
|
101
|
+
public set useNodeData(value: boolean) {
|
|
102
|
+
this.#useNodeData = value;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
// #endregion Public Getters And Setters (13)
|
|
108
106
|
}
|