@xeokit/xeokit-sdk 2.6.78-rc2-no-las → 2.6.78

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 (78) hide show
  1. package/dist/xeokit-sdk.cjs.js +32532 -15213
  2. package/dist/xeokit-sdk.es.js +32531 -15214
  3. package/dist/xeokit-sdk.es5.js +29446 -30855
  4. package/dist/xeokit-sdk.min.cjs.js +8 -8
  5. package/dist/xeokit-sdk.min.es.js +8 -8
  6. package/dist/xeokit-sdk.min.es5.js +33 -34
  7. package/package.json +4 -7
  8. package/src/plugins/CxConverterIFCLoaderPlugin/CxConverterIFCLoaderPlugin.js +68 -68
  9. package/src/plugins/CxConverterIFCLoaderPlugin/index.js +1 -1
  10. package/src/plugins/LASLoaderPlugin/index.js +1 -1
  11. package/src/plugins/XKTLoaderPlugin/parsers/ParserV1.js +5 -5
  12. package/src/plugins/XKTLoaderPlugin/parsers/ParserV10.js +5 -5
  13. package/src/plugins/XKTLoaderPlugin/parsers/ParserV12.js +9 -9
  14. package/src/plugins/XKTLoaderPlugin/parsers/ParserV2.js +5 -5
  15. package/src/plugins/XKTLoaderPlugin/parsers/ParserV3.js +5 -5
  16. package/src/plugins/XKTLoaderPlugin/parsers/ParserV4.js +5 -5
  17. package/src/plugins/XKTLoaderPlugin/parsers/ParserV5.js +5 -5
  18. package/src/plugins/XKTLoaderPlugin/parsers/ParserV6.js +5 -5
  19. package/src/plugins/XKTLoaderPlugin/parsers/ParserV7.js +5 -5
  20. package/src/plugins/XKTLoaderPlugin/parsers/ParserV8.js +5 -5
  21. package/src/plugins/XKTLoaderPlugin/parsers/ParserV9.js +5 -5
  22. package/src/plugins/index.js +2 -2
  23. package/src/viewer/scene/Entity.js +6 -0
  24. package/src/viewer/scene/model/SceneModelEntity.js +26 -0
  25. package/src/viewer/scene/model/vbo/batching/triangles/VBOBatchingTrianglesLayer.js +44 -0
  26. package/src/viewer/scene/model/vbo/instancing/triangles/VBOInstancingTrianglesLayer.js +58 -0
  27. package/src/viewer/scene/sectionCaps/SectionCaps.js +33 -27
  28. package/src/viewer/scene/webgl/ArrayBuf.js +20 -0
  29. package/types/plugins/AngleMeasurementsPlugin/AngleMeasurement.d.ts +108 -26
  30. package/types/plugins/CityJSONLoaderPlugin/CityJSONLoaderPlugin.d.ts +14 -3
  31. package/types/plugins/DotBIMLoaderPlugin/DotBIMLoaderPlugin.d.ts +23 -5
  32. package/types/plugins/GLTFLoaderPlugin/GLTFLoaderPlugin.d.ts +25 -5
  33. package/types/plugins/LASLoaderPlugin/LASLoaderPlugin.d.ts +100 -20
  34. package/types/plugins/STLLoaderPlugin/STLLoaderPlugin.d.ts +14 -3
  35. package/types/plugins/WebIFCLoaderPlugin/WebIFCLoaderPlugin.d.ts +83 -18
  36. package/types/plugins/XKTLoaderPlugin/XKTLoaderPlugin.d.ts +106 -21
  37. package/types/viewer/Configs.d.ts +24 -6
  38. package/types/viewer/scene/CameraControl/CameraControl.d.ts +445 -66
  39. package/types/viewer/scene/Component.d.ts +1 -1
  40. package/types/viewer/scene/Entity.d.ts +191 -40
  41. package/types/viewer/scene/camera/Camera.d.ts +170 -50
  42. package/types/viewer/scene/camera/CameraFlightAnimation.d.ts +57 -8
  43. package/types/viewer/scene/camera/CameraPath.d.ts +13 -8
  44. package/types/viewer/scene/camera/CameraPathAnimation.d.ts +22 -4
  45. package/types/viewer/scene/camera/CustomProjection.d.ts +21 -6
  46. package/types/viewer/scene/camera/Frustum.d.ts +90 -18
  47. package/types/viewer/scene/camera/Ortho.d.ts +54 -14
  48. package/types/viewer/scene/camera/Perspective.d.ts +70 -16
  49. package/types/viewer/scene/geometry/ReadableGeometry.d.ts +25 -21
  50. package/types/viewer/scene/geometry/VBOGeometry.d.ts +7 -7
  51. package/types/viewer/scene/lights/AmbientLight.d.ts +26 -4
  52. package/types/viewer/scene/lights/DirLight.d.ts +52 -8
  53. package/types/viewer/scene/lights/PointLight.d.ts +93 -14
  54. package/types/viewer/scene/materials/EdgeMaterial.d.ts +37 -12
  55. package/types/viewer/scene/materials/EmphasisMaterial.d.ts +119 -22
  56. package/types/viewer/scene/materials/Fresnel.d.ts +50 -10
  57. package/types/viewer/scene/materials/LambertMaterial.d.ts +90 -16
  58. package/types/viewer/scene/materials/LinesMaterial.d.ts +25 -7
  59. package/types/viewer/scene/materials/MetallicMaterial.d.ts +127 -40
  60. package/types/viewer/scene/materials/PhongMaterial.d.ts +185 -52
  61. package/types/viewer/scene/materials/PointsMaterial.d.ts +101 -20
  62. package/types/viewer/scene/materials/SpecularMaterial.d.ts +117 -41
  63. package/types/viewer/scene/materials/Texture.d.ts +62 -22
  64. package/types/viewer/scene/models/SceneModel.d.ts +233 -76
  65. package/types/viewer/scene/models/SceneModelEntity.d.ts +217 -51
  66. package/types/viewer/scene/models/SceneModelMesh.d.ts +4 -4
  67. package/types/viewer/scene/models/SceneModelTransform.d.ts +59 -14
  68. package/types/viewer/scene/paths/CubicBezierCurve.d.ts +73 -12
  69. package/types/viewer/scene/paths/Curve.d.ts +19 -6
  70. package/types/viewer/scene/paths/Path.d.ts +57 -10
  71. package/types/viewer/scene/paths/QuadraticBezierCurve.d.ts +57 -10
  72. package/types/viewer/scene/paths/SplineCurve.d.ts +32 -6
  73. package/types/viewer/scene/scene/Scene.d.ts +196 -94
  74. package/types/viewer/scene/sectionPlane/SectionPlane.d.ts +69 -12
  75. package/types/viewer/scene/viewport/Viewport.d.ts +14 -4
  76. package/types/viewer/scene/webgl/PickResult.d.ts +28 -13
  77. package/dist/xeokit-sdk.es5.js.map +0 -1
  78. package/dist/xeokit-sdk.min.es5.js.map +0 -1
