@xeokit/xeokit-sdk 2.3.0-beta-35 → 2.3.1

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.
@@ -63846,7 +63846,7 @@ class TrianglesInstancingOcclusionRenderer {
63846
63846
  src.push("uniform mat4 positionsDecodeMatrix;");
63847
63847
  if (scene.logarithmicDepthBufferEnabled) {
63848
63848
  src.push("uniform float logDepthBufFC;");
63849
- src.push("in float vFragDepth;");
63849
+ src.push("out float vFragDepth;");
63850
63850
  src.push("bool isPerspectiveMatrix(mat4 m) {");
63851
63851
  src.push(" return (m[2][3] == - 1.0);");
63852
63852
  src.push("}");
@@ -63901,9 +63901,9 @@ class TrianglesInstancingOcclusionRenderer {
63901
63901
  src.push("precision mediump int;");
63902
63902
  src.push("#endif");
63903
63903
  if (scene.logarithmicDepthBufferEnabled) {
63904
- src.push("out float isPerspective;");
63904
+ src.push("in float isPerspective;");
63905
63905
  src.push("uniform float logDepthBufFC;");
63906
- src.push("out float vFragDepth;");
63906
+ src.push("in float vFragDepth;");
63907
63907
  }
63908
63908
  if (clipping) {
63909
63909
  src.push("in vec4 vWorldPosition;");
@@ -96093,7 +96093,7 @@ const IFCObjectDefaults = {
96093
96093
  *
96094
96094
  * ## Usage
96095
96095
  *
96096
- * In the example below we'll load the Schependomlaan model from a [glTF file](http://xeokit.github.io/xeokit-sdk/examples/models/gltf/schependomlaan/), along
96096
+ * In the example below we'll load a house plan model from a [binary glTF file](http://xeokit.github.io/xeokit-sdk/examples/models/gltf/schependomlaan/), along
96097
96097
  * with an accompanying JSON [IFC metadata file](http://xeokit.github.io/xeokit-sdk/examples/metaModels/schependomlaan/).
96098
96098
  *
96099
96099
  * This will create a bunch of {@link Entity}s that represents the model and its objects, along with a {@link MetaModel} and {@link MetaObject}s
@@ -96104,8 +96104,6 @@ const IFCObjectDefaults = {
96104
96104
  *
96105
96105
  * Read more about this example in the user guide on [Viewing BIM Models Offline](https://www.notion.so/xeokit/Viewing-an-IFC-Model-with-xeokit-c373e48bc4094ff5b6e5c5700ff580ee).
96106
96106
  *
96107
- * [[Run this example](http://xeokit.github.io/xeokit-sdk/examples/#BIMOffline_glTF_OTCConferenceCenter)]
96108
- *
96109
96107
  * ````javascript
96110
96108
  * import {Viewer, GLTFLoaderPlugin} from "xeokit-sdk.es.js";
96111
96109
  *
@@ -96189,8 +96187,6 @@ const IFCObjectDefaults = {
96189
96187
  * In the example below, we'll scale our model to half its size, rotate it 90 degrees about its local X-axis, then
96190
96188
  * translate it 100 units along its X axis.
96191
96189
  *
96192
- * [[Run example](https://xeokit.github.io/xeokit-sdk/examples/#loading_glTF_Duplex_transform)]
96193
- *
96194
96190
  * ````javascript
96195
96191
  * const model = gltfLoader.load({
96196
96192
  * src: "./models/gltf/Duplex/scene.gltf",
@@ -96206,8 +96202,6 @@ const IFCObjectDefaults = {
96206
96202
  * We can also load only those objects that have the specified IFC types. In the example below, we'll load only the
96207
96203
  * objects that represent walls.
96208
96204
  *
96209
- * [[Run this example](http://xeokit.github.io/xeokit-sdk/examples/#BIMOffline_glTF_includeTypes_PlanView)]
96210
- *
96211
96205
  * ````javascript
96212
96206
  * const model = gltfLoader.load({
96213
96207
  * id: "myModel",
@@ -63842,7 +63842,7 @@ class TrianglesInstancingOcclusionRenderer {
63842
63842
  src.push("uniform mat4 positionsDecodeMatrix;");
63843
63843
  if (scene.logarithmicDepthBufferEnabled) {
63844
63844
  src.push("uniform float logDepthBufFC;");
63845
- src.push("in float vFragDepth;");
63845
+ src.push("out float vFragDepth;");
63846
63846
  src.push("bool isPerspectiveMatrix(mat4 m) {");
63847
63847
  src.push(" return (m[2][3] == - 1.0);");
63848
63848
  src.push("}");
@@ -63897,9 +63897,9 @@ class TrianglesInstancingOcclusionRenderer {
63897
63897
  src.push("precision mediump int;");
63898
63898
  src.push("#endif");
63899
63899
  if (scene.logarithmicDepthBufferEnabled) {
63900
- src.push("out float isPerspective;");
63900
+ src.push("in float isPerspective;");
63901
63901
  src.push("uniform float logDepthBufFC;");
63902
- src.push("out float vFragDepth;");
63902
+ src.push("in float vFragDepth;");
63903
63903
  }
63904
63904
  if (clipping) {
63905
63905
  src.push("in vec4 vWorldPosition;");
@@ -96089,7 +96089,7 @@ const IFCObjectDefaults = {
96089
96089
  *
96090
96090
  * ## Usage
96091
96091
  *
96092
- * In the example below we'll load the Schependomlaan model from a [glTF file](http://xeokit.github.io/xeokit-sdk/examples/models/gltf/schependomlaan/), along
96092
+ * In the example below we'll load a house plan model from a [binary glTF file](http://xeokit.github.io/xeokit-sdk/examples/models/gltf/schependomlaan/), along
96093
96093
  * with an accompanying JSON [IFC metadata file](http://xeokit.github.io/xeokit-sdk/examples/metaModels/schependomlaan/).
96094
96094
  *
96095
96095
  * This will create a bunch of {@link Entity}s that represents the model and its objects, along with a {@link MetaModel} and {@link MetaObject}s
@@ -96100,8 +96100,6 @@ const IFCObjectDefaults = {
96100
96100
  *
96101
96101
  * Read more about this example in the user guide on [Viewing BIM Models Offline](https://www.notion.so/xeokit/Viewing-an-IFC-Model-with-xeokit-c373e48bc4094ff5b6e5c5700ff580ee).
96102
96102
  *
96103
- * [[Run this example](http://xeokit.github.io/xeokit-sdk/examples/#BIMOffline_glTF_OTCConferenceCenter)]
96104
- *
96105
96103
  * ````javascript
96106
96104
  * import {Viewer, GLTFLoaderPlugin} from "xeokit-sdk.es.js";
96107
96105
  *
@@ -96185,8 +96183,6 @@ const IFCObjectDefaults = {
96185
96183
  * In the example below, we'll scale our model to half its size, rotate it 90 degrees about its local X-axis, then
96186
96184
  * translate it 100 units along its X axis.
96187
96185
  *
96188
- * [[Run example](https://xeokit.github.io/xeokit-sdk/examples/#loading_glTF_Duplex_transform)]
96189
- *
96190
96186
  * ````javascript
96191
96187
  * const model = gltfLoader.load({
96192
96188
  * src: "./models/gltf/Duplex/scene.gltf",
@@ -96202,8 +96198,6 @@ const IFCObjectDefaults = {
96202
96198
  * We can also load only those objects that have the specified IFC types. In the example below, we'll load only the
96203
96199
  * objects that represent walls.
96204
96200
  *
96205
- * [[Run this example](http://xeokit.github.io/xeokit-sdk/examples/#BIMOffline_glTF_includeTypes_PlanView)]
96206
- *
96207
96201
  * ````javascript
96208
96202
  * const model = gltfLoader.load({
96209
96203
  * id: "myModel",
@@ -16623,9 +16623,9 @@ src.push("} else {");src.push(" vec4 worldPosition = positionsDecodeMatrix * ve
16623
16623
  */var TrianglesInstancingOcclusionRenderer=/*#__PURE__*/function(){function TrianglesInstancingOcclusionRenderer(scene){_classCallCheck(this,TrianglesInstancingOcclusionRenderer);this._scene=scene;this._hash=this._getHash();this._allocate();}_createClass(TrianglesInstancingOcclusionRenderer,[{key:"getValid",value:function getValid(){return this._hash===this._getHash();}},{key:"_getHash",value:function _getHash(){return this._scene._sectionPlanesState.getHash();}},{key:"drawLayer",value:function drawLayer(frameCtx,instancingLayer,renderPass){var model=instancingLayer.model;var scene=model.scene;var camera=scene.camera;var gl=scene.canvas.gl;var state=instancingLayer._state;var geometry=state.geometry;var origin=instancingLayer._state.origin;if(!this._program){this._allocate();if(this.errors){return;}}if(frameCtx.lastProgramId!==this._program.id){frameCtx.lastProgramId=this._program.id;this._bindProgram();}gl.uniform1i(this._uRenderPass,renderPass);gl.uniformMatrix4fv(this._uViewMatrix,false,origin?createRTCViewMat(camera.viewMatrix,origin):camera.viewMatrix);gl.uniformMatrix4fv(this._uWorldMatrix,false,model.worldMatrix);var numSectionPlanes=scene._sectionPlanesState.sectionPlanes.length;if(numSectionPlanes>0){var sectionPlanes=scene._sectionPlanesState.sectionPlanes;var baseIndex=instancingLayer.layerIndex*numSectionPlanes;var renderFlags=model.renderFlags;for(var sectionPlaneIndex=0;sectionPlaneIndex<numSectionPlanes;sectionPlaneIndex++){var sectionPlaneUniforms=this._uSectionPlanes[sectionPlaneIndex];if(sectionPlaneUniforms){var active=renderFlags.sectionPlanesActivePerLayer[baseIndex+sectionPlaneIndex];gl.uniform1i(sectionPlaneUniforms.active,active?1:0);if(active){var sectionPlane=sectionPlanes[sectionPlaneIndex];if(origin){var rtcSectionPlanePos=getPlaneRTCPos(sectionPlane.dist,sectionPlane.dir,origin,tempVec3a$x);gl.uniform3fv(sectionPlaneUniforms.pos,rtcSectionPlanePos);}else{gl.uniform3fv(sectionPlaneUniforms.pos,sectionPlane.pos);}gl.uniform3fv(sectionPlaneUniforms.dir,sectionPlane.dir);}}}}gl.uniformMatrix4fv(this._uPositionsDecodeMatrix,false,geometry.positionsDecodeMatrix);this._aModelMatrixCol0.bindArrayBuffer(state.modelMatrixCol0Buf);this._aModelMatrixCol1.bindArrayBuffer(state.modelMatrixCol1Buf);this._aModelMatrixCol2.bindArrayBuffer(state.modelMatrixCol2Buf);gl.vertexAttribDivisor(this._aModelMatrixCol0.location,1);gl.vertexAttribDivisor(this._aModelMatrixCol1.location,1);gl.vertexAttribDivisor(this._aModelMatrixCol2.location,1);if(this._aColor){this._aColor.bindArrayBuffer(state.colorsBuf);gl.vertexAttribDivisor(this._aColor.location,1);}this._aPosition.bindArrayBuffer(geometry.positionsBuf);if(this._aOffset){this._aOffset.bindArrayBuffer(state.offsetsBuf);gl.vertexAttribDivisor(this._aOffset.location,1);}this._aFlags.bindArrayBuffer(state.flagsBuf);gl.vertexAttribDivisor(this._aFlags.location,1);if(this._aFlags2){this._aFlags2.bindArrayBuffer(state.flags2Buf);gl.vertexAttribDivisor(this._aFlags2.location,1);}geometry.indicesBuf.bind();gl.drawElementsInstanced(gl.TRIANGLES,geometry.indicesBuf.numItems,geometry.indicesBuf.itemType,0,state.numInstances);// Cleanup
16624
16624
  gl.vertexAttribDivisor(this._aModelMatrixCol0.location,0);gl.vertexAttribDivisor(this._aModelMatrixCol1.location,0);gl.vertexAttribDivisor(this._aModelMatrixCol2.location,0);if(this._aColor){gl.vertexAttribDivisor(this._aColor.location,0);}gl.vertexAttribDivisor(this._aFlags.location,0);if(this._aFlags2){// Won't be in shader when not clipping
16625
16625
  gl.vertexAttribDivisor(this._aFlags2.location,0);}if(this._aOffset){gl.vertexAttribDivisor(this._aOffset.location,0);}}},{key:"_allocate",value:function _allocate(){var scene=this._scene;var gl=scene.canvas.gl;var sectionPlanesState=scene._sectionPlanesState;this._program=new Program(gl,this._buildShader());if(this._program.errors){this.errors=this._program.errors;return;}var program=this._program;this._uRenderPass=program.getLocation("renderPass");this._uPositionsDecodeMatrix=program.getLocation("positionsDecodeMatrix");this._uWorldMatrix=program.getLocation("worldMatrix");this._uViewMatrix=program.getLocation("viewMatrix");this._uProjMatrix=program.getLocation("projMatrix");this._uSectionPlanes=[];var clips=sectionPlanesState.sectionPlanes;for(var _i250=0,len=clips.length;_i250<len;_i250++){this._uSectionPlanes.push({active:program.getLocation("sectionPlaneActive"+_i250),pos:program.getLocation("sectionPlanePos"+_i250),dir:program.getLocation("sectionPlaneDir"+_i250)});}this._aPosition=program.getAttribute("position");this._aOffset=program.getAttribute("offset");this._aColor=program.getAttribute("color");this._aFlags=program.getAttribute("flags");this._aFlags2=program.getAttribute("flags2");this._aModelMatrixCol0=program.getAttribute("modelMatrixCol0");this._aModelMatrixCol1=program.getAttribute("modelMatrixCol1");this._aModelMatrixCol2=program.getAttribute("modelMatrixCol2");if(scene.logarithmicDepthBufferEnabled){this._uLogDepthBufFC=program.getLocation("logDepthBufFC");}}},{key:"_bindProgram",value:function _bindProgram(){var scene=this._scene;var gl=scene.canvas.gl;var project=scene.camera.project;this._program.bind();gl.uniformMatrix4fv(this._uProjMatrix,false,project.matrix);if(scene.logarithmicDepthBufferEnabled){var logDepthBufFC=2.0/(Math.log(project.far+1.0)/Math.LN2);gl.uniform1f(this._uLogDepthBufFC,logDepthBufFC);}}},{key:"_buildShader",value:function _buildShader(){return{vertex:this._buildVertexShader(),fragment:this._buildFragmentShader()};}},{key:"_buildVertexShader",value:function _buildVertexShader(){var scene=this._scene;var sectionPlanesState=scene._sectionPlanesState;var clipping=sectionPlanesState.sectionPlanes.length>0;var src=[];src.push("#version 300 es");src.push("// Instancing occlusion vertex shader");src.push("uniform int renderPass;");src.push("in vec3 position;");if(scene.entityOffsetsEnabled){src.push("in vec3 offset;");}src.push("in vec4 color;");src.push("in vec4 flags;");src.push("in vec4 flags2;");src.push("in vec4 modelMatrixCol0;");// Modeling matrix
16626
- src.push("in vec4 modelMatrixCol1;");src.push("in vec4 modelMatrixCol2;");src.push("uniform mat4 worldMatrix;");src.push("uniform mat4 viewMatrix;");src.push("uniform mat4 projMatrix;");src.push("uniform mat4 positionsDecodeMatrix;");if(scene.logarithmicDepthBufferEnabled){src.push("uniform float logDepthBufFC;");src.push("in float vFragDepth;");src.push("bool isPerspectiveMatrix(mat4 m) {");src.push(" return (m[2][3] == - 1.0);");src.push("}");src.push("in float isPerspective;");}if(clipping){src.push("out vec4 vWorldPosition;");src.push("out vec4 vFlags2;");}src.push("void main(void) {");// flags.x = NOT_RENDERED | COLOR_OPAQUE | COLOR_TRANSPARENT
16626
+ src.push("in vec4 modelMatrixCol1;");src.push("in vec4 modelMatrixCol2;");src.push("uniform mat4 worldMatrix;");src.push("uniform mat4 viewMatrix;");src.push("uniform mat4 projMatrix;");src.push("uniform mat4 positionsDecodeMatrix;");if(scene.logarithmicDepthBufferEnabled){src.push("uniform float logDepthBufFC;");src.push("out float vFragDepth;");src.push("bool isPerspectiveMatrix(mat4 m) {");src.push(" return (m[2][3] == - 1.0);");src.push("}");src.push("in float isPerspective;");}if(clipping){src.push("out vec4 vWorldPosition;");src.push("out vec4 vFlags2;");}src.push("void main(void) {");// flags.x = NOT_RENDERED | COLOR_OPAQUE | COLOR_TRANSPARENT
16627
16627
  // renderPass = COLOR_OPAQUE
16628
- src.push("if (int(flags.x) != renderPass) {");src.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);");src.push("} else {");src.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); ");src.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);");if(scene.entityOffsetsEnabled){src.push(" worldPosition.xyz = worldPosition.xyz + offset;");}src.push(" vec4 viewPosition = viewMatrix * worldPosition; ");if(clipping){src.push(" vWorldPosition = worldPosition;");}src.push("vec4 clipPos = projMatrix * viewPosition;");if(scene.logarithmicDepthBufferEnabled){src.push("vFragDepth = 1.0 + clipPos.w;");src.push("isPerspective = float (isPerspectiveMatrix(projMatrix));");}src.push("gl_Position = clipPos;");src.push("}");src.push("}");return src;}},{key:"_buildFragmentShader",value:function _buildFragmentShader(){var scene=this._scene;var sectionPlanesState=scene._sectionPlanesState;var clipping=sectionPlanesState.sectionPlanes.length>0;var src=[];src.push("#version 300 es");src.push("// Instancing occlusion fragment shader");src.push("#ifdef GL_FRAGMENT_PRECISION_HIGH");src.push("precision highp float;");src.push("precision highp int;");src.push("#else");src.push("precision mediump float;");src.push("precision mediump int;");src.push("#endif");if(scene.logarithmicDepthBufferEnabled){src.push("out float isPerspective;");src.push("uniform float logDepthBufFC;");src.push("out float vFragDepth;");}if(clipping){src.push("in vec4 vWorldPosition;");src.push("in vec4 vFlags2;");for(var _i251=0;_i251<sectionPlanesState.sectionPlanes.length;_i251++){src.push("uniform bool sectionPlaneActive"+_i251+";");src.push("uniform vec3 sectionPlanePos"+_i251+";");src.push("uniform vec3 sectionPlaneDir"+_i251+";");}}src.push("out vec4 outColor;");src.push("void main(void) {");if(clipping){src.push(" bool clippable = (float(vFlags2.x) > 0.0);");src.push(" if (clippable) {");src.push(" float dist = 0.0;");for(var _i252=0;_i252<sectionPlanesState.sectionPlanes.length;_i252++){src.push("if (sectionPlaneActive"+_i252+") {");src.push(" dist += clamp(dot(-sectionPlaneDir"+_i252+".xyz, vWorldPosition.xyz - sectionPlanePos"+_i252+".xyz), 0.0, 1000.0);");src.push("}");}src.push("if (dist > 0.0) { discard; }");src.push("}");}src.push(" outColor = vec4(0.0, 0.0, 1.0, 1.0); ");// Occluders are blue
16628
+ src.push("if (int(flags.x) != renderPass) {");src.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);");src.push("} else {");src.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); ");src.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);");if(scene.entityOffsetsEnabled){src.push(" worldPosition.xyz = worldPosition.xyz + offset;");}src.push(" vec4 viewPosition = viewMatrix * worldPosition; ");if(clipping){src.push(" vWorldPosition = worldPosition;");}src.push("vec4 clipPos = projMatrix * viewPosition;");if(scene.logarithmicDepthBufferEnabled){src.push("vFragDepth = 1.0 + clipPos.w;");src.push("isPerspective = float (isPerspectiveMatrix(projMatrix));");}src.push("gl_Position = clipPos;");src.push("}");src.push("}");return src;}},{key:"_buildFragmentShader",value:function _buildFragmentShader(){var scene=this._scene;var sectionPlanesState=scene._sectionPlanesState;var clipping=sectionPlanesState.sectionPlanes.length>0;var src=[];src.push("#version 300 es");src.push("// Instancing occlusion fragment shader");src.push("#ifdef GL_FRAGMENT_PRECISION_HIGH");src.push("precision highp float;");src.push("precision highp int;");src.push("#else");src.push("precision mediump float;");src.push("precision mediump int;");src.push("#endif");if(scene.logarithmicDepthBufferEnabled){src.push("in float isPerspective;");src.push("uniform float logDepthBufFC;");src.push("in float vFragDepth;");}if(clipping){src.push("in vec4 vWorldPosition;");src.push("in vec4 vFlags2;");for(var _i251=0;_i251<sectionPlanesState.sectionPlanes.length;_i251++){src.push("uniform bool sectionPlaneActive"+_i251+";");src.push("uniform vec3 sectionPlanePos"+_i251+";");src.push("uniform vec3 sectionPlaneDir"+_i251+";");}}src.push("out vec4 outColor;");src.push("void main(void) {");if(clipping){src.push(" bool clippable = (float(vFlags2.x) > 0.0);");src.push(" if (clippable) {");src.push(" float dist = 0.0;");for(var _i252=0;_i252<sectionPlanesState.sectionPlanes.length;_i252++){src.push("if (sectionPlaneActive"+_i252+") {");src.push(" dist += clamp(dot(-sectionPlaneDir"+_i252+".xyz, vWorldPosition.xyz - sectionPlanePos"+_i252+".xyz), 0.0, 1000.0);");src.push("}");}src.push("if (dist > 0.0) { discard; }");src.push("}");}src.push(" outColor = vec4(0.0, 0.0, 1.0, 1.0); ");// Occluders are blue
16629
16629
  if(scene.logarithmicDepthBufferEnabled){src.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;");}src.push("}");return src;}},{key:"webglContextRestored",value:function webglContextRestored(){this._program=null;}},{key:"destroy",value:function destroy(){if(this._program){this._program.destroy();}this._program=null;}}]);return TrianglesInstancingOcclusionRenderer;}();var tempVec3a$w=math.vec3();/**
16630
16630
  * @private
16631
16631
  */var TrianglesInstancingDepthRenderer=/*#__PURE__*/function(){function TrianglesInstancingDepthRenderer(scene){_classCallCheck(this,TrianglesInstancingDepthRenderer);this._scene=scene;this._hash=this._getHash();this._allocate();}_createClass(TrianglesInstancingDepthRenderer,[{key:"getValid",value:function getValid(){return this._hash===this._getHash();}},{key:"_getHash",value:function _getHash(){return this._scene._sectionPlanesState.getHash();}},{key:"drawLayer",value:function drawLayer(frameCtx,instancingLayer,renderPass){var model=instancingLayer.model;var scene=model.scene;var camera=scene.camera;var gl=scene.canvas.gl;var state=instancingLayer._state;var geometry=state.geometry;var origin=instancingLayer._state.origin;if(!this._program){this._allocate();if(this.errors){return;}}if(frameCtx.lastProgramId!==this._program.id){frameCtx.lastProgramId=this._program.id;this._bindProgram();}gl.uniform1i(this._uRenderPass,renderPass);gl.uniformMatrix4fv(this._uWorldMatrix,false,model.worldMatrix);gl.uniformMatrix4fv(this._uViewMatrix,false,origin?createRTCViewMat(camera.viewMatrix,origin):camera.viewMatrix);var numSectionPlanes=scene._sectionPlanesState.sectionPlanes.length;if(numSectionPlanes>0){var sectionPlanes=scene._sectionPlanesState.sectionPlanes;var baseIndex=instancingLayer.layerIndex*numSectionPlanes;var renderFlags=model.renderFlags;for(var sectionPlaneIndex=0;sectionPlaneIndex<numSectionPlanes;sectionPlaneIndex++){var sectionPlaneUniforms=this._uSectionPlanes[sectionPlaneIndex];if(sectionPlaneUniforms){var active=renderFlags.sectionPlanesActivePerLayer[baseIndex+sectionPlaneIndex];gl.uniform1i(sectionPlaneUniforms.active,active?1:0);if(active){var sectionPlane=sectionPlanes[sectionPlaneIndex];if(origin){var rtcSectionPlanePos=getPlaneRTCPos(sectionPlane.dist,sectionPlane.dir,origin,tempVec3a$w);gl.uniform3fv(sectionPlaneUniforms.pos,rtcSectionPlanePos);}else{gl.uniform3fv(sectionPlaneUniforms.pos,sectionPlane.pos);}gl.uniform3fv(sectionPlaneUniforms.dir,sectionPlane.dir);}}}}this._aModelMatrixCol0.bindArrayBuffer(state.modelMatrixCol0Buf);this._aModelMatrixCol1.bindArrayBuffer(state.modelMatrixCol1Buf);this._aModelMatrixCol2.bindArrayBuffer(state.modelMatrixCol2Buf);gl.vertexAttribDivisor(this._aModelMatrixCol0.location,1);gl.vertexAttribDivisor(this._aModelMatrixCol1.location,1);gl.vertexAttribDivisor(this._aModelMatrixCol2.location,1);gl.uniformMatrix4fv(this._uPositionsDecodeMatrix,false,geometry.positionsDecodeMatrix);this._aPosition.bindArrayBuffer(geometry.positionsBuf);if(this._aOffset){this._aOffset.bindArrayBuffer(state.offsetsBuf);gl.vertexAttribDivisor(this._aOffset.location,1);}this._aFlags.bindArrayBuffer(state.flagsBuf);gl.vertexAttribDivisor(this._aFlags.location,1);if(this._aFlags2){this._aFlags2.bindArrayBuffer(state.flags2Buf);gl.vertexAttribDivisor(this._aFlags2.location,1);}geometry.indicesBuf.bind();gl.drawElementsInstanced(gl.TRIANGLES,geometry.indicesBuf.numItems,geometry.indicesBuf.itemType,0,state.numInstances);gl.vertexAttribDivisor(this._aModelMatrixCol0.location,0);gl.vertexAttribDivisor(this._aModelMatrixCol1.location,0);gl.vertexAttribDivisor(this._aModelMatrixCol2.location,0);gl.vertexAttribDivisor(this._aFlags.location,0);if(this._aFlags2){// Won't be in shader when not clipping
@@ -21603,7 +21603,7 @@ if(rtcNeeded){meshCfg.origin=origin;}var material=primitive.material;if(material
21603
21603
  *
21604
21604
  * ## Usage
21605
21605
  *
21606
- * In the example below we'll load the Schependomlaan model from a [glTF file](http://xeokit.github.io/xeokit-sdk/examples/models/gltf/schependomlaan/), along
21606
+ * In the example below we'll load a house plan model from a [binary glTF file](http://xeokit.github.io/xeokit-sdk/examples/models/gltf/schependomlaan/), along
21607
21607
  * with an accompanying JSON [IFC metadata file](http://xeokit.github.io/xeokit-sdk/examples/metaModels/schependomlaan/).
21608
21608
  *
21609
21609
  * This will create a bunch of {@link Entity}s that represents the model and its objects, along with a {@link MetaModel} and {@link MetaObject}s
@@ -21614,8 +21614,6 @@ if(rtcNeeded){meshCfg.origin=origin;}var material=primitive.material;if(material
21614
21614
  *
21615
21615
  * Read more about this example in the user guide on [Viewing BIM Models Offline](https://www.notion.so/xeokit/Viewing-an-IFC-Model-with-xeokit-c373e48bc4094ff5b6e5c5700ff580ee).
21616
21616
  *
21617
- * [[Run this example](http://xeokit.github.io/xeokit-sdk/examples/#BIMOffline_glTF_OTCConferenceCenter)]
21618
- *
21619
21617
  * ````javascript
21620
21618
  * import {Viewer, GLTFLoaderPlugin} from "xeokit-sdk.es.js";
21621
21619
  *
@@ -21699,8 +21697,6 @@ if(rtcNeeded){meshCfg.origin=origin;}var material=primitive.material;if(material
21699
21697
  * In the example below, we'll scale our model to half its size, rotate it 90 degrees about its local X-axis, then
21700
21698
  * translate it 100 units along its X axis.
21701
21699
  *
21702
- * [[Run example](https://xeokit.github.io/xeokit-sdk/examples/#loading_glTF_Duplex_transform)]
21703
- *
21704
21700
  * ````javascript
21705
21701
  * const model = gltfLoader.load({
21706
21702
  * src: "./models/gltf/Duplex/scene.gltf",
@@ -21716,8 +21712,6 @@ if(rtcNeeded){meshCfg.origin=origin;}var material=primitive.material;if(material
21716
21712
  * We can also load only those objects that have the specified IFC types. In the example below, we'll load only the
21717
21713
  * objects that represent walls.
21718
21714
  *
21719
- * [[Run this example](http://xeokit.github.io/xeokit-sdk/examples/#BIMOffline_glTF_includeTypes_PlanView)]
21720
- *
21721
21715
  * ````javascript
21722
21716
  * const model = gltfLoader.load({
21723
21717
  * id: "myModel",