@xeokit/xeokit-sdk 2.6.109 → 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.
- package/dist/xeokit-sdk.cjs.js +60 -39
- package/dist/xeokit-sdk.es.js +60 -39
- package/dist/xeokit-sdk.es5.js +36 -32
- package/dist/xeokit-sdk.min.cjs.js +7 -7
- package/dist/xeokit-sdk.min.es.js +7 -7
- package/dist/xeokit-sdk.min.es5.js +6 -6
- package/package.json +4 -4
- package/src/plugins/GLTFLoaderPlugin/GLTFLoaderPlugin.js +3 -0
- package/src/plugins/GLTFLoaderPlugin/GLTFSceneModelLoader.js +3 -2
- package/src/plugins/ViewCullPlugin/ViewCullPlugin.js +3 -0
- package/src/plugins/XKTLoaderPlugin/XKTLoaderPlugin.js +33 -11
- package/src/plugins/XKTLoaderPlugin/parsers/ParserV10.js +1 -1
- package/src/plugins/XKTLoaderPlugin/parsers/ParserV11.js +1 -1
- package/src/plugins/XKTLoaderPlugin/parsers/ParserV12.js +1 -1
- package/src/plugins/XKTLoaderPlugin/parsers/ParserV8.js +1 -1
- package/src/plugins/XKTLoaderPlugin/parsers/ParserV9.js +1 -1
- package/src/vendor/xeokit-deps.js +37870 -0
- package/src/viewer/scene/CameraControl/lib/CameraUpdater.js +9 -17
- package/types/plugins/GLTFLoaderPlugin/GLTFLoaderPlugin.d.ts +14 -0
- package/types/plugins/XKTLoaderPlugin/XKTLoaderPlugin.d.ts +10 -4
- package/types/viewer/metadata/MetaModel.d.ts +14 -4
|
@@ -117,26 +117,18 @@ class CameraUpdater {
|
|
|
117
117
|
|
|
118
118
|
if (updates.rotateDeltaY !== 0 || updates.rotateDeltaX !== 0) {
|
|
119
119
|
|
|
120
|
-
if (
|
|
121
|
-
pivotController.continuePivot(updates.rotateDeltaY, updates.rotateDeltaX);
|
|
122
|
-
pivotController.showPivot();
|
|
123
|
-
|
|
124
|
-
} else {
|
|
125
|
-
|
|
120
|
+
if (configs.firstPerson) {
|
|
126
121
|
if (updates.rotateDeltaX !== 0) {
|
|
127
|
-
|
|
128
|
-
camera.pitch(-updates.rotateDeltaX);
|
|
129
|
-
} else {
|
|
130
|
-
camera.orbitPitch(updates.rotateDeltaX);
|
|
131
|
-
}
|
|
122
|
+
camera.pitch(-updates.rotateDeltaX);
|
|
132
123
|
}
|
|
133
|
-
|
|
134
124
|
if (updates.rotateDeltaY !== 0) {
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
125
|
+
camera.yaw(updates.rotateDeltaY);
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
else {
|
|
129
|
+
if (configs.followPointer && pivotController.getPivoting()){
|
|
130
|
+
pivotController.continuePivot(updates.rotateDeltaY, updates.rotateDeltaX);
|
|
131
|
+
pivotController.showPivot();
|
|
140
132
|
}
|
|
141
133
|
}
|
|
142
134
|
|
|
@@ -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?:
|
|
23
|
+
reuseGeometries?: ReuseGeometries;
|
|
20
24
|
/** Maximum geometry batch size, as number of vertices. */
|
|
21
25
|
maxGeometryBatchSize?: number;
|
|
22
26
|
};
|
|
@@ -32,6 +36,8 @@ export declare type LoadXKTModel = {
|
|
|
32
36
|
metaModelSrc?: string;
|
|
33
37
|
/** JSON model metadata, as an alternative to the ````metaModelSrc```` parameter. */
|
|
34
38
|
metaModelData?: any;
|
|
39
|
+
/** Whether to load metadata into MetaScene, otherwise expose as SceneModel::metadata. Defaults to `true`. */
|
|
40
|
+
loadIntoMetaScene?: boolean;
|
|
35
41
|
/** Path or URL to a JSON manifest file that provides paths or URLs to ````.xkt```` files to load as parts of the model. Use this option to load models that have been split into multiple XKT files. See [tutorial](https://xeokit.io/blog/automatically-splitting-large-models-for-better-performance) for more info.*/
|
|
36
42
|
manifestSrc?: any;
|
|
37
43
|
/** A JSON manifest object (as an alternative to a path or URL) that provides paths or URLs to ````.xkt```` files to load as parts of the model. Use this option to load models that have been split into multiple XKT files. See [tutorial](https://xeokit.io/blog/automatically-splitting-large-models-for-better-performance) for more info. */
|
|
@@ -72,7 +78,7 @@ export declare type LoadXKTModel = {
|
|
|
72
78
|
* all geometry instances into batches (````false````), and not use instancing to render them. Setting this ````false```` can significantly
|
|
73
79
|
* improve Viewer performance for models that have excessive geometry reuse, but may also increases the amount of
|
|
74
80
|
* browser and GPU memory used by the model. See [#769](https://github.com/xeokit/xeokit-sdk/issues/769) for more info. */
|
|
75
|
-
reuseGeometries?:
|
|
81
|
+
reuseGeometries?: ReuseGeometries;
|
|
76
82
|
/** When ````true```` (default) use data textures (DTX), where appropriate, to
|
|
77
83
|
* represent the returned model. Set false to always use vertex buffer objects (VBOs). Note that DTX is only applicable
|
|
78
84
|
* to non-textured triangle meshes, and that VBOs are always used for meshes that have textures, line segments, or point
|
|
@@ -265,7 +271,7 @@ export declare class XKTLoaderPlugin extends Plugin {
|
|
|
265
271
|
*
|
|
266
272
|
* @type {Boolean}
|
|
267
273
|
*/
|
|
268
|
-
set reuseGeometries(arg:
|
|
274
|
+
set reuseGeometries(arg: ReuseGeometries);
|
|
269
275
|
|
|
270
276
|
/**
|
|
271
277
|
* Gets whether XKTLoaderPlugin enables geometry reuse when loading models.
|
|
@@ -274,7 +280,7 @@ export declare class XKTLoaderPlugin extends Plugin {
|
|
|
274
280
|
*
|
|
275
281
|
* @type {Boolean}
|
|
276
282
|
*/
|
|
277
|
-
get reuseGeometries():
|
|
283
|
+
get reuseGeometries(): ReuseGeometries;
|
|
278
284
|
|
|
279
285
|
/**
|
|
280
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.
|