@@ -12,6 +12,7 @@ const tempVec3a = math.vec3();
12
12
  const tempVec3b = math.vec3();
13
13
  const tempVec3c = math.vec3();
14
14
  const tempVec3d = math.vec3();
15
+ const planeOff = math.vec3();
15
16
 
16
17
  function pointsEqual(p1, p2) {
17
18
  return (
@@ -215,9 +216,9 @@ class SectionCaps {
215
216
  const objects = sceneModel.objects;
216
217
  // Preallocate arrays for triangle vertices to avoid repeated allocation
217
218
  const triangle = [
218
- new Float32Array(3),
219
- new Float32Array(3),
220
- new Float32Array(3)
219
+ math.vec3(),
220
+ math.vec3(),
221
+ math.vec3()
221
222
  ];
222
223
 
223
224
  this._dirtyMap[sceneModel.id].forEach((isDirty, objectId) => {
@@ -230,20 +231,29 @@ class SectionCaps {
230
231
  if(!this._doesPlaneIntersectBoundingBox(object.aabb, plane)) return;
231
232
 
232
233
  if(!this._sceneModelsData[sceneModel.id]) {
234
+ const aabb = sceneModel.aabb;
233
235
  this._sceneModelsData[sceneModel.id] = {
234
236
  verticesMap: new Map(),
235
- indicesMap: new Map()
237
+ indicesMap: new Map(),
238
+ // modelOrigin is critical to use when handling models with large coordinates.
239
+ // See XCD-306 and examples/slicing/SectionCaps_at_distance.html for more details.
240
+ modelOrigin: math.vec3([
241
+ (aabb[0] + aabb[3]) / 2,
242
+ (aabb[1] + aabb[4]) / 2,
243
+ (aabb[2] + aabb[5]) / 2
244
+ ])
236
245
  };
237
246
  }
238
247
 
239
248
  const sceneModelData = this._sceneModelsData[sceneModel.id];
249
+ const modelOrigin = sceneModelData.modelOrigin;
240
250
 
241
251
  if(!sceneModelData.verticesMap.has(objectId)) {
242
252
  const isSolid = object.meshes[0].isSolid();
243
253
  const vertices = [ ];
244
254
  const indices = [ ];
245
255
  if(isSolid && object.capMaterial) {
246
- object.getEachVertex(v => vertices.push(v[0], v[1], v[2]));
256
+ object.getEachVertex(v => vertices.push(v[0]-modelOrigin[0], v[1]-modelOrigin[1], v[2]-modelOrigin[2]));
247
257
  object.getEachIndex(i => indices.push(i));
248
258
  }
249
259
  sceneModelData.verticesMap.set(objectId, vertices);
@@ -252,6 +262,7 @@ class SectionCaps {
252
262
 
253
263
  const vertices = sceneModelData.verticesMap.get(objectId);
254
264
  const indices = sceneModelData.indicesMap.get(objectId);
265
+ const planeDist = -math.dotVec3(math.subVec3(plane.pos, modelOrigin, tempVec3a), plane.dir);
255
266
 
256
267
  const capSegments = [];
257
268
  const vertCount = indices.length;
@@ -273,8 +284,8 @@ class SectionCaps {
273
284
  const p1 = triangle[i];
274
285
  const p2 = triangle[(i + 1) % 3];
275
286
 
276
- const d1 = plane.dist + math.dotVec3(plane.dir, p1);
277
- const d2 = plane.dist + math.dotVec3(plane.dir, p2);
287
+ const d1 = planeDist + math.dotVec3(plane.dir, p1);
288
+ const d2 = planeDist + math.dotVec3(plane.dir, p2);
278
289
 
279
290
  if (d1 * d2 > 0) continue;
280
291
 
@@ -364,6 +375,7 @@ class SectionCaps {
364
375
  const caps = new Map();
365
376
  let arr;
366
377
  projectedSegments.forEach((segment, segmentId) => {
378
+ const modelOrigin = this._sceneModelsData[sceneModel.id].modelOrigin;
367
379
  arr = [];
368
380
  const loops = segment;
369
381
 
@@ -446,7 +458,7 @@ class SectionCaps {
446
458
  for (let j = 0; j < 3; j++) {
447
459
  const idx = triangles[i + j] * 2;
448
460
  const point2D = [vertices[idx], vertices[idx + 1]];
449
- const point3D = this._convertTo3D(point2D, plane);
461
+ const point3D = this._convertTo3D(point2D, plane, modelOrigin);
450
462
  triangle.push(point3D);
451
463
  }
452
464
 
@@ -509,11 +521,10 @@ class SectionCaps {
509
521
  this._prevIntersectionModelsMap[sceneModel.id] = new Map();
510
522
 
511
523
  // Cache plane direction values
512
- const offsetX = plane.dir[0] * 0.001;
513
- const offsetY = plane.dir[1] * 0.001;
514
- const offsetZ = plane.dir[2] * 0.001;
524
+ math.mulVec3Scalar(plane.dir, 0.001, planeOff); // Use dedicated planeOff, as tempVec* are overwritten by _createUVs
515
525
 
516
526
  geometryData.forEach((geometries, objectId) => {
527
+ const modelOrigin = this._sceneModelsData[sceneModel.id].modelOrigin;
517
528
  const meshArray = new Array(geometries.size); // Pre-allocate array with known size
518
529
  let meshIndex = 0;
519
530
 
@@ -522,16 +533,10 @@ class SectionCaps {
522
533
  const indices = geometry.indices;
523
534
  const verticesLength = vertices.length;
524
535
 
525
- for (let i = 0; i < verticesLength; i += 3) {
526
- vertices[i] += offsetX;
527
- vertices[i + 1] += offsetY;
528
- vertices[i + 2] += offsetZ;
529
- }
530
-
531
536
  // Build normals and UVs in parallel if possible
532
537
  const meshNormals = math.buildNormals(vertices, indices);
533
- const uvs = this._createUVs(vertices, plane);
534
-
538
+ const uvs = this._createUVs(vertices, plane, modelOrigin);
539
+
535
540
  // Create mesh with transformed vertices
536
541
  meshArray[meshIndex++] = new Mesh(this.scene, {
537
542
  id: `${plane.id}-${objectId}-${index}`,
@@ -542,6 +547,7 @@ class SectionCaps {
542
547
  normals: meshNormals,
543
548
  uv: uvs
544
549
  }),
550
+ origin: math.addVec3(modelOrigin, planeOff, tempVec3a),
545
551
  position: [0, 0, 0],
546
552
  rotation: [0, 0, 0],
547
553
  material: sceneModel.objects[objectId].capMaterial
@@ -651,7 +657,7 @@ class SectionCaps {
651
657
  return inside;
652
658
  }
653
659
 
654
- _convertTo3D(point2D, plane) {
660
+ _convertTo3D(point2D, plane, origin) {
655
661
  // Reconstruct the same basis vectors used in _projectTo2D
656
662
  let u, normal = plane.dir, planePosition = plane.pos;
657
663
  if (Math.abs(normal[0]) > Math.abs(normal[1])) {
@@ -677,9 +683,9 @@ class SectionCaps {
677
683
  // Project the point onto the cutting plane
678
684
 
679
685
  const t = math.dotVec3(normal, [
680
- planePosition[0] - result[0],
681
- planePosition[1] - result[1],
682
- planePosition[2] - result[2]
686
+ planePosition[0] - result[0] - origin[0],
687
+ planePosition[1] - result[1] - origin[1],
688
+ planePosition[2] - result[2] - origin[2]
683
689
  ]);
684
690
 
685
691
  return [
@@ -708,7 +714,7 @@ class SectionCaps {
708
714
 
709
715
  }
710
716
 
711
- _createUVs(vertices, plane) {
717
+ _createUVs(vertices, plane, origin) {
712
718
  const O = plane.pos;
713
719
  const D = tempVec3a;
714
720
  D.set(plane.dir);
@@ -717,9 +723,9 @@ class SectionCaps {
717
723
 
718
724
  const uvs = [ ];
719
725
  for (let i = 0; i < vertices.length; i += 3) {
720
- P[0] = vertices[i];
721
- P[1] = vertices[i + 1];
722
- P[2] = vertices[i + 2];
726
+ P[0] = vertices[i] + origin[0];
727
+ P[1] = vertices[i + 1] + origin[1];
728
+ P[2] = vertices[i + 2] + origin[2];
723
729
 
724
730
  // Project P onto the plane
725
731
  const OP = math.subVec3(P, O, tempVec3c);
@@ -10,6 +10,7 @@ class ArrayBuf {
10
10
  this._gl = gl;
11
11
  this.type = type;
12
12
  this.allocated = false;
13
+ this.ConstructorType = data.constructor;
13
14
 
14
15
  switch (data.constructor) {
15
16
 
@@ -94,6 +95,25 @@ class ArrayBuf {
94
95
  }
95
96
  }
96
97
 
98
+ getData(baseIndex = 0, length = (this.numItems) - baseIndex) {
99
+ if (!this.allocated) {
100
+ return [];
101
+ }
102
+
103
+ const array = new (this.ConstructorType)(length * this.itemSize);
104
+
105
+ this._gl.bindBuffer(this.type, this._handle);
106
+ this._gl.getBufferSubData(
107
+ this.type,
108
+ baseIndex * this.itemByteSize * this.itemSize,
109
+ array,
110
+ 0,
111
+ length * this.itemSize
112
+ );
113
+
114
+ return array;
115
+ }
116
+
97
117
  bind() {
98
118
  if (!this.allocated) {
99
119
  return;
@@ -13,64 +13,146 @@ export declare class AngleMeasurement extends Component {
13
13
  plugin: AngleMeasurementsPlugin;
14
14
 
15
15
  /**
16
- * Whether this AngleMeasurement indicates that its measurement is approximate.
16
+ * Sets whether this AngleMeasurement indicates that its measurement is approximate.
17
17
  *
18
18
  * This is ````true```` by default.
19
+ *
20
+ * @type {Boolean}
19
21
  */
20
- approximate: boolean;
22
+ set approximate(arg: boolean);
21
23
  /**
22
- * Whether this AngleMeasurement is visible or not.
24
+ * Gets whether this AngleMeasurement indicates that its measurement is approximate.
25
+ *
26
+ * This is ````true```` by default.
27
+ *
28
+ * @type {Boolean}
23
29
  */
24
- visible: boolean;
30
+ get approximate(): boolean;
31
+ /**
32
+ * Sets whether this AngleMeasurement is visible or not.
33
+ *
34
+ * @type {Boolean}
35
+ */
36
+ set visible(arg: boolean);
37
+ /**
38
+ * Gets whether this AngleMeasurement is visible or not.
39
+ *
40
+ * @type {Boolean}
41
+ */
42
+ get visible(): boolean;
25
43
 
26
44
  /**
27
- * Whether this AngleMeasurement is highlighted or not.
45
+ * Sets whether this AngleMeasurement is highlighted or not.
46
+ *
47
+ * @type {Boolean}
28
48
  */
29
- highlighted: boolean;
49
+ set highlighted(arg: boolean);
50
+ /**
51
+ * Gets whether this AngleMeasurement is highlighted or not.
52
+ *
53
+ * @type {Boolean}
54
+ */
55
+ get highlighted(): boolean;
30
56
 
31
57
  /**
32
- * Whether the origin {@link Marker} is visible.
58
+ * Sets if the origin {@link Marker} is visible.
59
+ *
60
+ * @type {Boolean}
61
+ */
62
+ set originVisible(arg: boolean);
63
+ /**
64
+ * Gets if the origin {@link Marker} is visible.
65
+ *
66
+ * @type {Boolean}
67
+ */
68
+ get originVisible(): boolean;
69
+ /**
70
+ * Sets if the corner {@link Marker} is visible.
71
+ *
72
+ * @type {Boolean}
73
+ */
74
+ set cornerVisible(arg: boolean);
75
+ /**
76
+ * Gets if the corner {@link Marker} is visible.
77
+ *
78
+ * @type {Boolean}
33
79
  */
34
- originVisible: boolean;
80
+ get cornerVisible(): boolean;
35
81
  /**
36
- * Whether the corner {@link Marker} is visible.
82
+ * Sets if the target {@link Marker} is visible.
83
+ *
84
+ * @type {Boolean}
37
85
  */
38
- cornerVisible: boolean;
86
+ set targetVisible(arg: boolean);
39
87
  /**
40
- * Whether the target {@link Marker} is visible.
88
+ * Gets if the target {@link Marker} is visible.
89
+ *
90
+ * @type {Boolean}
41
91
  */
42
- targetVisible: boolean;
92
+ get targetVisible(): boolean;
43
93
  /**
44
- * Whether the wire between the origin and the corner is visible.
94
+ * Sets if the wire between the origin and the corner is visible.
95
+ *
96
+ * @type {Boolean}
45
97
  */
46
- originWireVisible: boolean;
98
+ set originWireVisible(arg: boolean);
47
99
  /**
48
- * Whether the wire between the target and the corner is visible.
100
+ * Gets if the wire between the origin and the corner is visible.
101
+ *
102
+ * @type {Boolean}
49
103
  */
50
- targetWireVisible: boolean;
104
+ get originWireVisible(): boolean;
51
105
  /**
52
- * Whether the angle label is visible.
106
+ * Sets if the wire between the target and the corner is visible.
107
+ *
108
+ * @type {Boolean}
109
+ */
110
+ set targetWireVisible(arg: boolean);
111
+ /**
112
+ * Gets if the wire between the target and the corner is visible.
113
+ *
114
+ * @type {Boolean}
53
115
  */
54
- angleVisible: boolean;
116
+ get targetWireVisible(): boolean;
117
+ /**
118
+ * Sets if the angle label is visible.
119
+ *
120
+ * @type {Boolean}
121
+ */
122
+ set angleVisible(arg: boolean);
123
+ /**
124
+ * Gets if the angle label is visible.
125
+ *
126
+ * @type {Boolean}
127
+ */
128
+ get angleVisible(): boolean;
55
129
 
56
130
  /**
57
- * The origin {@link Marker}.
131
+ * Gets the origin {@link Marker}.
132
+ *
133
+ * @type {Marker}
58
134
  */
59
- readonly origin: Marker;
135
+ get origin(): Marker;
60
136
 
61
137
  /**
62
- * The corner {@link Marker}.
138
+ * Gets the corner {@link Marker}.
139
+ *
140
+ * @type {Marker}
63
141
  */
64
- readonly corner: Marker;
142
+ get corner(): Marker;
65
143
 
66
144
  /**
67
- * The target {@link Marker}.
145
+ * Gets the target {@link Marker}.
146
+ *
147
+ * @type {Marker}
68
148
  */
69
- readonly target: Marker;
149
+ get target(): Marker;
70
150
 
71
151
  /**
72
- * The angle between two connected 3D line segments, given
152
+ * Gets the angle between two connected 3D line segments, given
73
153
  * as three positions on the surface(s) of one or more {@link Entity}s.
154
+ *
155
+ * @type {Number}
74
156
  */
75
- readonly angle: number;
157
+ get angle(): number;
76
158
  }
@@ -11,7 +11,9 @@ export declare interface ICityJSONDefaultDataSource {
11
11
  */
12
12
  getCityJSON(src: string | number, ok: (json: any)=> void, error: (e: Error)=> void): void;
13
13
 
14
- cacheBuster: boolean;
14
+ get cacheBuster(): boolean;
15
+
16
+ set cacheBuster(value: boolean);
15
17
  }
16
18
 
17
19
  export declare type CityJSONLoaderPluginConfiguration = {
@@ -57,13 +59,22 @@ export declare class CityJSONLoaderPlugin extends Plugin {
57
59
  constructor(viewer: Viewer, cfg?: CityJSONLoaderPluginConfiguration);
58
60
 
59
61
  /**
60
- * Custom data source through which the CityJSONLoaderPlugin can load CityJSON files.
62
+ * Sets a custom data source through which the CityJSONLoaderPlugin can load CityJSON files.
63
+ *
64
+ * Default value is {@link CityJSONDefaultDataSource}, which loads via HTTP.
65
+ *
66
+ * @type {Object}
67
+ */
68
+ set dataSource(arg: ICityJSONDefaultDataSource);
69
+
70
+ /**
71
+ * Gets the custom data source through which the CityJSONLoaderPlugin can load CityJSON files.
61
72
  *
62
73
  * Default value is {@link CityJSONDefaultDataSource}, which loads via HTTP.
63
74
  *
64
75
  * @type {Object}
65
76
  */
66
- dataSource: ICityJSONDefaultDataSource;
77
+ get dataSource(): ICityJSONDefaultDataSource;
67
78
 
68
79
  /**
69
80
  * Loads an ````CityJSON```` model into this CityJSONLoaderPlugin's {@link Viewer}.
@@ -10,7 +10,9 @@ export declare interface IDotBIMDefaultDataSource {
10
10
  */
11
11
  getDotBIM(dotBIMSrc: string | number, ok: (buffer: ArrayBuffer) => void, error: (e: Error) => void): void;
12
12
 
13
- cacheBuster: boolean;
13
+ get cacheBuster(): boolean;
14
+
15
+ set cacheBuster(value: boolean);
14
16
  }
15
17
 
16
18
  export declare type DotBIMLoaderPluginConfiguration = {
@@ -71,20 +73,36 @@ export declare class DotBIMLoaderPlugin extends Plugin {
71
73
  constructor(viewer: Viewer, cfg?: DotBIMLoaderPluginConfiguration);
72
74
 
73
75
  /**
74
- * Custom data source through which the DotBIMLoaderPlugin can load .BIM files.
76
+ * Sets a custom data source through which the DotBIMLoaderPlugin can .BIM files.
77
+ *
78
+ * Default value is {@link DotBIMDefaultDataSource}, which loads via an XMLHttpRequest.
79
+ *
80
+ * @type {IDotBIMDefaultDataSource}
81
+ */
82
+ set dataSource(arg: IDotBIMDefaultDataSource);
83
+
84
+ /**
85
+ * Gets the custom data source through which the DotBIMLoaderPlugin can load .BIM files.
75
86
  *
76
87
  * Default value is {@link DotBIMDefaultDataSource}, which loads via an XMLHttpRequest.
77
88
  *
78
89
  * @type {IDotBIMDefaultDataSource}
79
90
  */
80
- dataSource: IDotBIMDefaultDataSource;
91
+ get dataSource(): IDotBIMDefaultDataSource;
92
+
93
+ /**
94
+ * Sets map of initial default states for each loaded {@link Entity} that represents an object.
95
+ *
96
+ * @type {IFCObjectDefaults}
97
+ */
98
+ set objectDefaults(arg: IFCObjectDefaults);
81
99
 
82
100
  /**
83
- * Map of initial default states for each loaded {@link Entity} that represents an object.
101
+ * Gets map of initial default states for each loaded {@link Entity} that represents an object.
84
102
  *
85
103
  * @type {IFCObjectDefaults}
86
104
  */
87
- objectDefaults: IFCObjectDefaults;
105
+ get objectDefaults(): IFCObjectDefaults;
88
106
 
89
107
  /**
90
108
  * Loads a .BIM model from a file into this DotBIMLoaderPlugin's {@link Viewer}.
@@ -32,7 +32,9 @@ export declare interface IGLTFDefaultDataSource {
32
32
  */
33
33
  getArrayBuffer(glTFSrc: string | number, binarySrc: string | number, ok: Function, error: Function): void;
34
34
 
35
- cacheBuster: boolean;
35
+ get cacheBuster(): boolean;
36
+
37
+ set cacheBuster(value: boolean);
36
38
  }
37
39
 
38
40
  export declare type GLTFLoaderPluginConfiguration = {
@@ -99,22 +101,40 @@ export declare class GLTFLoaderPlugin extends Plugin {
99
101
  constructor(viewer: Viewer, cfg?:GLTFLoaderPluginConfiguration);
100
102
 
101
103
  /**
102
- * Custom data source through which the GLTFLoaderPlugin can load metadata, glTF and binary attachments.
104
+ * Sets a custom data source through which the GLTFLoaderPlugin can load metadata, glTF and binary attachments.
105
+ *
106
+ * Default value is {@link GLTFDefaultDataSource}, which loads via an XMLHttpRequest.
107
+ *
108
+ * @type {Object}
109
+ */
110
+ set dataSource(arg: IGLTFDefaultDataSource);
111
+
112
+ /**
113
+ * Gets the custom data source through which the GLTFLoaderPlugin can load metadata, glTF and binary attachments.
103
114
  *
104
115
  * Default value is {@link GLTFDefaultDataSource}, which loads via an XMLHttpRequest.
105
116
  *
106
117
  * @type {Object}
107
118
  */
108
- dataSource: IGLTFDefaultDataSource;
119
+ get dataSource(): IGLTFDefaultDataSource;
120
+
121
+ /**
122
+ * Sets map of initial default states for each loaded {@link Entity} that represents an object.
123
+ *
124
+ * Default value is {@link IFCObjectDefaults}.
125
+ *
126
+ * @type {IFCObjectDefaults}
127
+ */
128
+ set objectDefaults(arg: IFCObjectDefaults);
109
129
 
110
130
  /**
111
- * Map of initial default states for each loaded {@link Entity} that represents an object.
131
+ * Gets map of initial default states for each loaded {@link Entity} that represents an object.
112
132
  *
113
133
  * Default value is {@link IFCObjectDefaults}.
114
134
  *
115
135
  * @type {IFCObjectDefaults}
116
136
  */
117
- objectDefaults: IFCObjectDefaults;
137
+ get objectDefaults(): IFCObjectDefaults;
118
138
 
119
139
  /**
120
140
  * Loads a glTF model from a file into this GLTFLoaderPlugin's {@link Viewer}.