@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,3 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
//# sourceMappingURL=ILightApi.js.map
|
|
@@ -1,139 +1,139 @@
|
|
|
1
|
-
import { ITreeNode } from "@shapediver/viewer.shared.node-tree";
|
|
2
|
-
import { Color } from "@shapediver/viewer.shared.types";
|
|
3
|
-
import { vec3 } from "gl-matrix";
|
|
4
|
-
import { ILightApi } from "./ILightApi";
|
|
5
|
-
import { IAmbientLightApi } from "./types/IAmbientLightApi";
|
|
6
|
-
import { IDirectionalLightApi } from "./types/IDirectionalLightApi";
|
|
7
|
-
import { IHemisphereLightApi } from "./types/IHemisphereLightApi";
|
|
8
|
-
import { IPointLightApi } from "./types/IPointLightApi";
|
|
9
|
-
import { ISpotLightApi } from "./types/ISpotLightApi";
|
|
10
|
-
/**
|
|
11
|
-
* The api for a light scene.
|
|
12
|
-
* A light scene is a collection of lights. Therefore multiple light scene can be used to switch between different lighting environments.
|
|
13
|
-
* It can be created by calling the {@link createLightScene} method.
|
|
14
|
-
*/
|
|
15
|
-
export interface ILightSceneApi {
|
|
16
|
-
/**
|
|
17
|
-
* The id of the light scene.
|
|
18
|
-
*/
|
|
19
|
-
readonly id: string;
|
|
20
|
-
/**
|
|
21
|
-
* The node in which the lights are stored in the [scene tree]{@link ITree}.
|
|
22
|
-
*/
|
|
23
|
-
readonly node: ITreeNode;
|
|
24
|
-
/**
|
|
25
|
-
* The collection of lights in the light scene.
|
|
26
|
-
*/
|
|
27
|
-
lights: {
|
|
28
|
-
[key: string]: ILightApi;
|
|
29
|
-
};
|
|
30
|
-
/**
|
|
31
|
-
* The name of the light scene.
|
|
32
|
-
*/
|
|
33
|
-
name?: string;
|
|
34
|
-
/**
|
|
35
|
-
* Create an ambient light and add it to the light scene.
|
|
36
|
-
*
|
|
37
|
-
* @param properties.color The color of the light.
|
|
38
|
-
* @param properties.intensity The intensity of the light. (0-Infinity, default: 0.5)
|
|
39
|
-
* @param properties.id The id of the light.
|
|
40
|
-
* @param properties.name The name of the light.
|
|
41
|
-
*/
|
|
42
|
-
addAmbientLight(properties: {
|
|
43
|
-
color?: Color;
|
|
44
|
-
intensity?: number;
|
|
45
|
-
id?: string;
|
|
46
|
-
name?: string;
|
|
47
|
-
}): IAmbientLightApi;
|
|
48
|
-
/**
|
|
49
|
-
* Create a directional light and add it to the light scene.
|
|
50
|
-
*
|
|
51
|
-
* @param properties.color The color of the light.
|
|
52
|
-
* @param properties.intensity The intensity of the light. (0-Infinity, default: 0.5)
|
|
53
|
-
* @param properties.id The id of the light.
|
|
54
|
-
* @param properties.name The name of the light.
|
|
55
|
-
* @param properties.direction The direction of the light.
|
|
56
|
-
* @param properties.castShadow Option for the light to cast shadows.
|
|
57
|
-
* @param properties.shadowMapResolution The resolution of the shadow map. (default: 1024, has to be power of two)
|
|
58
|
-
* @param properties.shadowMapBias The bias of the shadow map. For more info on the shadow bias, see [here](https://digitalrune.github.io/DigitalRune-Documentation/html/3f4d959e-9c98-4a97-8d85-7a73c26145d7.htm).
|
|
59
|
-
*/
|
|
60
|
-
addDirectionalLight(properties: {
|
|
61
|
-
color?: Color;
|
|
62
|
-
intensity?: number;
|
|
63
|
-
direction?: vec3;
|
|
64
|
-
castShadow?: boolean;
|
|
65
|
-
shadowMapResolution?: number;
|
|
66
|
-
shadowMapBias?: number;
|
|
67
|
-
id?: string;
|
|
68
|
-
name?: string;
|
|
69
|
-
}): IDirectionalLightApi;
|
|
70
|
-
/**
|
|
71
|
-
* Create an hemisphere light and add it to the light scene.
|
|
72
|
-
*
|
|
73
|
-
* @param properties.color The color of the light.
|
|
74
|
-
* @param properties.intensity The intensity of the light. (0-Infinity, default: 0.5)
|
|
75
|
-
* @param properties.id The id of the light.
|
|
76
|
-
* @param properties.name The name of the light.
|
|
77
|
-
* @param properties.groundColor The ground color of the light.
|
|
78
|
-
*/
|
|
79
|
-
addHemisphereLight(properties: {
|
|
80
|
-
color?: Color;
|
|
81
|
-
intensity?: number;
|
|
82
|
-
groundColor?: Color;
|
|
83
|
-
id?: string;
|
|
84
|
-
name?: string;
|
|
85
|
-
}): IHemisphereLightApi;
|
|
86
|
-
/**
|
|
87
|
-
* Create a point light and add it to the light scene.
|
|
88
|
-
*
|
|
89
|
-
* @param properties.color The color of the light.
|
|
90
|
-
* @param properties.intensity The intensity of the light. (0-Infinity, default: 0.5)
|
|
91
|
-
* @param properties.id The id of the light.
|
|
92
|
-
* @param properties.name The name of the light.
|
|
93
|
-
* @param properties.position The position of the light.
|
|
94
|
-
* @param properties.distance The distance of the light.
|
|
95
|
-
* @param properties.decay The decay of the light.
|
|
96
|
-
*/
|
|
97
|
-
addPointLight(properties: {
|
|
98
|
-
color?: Color;
|
|
99
|
-
intensity?: number;
|
|
100
|
-
position?: vec3;
|
|
101
|
-
distance?: number;
|
|
102
|
-
decay?: number;
|
|
103
|
-
id?: string;
|
|
104
|
-
name?: string;
|
|
105
|
-
}): IPointLightApi;
|
|
106
|
-
/**
|
|
107
|
-
* Create a point light and add it to the light scene.
|
|
108
|
-
*
|
|
109
|
-
* @param properties.color The color of the light.
|
|
110
|
-
* @param properties.intensity The intensity of the light. (0-Infinity, default: 0.5)
|
|
111
|
-
* @param properties.id The id of the light.
|
|
112
|
-
* @param properties.name The name of the light.
|
|
113
|
-
* @param properties.position The position of the light.
|
|
114
|
-
* @param properties.target The target of the light.
|
|
115
|
-
* @param properties.distance The distance of the light.
|
|
116
|
-
* @param properties.decay The decay of the light.
|
|
117
|
-
* @param properties.angle The angle of the light.
|
|
118
|
-
* @param properties.penumbra The penumbra of the light.
|
|
119
|
-
*/
|
|
120
|
-
addSpotLight(properties: {
|
|
121
|
-
color?: Color;
|
|
122
|
-
intensity?: number;
|
|
123
|
-
position?: vec3;
|
|
124
|
-
target?: vec3;
|
|
125
|
-
distance?: number;
|
|
126
|
-
decay?: number;
|
|
127
|
-
angle?: number;
|
|
128
|
-
penumbra?: number;
|
|
129
|
-
id?: string;
|
|
130
|
-
name?: string;
|
|
131
|
-
}): ISpotLightApi;
|
|
132
|
-
/**
|
|
133
|
-
* Remove a light from the light scene with the specified id.
|
|
134
|
-
*
|
|
135
|
-
* @param id The id of the light to remove.
|
|
136
|
-
*/
|
|
137
|
-
removeLight(id: string): boolean;
|
|
138
|
-
}
|
|
1
|
+
import { ITreeNode } from "@shapediver/viewer.shared.node-tree";
|
|
2
|
+
import { Color } from "@shapediver/viewer.shared.types";
|
|
3
|
+
import { vec3 } from "gl-matrix";
|
|
4
|
+
import { ILightApi } from "./ILightApi";
|
|
5
|
+
import { IAmbientLightApi } from "./types/IAmbientLightApi";
|
|
6
|
+
import { IDirectionalLightApi } from "./types/IDirectionalLightApi";
|
|
7
|
+
import { IHemisphereLightApi } from "./types/IHemisphereLightApi";
|
|
8
|
+
import { IPointLightApi } from "./types/IPointLightApi";
|
|
9
|
+
import { ISpotLightApi } from "./types/ISpotLightApi";
|
|
10
|
+
/**
|
|
11
|
+
* The api for a light scene.
|
|
12
|
+
* A light scene is a collection of lights. Therefore multiple light scene can be used to switch between different lighting environments.
|
|
13
|
+
* It can be created by calling the {@link createLightScene} method.
|
|
14
|
+
*/
|
|
15
|
+
export interface ILightSceneApi {
|
|
16
|
+
/**
|
|
17
|
+
* The id of the light scene.
|
|
18
|
+
*/
|
|
19
|
+
readonly id: string;
|
|
20
|
+
/**
|
|
21
|
+
* The node in which the lights are stored in the [scene tree]{@link ITree}.
|
|
22
|
+
*/
|
|
23
|
+
readonly node: ITreeNode;
|
|
24
|
+
/**
|
|
25
|
+
* The collection of lights in the light scene.
|
|
26
|
+
*/
|
|
27
|
+
lights: {
|
|
28
|
+
[key: string]: ILightApi;
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* The name of the light scene.
|
|
32
|
+
*/
|
|
33
|
+
name?: string;
|
|
34
|
+
/**
|
|
35
|
+
* Create an ambient light and add it to the light scene.
|
|
36
|
+
*
|
|
37
|
+
* @param properties.color The color of the light.
|
|
38
|
+
* @param properties.intensity The intensity of the light. (0-Infinity, default: 0.5)
|
|
39
|
+
* @param properties.id The id of the light.
|
|
40
|
+
* @param properties.name The name of the light.
|
|
41
|
+
*/
|
|
42
|
+
addAmbientLight(properties: {
|
|
43
|
+
color?: Color;
|
|
44
|
+
intensity?: number;
|
|
45
|
+
id?: string;
|
|
46
|
+
name?: string;
|
|
47
|
+
}): IAmbientLightApi;
|
|
48
|
+
/**
|
|
49
|
+
* Create a directional light and add it to the light scene.
|
|
50
|
+
*
|
|
51
|
+
* @param properties.color The color of the light.
|
|
52
|
+
* @param properties.intensity The intensity of the light. (0-Infinity, default: 0.5)
|
|
53
|
+
* @param properties.id The id of the light.
|
|
54
|
+
* @param properties.name The name of the light.
|
|
55
|
+
* @param properties.direction The direction of the light.
|
|
56
|
+
* @param properties.castShadow Option for the light to cast shadows.
|
|
57
|
+
* @param properties.shadowMapResolution The resolution of the shadow map. (default: 1024, has to be power of two)
|
|
58
|
+
* @param properties.shadowMapBias The bias of the shadow map. For more info on the shadow bias, see [here](https://digitalrune.github.io/DigitalRune-Documentation/html/3f4d959e-9c98-4a97-8d85-7a73c26145d7.htm).
|
|
59
|
+
*/
|
|
60
|
+
addDirectionalLight(properties: {
|
|
61
|
+
color?: Color;
|
|
62
|
+
intensity?: number;
|
|
63
|
+
direction?: vec3;
|
|
64
|
+
castShadow?: boolean;
|
|
65
|
+
shadowMapResolution?: number;
|
|
66
|
+
shadowMapBias?: number;
|
|
67
|
+
id?: string;
|
|
68
|
+
name?: string;
|
|
69
|
+
}): IDirectionalLightApi;
|
|
70
|
+
/**
|
|
71
|
+
* Create an hemisphere light and add it to the light scene.
|
|
72
|
+
*
|
|
73
|
+
* @param properties.color The color of the light.
|
|
74
|
+
* @param properties.intensity The intensity of the light. (0-Infinity, default: 0.5)
|
|
75
|
+
* @param properties.id The id of the light.
|
|
76
|
+
* @param properties.name The name of the light.
|
|
77
|
+
* @param properties.groundColor The ground color of the light.
|
|
78
|
+
*/
|
|
79
|
+
addHemisphereLight(properties: {
|
|
80
|
+
color?: Color;
|
|
81
|
+
intensity?: number;
|
|
82
|
+
groundColor?: Color;
|
|
83
|
+
id?: string;
|
|
84
|
+
name?: string;
|
|
85
|
+
}): IHemisphereLightApi;
|
|
86
|
+
/**
|
|
87
|
+
* Create a point light and add it to the light scene.
|
|
88
|
+
*
|
|
89
|
+
* @param properties.color The color of the light.
|
|
90
|
+
* @param properties.intensity The intensity of the light. (0-Infinity, default: 0.5)
|
|
91
|
+
* @param properties.id The id of the light.
|
|
92
|
+
* @param properties.name The name of the light.
|
|
93
|
+
* @param properties.position The position of the light.
|
|
94
|
+
* @param properties.distance The distance of the light.
|
|
95
|
+
* @param properties.decay The decay of the light.
|
|
96
|
+
*/
|
|
97
|
+
addPointLight(properties: {
|
|
98
|
+
color?: Color;
|
|
99
|
+
intensity?: number;
|
|
100
|
+
position?: vec3;
|
|
101
|
+
distance?: number;
|
|
102
|
+
decay?: number;
|
|
103
|
+
id?: string;
|
|
104
|
+
name?: string;
|
|
105
|
+
}): IPointLightApi;
|
|
106
|
+
/**
|
|
107
|
+
* Create a point light and add it to the light scene.
|
|
108
|
+
*
|
|
109
|
+
* @param properties.color The color of the light.
|
|
110
|
+
* @param properties.intensity The intensity of the light. (0-Infinity, default: 0.5)
|
|
111
|
+
* @param properties.id The id of the light.
|
|
112
|
+
* @param properties.name The name of the light.
|
|
113
|
+
* @param properties.position The position of the light.
|
|
114
|
+
* @param properties.target The target of the light.
|
|
115
|
+
* @param properties.distance The distance of the light.
|
|
116
|
+
* @param properties.decay The decay of the light.
|
|
117
|
+
* @param properties.angle The angle of the light.
|
|
118
|
+
* @param properties.penumbra The penumbra of the light.
|
|
119
|
+
*/
|
|
120
|
+
addSpotLight(properties: {
|
|
121
|
+
color?: Color;
|
|
122
|
+
intensity?: number;
|
|
123
|
+
position?: vec3;
|
|
124
|
+
target?: vec3;
|
|
125
|
+
distance?: number;
|
|
126
|
+
decay?: number;
|
|
127
|
+
angle?: number;
|
|
128
|
+
penumbra?: number;
|
|
129
|
+
id?: string;
|
|
130
|
+
name?: string;
|
|
131
|
+
}): ISpotLightApi;
|
|
132
|
+
/**
|
|
133
|
+
* Remove a light from the light scene with the specified id.
|
|
134
|
+
*
|
|
135
|
+
* @param id The id of the light to remove.
|
|
136
|
+
*/
|
|
137
|
+
removeLight(id: string): boolean;
|
|
138
|
+
}
|
|
139
139
|
//# sourceMappingURL=ILightSceneApi.d.ts.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
//# sourceMappingURL=ILightSceneApi.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ILightApi } from "../ILightApi";
|
|
2
|
-
/**
|
|
3
|
-
* The api for an ambient light.
|
|
4
|
-
* An ambient light can be created by calling the {@link addAmbientLight} method.
|
|
5
|
-
*/
|
|
6
|
-
export
|
|
1
|
+
import { ILightApi } from "../ILightApi";
|
|
2
|
+
/**
|
|
3
|
+
* The api for an ambient light.
|
|
4
|
+
* An ambient light can be created by calling the {@link addAmbientLight} method.
|
|
5
|
+
*/
|
|
6
|
+
export type IAmbientLightApi = ILightApi;
|
|
7
7
|
//# sourceMappingURL=IAmbientLightApi.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IAmbientLightApi.d.ts","sourceRoot":"","sources":["../../../../src/interfaces/lights/types/IAmbientLightApi.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAEvC;;;GAGG;AACH,
|
|
1
|
+
{"version":3,"file":"IAmbientLightApi.d.ts","sourceRoot":"","sources":["../../../../src/interfaces/lights/types/IAmbientLightApi.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAEvC;;;GAGG;AACH,MAAM,MAAM,gBAAgB,GAAG,SAAS,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
//# sourceMappingURL=IAmbientLightApi.js.map
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { vec3 } from "gl-matrix";
|
|
2
|
-
import { ILightApi } from "../ILightApi";
|
|
3
|
-
/**
|
|
4
|
-
* The api for a directional light.
|
|
5
|
-
* A directional light can be created by calling the {@link addDirectionalLight} method.
|
|
6
|
-
*/
|
|
7
|
-
export interface IDirectionalLightApi extends ILightApi {
|
|
8
|
-
/**
|
|
9
|
-
* Option to cast shadows.
|
|
10
|
-
*/
|
|
11
|
-
castShadow: boolean;
|
|
12
|
-
/**
|
|
13
|
-
* The direction of the light.
|
|
14
|
-
*/
|
|
15
|
-
direction: vec3;
|
|
16
|
-
/**
|
|
17
|
-
* The bias of the shadow map.
|
|
18
|
-
*/
|
|
19
|
-
shadowMapBias: number;
|
|
20
|
-
/**
|
|
21
|
-
* The resolution of the shadow map.
|
|
22
|
-
*/
|
|
23
|
-
shadowMapResolution: number;
|
|
24
|
-
}
|
|
1
|
+
import { vec3 } from "gl-matrix";
|
|
2
|
+
import { ILightApi } from "../ILightApi";
|
|
3
|
+
/**
|
|
4
|
+
* The api for a directional light.
|
|
5
|
+
* A directional light can be created by calling the {@link addDirectionalLight} method.
|
|
6
|
+
*/
|
|
7
|
+
export interface IDirectionalLightApi extends ILightApi {
|
|
8
|
+
/**
|
|
9
|
+
* Option to cast shadows.
|
|
10
|
+
*/
|
|
11
|
+
castShadow: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* The direction of the light.
|
|
14
|
+
*/
|
|
15
|
+
direction: vec3;
|
|
16
|
+
/**
|
|
17
|
+
* The bias of the shadow map.
|
|
18
|
+
*/
|
|
19
|
+
shadowMapBias: number;
|
|
20
|
+
/**
|
|
21
|
+
* The resolution of the shadow map.
|
|
22
|
+
*/
|
|
23
|
+
shadowMapResolution: number;
|
|
24
|
+
}
|
|
25
25
|
//# sourceMappingURL=IDirectionalLightApi.d.ts.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
//# sourceMappingURL=IDirectionalLightApi.js.map
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { Color } from "@shapediver/viewer.shared.types";
|
|
2
|
-
import { ILightApi } from "../ILightApi";
|
|
3
|
-
/**
|
|
4
|
-
* The api for an hemisphere light.
|
|
5
|
-
* An hemisphere light can be created by calling the {@link addHemisphereLight} method.
|
|
6
|
-
*/
|
|
7
|
-
export interface IHemisphereLightApi extends ILightApi {
|
|
8
|
-
/**
|
|
9
|
-
* The ground color of the light.
|
|
10
|
-
*/
|
|
11
|
-
groundColor: Color;
|
|
12
|
-
}
|
|
1
|
+
import { Color } from "@shapediver/viewer.shared.types";
|
|
2
|
+
import { ILightApi } from "../ILightApi";
|
|
3
|
+
/**
|
|
4
|
+
* The api for an hemisphere light.
|
|
5
|
+
* An hemisphere light can be created by calling the {@link addHemisphereLight} method.
|
|
6
|
+
*/
|
|
7
|
+
export interface IHemisphereLightApi extends ILightApi {
|
|
8
|
+
/**
|
|
9
|
+
* The ground color of the light.
|
|
10
|
+
*/
|
|
11
|
+
groundColor: Color;
|
|
12
|
+
}
|
|
13
13
|
//# sourceMappingURL=IHemisphereLightApi.d.ts.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
//# sourceMappingURL=IHemisphereLightApi.js.map
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { vec3 } from "gl-matrix";
|
|
2
|
-
import { ILightApi } from "../ILightApi";
|
|
3
|
-
/**
|
|
4
|
-
* The api for a point light.
|
|
5
|
-
* A point light can be created by calling the {@link addPointLight} method.
|
|
6
|
-
*/
|
|
7
|
-
export interface IPointLightApi extends ILightApi {
|
|
8
|
-
/**
|
|
9
|
-
* The decay of the light.
|
|
10
|
-
*/
|
|
11
|
-
decay: number;
|
|
12
|
-
/**
|
|
13
|
-
* The distance of the light.
|
|
14
|
-
*/
|
|
15
|
-
distance: number;
|
|
16
|
-
/**
|
|
17
|
-
* The position of the light.
|
|
18
|
-
*/
|
|
19
|
-
position: vec3;
|
|
20
|
-
}
|
|
1
|
+
import { vec3 } from "gl-matrix";
|
|
2
|
+
import { ILightApi } from "../ILightApi";
|
|
3
|
+
/**
|
|
4
|
+
* The api for a point light.
|
|
5
|
+
* A point light can be created by calling the {@link addPointLight} method.
|
|
6
|
+
*/
|
|
7
|
+
export interface IPointLightApi extends ILightApi {
|
|
8
|
+
/**
|
|
9
|
+
* The decay of the light.
|
|
10
|
+
*/
|
|
11
|
+
decay: number;
|
|
12
|
+
/**
|
|
13
|
+
* The distance of the light.
|
|
14
|
+
*/
|
|
15
|
+
distance: number;
|
|
16
|
+
/**
|
|
17
|
+
* The position of the light.
|
|
18
|
+
*/
|
|
19
|
+
position: vec3;
|
|
20
|
+
}
|
|
21
21
|
//# sourceMappingURL=IPointLightApi.d.ts.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
//# sourceMappingURL=IPointLightApi.js.map
|
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
import { vec3 } from "gl-matrix";
|
|
2
|
-
import { ILightApi } from "../ILightApi";
|
|
3
|
-
/**
|
|
4
|
-
* The api for a spot light.
|
|
5
|
-
* A spot light can be created by calling the {@link addSpotLight} method.
|
|
6
|
-
*/
|
|
7
|
-
export interface ISpotLightApi extends ILightApi {
|
|
8
|
-
/**
|
|
9
|
-
* The angle of the light.
|
|
10
|
-
*/
|
|
11
|
-
angle: number;
|
|
12
|
-
/**
|
|
13
|
-
* The decay of the light.
|
|
14
|
-
*/
|
|
15
|
-
decay: number;
|
|
16
|
-
/**
|
|
17
|
-
* The distance of the light.
|
|
18
|
-
*/
|
|
19
|
-
distance: number;
|
|
20
|
-
/**
|
|
21
|
-
* The penumbra of the light.
|
|
22
|
-
*/
|
|
23
|
-
penumbra: number;
|
|
24
|
-
/**
|
|
25
|
-
* The position of the light.
|
|
26
|
-
*/
|
|
27
|
-
position: vec3;
|
|
28
|
-
/**
|
|
29
|
-
* The target of the light.
|
|
30
|
-
*/
|
|
31
|
-
target: vec3;
|
|
32
|
-
}
|
|
1
|
+
import { vec3 } from "gl-matrix";
|
|
2
|
+
import { ILightApi } from "../ILightApi";
|
|
3
|
+
/**
|
|
4
|
+
* The api for a spot light.
|
|
5
|
+
* A spot light can be created by calling the {@link addSpotLight} method.
|
|
6
|
+
*/
|
|
7
|
+
export interface ISpotLightApi extends ILightApi {
|
|
8
|
+
/**
|
|
9
|
+
* The angle of the light.
|
|
10
|
+
*/
|
|
11
|
+
angle: number;
|
|
12
|
+
/**
|
|
13
|
+
* The decay of the light.
|
|
14
|
+
*/
|
|
15
|
+
decay: number;
|
|
16
|
+
/**
|
|
17
|
+
* The distance of the light.
|
|
18
|
+
*/
|
|
19
|
+
distance: number;
|
|
20
|
+
/**
|
|
21
|
+
* The penumbra of the light.
|
|
22
|
+
*/
|
|
23
|
+
penumbra: number;
|
|
24
|
+
/**
|
|
25
|
+
* The position of the light.
|
|
26
|
+
*/
|
|
27
|
+
position: vec3;
|
|
28
|
+
/**
|
|
29
|
+
* The target of the light.
|
|
30
|
+
*/
|
|
31
|
+
target: vec3;
|
|
32
|
+
}
|
|
33
33
|
//# sourceMappingURL=ISpotLightApi.d.ts.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
//# sourceMappingURL=ISpotLightApi.js.map
|
package/dist/main.d.ts
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import { ViewportCreationDefinition } from "@shapediver/viewer.shared.types";
|
|
2
|
-
import { IViewportApi } from "./interfaces/IViewportApi";
|
|
3
|
-
/**
|
|
4
|
-
* The viewports that are currently being used.
|
|
5
|
-
*/
|
|
6
|
-
export declare const viewports: {
|
|
7
|
-
[key: string]: IViewportApi;
|
|
8
|
-
};
|
|
9
|
-
/**
|
|
10
|
-
* Create and initialize a viewport with the provided type and canvas,
|
|
11
|
-
* and return a viewport api object allowing to control it.
|
|
12
|
-
*
|
|
13
|
-
* An optional identifier for the viewport can be provided. This identifier can be used to retrieve the
|
|
14
|
-
* viewport object from {@link viewports}. In case no identifier is provided, a unique one will be generated.
|
|
15
|
-
*
|
|
16
|
-
* By default a new viewport displays the complete scene tree. Viewports can be excluded from
|
|
17
|
-
* displaying geometry for specific sessions by using the {@link excludeViewports} property of
|
|
18
|
-
* {@link ISessionApi}.
|
|
19
|
-
*
|
|
20
|
-
* @param properties.visibility The visibility of the viewport.
|
|
21
|
-
* @param properties.canvas The canvas that the viewport should use. A canvas element will be created if none is provided.
|
|
22
|
-
* @param properties.id The unique identifier to use for the viewport.
|
|
23
|
-
* @param properties.branding Optional branding options.
|
|
24
|
-
* @param properties.visibilitySessionIds Optional list of session ids to be displayed in the viewport when the {@link VISIBILITY_MODE} is set to {@link VISIBILITY_MODE.SESSIONS}.
|
|
25
|
-
* @param properties.sessionSettingsId Optional identifier of the session to be used for loading / persisting settings of the viewport when the {@link SESSION_SETTINGS_MODE} is set to MANUAL.
|
|
26
|
-
* @param properties.sessionSettingsMode Allows to control which session to use for loading / persisting settings of the viewport. (default: {@link SESSION_SETTINGS_MODE.FIRST}).
|
|
27
|
-
* @param properties.flags Optional flags that should be initially set on the viewport. The key is the token that is used to identify the flag, and the value is the type of the flag.
|
|
28
|
-
* @returns
|
|
29
|
-
*/
|
|
30
|
-
export declare const createViewport: (properties?: ViewportCreationDefinition) => Promise<IViewportApi>;
|
|
1
|
+
import { ViewportCreationDefinition } from "@shapediver/viewer.shared.types";
|
|
2
|
+
import { IViewportApi } from "./interfaces/IViewportApi";
|
|
3
|
+
/**
|
|
4
|
+
* The viewports that are currently being used.
|
|
5
|
+
*/
|
|
6
|
+
export declare const viewports: {
|
|
7
|
+
[key: string]: IViewportApi;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* Create and initialize a viewport with the provided type and canvas,
|
|
11
|
+
* and return a viewport api object allowing to control it.
|
|
12
|
+
*
|
|
13
|
+
* An optional identifier for the viewport can be provided. This identifier can be used to retrieve the
|
|
14
|
+
* viewport object from {@link viewports}. In case no identifier is provided, a unique one will be generated.
|
|
15
|
+
*
|
|
16
|
+
* By default a new viewport displays the complete scene tree. Viewports can be excluded from
|
|
17
|
+
* displaying geometry for specific sessions by using the {@link excludeViewports} property of
|
|
18
|
+
* {@link ISessionApi}.
|
|
19
|
+
*
|
|
20
|
+
* @param properties.visibility The visibility of the viewport.
|
|
21
|
+
* @param properties.canvas The canvas that the viewport should use. A canvas element will be created if none is provided.
|
|
22
|
+
* @param properties.id The unique identifier to use for the viewport.
|
|
23
|
+
* @param properties.branding Optional branding options.
|
|
24
|
+
* @param properties.visibilitySessionIds Optional list of session ids to be displayed in the viewport when the {@link VISIBILITY_MODE} is set to {@link VISIBILITY_MODE.SESSIONS}.
|
|
25
|
+
* @param properties.sessionSettingsId Optional identifier of the session to be used for loading / persisting settings of the viewport when the {@link SESSION_SETTINGS_MODE} is set to MANUAL.
|
|
26
|
+
* @param properties.sessionSettingsMode Allows to control which session to use for loading / persisting settings of the viewport. (default: {@link SESSION_SETTINGS_MODE.FIRST}).
|
|
27
|
+
* @param properties.flags Optional flags that should be initially set on the viewport. The key is the token that is used to identify the flag, and the value is the type of the flag.
|
|
28
|
+
* @returns
|
|
29
|
+
*/
|
|
30
|
+
export declare const createViewport: (properties?: ViewportCreationDefinition) => Promise<IViewportApi>;
|
|
31
31
|
//# sourceMappingURL=main.d.ts.map
|
package/dist/main.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":"AAYA,OAAO,EAGN,0BAA0B,EAE1B,MAAM,iCAAiC,CAAC;AAEzC,OAAO,EAAC,YAAY,EAAC,MAAM,2BAA2B,CAAC;AAEvD;;GAEG;AACH,eAAO,MAAM,SAAS,EAAE;IAAC,CAAC,GAAG,EAAE,MAAM,GAAG,YAAY,CAAA;CAAM,CAAC;AAc3D;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,cAAc,
|
|
1
|
+
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":"AAYA,OAAO,EAGN,0BAA0B,EAE1B,MAAM,iCAAiC,CAAC;AAEzC,OAAO,EAAC,YAAY,EAAC,MAAM,2BAA2B,CAAC;AAEvD;;GAEG;AACH,eAAO,MAAM,SAAS,EAAE;IAAC,CAAC,GAAG,EAAE,MAAM,GAAG,YAAY,CAAA;CAAM,CAAC;AAc3D;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,cAAc,GAC1B,aAAa,0BAA0B,KACrC,OAAO,CAAC,YAAY,CAqItB,CAAC"}
|