@xeokit/xeokit-sdk 2.4.2-beta-4 → 2.4.2-beta-7
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 +44 -32
- package/dist/xeokit-sdk.es.js +44 -32
- package/dist/xeokit-sdk.es5.js +22 -29
- package/dist/xeokit-sdk.min.cjs.js +2 -2
- package/dist/xeokit-sdk.min.es.js +2 -2
- package/dist/xeokit-sdk.min.es5.js +2 -2
- package/package.json +1 -1
- package/src/viewer/metadata/IFCObjectDefaultColors.js +1 -0
- package/src/viewer/metadata/MetaModel.js +16 -10
- package/src/viewer/metadata/MetaObject.js +26 -21
- package/src/viewer/scene/model/vbo/pointsBatching/renderers/PointsBatchingColorRenderer.js +1 -0
- package/src/viewer/scene/scene/Scene.js +1 -1
package/package.json
CHANGED
|
@@ -114,15 +114,6 @@ class MetaModel {
|
|
|
114
114
|
*/
|
|
115
115
|
this.propertySets = [];
|
|
116
116
|
|
|
117
|
-
/**
|
|
118
|
-
* The root {@link MetaObject} in this MetaModel's composition structure hierarchy.
|
|
119
|
-
*
|
|
120
|
-
* @property rootMetaObject
|
|
121
|
-
* @type {MetaObject}
|
|
122
|
-
* @deprecated
|
|
123
|
-
*/
|
|
124
|
-
this.rootMetaObject = null;
|
|
125
|
-
|
|
126
117
|
/**
|
|
127
118
|
* The root {@link MetaObject}s in this MetaModel's composition structure hierarchy.
|
|
128
119
|
*
|
|
@@ -154,6 +145,20 @@ class MetaModel {
|
|
|
154
145
|
this.finalized = false;
|
|
155
146
|
}
|
|
156
147
|
|
|
148
|
+
/**
|
|
149
|
+
* Backwards compatibility with the model having a single root MetaObject.
|
|
150
|
+
*
|
|
151
|
+
* @property rootMetaObject
|
|
152
|
+
* @type {MetaObject|null}
|
|
153
|
+
*/
|
|
154
|
+
get rootMetaObject()
|
|
155
|
+
{
|
|
156
|
+
if (this.rootMetaObjects.length == 1) {
|
|
157
|
+
return this.rootMetaObjects[0];
|
|
158
|
+
}
|
|
159
|
+
return null;
|
|
160
|
+
}
|
|
161
|
+
|
|
157
162
|
/**
|
|
158
163
|
* Load metamodel data into this MetaModel.
|
|
159
164
|
* @param metaModelData
|
|
@@ -205,7 +210,8 @@ class MetaModel {
|
|
|
205
210
|
type,
|
|
206
211
|
name: metaObjectData.name,
|
|
207
212
|
attributes: metaObjectData.attributes,
|
|
208
|
-
propertySetIds
|
|
213
|
+
propertySetIds,
|
|
214
|
+
external: metaObjectData.external,
|
|
209
215
|
});
|
|
210
216
|
this.metaScene.metaObjects[id] = metaObject;
|
|
211
217
|
}
|
|
@@ -21,15 +21,6 @@ class MetaObject {
|
|
|
21
21
|
*/
|
|
22
22
|
constructor(params) {
|
|
23
23
|
|
|
24
|
-
/**
|
|
25
|
-
* Model metadata.
|
|
26
|
-
*
|
|
27
|
-
* @property metaModel
|
|
28
|
-
* @type {MetaModel}
|
|
29
|
-
* @deprecated
|
|
30
|
-
*/
|
|
31
|
-
this.metaModel = null;
|
|
32
|
-
|
|
33
24
|
/**
|
|
34
25
|
* The MetaModels that share this MetaObject.
|
|
35
26
|
* @type {MetaModel[]}
|
|
@@ -102,18 +93,32 @@ class MetaObject {
|
|
|
102
93
|
*/
|
|
103
94
|
this.attributes = params.attributes || {};
|
|
104
95
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
96
|
+
if (params.external !== undefined && params.external !== null) {
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* External application-specific metadata
|
|
100
|
+
*
|
|
101
|
+
* Undefined when there are is no external application-specific metadata.
|
|
102
|
+
*
|
|
103
|
+
* @property external
|
|
104
|
+
* @type {*}
|
|
105
|
+
*/
|
|
106
|
+
this.external = params.external;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* Backwards compatibility with the object belonging to a single MetaModel.
|
|
112
|
+
*
|
|
113
|
+
* @property metaModel
|
|
114
|
+
* @type {MetaModel|null}
|
|
115
|
+
**/
|
|
116
|
+
get metaModel() {
|
|
117
|
+
if (this.metaModels.length == 1) {
|
|
118
|
+
return this.metaModels[0];
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
return null;
|
|
117
122
|
}
|
|
118
123
|
|
|
119
124
|
/**
|
|
@@ -88,6 +88,7 @@ class PointsBatchingColorRenderer extends VBOSceneModelPointBatchingRenderer {
|
|
|
88
88
|
if (scene.logarithmicDepthBufferEnabled) {
|
|
89
89
|
src.push("vFragDepth = 1.0 + clipPos.w;");
|
|
90
90
|
}
|
|
91
|
+
|
|
91
92
|
src.push("gl_Position = clipPos;");
|
|
92
93
|
if (pointsMaterial.perspectivePoints) {
|
|
93
94
|
src.push("gl_PointSize = (nearPlaneHeight * pointSize) / clipPos.w;");
|
|
@@ -30,7 +30,7 @@ function getEntityIDMap(scene, entityIds) {
|
|
|
30
30
|
let entity;
|
|
31
31
|
for (let i = 0, len = entityIds.length; i < len; i++) {
|
|
32
32
|
entityId = entityIds[i];
|
|
33
|
-
entity = scene.
|
|
33
|
+
entity = scene.components[entityId];
|
|
34
34
|
if (!entity) {
|
|
35
35
|
scene.warn("pick(): Component not found: " + entityId);
|
|
36
36
|
continue;
|