@xeokit/xeokit-sdk 2.2.5 → 2.3.0-beta-2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (120) hide show
  1. package/dist/web-ifc.wasm +0 -0
  2. package/dist/xeokit-sdk.cjs.js +87051 -79967
  3. package/dist/xeokit-sdk.es.js +87051 -79967
  4. package/dist/xeokit-sdk.min.cjs.js +1 -1
  5. package/dist/xeokit-sdk.min.es.js +1 -1
  6. package/package.json +18 -22
  7. package/types/extras/ContextMenu/ContextMenu.d.ts +125 -0
  8. package/types/extras/ContextMenu/index.d.ts +1 -0
  9. package/types/extras/index.d.ts +1 -0
  10. package/types/index.d.ts +3 -0
  11. package/types/plugins/AngleMeasurementsPlugin/AngleMeasurement.d.ts +144 -0
  12. package/types/plugins/AngleMeasurementsPlugin/AngleMeasurementsControl.d.ts +67 -0
  13. package/types/plugins/AngleMeasurementsPlugin/AngleMeasurementsPlugin.d.ts +99 -0
  14. package/types/plugins/AngleMeasurementsPlugin/index.d.ts +1 -0
  15. package/types/plugins/AnnotationsPlugin/Annotation.d.ts +135 -0
  16. package/types/plugins/AnnotationsPlugin/AnnotationsPlugin.d.ts +150 -0
  17. package/types/plugins/AnnotationsPlugin/index.d.ts +2 -0
  18. package/types/plugins/AxisGizmoPlugin/AxisGizmoPlugin.d.ts +28 -0
  19. package/types/plugins/AxisGizmoPlugin/index.d.ts +1 -0
  20. package/types/plugins/BCFViewpointsPlugin/BCFViewpointsPlugin.d.ts +146 -0
  21. package/types/plugins/BCFViewpointsPlugin/index.d.ts +1 -0
  22. package/types/plugins/CityJSONLoaderPlugin/CityJSONLoaderPlugin.d.ts +81 -0
  23. package/types/plugins/CityJSONLoaderPlugin/index.d.ts +1 -0
  24. package/types/plugins/DistanceMeasurementsPlugin/DistanceMeasurement.d.ts +137 -0
  25. package/types/plugins/DistanceMeasurementsPlugin/DistanceMeasurementsControl.d.ts +65 -0
  26. package/types/plugins/DistanceMeasurementsPlugin/DistanceMeasurementsPlugin.d.ts +135 -0
  27. package/types/plugins/DistanceMeasurementsPlugin/index.d.ts +1 -0
  28. package/types/plugins/FastNavPlugin/FastNavPlugin.d.ts +203 -0
  29. package/types/plugins/FastNavPlugin/index.d.ts +1 -0
  30. package/types/plugins/GLTFLoaderPlugin/GLTFLoaderPlugin.d.ts +140 -0
  31. package/types/plugins/GLTFLoaderPlugin/index.d.ts +1 -0
  32. package/types/plugins/LASLoaderPlugin/LASLoaderPlugin.d.ts +146 -0
  33. package/types/plugins/LASLoaderPlugin/index.d.ts +1 -0
  34. package/types/plugins/NavCubePlugin/NavCubePlugin.d.ts +160 -0
  35. package/types/plugins/NavCubePlugin/index.d.ts +1 -0
  36. package/types/plugins/OBJLoaderPlugin/OBJLoaderPlugin.d.ts +44 -0
  37. package/types/plugins/OBJLoaderPlugin/index.d.ts +1 -0
  38. package/types/plugins/STLLoaderPlugin/STLLoaderPlugin.d.ts +88 -0
  39. package/types/plugins/STLLoaderPlugin/index.d.ts +1 -0
  40. package/types/plugins/SectionPlanesPlugin/SectionPlanesPlugin.d.ts +103 -0
  41. package/types/plugins/SectionPlanesPlugin/index.d.ts +1 -0
  42. package/types/plugins/SkyboxesPlugin/SkyboxesPlugin.d.ts +34 -0
  43. package/types/plugins/SkyboxesPlugin/index.d.ts +1 -0
  44. package/types/plugins/StoreyViewsPlugin/Storey.d.ts +47 -0
  45. package/types/plugins/StoreyViewsPlugin/StoreyMap.d.ts +41 -0
  46. package/types/plugins/StoreyViewsPlugin/StoreyViewsPlugin.d.ts +180 -0
  47. package/types/plugins/StoreyViewsPlugin/index.d.ts +1 -0
  48. package/types/plugins/TreeViewPlugin/ModelTreeView.d.ts +24 -0
  49. package/types/plugins/TreeViewPlugin/TreeViewNode.d.ts +66 -0
  50. package/types/plugins/TreeViewPlugin/TreeViewPlugin.d.ts +150 -0
  51. package/types/plugins/TreeViewPlugin/index.d.ts +1 -0
  52. package/types/plugins/ViewCullPlugin/ViewCullPlugin.d.ts +34 -0
  53. package/types/plugins/ViewCullPlugin/index.d.ts +1 -0
  54. package/types/plugins/WebIFCLoaderPlugin/WebIFCLoaderPlugin.d.ts +230 -0
  55. package/types/plugins/WebIFCLoaderPlugin/index.d.ts +1 -0
  56. package/types/plugins/XKTLoaderPlugin/XKTLoaderPlugin.d.ts +277 -0
  57. package/types/plugins/XKTLoaderPlugin/index.d.ts +1 -0
  58. package/types/plugins/XML3DLoaderPlugin/XML3DLoaderPlugin.d.ts +65 -0
  59. package/types/plugins/XML3DLoaderPlugin/index.d.ts +1 -0
  60. package/types/plugins/index.d.ts +34 -0
  61. package/types/viewer/Configs.d.ts +20 -0
  62. package/types/viewer/Plugin.d.ts +69 -0
  63. package/types/viewer/Viewer.d.ts +212 -0
  64. package/types/viewer/index.d.ts +6 -0
  65. package/types/viewer/localization/LocaleService.d.ts +183 -0
  66. package/types/viewer/metadata/IFCObjectDefaults.d.ts +9 -0
  67. package/types/viewer/metadata/MetaModel.d.ts +65 -0
  68. package/types/viewer/metadata/MetaObject.d.ts +74 -0
  69. package/types/viewer/metadata/MetaScene.d.ts +135 -0
  70. package/types/viewer/metadata/Property.d.ts +29 -0
  71. package/types/viewer/metadata/PropertySet.d.ts +31 -0
  72. package/types/viewer/metadata/index.d.ts +6 -0
  73. package/types/viewer/scene/CameraControl/CameraControl.d.ts +681 -0
  74. package/types/viewer/scene/Component.d.ts +155 -0
  75. package/types/viewer/scene/Entity.d.ts +394 -0
  76. package/types/viewer/scene/camera/Camera.d.ts +364 -0
  77. package/types/viewer/scene/camera/CameraFlightAnimation.d.ts +167 -0
  78. package/types/viewer/scene/camera/CameraPath.d.ts +28 -0
  79. package/types/viewer/scene/camera/CameraPathAnimation.d.ts +95 -0
  80. package/types/viewer/scene/camera/CustomProjection.d.ts +57 -0
  81. package/types/viewer/scene/camera/Frustum.d.ts +166 -0
  82. package/types/viewer/scene/camera/Ortho.d.ts +115 -0
  83. package/types/viewer/scene/camera/Perspective.d.ts +136 -0
  84. package/types/viewer/scene/camera/index.d.ts +4 -0
  85. package/types/viewer/scene/geometry/Geometry.d.ts +7 -0
  86. package/types/viewer/scene/geometry/ReadableGeometry.d.ts +95 -0
  87. package/types/viewer/scene/geometry/index.d.ts +1 -0
  88. package/types/viewer/scene/index.d.ts +17 -0
  89. package/types/viewer/scene/marker/Marker.d.ts +136 -0
  90. package/types/viewer/scene/marker/index.d.ts +1 -0
  91. package/types/viewer/scene/materials/EdgeMaterial.d.ts +83 -0
  92. package/types/viewer/scene/materials/EmphasisMaterial.d.ts +241 -0
  93. package/types/viewer/scene/materials/Fresnel.d.ts +148 -0
  94. package/types/viewer/scene/materials/LinesMaterial.d.ts +71 -0
  95. package/types/viewer/scene/materials/Material.d.ts +3 -0
  96. package/types/viewer/scene/materials/PhongMaterial.d.ts +468 -0
  97. package/types/viewer/scene/materials/PointsMaterial.d.ts +206 -0
  98. package/types/viewer/scene/materials/Texture.d.ts +260 -0
  99. package/types/viewer/scene/materials/index.d.ts +6 -0
  100. package/types/viewer/scene/math/math.d.ts +56 -0
  101. package/types/viewer/scene/mementos/CameraMemento.d.ts +28 -0
  102. package/types/viewer/scene/mementos/ModelMemento.d.ts +44 -0
  103. package/types/viewer/scene/mementos/ObjectsMemento.d.ts +39 -0
  104. package/types/viewer/scene/mementos/index.d.ts +3 -0
  105. package/types/viewer/scene/mesh/Mesh.d.ts +786 -0
  106. package/types/viewer/scene/mesh/index.d.ts +1 -0
  107. package/types/viewer/scene/models/PerformanceModel/PerformanceModel.d.ts +622 -0
  108. package/types/viewer/scene/models/PerformanceModel/PerformanceNode.d.ts +302 -0
  109. package/types/viewer/scene/models/PerformanceModel/index.d.ts +2 -0
  110. package/types/viewer/scene/models/index.d.ts +1 -0
  111. package/types/viewer/scene/nodes/Node.d.ts +664 -0
  112. package/types/viewer/scene/nodes/index.d.ts +1 -0
  113. package/types/viewer/scene/postfx/SAO.d.ts +209 -0
  114. package/types/viewer/scene/scene/Scene.d.ts +771 -0
  115. package/types/viewer/scene/sectionPlane/SectionPlane.d.ts +93 -0
  116. package/types/viewer/scene/sectionPlane/index.d.ts +1 -0
  117. package/types/viewer/scene/viewport/Viewport.d.ts +23 -0
  118. package/types/viewer/scene/viewport/index.d.ts +1 -0
  119. package/types/viewer/scene/webgl/PickResult.d.ts +103 -0
  120. package/types/viewer/scene/webgl/index.d.ts +1 -0
