@shapediver/viewer.viewport 3.16.7 → 3.16.9
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/PostProcessingApi.d.ts +37 -37
- package/dist/implementation/PostProcessingApi.js +149 -149
- package/dist/implementation/PostProcessingApi.js.map +1 -1
- package/dist/implementation/ViewportApi.d.ts +217 -217
- package/dist/implementation/ViewportApi.js +1003 -993
- package/dist/implementation/ViewportApi.js.map +1 -1
- package/dist/implementation/camera/AbstractCameraApi.d.ts +140 -140
- package/dist/implementation/camera/AbstractCameraApi.js +478 -478
- package/dist/implementation/camera/AbstractCameraApi.js.map +1 -1
- package/dist/implementation/camera/OrthographicCameraApi.d.ts +10 -10
- package/dist/implementation/camera/OrthographicCameraApi.js +47 -47
- package/dist/implementation/camera/OrthographicCameraApi.js.map +1 -1
- package/dist/implementation/camera/PerspectiveCameraApi.d.ts +10 -10
- package/dist/implementation/camera/PerspectiveCameraApi.js +46 -46
- package/dist/implementation/camera/PerspectiveCameraApi.js.map +1 -1
- package/dist/implementation/lights/AbstractLightApi.d.ts +19 -19
- package/dist/implementation/lights/AbstractLightApi.js +80 -80
- package/dist/implementation/lights/AbstractLightApi.js.map +1 -1
- package/dist/implementation/lights/LightSceneApi.d.ts +68 -68
- package/dist/implementation/lights/LightSceneApi.js +171 -171
- package/dist/implementation/lights/LightSceneApi.js.map +1 -1
- package/dist/implementation/lights/types/AmbientLightApi.d.ts +8 -8
- package/dist/implementation/lights/types/AmbientLightApi.js +26 -26
- package/dist/implementation/lights/types/AmbientLightApi.js.map +1 -1
- package/dist/implementation/lights/types/DirectionalLightApi.d.ts +17 -17
- package/dist/implementation/lights/types/DirectionalLightApi.js +76 -76
- package/dist/implementation/lights/types/DirectionalLightApi.js.map +1 -1
- package/dist/implementation/lights/types/HemisphereLightApi.d.ts +11 -11
- package/dist/implementation/lights/types/HemisphereLightApi.js +46 -46
- package/dist/implementation/lights/types/HemisphereLightApi.js.map +1 -1
- package/dist/implementation/lights/types/PointLightApi.d.ts +15 -15
- package/dist/implementation/lights/types/PointLightApi.js +66 -66
- package/dist/implementation/lights/types/PointLightApi.js.map +1 -1
- package/dist/implementation/lights/types/SpotLightApi.d.ts +21 -21
- package/dist/implementation/lights/types/SpotLightApi.js +96 -96
- package/dist/implementation/lights/types/SpotLightApi.js.map +1 -1
- package/dist/index.d.ts +52 -52
- package/dist/index.js +189 -189
- package/dist/interfaces/IPostProcessingApi.d.ts +183 -183
- package/dist/interfaces/IPostProcessingApi.js +2 -2
- package/dist/interfaces/IViewportApi.d.ts +699 -699
- package/dist/interfaces/IViewportApi.js +2 -2
- package/dist/interfaces/camera/ICameraApi.d.ts +256 -256
- package/dist/interfaces/camera/ICameraApi.js +2 -2
- package/dist/interfaces/camera/IOrthographicCameraApi.d.ts +13 -13
- package/dist/interfaces/camera/IOrthographicCameraApi.js +2 -2
- package/dist/interfaces/camera/IPerspectiveCameraApi.d.ts +12 -12
- package/dist/interfaces/camera/IPerspectiveCameraApi.js +2 -2
- package/dist/interfaces/lights/ILightApi.d.ts +35 -35
- package/dist/interfaces/lights/ILightApi.js +2 -2
- package/dist/interfaces/lights/ILightSceneApi.d.ts +138 -138
- package/dist/interfaces/lights/ILightSceneApi.js +2 -2
- package/dist/interfaces/lights/types/IAmbientLightApi.d.ts +6 -6
- package/dist/interfaces/lights/types/IAmbientLightApi.d.ts.map +1 -1
- package/dist/interfaces/lights/types/IAmbientLightApi.js +2 -2
- package/dist/interfaces/lights/types/IDirectionalLightApi.d.ts +24 -24
- package/dist/interfaces/lights/types/IDirectionalLightApi.js +2 -2
- package/dist/interfaces/lights/types/IHemisphereLightApi.d.ts +12 -12
- package/dist/interfaces/lights/types/IHemisphereLightApi.js +2 -2
- package/dist/interfaces/lights/types/IPointLightApi.d.ts +20 -20
- package/dist/interfaces/lights/types/IPointLightApi.js +2 -2
- package/dist/interfaces/lights/types/ISpotLightApi.d.ts +32 -32
- package/dist/interfaces/lights/types/ISpotLightApi.js +2 -2
- package/dist/main.d.ts +30 -30
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +91 -91
- package/dist/main.js.map +1 -1
- package/package.json +20 -20
|
@@ -1,69 +1,69 @@
|
|
|
1
|
-
import { ILightScene } from "@shapediver/viewer.rendering-engine.light-engine";
|
|
2
|
-
import { ITreeNode } from "@shapediver/viewer.shared.node-tree";
|
|
3
|
-
import { Color } from "@shapediver/viewer.shared.types";
|
|
4
|
-
import { vec3 } from "gl-matrix";
|
|
5
|
-
import { IViewportApi } from "../../interfaces/IViewportApi";
|
|
6
|
-
import { ILightApi } from "../../interfaces/lights/ILightApi";
|
|
7
|
-
import { ILightSceneApi } from "../../interfaces/lights/ILightSceneApi";
|
|
8
|
-
import { IAmbientLightApi } from "../../interfaces/lights/types/IAmbientLightApi";
|
|
9
|
-
import { IDirectionalLightApi } from "../../interfaces/lights/types/IDirectionalLightApi";
|
|
10
|
-
import { IHemisphereLightApi } from "../../interfaces/lights/types/IHemisphereLightApi";
|
|
11
|
-
import { IPointLightApi } from "../../interfaces/lights/types/IPointLightApi";
|
|
12
|
-
import { ISpotLightApi } from "../../interfaces/lights/types/ISpotLightApi";
|
|
13
|
-
export declare class LightSceneApi implements ILightSceneApi {
|
|
14
|
-
#private;
|
|
15
|
-
constructor(viewportApi: IViewportApi, lightScene: ILightScene);
|
|
16
|
-
get id(): string;
|
|
17
|
-
get lights(): {
|
|
18
|
-
[key: string]: ILightApi;
|
|
19
|
-
};
|
|
20
|
-
get name(): string | undefined;
|
|
21
|
-
set name(value: string | undefined);
|
|
22
|
-
get node(): ITreeNode;
|
|
23
|
-
addAmbientLight(properties: {
|
|
24
|
-
color?: Color | undefined;
|
|
25
|
-
intensity?: number | undefined;
|
|
26
|
-
id?: string | undefined;
|
|
27
|
-
name?: string | undefined;
|
|
28
|
-
}): IAmbientLightApi;
|
|
29
|
-
addDirectionalLight(properties: {
|
|
30
|
-
color?: Color | undefined;
|
|
31
|
-
intensity?: number | undefined;
|
|
32
|
-
direction?: vec3 | undefined;
|
|
33
|
-
castShadow?: boolean | undefined;
|
|
34
|
-
shadowMapResolution?: number | undefined;
|
|
35
|
-
shadowMapBias?: number | undefined;
|
|
36
|
-
id?: string | undefined;
|
|
37
|
-
name?: string | undefined;
|
|
38
|
-
}): IDirectionalLightApi;
|
|
39
|
-
addHemisphereLight(properties: {
|
|
40
|
-
color?: Color | undefined;
|
|
41
|
-
intensity?: number | undefined;
|
|
42
|
-
groundColor?: Color | undefined;
|
|
43
|
-
id?: string | undefined;
|
|
44
|
-
name?: string | undefined;
|
|
45
|
-
}): IHemisphereLightApi;
|
|
46
|
-
addPointLight(properties: {
|
|
47
|
-
color?: Color | undefined;
|
|
48
|
-
intensity?: number | undefined;
|
|
49
|
-
position?: vec3 | undefined;
|
|
50
|
-
distance?: number | undefined;
|
|
51
|
-
decay?: number | undefined;
|
|
52
|
-
id?: string | undefined;
|
|
53
|
-
name?: string | undefined;
|
|
54
|
-
}): IPointLightApi;
|
|
55
|
-
addSpotLight(properties: {
|
|
56
|
-
color?: Color | undefined;
|
|
57
|
-
intensity?: number | undefined;
|
|
58
|
-
position?: vec3 | undefined;
|
|
59
|
-
target?: vec3 | undefined;
|
|
60
|
-
distance?: number | undefined;
|
|
61
|
-
decay?: number | undefined;
|
|
62
|
-
angle?: number | undefined;
|
|
63
|
-
penumbra?: number | undefined;
|
|
64
|
-
id?: string | undefined;
|
|
65
|
-
name?: string | undefined;
|
|
66
|
-
}): ISpotLightApi;
|
|
67
|
-
removeLight(id: string): boolean;
|
|
68
|
-
}
|
|
1
|
+
import { ILightScene } from "@shapediver/viewer.rendering-engine.light-engine";
|
|
2
|
+
import { ITreeNode } from "@shapediver/viewer.shared.node-tree";
|
|
3
|
+
import { Color } from "@shapediver/viewer.shared.types";
|
|
4
|
+
import { vec3 } from "gl-matrix";
|
|
5
|
+
import { IViewportApi } from "../../interfaces/IViewportApi";
|
|
6
|
+
import { ILightApi } from "../../interfaces/lights/ILightApi";
|
|
7
|
+
import { ILightSceneApi } from "../../interfaces/lights/ILightSceneApi";
|
|
8
|
+
import { IAmbientLightApi } from "../../interfaces/lights/types/IAmbientLightApi";
|
|
9
|
+
import { IDirectionalLightApi } from "../../interfaces/lights/types/IDirectionalLightApi";
|
|
10
|
+
import { IHemisphereLightApi } from "../../interfaces/lights/types/IHemisphereLightApi";
|
|
11
|
+
import { IPointLightApi } from "../../interfaces/lights/types/IPointLightApi";
|
|
12
|
+
import { ISpotLightApi } from "../../interfaces/lights/types/ISpotLightApi";
|
|
13
|
+
export declare class LightSceneApi implements ILightSceneApi {
|
|
14
|
+
#private;
|
|
15
|
+
constructor(viewportApi: IViewportApi, lightScene: ILightScene);
|
|
16
|
+
get id(): string;
|
|
17
|
+
get lights(): {
|
|
18
|
+
[key: string]: ILightApi;
|
|
19
|
+
};
|
|
20
|
+
get name(): string | undefined;
|
|
21
|
+
set name(value: string | undefined);
|
|
22
|
+
get node(): ITreeNode;
|
|
23
|
+
addAmbientLight(properties: {
|
|
24
|
+
color?: Color | undefined;
|
|
25
|
+
intensity?: number | undefined;
|
|
26
|
+
id?: string | undefined;
|
|
27
|
+
name?: string | undefined;
|
|
28
|
+
}): IAmbientLightApi;
|
|
29
|
+
addDirectionalLight(properties: {
|
|
30
|
+
color?: Color | undefined;
|
|
31
|
+
intensity?: number | undefined;
|
|
32
|
+
direction?: vec3 | undefined;
|
|
33
|
+
castShadow?: boolean | undefined;
|
|
34
|
+
shadowMapResolution?: number | undefined;
|
|
35
|
+
shadowMapBias?: number | undefined;
|
|
36
|
+
id?: string | undefined;
|
|
37
|
+
name?: string | undefined;
|
|
38
|
+
}): IDirectionalLightApi;
|
|
39
|
+
addHemisphereLight(properties: {
|
|
40
|
+
color?: Color | undefined;
|
|
41
|
+
intensity?: number | undefined;
|
|
42
|
+
groundColor?: Color | undefined;
|
|
43
|
+
id?: string | undefined;
|
|
44
|
+
name?: string | undefined;
|
|
45
|
+
}): IHemisphereLightApi;
|
|
46
|
+
addPointLight(properties: {
|
|
47
|
+
color?: Color | undefined;
|
|
48
|
+
intensity?: number | undefined;
|
|
49
|
+
position?: vec3 | undefined;
|
|
50
|
+
distance?: number | undefined;
|
|
51
|
+
decay?: number | undefined;
|
|
52
|
+
id?: string | undefined;
|
|
53
|
+
name?: string | undefined;
|
|
54
|
+
}): IPointLightApi;
|
|
55
|
+
addSpotLight(properties: {
|
|
56
|
+
color?: Color | undefined;
|
|
57
|
+
intensity?: number | undefined;
|
|
58
|
+
position?: vec3 | undefined;
|
|
59
|
+
target?: vec3 | undefined;
|
|
60
|
+
distance?: number | undefined;
|
|
61
|
+
decay?: number | undefined;
|
|
62
|
+
angle?: number | undefined;
|
|
63
|
+
penumbra?: number | undefined;
|
|
64
|
+
id?: string | undefined;
|
|
65
|
+
name?: string | undefined;
|
|
66
|
+
}): ISpotLightApi;
|
|
67
|
+
removeLight(id: string): boolean;
|
|
68
|
+
}
|
|
69
69
|
//# sourceMappingURL=LightSceneApi.d.ts.map
|
|
@@ -1,172 +1,172 @@
|
|
|
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 _LightSceneApi_inputValidator, _LightSceneApi_lightScene, _LightSceneApi_lights, _LightSceneApi_logger, _LightSceneApi_viewportApi;
|
|
14
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.LightSceneApi = void 0;
|
|
16
|
-
const viewer_rendering_engine_light_engine_1 = require("@shapediver/viewer.rendering-engine.light-engine");
|
|
17
|
-
const viewer_shared_services_1 = require("@shapediver/viewer.shared.services");
|
|
18
|
-
const AmbientLightApi_1 = require("./types/AmbientLightApi");
|
|
19
|
-
const DirectionalLightApi_1 = require("./types/DirectionalLightApi");
|
|
20
|
-
const HemisphereLightApi_1 = require("./types/HemisphereLightApi");
|
|
21
|
-
const PointLightApi_1 = require("./types/PointLightApi");
|
|
22
|
-
const SpotLightApi_1 = require("./types/SpotLightApi");
|
|
23
|
-
class LightSceneApi {
|
|
24
|
-
// #endregion Properties (5)
|
|
25
|
-
// #region Constructors (1)
|
|
26
|
-
constructor(viewportApi, lightScene) {
|
|
27
|
-
// #region Properties (5)
|
|
28
|
-
_LightSceneApi_inputValidator.set(this, viewer_shared_services_1.InputValidator.instance);
|
|
29
|
-
_LightSceneApi_lightScene.set(this, void 0);
|
|
30
|
-
_LightSceneApi_lights.set(this, {});
|
|
31
|
-
_LightSceneApi_logger.set(this, viewer_shared_services_1.Logger.instance);
|
|
32
|
-
_LightSceneApi_viewportApi.set(this, void 0);
|
|
33
|
-
__classPrivateFieldSet(this, _LightSceneApi_viewportApi, viewportApi, "f");
|
|
34
|
-
__classPrivateFieldSet(this, _LightSceneApi_lightScene, lightScene, "f");
|
|
35
|
-
// Whenever a light is added or removed from the light scene, this update is called.
|
|
36
|
-
__classPrivateFieldGet(this, _LightSceneApi_lightScene, "f").update = () => {
|
|
37
|
-
for (const l in __classPrivateFieldGet(this, _LightSceneApi_lightScene, "f").lights) {
|
|
38
|
-
if (!__classPrivateFieldGet(this, _LightSceneApi_lights, "f")[l]) {
|
|
39
|
-
switch (__classPrivateFieldGet(this, _LightSceneApi_lightScene, "f").lights[l].type) {
|
|
40
|
-
case viewer_rendering_engine_light_engine_1.LIGHT_TYPE.AMBIENT:
|
|
41
|
-
__classPrivateFieldGet(this, _LightSceneApi_lights, "f")[l] = new AmbientLightApi_1.AmbientLightApi(__classPrivateFieldGet(this, _LightSceneApi_viewportApi, "f"), __classPrivateFieldGet(this, _LightSceneApi_lightScene, "f").lights[l]);
|
|
42
|
-
break;
|
|
43
|
-
case viewer_rendering_engine_light_engine_1.LIGHT_TYPE.DIRECTIONAL:
|
|
44
|
-
__classPrivateFieldGet(this, _LightSceneApi_lights, "f")[l] = new DirectionalLightApi_1.DirectionalLightApi(__classPrivateFieldGet(this, _LightSceneApi_viewportApi, "f"), __classPrivateFieldGet(this, _LightSceneApi_lightScene, "f").lights[l]);
|
|
45
|
-
break;
|
|
46
|
-
case viewer_rendering_engine_light_engine_1.LIGHT_TYPE.HEMISPHERE:
|
|
47
|
-
__classPrivateFieldGet(this, _LightSceneApi_lights, "f")[l] = new HemisphereLightApi_1.HemisphereLightApi(__classPrivateFieldGet(this, _LightSceneApi_viewportApi, "f"), __classPrivateFieldGet(this, _LightSceneApi_lightScene, "f").lights[l]);
|
|
48
|
-
break;
|
|
49
|
-
case viewer_rendering_engine_light_engine_1.LIGHT_TYPE.POINT:
|
|
50
|
-
__classPrivateFieldGet(this, _LightSceneApi_lights, "f")[l] = new PointLightApi_1.PointLightApi(__classPrivateFieldGet(this, _LightSceneApi_viewportApi, "f"), __classPrivateFieldGet(this, _LightSceneApi_lightScene, "f").lights[l]);
|
|
51
|
-
break;
|
|
52
|
-
case viewer_rendering_engine_light_engine_1.LIGHT_TYPE.SPOT:
|
|
53
|
-
__classPrivateFieldGet(this, _LightSceneApi_lights, "f")[l] = new SpotLightApi_1.SpotLightApi(__classPrivateFieldGet(this, _LightSceneApi_viewportApi, "f"), __classPrivateFieldGet(this, _LightSceneApi_lightScene, "f").lights[l]);
|
|
54
|
-
break;
|
|
55
|
-
default:
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
for (const l in __classPrivateFieldGet(this, _LightSceneApi_lights, "f")) {
|
|
60
|
-
if (!__classPrivateFieldGet(this, _LightSceneApi_lightScene, "f").lights[l]) {
|
|
61
|
-
delete __classPrivateFieldGet(this, _LightSceneApi_lights, "f")[l];
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
};
|
|
65
|
-
// We call it once in the beginning to get the current state.
|
|
66
|
-
__classPrivateFieldGet(this, _LightSceneApi_lightScene, "f").update();
|
|
67
|
-
}
|
|
68
|
-
// #endregion Constructors (1)
|
|
69
|
-
// #region Public Getters And Setters (5)
|
|
70
|
-
get id() {
|
|
71
|
-
return __classPrivateFieldGet(this, _LightSceneApi_lightScene, "f").id;
|
|
72
|
-
}
|
|
73
|
-
get lights() {
|
|
74
|
-
return __classPrivateFieldGet(this, _LightSceneApi_lights, "f");
|
|
75
|
-
}
|
|
76
|
-
get name() {
|
|
77
|
-
return __classPrivateFieldGet(this, _LightSceneApi_lightScene, "f").name;
|
|
78
|
-
}
|
|
79
|
-
set name(value) {
|
|
80
|
-
const scope = "name";
|
|
81
|
-
__classPrivateFieldGet(this, _LightSceneApi_inputValidator, "f").validateAndError(`LightSceneApi.${scope}`, value, "string", false);
|
|
82
|
-
__classPrivateFieldGet(this, _LightSceneApi_lightScene, "f").name = value;
|
|
83
|
-
__classPrivateFieldGet(this, _LightSceneApi_logger, "f").debug(`LightSceneApi.${scope}: ${scope} was set to: ${value}`);
|
|
84
|
-
}
|
|
85
|
-
get node() {
|
|
86
|
-
return __classPrivateFieldGet(this, _LightSceneApi_lightScene, "f").node;
|
|
87
|
-
}
|
|
88
|
-
// #endregion Public Getters And Setters (5)
|
|
89
|
-
// #region Public Methods (6)
|
|
90
|
-
addAmbientLight(properties) {
|
|
91
|
-
const scope = "addAmbientLight";
|
|
92
|
-
__classPrivateFieldGet(this, _LightSceneApi_inputValidator, "f").validateAndError(`LightSceneApi.${scope}`, properties, "object", false);
|
|
93
|
-
const prop = Object.assign({}, properties);
|
|
94
|
-
__classPrivateFieldGet(this, _LightSceneApi_inputValidator, "f").validateAndError(`LightSceneApi.${scope}`, prop.color, "color", false);
|
|
95
|
-
__classPrivateFieldGet(this, _LightSceneApi_inputValidator, "f").validateAndError(`LightSceneApi.${scope}`, prop.intensity, "number", false);
|
|
96
|
-
__classPrivateFieldGet(this, _LightSceneApi_inputValidator, "f").validateAndError(`LightSceneApi.${scope}`, prop.id, "string", false);
|
|
97
|
-
__classPrivateFieldGet(this, _LightSceneApi_inputValidator, "f").validateAndError(`LightSceneApi.${scope}`, prop.name, "string", false);
|
|
98
|
-
const light = __classPrivateFieldGet(this, _LightSceneApi_lightScene, "f").addAmbientLight(properties);
|
|
99
|
-
__classPrivateFieldGet(this, _LightSceneApi_viewportApi, "f").update();
|
|
100
|
-
return __classPrivateFieldGet(this, _LightSceneApi_lights, "f")[light.id];
|
|
101
|
-
}
|
|
102
|
-
addDirectionalLight(properties) {
|
|
103
|
-
const scope = "addDirectionalLight";
|
|
104
|
-
__classPrivateFieldGet(this, _LightSceneApi_inputValidator, "f").validateAndError(`LightSceneApi.${scope}`, properties, "object", false);
|
|
105
|
-
const prop = Object.assign({}, properties);
|
|
106
|
-
__classPrivateFieldGet(this, _LightSceneApi_inputValidator, "f").validateAndError(`LightSceneApi.${scope}`, prop.color, "color", false);
|
|
107
|
-
__classPrivateFieldGet(this, _LightSceneApi_inputValidator, "f").validateAndError(`LightSceneApi.${scope}`, prop.intensity, "number", false);
|
|
108
|
-
__classPrivateFieldGet(this, _LightSceneApi_inputValidator, "f").validateAndError(`LightSceneApi.${scope}`, prop.direction, "vec3", false);
|
|
109
|
-
__classPrivateFieldGet(this, _LightSceneApi_inputValidator, "f").validateAndError(`LightSceneApi.${scope}`, prop.castShadow, "boolean", false);
|
|
110
|
-
__classPrivateFieldGet(this, _LightSceneApi_inputValidator, "f").validateAndError(`LightSceneApi.${scope}`, prop.shadowMapResolution, "number", false);
|
|
111
|
-
__classPrivateFieldGet(this, _LightSceneApi_inputValidator, "f").validateAndError(`LightSceneApi.${scope}`, prop.shadowMapBias, "number", false);
|
|
112
|
-
__classPrivateFieldGet(this, _LightSceneApi_inputValidator, "f").validateAndError(`LightSceneApi.${scope}`, prop.id, "string", false);
|
|
113
|
-
__classPrivateFieldGet(this, _LightSceneApi_inputValidator, "f").validateAndError(`LightSceneApi.${scope}`, prop.name, "string", false);
|
|
114
|
-
const light = __classPrivateFieldGet(this, _LightSceneApi_lightScene, "f").addDirectionalLight(properties);
|
|
115
|
-
__classPrivateFieldGet(this, _LightSceneApi_viewportApi, "f").update();
|
|
116
|
-
return __classPrivateFieldGet(this, _LightSceneApi_lights, "f")[light.id];
|
|
117
|
-
}
|
|
118
|
-
addHemisphereLight(properties) {
|
|
119
|
-
const scope = "addHemisphereLight";
|
|
120
|
-
__classPrivateFieldGet(this, _LightSceneApi_inputValidator, "f").validateAndError(`LightSceneApi.${scope}`, properties, "object", false);
|
|
121
|
-
const prop = Object.assign({}, properties);
|
|
122
|
-
__classPrivateFieldGet(this, _LightSceneApi_inputValidator, "f").validateAndError(`LightSceneApi.${scope}`, prop.color, "color", false);
|
|
123
|
-
__classPrivateFieldGet(this, _LightSceneApi_inputValidator, "f").validateAndError(`LightSceneApi.${scope}`, prop.intensity, "number", false);
|
|
124
|
-
__classPrivateFieldGet(this, _LightSceneApi_inputValidator, "f").validateAndError(`LightSceneApi.${scope}`, prop.groundColor, "color", false);
|
|
125
|
-
__classPrivateFieldGet(this, _LightSceneApi_inputValidator, "f").validateAndError(`LightSceneApi.${scope}`, prop.id, "string", false);
|
|
126
|
-
__classPrivateFieldGet(this, _LightSceneApi_inputValidator, "f").validateAndError(`LightSceneApi.${scope}`, prop.name, "string", false);
|
|
127
|
-
const light = __classPrivateFieldGet(this, _LightSceneApi_lightScene, "f").addHemisphereLight(properties);
|
|
128
|
-
__classPrivateFieldGet(this, _LightSceneApi_viewportApi, "f").update();
|
|
129
|
-
return __classPrivateFieldGet(this, _LightSceneApi_lights, "f")[light.id];
|
|
130
|
-
}
|
|
131
|
-
addPointLight(properties) {
|
|
132
|
-
const scope = "addPointLight";
|
|
133
|
-
__classPrivateFieldGet(this, _LightSceneApi_inputValidator, "f").validateAndError(`LightSceneApi.${scope}`, properties, "object", false);
|
|
134
|
-
const prop = Object.assign({}, properties);
|
|
135
|
-
__classPrivateFieldGet(this, _LightSceneApi_inputValidator, "f").validateAndError(`LightSceneApi.${scope}`, prop.color, "color", false);
|
|
136
|
-
__classPrivateFieldGet(this, _LightSceneApi_inputValidator, "f").validateAndError(`LightSceneApi.${scope}`, prop.intensity, "number", false);
|
|
137
|
-
__classPrivateFieldGet(this, _LightSceneApi_inputValidator, "f").validateAndError(`LightSceneApi.${scope}`, prop.position, "vec3", false);
|
|
138
|
-
__classPrivateFieldGet(this, _LightSceneApi_inputValidator, "f").validateAndError(`LightSceneApi.${scope}`, prop.distance, "number", false);
|
|
139
|
-
__classPrivateFieldGet(this, _LightSceneApi_inputValidator, "f").validateAndError(`LightSceneApi.${scope}`, prop.decay, "number", false);
|
|
140
|
-
__classPrivateFieldGet(this, _LightSceneApi_inputValidator, "f").validateAndError(`LightSceneApi.${scope}`, prop.id, "string", false);
|
|
141
|
-
__classPrivateFieldGet(this, _LightSceneApi_inputValidator, "f").validateAndError(`LightSceneApi.${scope}`, prop.name, "string", false);
|
|
142
|
-
const light = __classPrivateFieldGet(this, _LightSceneApi_lightScene, "f").addPointLight(properties);
|
|
143
|
-
__classPrivateFieldGet(this, _LightSceneApi_viewportApi, "f").update();
|
|
144
|
-
return __classPrivateFieldGet(this, _LightSceneApi_lights, "f")[light.id];
|
|
145
|
-
}
|
|
146
|
-
addSpotLight(properties) {
|
|
147
|
-
const scope = "addSpotLight";
|
|
148
|
-
__classPrivateFieldGet(this, _LightSceneApi_inputValidator, "f").validateAndError(`LightSceneApi.${scope}`, properties, "object", false);
|
|
149
|
-
const prop = Object.assign({}, properties);
|
|
150
|
-
__classPrivateFieldGet(this, _LightSceneApi_inputValidator, "f").validateAndError(`LightSceneApi.${scope}`, prop.color, "color", false);
|
|
151
|
-
__classPrivateFieldGet(this, _LightSceneApi_inputValidator, "f").validateAndError(`LightSceneApi.${scope}`, prop.intensity, "number", false);
|
|
152
|
-
__classPrivateFieldGet(this, _LightSceneApi_inputValidator, "f").validateAndError(`LightSceneApi.${scope}`, prop.position, "vec3", false);
|
|
153
|
-
__classPrivateFieldGet(this, _LightSceneApi_inputValidator, "f").validateAndError(`LightSceneApi.${scope}`, prop.target, "vec3", false);
|
|
154
|
-
__classPrivateFieldGet(this, _LightSceneApi_inputValidator, "f").validateAndError(`LightSceneApi.${scope}`, prop.distance, "number", false);
|
|
155
|
-
__classPrivateFieldGet(this, _LightSceneApi_inputValidator, "f").validateAndError(`LightSceneApi.${scope}`, prop.decay, "number", false);
|
|
156
|
-
__classPrivateFieldGet(this, _LightSceneApi_inputValidator, "f").validateAndError(`LightSceneApi.${scope}`, prop.angle, "number", false);
|
|
157
|
-
__classPrivateFieldGet(this, _LightSceneApi_inputValidator, "f").validateAndError(`LightSceneApi.${scope}`, prop.penumbra, "number", false);
|
|
158
|
-
__classPrivateFieldGet(this, _LightSceneApi_inputValidator, "f").validateAndError(`LightSceneApi.${scope}`, prop.id, "string", false);
|
|
159
|
-
__classPrivateFieldGet(this, _LightSceneApi_inputValidator, "f").validateAndError(`LightSceneApi.${scope}`, prop.name, "string", false);
|
|
160
|
-
const light = __classPrivateFieldGet(this, _LightSceneApi_lightScene, "f").addSpotLight(properties);
|
|
161
|
-
__classPrivateFieldGet(this, _LightSceneApi_viewportApi, "f").update();
|
|
162
|
-
return __classPrivateFieldGet(this, _LightSceneApi_lights, "f")[light.id];
|
|
163
|
-
}
|
|
164
|
-
removeLight(id) {
|
|
165
|
-
const check = __classPrivateFieldGet(this, _LightSceneApi_lightScene, "f").removeLight(id);
|
|
166
|
-
__classPrivateFieldGet(this, _LightSceneApi_viewportApi, "f").update();
|
|
167
|
-
return check;
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
exports.LightSceneApi = LightSceneApi;
|
|
171
|
-
_LightSceneApi_inputValidator = new WeakMap(), _LightSceneApi_lightScene = new WeakMap(), _LightSceneApi_lights = new WeakMap(), _LightSceneApi_logger = new WeakMap(), _LightSceneApi_viewportApi = new WeakMap();
|
|
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 _LightSceneApi_inputValidator, _LightSceneApi_lightScene, _LightSceneApi_lights, _LightSceneApi_logger, _LightSceneApi_viewportApi;
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.LightSceneApi = void 0;
|
|
16
|
+
const viewer_rendering_engine_light_engine_1 = require("@shapediver/viewer.rendering-engine.light-engine");
|
|
17
|
+
const viewer_shared_services_1 = require("@shapediver/viewer.shared.services");
|
|
18
|
+
const AmbientLightApi_1 = require("./types/AmbientLightApi");
|
|
19
|
+
const DirectionalLightApi_1 = require("./types/DirectionalLightApi");
|
|
20
|
+
const HemisphereLightApi_1 = require("./types/HemisphereLightApi");
|
|
21
|
+
const PointLightApi_1 = require("./types/PointLightApi");
|
|
22
|
+
const SpotLightApi_1 = require("./types/SpotLightApi");
|
|
23
|
+
class LightSceneApi {
|
|
24
|
+
// #endregion Properties (5)
|
|
25
|
+
// #region Constructors (1)
|
|
26
|
+
constructor(viewportApi, lightScene) {
|
|
27
|
+
// #region Properties (5)
|
|
28
|
+
_LightSceneApi_inputValidator.set(this, viewer_shared_services_1.InputValidator.instance);
|
|
29
|
+
_LightSceneApi_lightScene.set(this, void 0);
|
|
30
|
+
_LightSceneApi_lights.set(this, {});
|
|
31
|
+
_LightSceneApi_logger.set(this, viewer_shared_services_1.Logger.instance);
|
|
32
|
+
_LightSceneApi_viewportApi.set(this, void 0);
|
|
33
|
+
__classPrivateFieldSet(this, _LightSceneApi_viewportApi, viewportApi, "f");
|
|
34
|
+
__classPrivateFieldSet(this, _LightSceneApi_lightScene, lightScene, "f");
|
|
35
|
+
// Whenever a light is added or removed from the light scene, this update is called.
|
|
36
|
+
__classPrivateFieldGet(this, _LightSceneApi_lightScene, "f").update = () => {
|
|
37
|
+
for (const l in __classPrivateFieldGet(this, _LightSceneApi_lightScene, "f").lights) {
|
|
38
|
+
if (!__classPrivateFieldGet(this, _LightSceneApi_lights, "f")[l]) {
|
|
39
|
+
switch (__classPrivateFieldGet(this, _LightSceneApi_lightScene, "f").lights[l].type) {
|
|
40
|
+
case viewer_rendering_engine_light_engine_1.LIGHT_TYPE.AMBIENT:
|
|
41
|
+
__classPrivateFieldGet(this, _LightSceneApi_lights, "f")[l] = new AmbientLightApi_1.AmbientLightApi(__classPrivateFieldGet(this, _LightSceneApi_viewportApi, "f"), __classPrivateFieldGet(this, _LightSceneApi_lightScene, "f").lights[l]);
|
|
42
|
+
break;
|
|
43
|
+
case viewer_rendering_engine_light_engine_1.LIGHT_TYPE.DIRECTIONAL:
|
|
44
|
+
__classPrivateFieldGet(this, _LightSceneApi_lights, "f")[l] = new DirectionalLightApi_1.DirectionalLightApi(__classPrivateFieldGet(this, _LightSceneApi_viewportApi, "f"), __classPrivateFieldGet(this, _LightSceneApi_lightScene, "f").lights[l]);
|
|
45
|
+
break;
|
|
46
|
+
case viewer_rendering_engine_light_engine_1.LIGHT_TYPE.HEMISPHERE:
|
|
47
|
+
__classPrivateFieldGet(this, _LightSceneApi_lights, "f")[l] = new HemisphereLightApi_1.HemisphereLightApi(__classPrivateFieldGet(this, _LightSceneApi_viewportApi, "f"), __classPrivateFieldGet(this, _LightSceneApi_lightScene, "f").lights[l]);
|
|
48
|
+
break;
|
|
49
|
+
case viewer_rendering_engine_light_engine_1.LIGHT_TYPE.POINT:
|
|
50
|
+
__classPrivateFieldGet(this, _LightSceneApi_lights, "f")[l] = new PointLightApi_1.PointLightApi(__classPrivateFieldGet(this, _LightSceneApi_viewportApi, "f"), __classPrivateFieldGet(this, _LightSceneApi_lightScene, "f").lights[l]);
|
|
51
|
+
break;
|
|
52
|
+
case viewer_rendering_engine_light_engine_1.LIGHT_TYPE.SPOT:
|
|
53
|
+
__classPrivateFieldGet(this, _LightSceneApi_lights, "f")[l] = new SpotLightApi_1.SpotLightApi(__classPrivateFieldGet(this, _LightSceneApi_viewportApi, "f"), __classPrivateFieldGet(this, _LightSceneApi_lightScene, "f").lights[l]);
|
|
54
|
+
break;
|
|
55
|
+
default:
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
for (const l in __classPrivateFieldGet(this, _LightSceneApi_lights, "f")) {
|
|
60
|
+
if (!__classPrivateFieldGet(this, _LightSceneApi_lightScene, "f").lights[l]) {
|
|
61
|
+
delete __classPrivateFieldGet(this, _LightSceneApi_lights, "f")[l];
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
// We call it once in the beginning to get the current state.
|
|
66
|
+
__classPrivateFieldGet(this, _LightSceneApi_lightScene, "f").update();
|
|
67
|
+
}
|
|
68
|
+
// #endregion Constructors (1)
|
|
69
|
+
// #region Public Getters And Setters (5)
|
|
70
|
+
get id() {
|
|
71
|
+
return __classPrivateFieldGet(this, _LightSceneApi_lightScene, "f").id;
|
|
72
|
+
}
|
|
73
|
+
get lights() {
|
|
74
|
+
return __classPrivateFieldGet(this, _LightSceneApi_lights, "f");
|
|
75
|
+
}
|
|
76
|
+
get name() {
|
|
77
|
+
return __classPrivateFieldGet(this, _LightSceneApi_lightScene, "f").name;
|
|
78
|
+
}
|
|
79
|
+
set name(value) {
|
|
80
|
+
const scope = "name";
|
|
81
|
+
__classPrivateFieldGet(this, _LightSceneApi_inputValidator, "f").validateAndError(`LightSceneApi.${scope}`, value, "string", false);
|
|
82
|
+
__classPrivateFieldGet(this, _LightSceneApi_lightScene, "f").name = value;
|
|
83
|
+
__classPrivateFieldGet(this, _LightSceneApi_logger, "f").debug(`LightSceneApi.${scope}: ${scope} was set to: ${value}`);
|
|
84
|
+
}
|
|
85
|
+
get node() {
|
|
86
|
+
return __classPrivateFieldGet(this, _LightSceneApi_lightScene, "f").node;
|
|
87
|
+
}
|
|
88
|
+
// #endregion Public Getters And Setters (5)
|
|
89
|
+
// #region Public Methods (6)
|
|
90
|
+
addAmbientLight(properties) {
|
|
91
|
+
const scope = "addAmbientLight";
|
|
92
|
+
__classPrivateFieldGet(this, _LightSceneApi_inputValidator, "f").validateAndError(`LightSceneApi.${scope}`, properties, "object", false);
|
|
93
|
+
const prop = Object.assign({}, properties);
|
|
94
|
+
__classPrivateFieldGet(this, _LightSceneApi_inputValidator, "f").validateAndError(`LightSceneApi.${scope}`, prop.color, "color", false);
|
|
95
|
+
__classPrivateFieldGet(this, _LightSceneApi_inputValidator, "f").validateAndError(`LightSceneApi.${scope}`, prop.intensity, "number", false);
|
|
96
|
+
__classPrivateFieldGet(this, _LightSceneApi_inputValidator, "f").validateAndError(`LightSceneApi.${scope}`, prop.id, "string", false);
|
|
97
|
+
__classPrivateFieldGet(this, _LightSceneApi_inputValidator, "f").validateAndError(`LightSceneApi.${scope}`, prop.name, "string", false);
|
|
98
|
+
const light = __classPrivateFieldGet(this, _LightSceneApi_lightScene, "f").addAmbientLight(properties);
|
|
99
|
+
__classPrivateFieldGet(this, _LightSceneApi_viewportApi, "f").update();
|
|
100
|
+
return __classPrivateFieldGet(this, _LightSceneApi_lights, "f")[light.id];
|
|
101
|
+
}
|
|
102
|
+
addDirectionalLight(properties) {
|
|
103
|
+
const scope = "addDirectionalLight";
|
|
104
|
+
__classPrivateFieldGet(this, _LightSceneApi_inputValidator, "f").validateAndError(`LightSceneApi.${scope}`, properties, "object", false);
|
|
105
|
+
const prop = Object.assign({}, properties);
|
|
106
|
+
__classPrivateFieldGet(this, _LightSceneApi_inputValidator, "f").validateAndError(`LightSceneApi.${scope}`, prop.color, "color", false);
|
|
107
|
+
__classPrivateFieldGet(this, _LightSceneApi_inputValidator, "f").validateAndError(`LightSceneApi.${scope}`, prop.intensity, "number", false);
|
|
108
|
+
__classPrivateFieldGet(this, _LightSceneApi_inputValidator, "f").validateAndError(`LightSceneApi.${scope}`, prop.direction, "vec3", false);
|
|
109
|
+
__classPrivateFieldGet(this, _LightSceneApi_inputValidator, "f").validateAndError(`LightSceneApi.${scope}`, prop.castShadow, "boolean", false);
|
|
110
|
+
__classPrivateFieldGet(this, _LightSceneApi_inputValidator, "f").validateAndError(`LightSceneApi.${scope}`, prop.shadowMapResolution, "number", false);
|
|
111
|
+
__classPrivateFieldGet(this, _LightSceneApi_inputValidator, "f").validateAndError(`LightSceneApi.${scope}`, prop.shadowMapBias, "number", false);
|
|
112
|
+
__classPrivateFieldGet(this, _LightSceneApi_inputValidator, "f").validateAndError(`LightSceneApi.${scope}`, prop.id, "string", false);
|
|
113
|
+
__classPrivateFieldGet(this, _LightSceneApi_inputValidator, "f").validateAndError(`LightSceneApi.${scope}`, prop.name, "string", false);
|
|
114
|
+
const light = __classPrivateFieldGet(this, _LightSceneApi_lightScene, "f").addDirectionalLight(properties);
|
|
115
|
+
__classPrivateFieldGet(this, _LightSceneApi_viewportApi, "f").update();
|
|
116
|
+
return __classPrivateFieldGet(this, _LightSceneApi_lights, "f")[light.id];
|
|
117
|
+
}
|
|
118
|
+
addHemisphereLight(properties) {
|
|
119
|
+
const scope = "addHemisphereLight";
|
|
120
|
+
__classPrivateFieldGet(this, _LightSceneApi_inputValidator, "f").validateAndError(`LightSceneApi.${scope}`, properties, "object", false);
|
|
121
|
+
const prop = Object.assign({}, properties);
|
|
122
|
+
__classPrivateFieldGet(this, _LightSceneApi_inputValidator, "f").validateAndError(`LightSceneApi.${scope}`, prop.color, "color", false);
|
|
123
|
+
__classPrivateFieldGet(this, _LightSceneApi_inputValidator, "f").validateAndError(`LightSceneApi.${scope}`, prop.intensity, "number", false);
|
|
124
|
+
__classPrivateFieldGet(this, _LightSceneApi_inputValidator, "f").validateAndError(`LightSceneApi.${scope}`, prop.groundColor, "color", false);
|
|
125
|
+
__classPrivateFieldGet(this, _LightSceneApi_inputValidator, "f").validateAndError(`LightSceneApi.${scope}`, prop.id, "string", false);
|
|
126
|
+
__classPrivateFieldGet(this, _LightSceneApi_inputValidator, "f").validateAndError(`LightSceneApi.${scope}`, prop.name, "string", false);
|
|
127
|
+
const light = __classPrivateFieldGet(this, _LightSceneApi_lightScene, "f").addHemisphereLight(properties);
|
|
128
|
+
__classPrivateFieldGet(this, _LightSceneApi_viewportApi, "f").update();
|
|
129
|
+
return __classPrivateFieldGet(this, _LightSceneApi_lights, "f")[light.id];
|
|
130
|
+
}
|
|
131
|
+
addPointLight(properties) {
|
|
132
|
+
const scope = "addPointLight";
|
|
133
|
+
__classPrivateFieldGet(this, _LightSceneApi_inputValidator, "f").validateAndError(`LightSceneApi.${scope}`, properties, "object", false);
|
|
134
|
+
const prop = Object.assign({}, properties);
|
|
135
|
+
__classPrivateFieldGet(this, _LightSceneApi_inputValidator, "f").validateAndError(`LightSceneApi.${scope}`, prop.color, "color", false);
|
|
136
|
+
__classPrivateFieldGet(this, _LightSceneApi_inputValidator, "f").validateAndError(`LightSceneApi.${scope}`, prop.intensity, "number", false);
|
|
137
|
+
__classPrivateFieldGet(this, _LightSceneApi_inputValidator, "f").validateAndError(`LightSceneApi.${scope}`, prop.position, "vec3", false);
|
|
138
|
+
__classPrivateFieldGet(this, _LightSceneApi_inputValidator, "f").validateAndError(`LightSceneApi.${scope}`, prop.distance, "number", false);
|
|
139
|
+
__classPrivateFieldGet(this, _LightSceneApi_inputValidator, "f").validateAndError(`LightSceneApi.${scope}`, prop.decay, "number", false);
|
|
140
|
+
__classPrivateFieldGet(this, _LightSceneApi_inputValidator, "f").validateAndError(`LightSceneApi.${scope}`, prop.id, "string", false);
|
|
141
|
+
__classPrivateFieldGet(this, _LightSceneApi_inputValidator, "f").validateAndError(`LightSceneApi.${scope}`, prop.name, "string", false);
|
|
142
|
+
const light = __classPrivateFieldGet(this, _LightSceneApi_lightScene, "f").addPointLight(properties);
|
|
143
|
+
__classPrivateFieldGet(this, _LightSceneApi_viewportApi, "f").update();
|
|
144
|
+
return __classPrivateFieldGet(this, _LightSceneApi_lights, "f")[light.id];
|
|
145
|
+
}
|
|
146
|
+
addSpotLight(properties) {
|
|
147
|
+
const scope = "addSpotLight";
|
|
148
|
+
__classPrivateFieldGet(this, _LightSceneApi_inputValidator, "f").validateAndError(`LightSceneApi.${scope}`, properties, "object", false);
|
|
149
|
+
const prop = Object.assign({}, properties);
|
|
150
|
+
__classPrivateFieldGet(this, _LightSceneApi_inputValidator, "f").validateAndError(`LightSceneApi.${scope}`, prop.color, "color", false);
|
|
151
|
+
__classPrivateFieldGet(this, _LightSceneApi_inputValidator, "f").validateAndError(`LightSceneApi.${scope}`, prop.intensity, "number", false);
|
|
152
|
+
__classPrivateFieldGet(this, _LightSceneApi_inputValidator, "f").validateAndError(`LightSceneApi.${scope}`, prop.position, "vec3", false);
|
|
153
|
+
__classPrivateFieldGet(this, _LightSceneApi_inputValidator, "f").validateAndError(`LightSceneApi.${scope}`, prop.target, "vec3", false);
|
|
154
|
+
__classPrivateFieldGet(this, _LightSceneApi_inputValidator, "f").validateAndError(`LightSceneApi.${scope}`, prop.distance, "number", false);
|
|
155
|
+
__classPrivateFieldGet(this, _LightSceneApi_inputValidator, "f").validateAndError(`LightSceneApi.${scope}`, prop.decay, "number", false);
|
|
156
|
+
__classPrivateFieldGet(this, _LightSceneApi_inputValidator, "f").validateAndError(`LightSceneApi.${scope}`, prop.angle, "number", false);
|
|
157
|
+
__classPrivateFieldGet(this, _LightSceneApi_inputValidator, "f").validateAndError(`LightSceneApi.${scope}`, prop.penumbra, "number", false);
|
|
158
|
+
__classPrivateFieldGet(this, _LightSceneApi_inputValidator, "f").validateAndError(`LightSceneApi.${scope}`, prop.id, "string", false);
|
|
159
|
+
__classPrivateFieldGet(this, _LightSceneApi_inputValidator, "f").validateAndError(`LightSceneApi.${scope}`, prop.name, "string", false);
|
|
160
|
+
const light = __classPrivateFieldGet(this, _LightSceneApi_lightScene, "f").addSpotLight(properties);
|
|
161
|
+
__classPrivateFieldGet(this, _LightSceneApi_viewportApi, "f").update();
|
|
162
|
+
return __classPrivateFieldGet(this, _LightSceneApi_lights, "f")[light.id];
|
|
163
|
+
}
|
|
164
|
+
removeLight(id) {
|
|
165
|
+
const check = __classPrivateFieldGet(this, _LightSceneApi_lightScene, "f").removeLight(id);
|
|
166
|
+
__classPrivateFieldGet(this, _LightSceneApi_viewportApi, "f").update();
|
|
167
|
+
return check;
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
exports.LightSceneApi = LightSceneApi;
|
|
171
|
+
_LightSceneApi_inputValidator = new WeakMap(), _LightSceneApi_lightScene = new WeakMap(), _LightSceneApi_lights = new WeakMap(), _LightSceneApi_logger = new WeakMap(), _LightSceneApi_viewportApi = new WeakMap();
|
|
172
172
|
//# sourceMappingURL=LightSceneApi.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LightSceneApi.js","sourceRoot":"","sources":["../../../src/implementation/lights/LightSceneApi.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2GAQ0D;AAE1D,+EAA0E;AAW1E,6DAAwD;AACxD,qEAAgE;AAChE,mEAA8D;AAC9D,yDAAoD;AACpD,uDAAkD;AAElD,MAAa,aAAa;IASzB,4BAA4B;IAE5B,2BAA2B;IAE3B,YAAY,WAAyB,EAAE,UAAuB;QAZ9D,yBAAyB;
|
|
1
|
+
{"version":3,"file":"LightSceneApi.js","sourceRoot":"","sources":["../../../src/implementation/lights/LightSceneApi.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2GAQ0D;AAE1D,+EAA0E;AAW1E,6DAAwD;AACxD,qEAAgE;AAChE,mEAA8D;AAC9D,yDAAoD;AACpD,uDAAkD;AAElD,MAAa,aAAa;IASzB,4BAA4B;IAE5B,2BAA2B;IAE3B,YAAY,WAAyB,EAAE,UAAuB;QAZ9D,yBAAyB;QAEhB,wCAAkC,uCAAc,CAAC,QAAQ,EAAC;QAC1D,4CAAyB;QACzB,gCAAsC,EAAE,EAAC;QACzC,gCAAkB,+BAAM,CAAC,QAAQ,EAAC;QAClC,6CAA2B;QAOnC,uBAAA,IAAI,8BAAgB,WAAW,MAAA,CAAC;QAChC,uBAAA,IAAI,6BAAe,UAAU,MAAA,CAAC;QAE9B,oFAAoF;QACpF,uBAAA,IAAI,iCAAY,CAAC,MAAM,GAAG,GAAG,EAAE;YAC9B,KAAK,MAAM,CAAC,IAAI,uBAAA,IAAI,iCAAY,CAAC,MAAM,EAAE,CAAC;gBACzC,IAAI,CAAC,uBAAA,IAAI,6BAAQ,CAAC,CAAC,CAAC,EAAE,CAAC;oBACtB,QAAQ,uBAAA,IAAI,iCAAY,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;wBACzC,KAAK,iDAAU,CAAC,OAAO;4BACtB,uBAAA,IAAI,6BAAQ,CAAC,CAAC,CAAC,GAAG,IAAI,iCAAe,CACpC,uBAAA,IAAI,kCAAa,EACF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AC,EAAU;QAC5B,MAAM,KAAK,GAAG,uBAAA,IAAI,iCAAY,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC;QAC/C,uBAAA,IAAI,kCAAa,CAAC,MAAM,EAAE,CAAC;QAC3B,OAAO,KAAK,CAAC;IACd,CAAC;CAGD;AA1aD,sCA0aC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { IAmbientLight } from "@shapediver/viewer.rendering-engine.light-engine";
|
|
2
|
-
import { IViewportApi } from "../../../interfaces/IViewportApi";
|
|
3
|
-
import { IAmbientLightApi } from "../../../interfaces/lights/types/IAmbientLightApi";
|
|
4
|
-
import { AbstractLightApi } from "../AbstractLightApi";
|
|
5
|
-
export declare class AmbientLightApi extends AbstractLightApi implements IAmbientLightApi {
|
|
6
|
-
#private;
|
|
7
|
-
constructor(viewportApi: IViewportApi, light: IAmbientLight);
|
|
8
|
-
}
|
|
1
|
+
import { IAmbientLight } from "@shapediver/viewer.rendering-engine.light-engine";
|
|
2
|
+
import { IViewportApi } from "../../../interfaces/IViewportApi";
|
|
3
|
+
import { IAmbientLightApi } from "../../../interfaces/lights/types/IAmbientLightApi";
|
|
4
|
+
import { AbstractLightApi } from "../AbstractLightApi";
|
|
5
|
+
export declare class AmbientLightApi extends AbstractLightApi implements IAmbientLightApi {
|
|
6
|
+
#private;
|
|
7
|
+
constructor(viewportApi: IViewportApi, light: IAmbientLight);
|
|
8
|
+
}
|
|
9
9
|
//# sourceMappingURL=AmbientLightApi.d.ts.map
|
|
@@ -1,27 +1,27 @@
|
|
|
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 _AmbientLightApi_light, _AmbientLightApi_viewportApi;
|
|
9
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.AmbientLightApi = void 0;
|
|
11
|
-
const AbstractLightApi_1 = require("../AbstractLightApi");
|
|
12
|
-
class AmbientLightApi extends AbstractLightApi_1.AbstractLightApi {
|
|
13
|
-
// #endregion Properties (2)
|
|
14
|
-
// #region Constructors (1)
|
|
15
|
-
constructor(viewportApi, light) {
|
|
16
|
-
super(viewportApi, light);
|
|
17
|
-
// #region Properties (2)
|
|
18
|
-
_AmbientLightApi_light.set(this, void 0);
|
|
19
|
-
_AmbientLightApi_viewportApi.set(this, void 0);
|
|
20
|
-
__classPrivateFieldSet(this, _AmbientLightApi_viewportApi, viewportApi, "f");
|
|
21
|
-
__classPrivateFieldSet(this, _AmbientLightApi_light, light, "f");
|
|
22
|
-
this.scope = "AmbientLightApi";
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
exports.AmbientLightApi = AmbientLightApi;
|
|
26
|
-
_AmbientLightApi_light = new WeakMap(), _AmbientLightApi_viewportApi = new WeakMap();
|
|
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 _AmbientLightApi_light, _AmbientLightApi_viewportApi;
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.AmbientLightApi = void 0;
|
|
11
|
+
const AbstractLightApi_1 = require("../AbstractLightApi");
|
|
12
|
+
class AmbientLightApi extends AbstractLightApi_1.AbstractLightApi {
|
|
13
|
+
// #endregion Properties (2)
|
|
14
|
+
// #region Constructors (1)
|
|
15
|
+
constructor(viewportApi, light) {
|
|
16
|
+
super(viewportApi, light);
|
|
17
|
+
// #region Properties (2)
|
|
18
|
+
_AmbientLightApi_light.set(this, void 0);
|
|
19
|
+
_AmbientLightApi_viewportApi.set(this, void 0);
|
|
20
|
+
__classPrivateFieldSet(this, _AmbientLightApi_viewportApi, viewportApi, "f");
|
|
21
|
+
__classPrivateFieldSet(this, _AmbientLightApi_light, light, "f");
|
|
22
|
+
this.scope = "AmbientLightApi";
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
exports.AmbientLightApi = AmbientLightApi;
|
|
26
|
+
_AmbientLightApi_light = new WeakMap(), _AmbientLightApi_viewportApi = new WeakMap();
|
|
27
27
|
//# sourceMappingURL=AmbientLightApi.js.map
|