@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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xeokit/xeokit-sdk",
3
- "version": "2.4.2-beta-4",
3
+ "version": "2.4.2-beta-7",
4
4
  "description": "Web Programming Toolkit for 3D/2D BIM and AEC Graphics",
5
5
  "module": "./dist/xeokit-sdk.es.js",
6
6
  "main": "./dist/xeokit-sdk.cjs.js",
@@ -36,6 +36,7 @@ const IFCObjectDefaultColors = {
36
36
 
37
37
  // Priority 2
38
38
 
39
+
39
40
  IfcStair: {
40
41
  colorize: [0.637255, 0.603922, 0.670588]
41
42
  },
@@ -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
- // if (external !== undefined && external !== null) {
106
- //
107
- // /**
108
- // * External application-specific metadata
109
- // *
110
- // * Undefined when there are is no external application-specific metadata.
111
- // *
112
- // * @property external
113
- // * @type {*}
114
- // */
115
- // this.external = external;
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.component[entityId];
33
+ entity = scene.components[entityId];
34
34
  if (!entity) {
35
35
  scene.warn("pick(): Component not found: " + entityId);
36
36
  continue;