@xeokit/xeokit-sdk 2.6.73 → 2.6.77-slim-rc1
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/xeokit-sdk.cjs.js +246 -126
- package/dist/xeokit-sdk.es.js +246 -126
- package/dist/xeokit-sdk.es5.js +316 -306
- package/dist/xeokit-sdk.min.cjs.js +8 -8
- package/dist/xeokit-sdk.min.es.js +8 -8
- package/dist/xeokit-sdk.min.es5.js +7 -7
- package/package.json +2 -1
- package/src/extras/ContextMenu/ContextMenu.js +25 -16
- package/src/extras/Skybox/Skybox.js +139 -0
- package/src/extras/index.js +2 -1
- package/src/plugins/CxConverterIFCLoaderPlugin/CxConverterIFCLoaderPlugin.js +81 -81
- package/src/plugins/CxConverterIFCLoaderPlugin/index.js +1 -1
- package/src/plugins/FastNavPlugin/FastNavPlugin.js +10 -18
- package/src/plugins/SectionPlanesPlugin/Control.js +1 -1
- package/src/plugins/TreeViewPlugin/RenderService.js +13 -4
- package/src/plugins/TreeViewPlugin/TreeViewPlugin.js +1 -1
- package/src/plugins/index.js +0 -1
- package/src/viewer/Viewer.js +0 -16
- package/src/viewer/scene/CameraControl/lib/controllers/PivotController.js +29 -8
- package/src/viewer/scene/LineSet/LineSet.js +7 -2
- package/src/viewer/scene/camera/CameraFlightAnimation.js +2 -2
- package/src/viewer/scene/canvas/Canvas.js +7 -4
- package/src/viewer/scene/index.js +0 -1
- package/src/viewer/scene/model/dtx/triangles/renderers/DTXTrianglesColorRenderer.js +5 -0
- package/src/viewer/scene/model/vbo/batching/triangles/renderers/TrianglesColorRenderer.js +5 -0
- package/src/viewer/scene/model/vbo/batching/triangles/renderers/TrianglesFlatColorRenderer.js +5 -0
- package/src/viewer/scene/model/vbo/instancing/triangles/renderers/TrianglesColorRenderer.js +5 -0
- package/src/viewer/scene/model/vbo/instancing/triangles/renderers/TrianglesFlatColorRenderer.js +5 -0
- package/types/plugins/FastNavPlugin/FastNavPlugin.d.ts +5 -0
- package/types/plugins/index.d.ts +0 -1
- package/types/viewer/scene/CameraControl/CameraControl.d.ts +168 -0
- package/types/viewer/scene/LineSet/LineSet.d.ts +1 -1
- package/types/viewer/scene/camera/CameraPath.d.ts +86 -6
- package/types/viewer/scene/camera/CameraPathAnimation.d.ts +2 -0
- package/types/viewer/scene/geometry/ReadableGeometry.d.ts +14 -0
- package/types/viewer/scene/geometry/VBOGeometry.d.ts +2 -0
- package/types/viewer/scene/geometry/index.d.ts +2 -1
- package/types/viewer/scene/geometry/loaders/index.d.ts +2 -0
- package/types/viewer/scene/geometry/loaders/load3DSGeometry.d.ts +17 -0
- package/types/viewer/scene/geometry/loaders/loadOBJGeometry.d.ts +18 -0
- package/types/viewer/scene/index.d.ts +1 -0
- package/types/viewer/scene/input/input.d.ts +117 -0
- package/types/viewer/scene/lights/AmbientLight.d.ts +41 -0
- package/types/viewer/scene/lights/CubeTexture.d.ts +27 -0
- package/types/viewer/scene/lights/DirLight.d.ts +77 -0
- package/types/viewer/scene/lights/LightMap.d.ts +27 -0
- package/types/viewer/scene/lights/PointLight.d.ts +135 -0
- package/types/viewer/scene/lights/ReflectionMap.d.ts +26 -0
- package/types/viewer/scene/lights/index.d.ts +4 -1
- package/types/viewer/scene/marker/Marker.d.ts +5 -0
- package/types/viewer/scene/materials/EmphasisMaterial.d.ts +5 -0
- package/types/viewer/scene/materials/Fresnel.d.ts +25 -62
- package/types/viewer/scene/materials/LambertMaterial.d.ts +192 -0
- package/types/viewer/scene/materials/MetallicMaterial.d.ts +359 -0
- package/types/viewer/scene/materials/PhongMaterial.d.ts +5 -0
- package/types/viewer/scene/materials/PointsMaterial.d.ts +5 -0
- package/types/viewer/scene/materials/SpecularMaterial.d.ts +342 -0
- package/types/viewer/scene/materials/Texture.d.ts +36 -78
- package/types/viewer/scene/materials/index.d.ts +2 -0
- package/types/viewer/scene/models/SceneModel.d.ts +134 -7
- package/types/viewer/scene/models/SceneModelEntity.d.ts +65 -0
- package/types/viewer/scene/models/SceneModelMesh.d.ts +12 -0
- package/types/viewer/scene/paths/CubicBezierCurve.d.ts +146 -0
- package/types/viewer/scene/paths/Curve.d.ts +75 -0
- package/types/viewer/scene/paths/Path.d.ts +119 -0
- package/types/viewer/scene/paths/QuadraticBezierCurve.d.ts +124 -0
- package/types/viewer/scene/paths/SplineCurve.d.ts +84 -0
- package/types/viewer/scene/paths/index.d.ts +5 -0
- package/types/viewer/scene/scene/Scene.d.ts +102 -0
- package/types/viewer/scene/sectionPlane/SectionPlane.d.ts +41 -0
- package/types/viewer/scene/webgl/PickResult.d.ts +19 -0
- package/src/plugins/SkyboxesPlugin/SkyboxesPlugin.js +0 -134
- package/src/plugins/SkyboxesPlugin/index.js +0 -1
- package/src/viewer/scene/skybox/Skybox.js +0 -123
- package/types/plugins/SkyboxesPlugin/SkyboxesPlugin.d.ts +0 -34
- package/types/plugins/SkyboxesPlugin/index.d.ts +0 -1
- /package/src/{viewer/scene/skybox → extras/Skybox}/index.js +0 -0
|
@@ -10,6 +10,123 @@ import { Component } from "../Component";
|
|
|
10
10
|
*/
|
|
11
11
|
export declare class Input extends Component {
|
|
12
12
|
|
|
13
|
+
KEY_BACKSPACE: number;
|
|
14
|
+
KEY_TAB: number;
|
|
15
|
+
KEY_ENTER: number;
|
|
16
|
+
KEY_SHIFT: number;
|
|
17
|
+
KEY_CTRL: number;
|
|
18
|
+
KEY_ALT: number;
|
|
19
|
+
KEY_PAUSE_BREAK: number;
|
|
20
|
+
KEY_CAPS_LOCK: number;
|
|
21
|
+
KEY_ESCAPE: number;
|
|
22
|
+
KEY_PAGE_UP: number;
|
|
23
|
+
KEY_PAGE_DOWN: number;
|
|
24
|
+
KEY_END: number;
|
|
25
|
+
KEY_HOME: number;
|
|
26
|
+
KEY_LEFT_ARROW: number;
|
|
27
|
+
KEY_UP_ARROW: number;
|
|
28
|
+
KEY_RIGHT_ARROW: number;
|
|
29
|
+
KEY_DOWN_ARROW: number;
|
|
30
|
+
KEY_INSERT: number;
|
|
31
|
+
KEY_DELETE: number;
|
|
32
|
+
KEY_NUM_0: number;
|
|
33
|
+
KEY_NUM_1: number;
|
|
34
|
+
KEY_NUM_2: number;
|
|
35
|
+
KEY_NUM_3: number;
|
|
36
|
+
KEY_NUM_4: number;
|
|
37
|
+
KEY_NUM_5: number;
|
|
38
|
+
KEY_NUM_6: number;
|
|
39
|
+
KEY_NUM_7: number;
|
|
40
|
+
KEY_NUM_8: number;
|
|
41
|
+
KEY_NUM_9: number;
|
|
42
|
+
KEY_A: number;
|
|
43
|
+
KEY_B: number;
|
|
44
|
+
KEY_C: number;
|
|
45
|
+
KEY_D: number;
|
|
46
|
+
KEY_E: number;
|
|
47
|
+
KEY_F: number;
|
|
48
|
+
KEY_G: number;
|
|
49
|
+
KEY_H: number;
|
|
50
|
+
KEY_I: number;
|
|
51
|
+
KEY_J: number;
|
|
52
|
+
KEY_K: number;
|
|
53
|
+
KEY_L: number;
|
|
54
|
+
KEY_M: number;
|
|
55
|
+
KEY_N: number;
|
|
56
|
+
KEY_O: number;
|
|
57
|
+
KEY_P: number;
|
|
58
|
+
KEY_Q: number;
|
|
59
|
+
KEY_R: number;
|
|
60
|
+
KEY_S: number;
|
|
61
|
+
KEY_T: number;
|
|
62
|
+
KEY_U: number;
|
|
63
|
+
KEY_V: number;
|
|
64
|
+
KEY_W: number;
|
|
65
|
+
KEY_X: number;
|
|
66
|
+
KEY_Y: number;
|
|
67
|
+
KEY_Z: number;
|
|
68
|
+
KEY_LEFT_WINDOW: number;
|
|
69
|
+
KEY_RIGHT_WINDOW: number;
|
|
70
|
+
KEY_SELECT_KEY: number;
|
|
71
|
+
KEY_NUMPAD_0: number;
|
|
72
|
+
KEY_NUMPAD_1: number;
|
|
73
|
+
KEY_NUMPAD_2: number;
|
|
74
|
+
KEY_NUMPAD_3: number;
|
|
75
|
+
KEY_NUMPAD_4: number;
|
|
76
|
+
KEY_NUMPAD_5: number;
|
|
77
|
+
KEY_NUMPAD_6: number;
|
|
78
|
+
KEY_NUMPAD_7: number;
|
|
79
|
+
KEY_NUMPAD_8: number;
|
|
80
|
+
KEY_NUMPAD_9: number;
|
|
81
|
+
KEY_MULTIPLY: number;
|
|
82
|
+
KEY_ADD: number;
|
|
83
|
+
KEY_SUBTRACT: number;
|
|
84
|
+
KEY_DECIMAL_POINT: number;
|
|
85
|
+
KEY_DIVIDE: number;
|
|
86
|
+
KEY_F1: number;
|
|
87
|
+
KEY_F2: number;
|
|
88
|
+
KEY_F3: number;
|
|
89
|
+
KEY_F4: number;
|
|
90
|
+
KEY_F5: number;
|
|
91
|
+
KEY_F6: number;
|
|
92
|
+
KEY_F7: number;
|
|
93
|
+
KEY_F8: number;
|
|
94
|
+
KEY_F9: number;
|
|
95
|
+
KEY_F10: number;
|
|
96
|
+
KEY_F11: number;
|
|
97
|
+
KEY_F12: number;
|
|
98
|
+
KEY_NUM_LOCK: number;
|
|
99
|
+
KEY_SCROLL_LOCK: number;
|
|
100
|
+
KEY_SEMI_COLON: number;
|
|
101
|
+
KEY_EQUAL_SIGN: number;
|
|
102
|
+
KEY_COMMA: number;
|
|
103
|
+
KEY_DASH: number;
|
|
104
|
+
KEY_PERIOD: number;
|
|
105
|
+
KEY_FORWARD_SLASH: number;
|
|
106
|
+
KEY_GRAVE_ACCENT: number;
|
|
107
|
+
KEY_OPEN_BRACKET: number;
|
|
108
|
+
KEY_BACK_SLASH: number;
|
|
109
|
+
KEY_CLOSE_BRACKET: number;
|
|
110
|
+
KEY_SINGLE_QUOTE: number;
|
|
111
|
+
KEY_SPACE: number;
|
|
112
|
+
MOUSE_LEFT_BUTTON: number;
|
|
113
|
+
MOUSE_MIDDLE_BUTTON: number;
|
|
114
|
+
MOUSE_RIGHT_BUTTON: number;
|
|
115
|
+
|
|
116
|
+
element: HTMLCanvasElement;
|
|
117
|
+
|
|
118
|
+
altDown: boolean;
|
|
119
|
+
ctrlDown: boolean;
|
|
120
|
+
mouseDownLeft: boolean;
|
|
121
|
+
mouseDownMiddle: boolean;
|
|
122
|
+
mouseDownRight: boolean;
|
|
123
|
+
keyDown: boolean[];
|
|
124
|
+
enabled: boolean;
|
|
125
|
+
keyboardEnabled: boolean;
|
|
126
|
+
mouseover: boolean;
|
|
127
|
+
mouseCanvasPos: number[];
|
|
128
|
+
|
|
129
|
+
|
|
13
130
|
/**
|
|
14
131
|
* Sets whether input handlers are enabled.
|
|
15
132
|
*/
|
|
@@ -16,4 +16,45 @@ export declare class AmbientLight extends Light {
|
|
|
16
16
|
* @param {AmbientLightConfiguration} [cfg] AmbientLight configuration
|
|
17
17
|
*/
|
|
18
18
|
constructor(owner: Component, cfg: AmbientLightConfiguration);
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Sets the RGB color of this AmbientLight.
|
|
22
|
+
*
|
|
23
|
+
* Default value is ````[0.7, 0.7, 0.8]````.
|
|
24
|
+
*
|
|
25
|
+
* @param {Number[]} color The AmbientLight's RGB color.
|
|
26
|
+
*/
|
|
27
|
+
set color(color: number[]);
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Gets the RGB color of this AmbientLight.
|
|
31
|
+
*
|
|
32
|
+
* Default value is ````[0.7, 0.7, 0.8]````.
|
|
33
|
+
*
|
|
34
|
+
* @returns {Number[]} The AmbientLight's RGB color.
|
|
35
|
+
*/
|
|
36
|
+
get color(): number;
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Sets the intensity of this AmbientLight.
|
|
40
|
+
*
|
|
41
|
+
* Default value is ````1.0```` for maximum intensity.
|
|
42
|
+
*
|
|
43
|
+
* @param {Number} intensity The AmbientLight's intensity.
|
|
44
|
+
*/
|
|
45
|
+
set intensity(intensity: number);
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Gets the intensity of this AmbientLight.
|
|
49
|
+
*
|
|
50
|
+
* Default value is ````1.0```` for maximum intensity.
|
|
51
|
+
*
|
|
52
|
+
* @returns {Number} The AmbientLight's intensity.
|
|
53
|
+
*/
|
|
54
|
+
get intensity(): number;
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Destroys this AmbientLight.
|
|
58
|
+
*/
|
|
59
|
+
destroy(): void;
|
|
19
60
|
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Component } from '../Component';
|
|
2
|
+
|
|
3
|
+
export declare type CubeTextureConfiguration = {
|
|
4
|
+
/**Optional ID for this CubeTexture, unique among all components in the parent scene, generated automatically when omitted. */
|
|
5
|
+
id?: string;
|
|
6
|
+
/**Paths to six image files to load into this CubeTexture. */
|
|
7
|
+
src: string[];
|
|
8
|
+
/**Flips this CubeTexture's source data along its vertical axis when true. */
|
|
9
|
+
flipY?: boolean;
|
|
10
|
+
/**Encoding format. Supported values are {@link LinearEncoding} and {@link sRGBEncoding}. */
|
|
11
|
+
encoding?: number;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export declare class CubeTexture extends Component {
|
|
15
|
+
/**
|
|
16
|
+
* @constructor
|
|
17
|
+
* @param {Component} owner Owner component. When destroyed, the owner will destroy this component as well.
|
|
18
|
+
* @param {CubeTextureConfiguration} [cfg] Configs
|
|
19
|
+
*/
|
|
20
|
+
constructor(owner: Component, cfg?: CubeTextureConfiguration);
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Destroys this CubeTexture
|
|
24
|
+
*
|
|
25
|
+
*/
|
|
26
|
+
destroy(): void;
|
|
27
|
+
}
|
|
@@ -22,4 +22,81 @@ export declare class DirLight extends Light {
|
|
|
22
22
|
* @param {DirLightConfiguration} [cfg] DirLight configuration
|
|
23
23
|
*/
|
|
24
24
|
constructor(owner: Component, cfg: DirLightConfiguration);
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Sets the direction in which the DirLight is shining.
|
|
28
|
+
*
|
|
29
|
+
* Default value is ````[1.0, 1.0, 1.0]````.
|
|
30
|
+
*
|
|
31
|
+
* @param {Number[]} value The direction vector.
|
|
32
|
+
*/
|
|
33
|
+
set dir(value: number);
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Gets the direction in which the DirLight is shining.
|
|
37
|
+
*
|
|
38
|
+
* Default value is ````[1.0, 1.0, 1.0]````.
|
|
39
|
+
*
|
|
40
|
+
* @returns {Number[]} The direction vector.
|
|
41
|
+
*/
|
|
42
|
+
get dir(): number;
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Sets the RGB color of this DirLight.
|
|
46
|
+
*
|
|
47
|
+
* Default value is ````[0.7, 0.7, 0.8]````.
|
|
48
|
+
*
|
|
49
|
+
* @param {Number[]} color The DirLight's RGB color.
|
|
50
|
+
*/
|
|
51
|
+
set color(color: number[]);
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Gets the RGB color of this DirLight.
|
|
55
|
+
*
|
|
56
|
+
* Default value is ````[0.7, 0.7, 0.8]````.
|
|
57
|
+
*
|
|
58
|
+
* @returns {Number[]} The DirLight's RGB color.
|
|
59
|
+
*/
|
|
60
|
+
get color(): number[];
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Sets the intensity of this DirLight.
|
|
64
|
+
*
|
|
65
|
+
* Default intensity is ````1.0```` for maximum intensity.
|
|
66
|
+
*
|
|
67
|
+
* @param {Number} intensity The DirLight's intensity
|
|
68
|
+
*/
|
|
69
|
+
set intensity(intensity: number);
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Gets the intensity of this DirLight.
|
|
73
|
+
*
|
|
74
|
+
* Default value is ````1.0```` for maximum intensity.
|
|
75
|
+
*
|
|
76
|
+
* @returns {Number} The DirLight's intensity.
|
|
77
|
+
*/
|
|
78
|
+
get intensity(): number;
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Sets if this DirLight casts a shadow.
|
|
82
|
+
*
|
|
83
|
+
* Default value is ````false````.
|
|
84
|
+
*
|
|
85
|
+
* @param {Boolean} castsShadow Set ````true```` to cast shadows.
|
|
86
|
+
*/
|
|
87
|
+
set castsShadow(castsShadow: boolean);
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* Gets if this DirLight casts a shadow.
|
|
91
|
+
*
|
|
92
|
+
* Default value is ````false````.
|
|
93
|
+
*
|
|
94
|
+
* @returns {Boolean} ````true```` if this DirLight casts shadows.
|
|
95
|
+
*/
|
|
96
|
+
get castsShadow(): boolean;
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Destroys this DirLight.
|
|
100
|
+
*/
|
|
101
|
+
destroy(): void;
|
|
25
102
|
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Component } from '../Component';
|
|
2
|
+
import { CubeTexture } from './CubeTexture';
|
|
3
|
+
|
|
4
|
+
export declare type LightMapConfiguration = {
|
|
5
|
+
/**Optional ID for this LightMap, unique among all components in the parent scene, generated automatically when omitted. */
|
|
6
|
+
id?: string;
|
|
7
|
+
/**Optional map of user-defined metadata to attach to this LightMap. */
|
|
8
|
+
/**Don't know where this property is being used */
|
|
9
|
+
meta?: any;
|
|
10
|
+
/**Paths to six image files to load into this LightMap. */
|
|
11
|
+
src: string[];
|
|
12
|
+
/**Flips this LightMap's source data along its vertical axis when true. */
|
|
13
|
+
flipY?: boolean;
|
|
14
|
+
/**Encoding format. Supported values are {@link LinearEncoding} and {@link sRGBEncoding}. */
|
|
15
|
+
encoding?: number;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export declare class LightMap extends CubeTexture {
|
|
19
|
+
/**
|
|
20
|
+
* @constructor
|
|
21
|
+
* @param {Component} owner Owner component. When destroyed, the owner will destroy this component as well.
|
|
22
|
+
* @param {LightMapConfiguration} [cfg] Configs
|
|
23
|
+
*/
|
|
24
|
+
constructor(owner: Component, cfg?: LightMapConfiguration);
|
|
25
|
+
|
|
26
|
+
destroy(): void;
|
|
27
|
+
}
|
|
@@ -28,4 +28,139 @@ export declare class PointLight extends Light {
|
|
|
28
28
|
* @param {PointLightConfiguration} [cfg] PointLight configuration
|
|
29
29
|
*/
|
|
30
30
|
constructor(owner: Component, cfg: PointLightConfiguration);
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Sets the position of this PointLight.
|
|
34
|
+
*
|
|
35
|
+
* This will be either World- or View-space, depending on the value of {@link PointLight#space}.
|
|
36
|
+
*
|
|
37
|
+
* Default value is ````[1.0, 1.0, 1.0]````.
|
|
38
|
+
*
|
|
39
|
+
* @param {Number[]} pos The position.
|
|
40
|
+
*/
|
|
41
|
+
set pos(pos: number[]);
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Gets the position of this PointLight.
|
|
45
|
+
*
|
|
46
|
+
* This will be either World- or View-space, depending on the value of {@link PointLight#space}.
|
|
47
|
+
*
|
|
48
|
+
* Default value is ````[1.0, 1.0, 1.0]````.
|
|
49
|
+
*
|
|
50
|
+
* @returns {Number[]} The position.
|
|
51
|
+
*/
|
|
52
|
+
get pos(): number[];
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Sets the RGB color of this PointLight.
|
|
56
|
+
*
|
|
57
|
+
* Default value is ````[0.7, 0.7, 0.8]````.
|
|
58
|
+
*
|
|
59
|
+
* @param {Number[]} color The PointLight's RGB color.
|
|
60
|
+
*/
|
|
61
|
+
set color(color: number[]);
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Gets the RGB color of this PointLight.
|
|
65
|
+
*
|
|
66
|
+
* Default value is ````[0.7, 0.7, 0.8]````.
|
|
67
|
+
*
|
|
68
|
+
* @returns {Number[]} The PointLight's RGB color.
|
|
69
|
+
*/
|
|
70
|
+
get color(): number[];
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Sets the intensity of this PointLight.
|
|
74
|
+
*
|
|
75
|
+
* Default intensity is ````1.0```` for maximum intensity.
|
|
76
|
+
*
|
|
77
|
+
* @param {Number} intensity The PointLight's intensity
|
|
78
|
+
*/
|
|
79
|
+
set intensity(intensity: number);
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* Gets the intensity of this PointLight.
|
|
83
|
+
*
|
|
84
|
+
* Default value is ````1.0```` for maximum intensity.
|
|
85
|
+
*
|
|
86
|
+
* @returns {Number} The PointLight's intensity.
|
|
87
|
+
*/
|
|
88
|
+
get intensity(): number;
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Sets the constant attenuation factor for this PointLight.
|
|
92
|
+
*
|
|
93
|
+
* Default value is ````0````.
|
|
94
|
+
*
|
|
95
|
+
* @param {Number} value The constant attenuation factor.
|
|
96
|
+
*/
|
|
97
|
+
set constantAttenuation(value: number);
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Gets the constant attenuation factor for this PointLight.
|
|
101
|
+
*
|
|
102
|
+
* Default value is ````0````.
|
|
103
|
+
*
|
|
104
|
+
* @returns {Number} The constant attenuation factor.
|
|
105
|
+
*/
|
|
106
|
+
get constantAttenuation(): number;
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Sets the linear attenuation factor for this PointLight.
|
|
110
|
+
*
|
|
111
|
+
* Default value is ````0````.
|
|
112
|
+
*
|
|
113
|
+
* @param {Number} value The linear attenuation factor.
|
|
114
|
+
*/
|
|
115
|
+
set linearAttenuation(value: number);
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* Gets the linear attenuation factor for this PointLight.
|
|
119
|
+
*
|
|
120
|
+
* Default value is ````0````.
|
|
121
|
+
*
|
|
122
|
+
* @returns {Number} The linear attenuation factor.
|
|
123
|
+
*/
|
|
124
|
+
get linearAttenuation(): number;
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Sets the quadratic attenuation factor for this PointLight.
|
|
128
|
+
*
|
|
129
|
+
* Default value is ````0````.
|
|
130
|
+
*
|
|
131
|
+
* @param {Number} value The quadratic attenuation factor.
|
|
132
|
+
*/
|
|
133
|
+
set quadraticAttenuation(value: number);
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* Gets the quadratic attenuation factor for this PointLight.
|
|
137
|
+
*
|
|
138
|
+
* Default value is ````0````.
|
|
139
|
+
*
|
|
140
|
+
* @returns {Number} The quadratic attenuation factor.
|
|
141
|
+
*/
|
|
142
|
+
get quadraticAttenuation(): number;
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* Sets if this PointLight casts a shadow.
|
|
146
|
+
*
|
|
147
|
+
* Default value is ````false````.
|
|
148
|
+
*
|
|
149
|
+
* @param {Boolean} castsShadow Set ````true```` to cast shadows.
|
|
150
|
+
*/
|
|
151
|
+
set castsShadow(castsShadow: boolean);
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* Gets if this PointLight casts a shadow.
|
|
155
|
+
*
|
|
156
|
+
* Default value is ````false````.
|
|
157
|
+
*
|
|
158
|
+
* @returns {Boolean} ````true```` if this PointLight casts shadows.
|
|
159
|
+
*/
|
|
160
|
+
get castsShadow(): boolean;
|
|
161
|
+
|
|
162
|
+
/**
|
|
163
|
+
* Destroys this PointLight.
|
|
164
|
+
*/
|
|
165
|
+
destroy(): void;
|
|
31
166
|
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Component } from '../Component';
|
|
2
|
+
import { CubeTexture } from './CubeTexture';
|
|
3
|
+
|
|
4
|
+
export declare type CubeTextureConfiguraton = {
|
|
5
|
+
/**Optional ID for this ReflectionMap, unique among all components in the parent scene, generated automatically when omitted. */
|
|
6
|
+
id?: string;
|
|
7
|
+
/** Paths to six image files to load into this ReflectionMap. */
|
|
8
|
+
src: string[];
|
|
9
|
+
/** Flips this ReflectionMap's source data along its vertical axis when true. */
|
|
10
|
+
flipY: boolean;
|
|
11
|
+
/** Encoding format. Supported values are {@link LinearEncoding} and {@link sRGBEncoding}. */
|
|
12
|
+
encoding?: number;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export declare class ReflectionMap extends CubeTexture {
|
|
16
|
+
/**
|
|
17
|
+
* @param {Component} owner Owner component. When destroyed, the owner will destroy this component as well.
|
|
18
|
+
* @param {CubeTextureConfiguraton} [cfg] Configs
|
|
19
|
+
*/
|
|
20
|
+
constructor(owner: Component, cfg?: CubeTextureConfiguraton);
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Destroys this ReflectionMap.
|
|
24
|
+
*/
|
|
25
|
+
destroy(): void;
|
|
26
|
+
}
|
|
@@ -1,69 +1,28 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
* transparent: true
|
|
19
|
-
* });
|
|
20
|
-
*
|
|
21
|
-
* viewer.scene.camera.eye = [0, 0, 5];
|
|
22
|
-
* viewer.scene.camera.look = [0, 0, 0];
|
|
23
|
-
* viewer.scene.camera.up = [0, 1, 0];
|
|
24
|
-
*
|
|
25
|
-
* new Mesh(viewer.scene, {
|
|
26
|
-
* geometry: new ReadableGeometry(viewer.scene, buildTorusGeometry({
|
|
27
|
-
* center: [0, 0, 0],
|
|
28
|
-
* radius: 1.5,
|
|
29
|
-
* tube: 0.5,
|
|
30
|
-
* radialSegments: 32,
|
|
31
|
-
* tubeSegments: 24,
|
|
32
|
-
* arc: Math.PI * 2.0
|
|
33
|
-
* }),
|
|
34
|
-
* material: new PhongMaterial(viewer.scene, {
|
|
35
|
-
* alpha: 0.9,
|
|
36
|
-
* alphaMode: "blend",
|
|
37
|
-
* ambient: [0.0, 0.0, 0.0],
|
|
38
|
-
* shininess: 30,
|
|
39
|
-
* diffuseMap: new Texture(viewer.scene, {
|
|
40
|
-
* src: "textures/diffuse/uvGrid2.jpg"
|
|
41
|
-
* }),
|
|
42
|
-
* alphaFresnel: new Fresnel(viewer.scene, {
|
|
43
|
-
v edgeBias: 0.2,
|
|
44
|
-
* centerBias: 0.8,
|
|
45
|
-
* edgeColor: [1.0, 1.0, 1.0],
|
|
46
|
-
* centerColor: [0.0, 0.0, 0.0],
|
|
47
|
-
* power: 2
|
|
48
|
-
* })
|
|
49
|
-
* })
|
|
50
|
-
* });
|
|
51
|
-
* ````
|
|
52
|
-
*/
|
|
1
|
+
import { Component } from "../Component";
|
|
2
|
+
|
|
3
|
+
export declare type FresnelMaterialConfiguration = {
|
|
4
|
+
/** Optional ID, unique among all components in the parent scene, generated automatically when omitted. */
|
|
5
|
+
id?: string;
|
|
6
|
+
/** Color used on edges. */
|
|
7
|
+
edgeColor?: number[];
|
|
8
|
+
/** Color used on center. */
|
|
9
|
+
centerColor?: number[];
|
|
10
|
+
/** Bias at the edge. */
|
|
11
|
+
edgeBias?: number;
|
|
12
|
+
/** Bias at the center. */
|
|
13
|
+
centerBias?: number;
|
|
14
|
+
/** The power. */
|
|
15
|
+
power?: number;
|
|
16
|
+
}
|
|
17
|
+
|
|
53
18
|
export declare class Fresnel extends Component {
|
|
54
19
|
/**
|
|
55
20
|
* @constructor
|
|
56
21
|
* @param {Component} owner Owner component. When destroyed, the owner will destroy this Fresnel as well.
|
|
57
|
-
* @param {
|
|
58
|
-
* @param {String} [cfg.id] Optional ID, unique among all components in the parent scene, generated automatically when omitted.
|
|
59
|
-
* @param {Number[]} [cfg.edgeColor=[ 0.0, 0.0, 0.0 ]] Color used on edges.
|
|
60
|
-
* @param {Number[]} [cfg.centerColor=[ 1.0, 1.0, 1.0 ]] Color used on center.
|
|
61
|
-
* @param {Number} [cfg.edgeBias=0] Bias at the edge.
|
|
62
|
-
* @param {Number} [cfg.centerBias=1] Bias at the center.
|
|
63
|
-
* @param {Number} [cfg.power=0] The power.
|
|
22
|
+
* @param {FresnelMaterialConfiguration} [cfg] Configs
|
|
64
23
|
*/
|
|
65
|
-
constructor(owner: Component, cfg?:
|
|
66
|
-
|
|
24
|
+
constructor(owner: Component, cfg?: FresnelMaterialConfiguration);
|
|
25
|
+
|
|
67
26
|
/**
|
|
68
27
|
* Sets the Fresnel's edge color.
|
|
69
28
|
*
|
|
@@ -144,5 +103,9 @@ export declare class Fresnel extends Component {
|
|
|
144
103
|
* @type {Number}
|
|
145
104
|
*/
|
|
146
105
|
get power(): number;
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* Destroys this Fresnel.
|
|
109
|
+
*/
|
|
110
|
+
destroy(): void;
|
|
147
111
|
}
|
|
148
|
-
import { Component } from "../Component";
|