@@ -0,0 +1,136 @@
1
+ import { Component } from "../Component";
2
+ import { Entity } from "../Entity";
3
+
4
+ export declare type MarkerConfiguration = {
5
+ /** Optional ID, unique among all components in the parent {@link Scene}, generated automatically when omitted. */
6
+ id?: string;
7
+ /** Entity to associate this Marker with. When the Marker has an Entity, then {@link Marker.visible} will always be ````false```` if {@link Entity.visible} is false. */
8
+ entity?: Entity
9
+ /** Indicates whether or not this Marker is hidden (ie. {@link Marker.visible} is ````false```` whenever occluded by {@link Entity}s in the {@link Scene}. */
10
+ occludable?: boolean;
11
+ /** World-space 3D Marker position. */
12
+ worldPos?: number[];
13
+ };
14
+
15
+ /**
16
+ * @desc Tracks the World, View and Canvas coordinates, and visibility, of a position within a {@link Scene}.
17
+ */
18
+ export declare class Marker extends Component {
19
+ /**
20
+ * @constructor
21
+ * @param {Component} [owner] Owner component. When destroyed, the owner will destroy this Marker as well.
22
+ * @param {MarkerConfiguration} [cfg] Marker configuration
23
+ */
24
+ constructor(owner?: Component, cfg?: MarkerConfiguration);
25
+
26
+ /**
27
+ * Sets the {@link Entity} this Marker is associated with.
28
+ *
29
+ * An Entity is optional. When the Marker has an Entity, then {@link Marker.visible} will always be ````false````
30
+ * if {@link Entity.visible} is false.
31
+ *
32
+ * @type {Entity}
33
+ */
34
+ set entity(arg: Entity);
35
+
36
+ /**
37
+ * Gets the {@link Entity} this Marker is associated with.
38
+ *
39
+ * @type {Entity}
40
+ */
41
+ get entity(): Entity;
42
+
43
+ /**
44
+ * Sets the World-space 3D position of this Marker.
45
+ *
46
+ * Fires a "worldPos" event with new World position.
47
+ *
48
+ * @type {Number[]}
49
+ */
50
+ set worldPos(arg: number[]);
51
+
52
+ /**
53
+ * Gets the World-space 3D position of this Marker.
54
+ *
55
+ * @type {Number[]}
56
+ */
57
+ get worldPos(): number[];
58
+
59
+ /**
60
+ * Sets whether occlusion testing is performed for this Marker.
61
+ *
62
+ * When this is ````true````, then {@link Marker.visible} will be ````false```` whenever the Marker is occluded by an {@link Entity} in the 3D view.
63
+ *
64
+ * The {@link Scene} periodically occlusion-tests all Markers on every 20th "tick" (which represents a rendered frame). We
65
+ * can adjust that frequency via property {@link Scene.ticksPerOcclusionTest}.
66
+ *
67
+ * @type {Boolean}
68
+ */
69
+ set occludable(arg: boolean);
70
+
71
+ /**
72
+ * Gets whether occlusion testing is performed for this Marker.
73
+ *
74
+ * When this is ````true````, then {@link Marker.visible} will be ````false```` whenever the Marker is occluded by an {@link Entity} in the 3D view.
75
+ *
76
+ * @type {Boolean}
77
+ */
78
+ get occludable(): boolean;
79
+
80
+ /**
81
+ * Gets the RTC center of this Marker.
82
+ *
83
+ * This is automatically calculated from {@link Marker.worldPos}.
84
+ *
85
+ * @type {Number[]}
86
+ */
87
+ get origin(): number[];
88
+
89
+ /**
90
+ * Gets the RTC position of this Marker.
91
+ *
92
+ * This is automatically calculated from {@link Marker.worldPos}.
93
+ *
94
+ * @type {Number[]}
95
+ */
96
+ get rtcPos(): number[];
97
+
98
+ /**
99
+ * View-space 3D coordinates of this Marker.
100
+ *
101
+ * This property is read-only and is automatically calculated from {@link Marker.worldPos} and the current {@link Camera} position.
102
+ *
103
+ * The Marker fires a "viewPos" event whenever this property changes.
104
+ *
105
+ * @type {Number[]}
106
+ */
107
+ get viewPos(): number[];
108
+
109
+ /**
110
+ * Canvas-space 2D coordinates of this Marker.
111
+ *
112
+ * This property is read-only and is automatically calculated from {@link Marker.worldPos} and the current {@link Camera} position and projection.
113
+ *
114
+ * The Marker fires a "canvasPos" event whenever this property changes.
115
+ *
116
+ * @type {Number[]}
117
+ */
118
+ get canvasPos(): number[];
119
+
120
+ /**
121
+ * Indicates if this Marker is currently visible.
122
+ *
123
+ * This is read-only and is automatically calculated.
124
+ *
125
+ * The Marker is **invisible** whenever:
126
+ *
127
+ * * {@link Marker.canvasPos} is currently outside the canvas,
128
+ * * {@link Marker.entity} is set to an {@link Entity} that has {@link Entity.visible} ````false````, or
129
+ * * or {@link Marker.occludable} is ````true```` and the Marker is currently occluded by an Entity in the 3D view.
130
+ *
131
+ * The Marker fires a "visible" event whenever this property changes.
132
+ *
133
+ * @type {Boolean}
134
+ */
135
+ get visible(): boolean;
136
+ }
@@ -0,0 +1 @@
1
+ export * from "./Marker";
@@ -0,0 +1,83 @@
1
+ import { Material } from "./Material";
2
+ import { Component } from "../Component";
3
+
4
+ export declare type EdgeMaterialConfiguration = {
5
+ /** Optional ID, unique among all components in the parent {@link Scene}, generated automatically when omitted. */
6
+ id?: string;
7
+ /** RGB edge color. */
8
+ edgeColor?: number[];
9
+ /** Edge transparency. */
10
+ edgeAlpha?: number;
11
+ /** Edge width in pixels. */
12
+ edgeWidth?: number;
13
+ /** Selects a preset EdgeMaterial configuration */
14
+ preset?: string;
15
+ };
16
+
17
+ /**
18
+ * Configures the appearance of {@link Entity}s when their edges are emphasised.
19
+ */
20
+ export declare class EdgeMaterial extends Material {
21
+ /**
22
+ * @constructor
23
+ * @param {Component} owner Owner component. When destroyed, the owner will destroy this component as well.
24
+ * @param {EdgeMaterialConfiguration} [cfg] The EdgeMaterial configuration
25
+ */
26
+ constructor(owner: Component, cfg?: EdgeMaterialConfiguration);
27
+
28
+ /**
29
+ * Gets available EdgeMaterial presets.
30
+ */
31
+ get presets(): any;
32
+
33
+ /**
34
+ * Selects a preset EdgeMaterial configuration.
35
+ * @type {String}
36
+ */
37
+ set preset(arg: string);
38
+
39
+ /**
40
+ * The current preset EdgeMaterial configuration.
41
+ */
42
+ get preset(): string;
43
+
44
+ /**
45
+ * Sets RGB edge color.
46
+ */
47
+ set edgeColor(arg: number[]);
48
+
49
+ /**
50
+ * Gets RGB edge color.
51
+ */
52
+ get edgeColor(): number[];
53
+
54
+ /**
55
+ * Sets edge transparency.
56
+ */
57
+ set edgeAlpha(arg: number);
58
+
59
+ /**
60
+ * Gets edge transparency.
61
+ */
62
+ get edgeAlpha(): number;
63
+
64
+ /**
65
+ * Sets edge width.
66
+ */
67
+ set edgeWidth(arg: number);
68
+
69
+ /**
70
+ * Gets edge width.
71
+ */
72
+ get edgeWidth(): number;
73
+
74
+ /**
75
+ * Sets if edges are visible.
76
+ */
77
+ set edges(arg: boolean);
78
+
79
+ /**
80
+ * Gets if edges are visible.
81
+ */
82
+ get edges(): boolean;
83
+ }
@@ -0,0 +1,241 @@
1
+ import { Material } from "./Material";
2
+ import { Component } from "../Component";
3
+
4
+ export declare type EmphasisMaterialConfiguration = {
5
+ /** Optional ID, unique among all components in the parent {@link Scene}, generated automatically when omitted. */
6
+ id?: string;
7
+ /** Indicates if xray surfaces are filled with color. */
8
+ fill?: boolean;
9
+ /** EmphasisMaterial fill color. */
10
+ fillColor?: number[];
11
+ /** Transparency of filled xray faces. A value of ````0.0```` indicates fully transparent, ````1.0```` is fully opaque.*/
12
+ fillAlpha?: number;
13
+ /** Indicates if xray edges are visible. */
14
+ edges?: boolean;
15
+ /** RGB color of xray edges. */
16
+ edgeColor?: number[];
17
+ /** Transparency of xray edges. A value of ````0.0```` indicates fully transparent, ````1.0```` is fully opaque. */
18
+ edgeAlpha?: number;
19
+ /** Width of xray edges, in pixels. */
20
+ edgeWidth?: number;
21
+ /** Selects a preset EmphasisMaterial configuration - see {@link EmphasisMaterial.presets}. */
22
+ preset?: string;
23
+ /** Whether to render geometry backfaces when emphasising. */
24
+ backfaces?: boolean;
25
+ /** Whether to make the emphasized object appear to float on top of other objects, as if it were "glowing through" them. */
26
+ glowThrough?: boolean;
27
+ };
28
+
29
+ /**
30
+ * Configures the appearance of {@link Entity}s when they are xrayed, highlighted or selected.
31
+ */
32
+ export declare class EmphasisMaterial extends Material {
33
+ /**
34
+ * @constructor
35
+ * @param {Component} owner Owner component. When destroyed, the owner will destroy this component as well.
36
+ * @param {EmphasisMaterialConfiguration} [cfg] The EmphasisMaterial configuration
37
+ */
38
+ constructor(owner: Component, cfg?: EmphasisMaterialConfiguration);
39
+
40
+ /**
41
+ * Gets available EmphasisMaterial presets.
42
+ *
43
+ * @type {Object}
44
+ */
45
+ get presets(): any;
46
+
47
+ /**
48
+ * Selects a preset EmphasisMaterial configuration.
49
+ *
50
+ * Default value is "default".
51
+ *
52
+ * @type {String}
53
+ */
54
+ set preset(arg: string);
55
+
56
+ /**
57
+ * Gets the current preset EmphasisMaterial configuration.
58
+ *
59
+ * Default value is "default".
60
+ *
61
+ * @type {String}
62
+ */
63
+ get preset(): string;
64
+
65
+ /**
66
+ * Sets if surfaces are filled with color.
67
+ *
68
+ * Default is ````true````.
69
+ *
70
+ * @type {Boolean}
71
+ */
72
+ set fill(arg: boolean);
73
+
74
+ /**
75
+ * Gets if surfaces are filled with color.
76
+ *
77
+ * Default is ````true````.
78
+ *
79
+ * @type {Boolean}
80
+ */
81
+ get fill(): boolean;
82
+
83
+ /**
84
+ * Sets the RGB color of filled faces.
85
+ *
86
+ * Default is ````[0.4, 0.4, 0.4]````.
87
+ *
88
+ * @type {Number[]}
89
+ */
90
+ set fillColor(arg: number[]);
91
+
92
+ /**
93
+ * Gets the RGB color of filled faces.
94
+ *
95
+ * Default is ````[0.4, 0.4, 0.4]````.
96
+ *
97
+ * @type {Number[]}
98
+ */
99
+ get fillColor(): number[];
100
+
101
+ /**
102
+ * Sets the transparency of filled faces.
103
+ *
104
+ * A value of ````0.0```` indicates fully transparent, ````1.0```` is fully opaque.
105
+ *
106
+ * Default is ````0.2````.
107
+ *
108
+ * @type {Number}
109
+ */
110
+ set fillAlpha(arg: number);
111
+
112
+ /**
113
+ * Gets the transparency of filled faces.
114
+ *
115
+ * A value of ````0.0```` indicates fully transparent, ````1.0```` is fully opaque.
116
+ *
117
+ * Default is ````0.2````.
118
+ *
119
+ * @type {Number}
120
+ */
121
+
122
+ get fillAlpha(): number;
123
+
124
+ /**
125
+ * Sets if edges are visible.
126
+ *
127
+ * Default is ````true````.
128
+ *
129
+ * @type {Boolean}
130
+ */
131
+ set edges(arg: boolean);
132
+
133
+ /**
134
+ * Gets if edges are visible.
135
+ *
136
+ * Default is ````true````.
137
+ *
138
+ * @type {Boolean}
139
+ */
140
+ get edges(): boolean;
141
+
142
+ /**
143
+ * Sets the RGB color of edges.
144
+ *
145
+ * Default is ```` [0.2, 0.2, 0.2]````.
146
+ *
147
+ * @type {Number[]}
148
+ */
149
+ set edgeColor(arg: number[]);
150
+
151
+ /**
152
+ * Gets the RGB color of edges.
153
+ *
154
+ * Default is ```` [0.2, 0.2, 0.2]````.
155
+ *
156
+ * @type {Number[]}
157
+ */
158
+ get edgeColor(): number[];
159
+
160
+ /**
161
+ * Sets the transparency of edges.
162
+ *
163
+ * A value of ````0.0```` indicates fully transparent, ````1.0```` is fully opaque.
164
+ *
165
+ * Default is ````0.2````.
166
+ *
167
+ * @type {Number}
168
+ */
169
+ set edgeAlpha(arg: number);
170
+
171
+ /**
172
+ * Gets the transparency of edges.
173
+ *
174
+ * A value of ````0.0```` indicates fully transparent, ````1.0```` is fully opaque.
175
+ *
176
+ * Default is ````0.2````.
177
+ *
178
+ * @type {Number}
179
+ */
180
+ get edgeAlpha(): number;
181
+
182
+ /**
183
+ * Sets edge width.
184
+ *
185
+ * This is not supported by WebGL implementations based on DirectX [2019].
186
+ *
187
+ * Default value is ````1.0```` pixels.
188
+ *
189
+ * @type {Number}
190
+ */
191
+ set edgeWidth(arg: number);
192
+
193
+ /**
194
+ * Gets edge width.
195
+ *
196
+ * This is not supported by WebGL implementations based on DirectX [2019].
197
+ *
198
+ * Default value is ````1.0```` pixels.
199
+ *
200
+ * @type {Number}
201
+ */
202
+ get edgeWidth(): number;
203
+
204
+ /**
205
+ * Sets whether to render backfaces when {@link EmphasisMaterial.fill} is ````true````.
206
+ *
207
+ * Default is ````false````.
208
+ *
209
+ * @type {Boolean}
210
+ */
211
+ set backfaces(arg: boolean);
212
+
213
+ /**
214
+ * Gets whether to render backfaces when {@link EmphasisMaterial.fill} is ````true````.
215
+ *
216
+ * Default is ````true````.
217
+ *
218
+ * @type {Boolean}
219
+ */
220
+ get backfaces(): boolean;
221
+
222
+ /**
223
+ * Sets whether to render emphasized objects over the top of other objects, as if they were "glowing through".
224
+ *
225
+ * Default is ````true````.
226
+ *
227
+ * Note: updating this property will not affect the appearance of objects that are already emphasized.
228
+ *
229
+ * @type {Boolean}
230
+ */
231
+ set glowThrough(arg: boolean);
232
+
233
+ /**
234
+ * Sets whether to render emphasized objects over the top of other objects, as if they were "glowing through".
235
+ *
236
+ * Default is ````true````.
237
+ *
238
+ * @type {Boolean}
239
+ */
240
+ get glowThrough(): boolean;
241
+ }
@@ -0,0 +1,148 @@
1
+ /**
2
+ * @desc Configures Fresnel effects for {@link PhongMaterial}s.
3
+ *
4
+ * Fresnels are attached to {@link PhongMaterial}s, which are attached to {@link Mesh}es.
5
+ *
6
+ * ## Usage
7
+ *
8
+ * In the example below we'll create a {@link Mesh} with a {@link PhongMaterial} that applies a Fresnel to its alpha channel to give a glasss-like effect.
9
+ *
10
+ * [[Run this example](http://xeokit.github.io/xeokit-sdk/examples/#materials_Fresnel)]
11
+ *
12
+ * ````javascript
13
+ * import {Viewer, Mesh, buildTorusGeometry,
14
+ * ReadableGeometry, PhongMaterial, Texture, Fresnel} from "xeokit-sdk.es.js";
15
+ *
16
+ * const viewer = new Viewer({
17
+ * canvasId: "myCanvas",
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
+ */
53
+ export declare class Fresnel extends Component {
54
+ /**
55
+ * @constructor
56
+ * @param {Component} owner Owner component. When destroyed, the owner will destroy this Fresnel as well.
57
+ * @param {*} [cfg] Configs
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.
64
+ */
65
+ constructor(owner: Component, cfg?: any);
66
+ _state: any;
67
+ /**
68
+ * Sets the Fresnel's edge color.
69
+ *
70
+ * Default value is ````[0.0, 0.0, 0.0]````.
71
+ *
72
+ * @type {Number[]}
73
+ */
74
+ set edgeColor(arg: number[]);
75
+ /**
76
+ * Gets the Fresnel's edge color.
77
+ *
78
+ * Default value is ````[0.0, 0.0, 0.0]````.
79
+ *
80
+ * @type {Number[]}
81
+ */
82
+ get edgeColor(): number[];
83
+ /**
84
+ * Sets the Fresnel's center color.
85
+ *
86
+ * Default value is ````[1.0, 1.0, 1.0]````.
87
+ *
88
+ * @type {Number[]}
89
+ */
90
+ set centerColor(arg: number[]);
91
+ /**
92
+ * Gets the Fresnel's center color.
93
+ *
94
+ * Default value is ````[1.0, 1.0, 1.0]````.
95
+ *
96
+ * @type {Number[]}
97
+ */
98
+ get centerColor(): number[];
99
+ /**
100
+ * Sets the Fresnel's edge bias.
101
+ *
102
+ * Default value is ````0````.
103
+ *
104
+ * @type {Number}
105
+ */
106
+ set edgeBias(arg: number);
107
+ /**
108
+ * Gets the Fresnel's edge bias.
109
+ *
110
+ * Default value is ````0````.
111
+ *
112
+ * @type {Number}
113
+ */
114
+ get edgeBias(): number;
115
+ /**
116
+ * Sets the Fresnel's center bias.
117
+ *
118
+ * Default value is ````1````.
119
+ *
120
+ * @type {Number}
121
+ */
122
+ set centerBias(arg: number);
123
+ /**
124
+ * Gets the Fresnel's center bias.
125
+ *
126
+ * Default value is ````1````.
127
+ *
128
+ * @type {Number}
129
+ */
130
+ get centerBias(): number;
131
+ /**
132
+ * Sets the Fresnel's power.
133
+ *
134
+ * Default value is ````1````.
135
+ *
136
+ * @type {Number}
137
+ */
138
+ set power(arg: number);
139
+ /**
140
+ * Gets the Fresnel's power.
141
+ *
142
+ * Default value is ````1````.
143
+ *
144
+ * @type {Number}
145
+ */
146
+ get power(): number;
147
+ }
148
+ import { Component } from "../Component";
@@ -0,0 +1,71 @@
1
+ import { Material } from "./Material";
2
+ import { Component } from "../Component";
3
+
4
+ export declare type LinesMaterialConfiguration = {
5
+ /** Optional ID, unique among all components in the parent {@link Scene}, generated automatically when omitted. */
6
+ id?: string;
7
+ /** Line width in pixels. */
8
+ lineWidth?: number;
9
+ /** Selects a preset LinesMaterial configuration - see {@link LinesMaterial.presets}. */
10
+ preset?: string;
11
+ };
12
+
13
+ /**
14
+ * Configures the shape of "lines" geometry primitives.
15
+ */
16
+ export declare class LinesMaterial extends Material {
17
+ /**
18
+ * @constructor
19
+ * @param {Component} owner Owner component. When destroyed, the owner will destroy this component as well.
20
+ * @param {LinesMaterialConfiguration} [cfg] The LinesMaterial configuration
21
+ */
22
+ constructor(owner: Component, cfg?: LinesMaterialConfiguration);
23
+ /**
24
+ * Gets available LinesMaterial presets.
25
+ *
26
+ * @type {Object}
27
+ */
28
+ get presets(): any;
29
+
30
+ /**
31
+ * Selects a preset LinesMaterial configuration.
32
+ *
33
+ * Default value is ````"default"````.
34
+ *
35
+ * @type {String}
36
+ */
37
+ set preset(arg: string);
38
+
39
+ /**
40
+ * The current preset LinesMaterial configuration.
41
+ *
42
+ * Default value is ````"default"````.
43
+ *
44
+ * @type {String}
45
+ */
46
+ get preset(): string;
47
+
48
+ /**
49
+ * Sets line width.
50
+ *
51
+ * Default value is ````1```` pixels.
52
+ *
53
+ * @type {Number}
54
+ */
55
+ set lineWidth(arg: number);
56
+
57
+ /**
58
+ * Gets the line width.
59
+ *
60
+ * Default value is ````1```` pixels.
61
+ *
62
+ * @type {Number}
63
+ */
64
+ get lineWidth(): number;
65
+
66
+ /**
67
+ * @private
68
+ * @return {string}
69
+ */
70
+ private get hash();
71
+ }
@@ -0,0 +1,3 @@
1
+ import { Component } from "../Component";
2
+ export abstract class Material extends Component {
3
+ }