@xeokit/xeokit-sdk 2.6.111 → 2.6.112

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.
@@ -87,6 +87,20 @@ export declare type LoadGLTFModel = {
87
87
  parseOptions?: any;
88
88
  /** Create an entity for each mesh, instead of grouping leaf meshes under their common entity. */
89
89
  entityPerMesh?: boolean;
90
+ /**
91
+ * Alternative user-provided loaders.gl library.
92
+ * This feature has been tested with loaders.gl 4.3.4 version.
93
+ * Because loaders.gl is supplied externally, xeokit cannot guarantee compatibility with all loaders.gl versions.
94
+ */
95
+ loadersGl?: {
96
+ core: {
97
+ parse: (...args: any[]) => any;
98
+ };
99
+ gltf: {
100
+ GLTFLoader: any;
101
+ postProcessGLTF: (...args: any[]) => any;
102
+ };
103
+ };
90
104
  };
91
105
 
92
106
  /**
@@ -1,5 +1,9 @@
1
1
  import {IFCObjectDefaults, Plugin, VBOSceneModel, Viewer} from "../../viewer";
2
2
 
3
+ type ReuseGeometries =
4
+ | boolean
5
+ | ((geometryConfig: { instanceCount: number }) => boolean);
6
+
3
7
  export declare type XKTLoaderPluginConfiguration = {
4
8
  /** Optional ID for this plugin, so that we can find it within {@link Viewer.plugins}. */
5
9
  id?: string;
@@ -16,7 +20,7 @@ export declare type XKTLoaderPluginConfiguration = {
16
20
  /** When loading metadata and this is ````true````, will only load {@link Entity}s that have {@link MetaObject}s (that are not excluded). This is useful when we don't want Entitys in the Scene that are not represented within IFC navigation components, such as {@link TreeViewPlugin}. */
17
21
  excludeUnclassifiedObjects?: boolean;
18
22
  /** Indicates whether to enable geometry reuse */
19
- reuseGeometries?: boolean;
23
+ reuseGeometries?: ReuseGeometries;
20
24
  /** Maximum geometry batch size, as number of vertices. */
21
25
  maxGeometryBatchSize?: number;
22
26
  };
@@ -74,7 +78,7 @@ export declare type LoadXKTModel = {
74
78
  * all geometry instances into batches (````false````), and not use instancing to render them. Setting this ````false```` can significantly
75
79
  * improve Viewer performance for models that have excessive geometry reuse, but may also increases the amount of
76
80
  * browser and GPU memory used by the model. See [#769](https://github.com/xeokit/xeokit-sdk/issues/769) for more info. */
77
- reuseGeometries?: boolean;
81
+ reuseGeometries?: ReuseGeometries;
78
82
  /** When ````true```` (default) use data textures (DTX), where appropriate, to
79
83
  * represent the returned model. Set false to always use vertex buffer objects (VBOs). Note that DTX is only applicable
80
84
  * to non-textured triangle meshes, and that VBOs are always used for meshes that have textures, line segments, or point
@@ -267,7 +271,7 @@ export declare class XKTLoaderPlugin extends Plugin {
267
271
  *
268
272
  * @type {Boolean}
269
273
  */
270
- set reuseGeometries(arg: boolean);
274
+ set reuseGeometries(arg: ReuseGeometries);
271
275
 
272
276
  /**
273
277
  * Gets whether XKTLoaderPlugin enables geometry reuse when loading models.
@@ -276,7 +280,7 @@ export declare class XKTLoaderPlugin extends Plugin {
276
280
  *
277
281
  * @type {Boolean}
278
282
  */
279
- get reuseGeometries(): boolean;
283
+ get reuseGeometries(): ReuseGeometries;
280
284
 
281
285
  /**
282
286
  * Gets the ````.xkt```` format versions supported by this XKTLoaderPlugin/
@@ -61,14 +61,24 @@ export declare class MetaModel {
61
61
  /**
62
62
  * The {@link PropertySet}s in this MetaModel.
63
63
  */
64
- propertySets: {
65
- String: PropertySet;
66
- };
64
+ propertySets: PropertySet[];
67
65
 
68
66
  /**
69
67
  * The root {@link MetaObject} in this MetaModel's composition structure hierarchy.
70
68
  */
71
- rootMetaObject: MetaObject;
69
+ rootMetaObject: MetaObject | null;
70
+
71
+ /**
72
+ * The root {@link MetaObject}s in this MetaModel's composition structure hierarchy.
73
+ */
74
+ rootMetaObjects: MetaObject[];
75
+
76
+ /**
77
+ * The {@link MetaObject}s in this MetaModel, each mapped to its ID.
78
+ */
79
+ metaObjects: {
80
+ String: MetaObject;
81
+ };
72
82
 
73
83
  /**
74
84
  * Finalizes this MetaModel.