@xeokit/xeokit-sdk 2.6.97 → 2.6.99

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.6.97",
3
+ "version": "2.6.99",
4
4
  "description": "3D BIM IFC Viewer SDK for AEC engineering applications. Open Source JavaScript Toolkit based on pure WebGL for top performance, real-world coordinates and full double precision",
5
5
  "module": "./dist/xeokit-sdk.es.js",
6
6
  "main": "./dist/xeokit-sdk.cjs.js",
@@ -323,6 +323,7 @@ class GLTFLoaderPlugin extends Plugin {
323
323
  * primitives. Only works while {@link DTX#enabled} is also ````true````.
324
324
  * @param {Boolean} [params.autoMetaModel] When supplied, creates a default MetaModel with a single MetaObject.
325
325
  * @param {Boolean} [params.globalizeObjectIds=false] Indicates whether to globalize each {@link Entity#id} and {@link MetaObject#id}, in case you need to prevent ID clashes with other models.
326
+ * @param {*} [params.parseOptions={}] Options to pass to loaders.gl parse method, eg. ````{ gltf: { excludeExtensions: { "KHR_texture_transform": false } } }````.
326
327
  * @returns {Entity} Entity representing the model, which will have {@link Entity#isModel} set ````true```` and will be registered by {@link Entity#id} in {@link Scene#models}
327
328
  */
328
329
  load(params = {}) {
@@ -102,6 +102,7 @@ function parseGLTF(plugin, src, gltf, metaModelJSON, options, sceneModel, ok, er
102
102
  const spinner = plugin.viewer.scene.canvas.spinner;
103
103
  spinner.processes++;
104
104
  parse(gltf, GLTFLoader, {
105
+ ...(options.parseOptions || { }),
105
106
  baseUri: options.basePath
106
107
  }).then((gltfData) => {
107
108
  const processedGLTF = postProcessGLTF(gltfData);
@@ -909,6 +909,7 @@ class Component {
909
909
  this._eventCallDepth = 0;
910
910
  this._ownedComponents = null;
911
911
  this._updateScheduled = false;
912
+ this._renderer = null;
912
913
  }
913
914
  }
914
915
 
@@ -2115,9 +2115,9 @@ const math = {
2115
2115
 
2116
2116
  const sy = math.lenVec3(vec);
2117
2117
 
2118
- vec[8] = mat[8];
2119
- vec[9] = mat[9];
2120
- vec[10] = mat[10];
2118
+ vec[0] = mat[8];
2119
+ vec[1] = mat[9];
2120
+ vec[2] = mat[10];
2121
2121
 
2122
2122
  const sz = math.lenVec3(vec);
2123
2123
 
@@ -5,7 +5,7 @@ export const SnapProgram = function(programVariables, geometry, isSnapInit, isPo
5
5
  const coordinateScaler = programVariables.createUniform("vec3", "coordinateScaler", (set, state) => set(state.legacyFrameCtx.snapPickCoordinateScale));
6
6
 
7
7
  const vWorldPosition = programVariables.createVarying("vec3", "vWorldPosition", () => `${geometry.attributes.position.world}.xyz`);
8
- const vPickColor = programVariables.createVarying("vec4", "vPickColor", () => geometry.attributes.pickColor, "flat");
8
+ const vPickColor = programVariables.createVarying("vec4", "vPickColor", () => geometry.attributes.pickColor); // Using `flat` causes an instability - see XEOK-385 and XEOK-401
9
9
 
10
10
  const outCoords = programVariables.createOutput("highp ivec4", "outCoords", 0);
11
11
  const outNormal = programVariables.createOutput("highp ivec4", "outNormal", 1);
@@ -83,6 +83,8 @@ export declare type LoadGLTFModel = {
83
83
  performance?: boolean;
84
84
  /** When true, generate a single MetaObject that represents the entire glTF model, and a MetaObject for each entity within it. */
85
85
  autoMetaModel?: boolean;
86
+ /** Options to pass to loaders.gl parse method, eg. ````{ gltf: { excludeExtensions: { "KHR_texture_transform": false } } }````. */
87
+ parseOptions?: any;
86
88
  };
87
89
 
88
90
  /**