@xeokit/xeokit-sdk 2.6.0-beta-7 → 2.6.0-beta-8

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/web-ifc.wasm CHANGED
Binary file
@@ -77176,7 +77176,9 @@ class DTXTrianglesLayer {
77176
77176
  // Color
77177
77177
 
77178
77178
  let f0;
77179
- if (!visible || culled || xrayed) { // Highlight & select are layered on top of color - not mutually exclusive
77179
+ if (!visible || culled || xrayed
77180
+ || (highlighted && !this.model.scene.highlightMaterial.glowThrough)
77181
+ || (selected && !this.model.scene.selectedMaterial.glowThrough)) {
77180
77182
  f0 = RENDER_PASSES.NOT_RENDERED;
77181
77183
  } else {
77182
77184
  if (transparent) {
@@ -94103,6 +94105,9 @@ class CameraUpdater {
94103
94105
  }
94104
94106
  }
94105
94107
  }
94108
+ } else {
94109
+ dollyDistFactor = 1;
94110
+ followPointerWorldPos = null;
94106
94111
  }
94107
94112
 
94108
94113
  const dollyDeltaForDist = (updates.dollyDelta * dollyDistFactor);
@@ -77172,7 +77172,9 @@ class DTXTrianglesLayer {
77172
77172
  // Color
77173
77173
 
77174
77174
  let f0;
77175
- if (!visible || culled || xrayed) { // Highlight & select are layered on top of color - not mutually exclusive
77175
+ if (!visible || culled || xrayed
77176
+ || (highlighted && !this.model.scene.highlightMaterial.glowThrough)
77177
+ || (selected && !this.model.scene.selectedMaterial.glowThrough)) {
77176
77178
  f0 = RENDER_PASSES.NOT_RENDERED;
77177
77179
  } else {
77178
77180
  if (transparent) {
@@ -94099,6 +94101,9 @@ class CameraUpdater {
94099
94101
  }
94100
94102
  }
94101
94103
  }
94104
+ } else {
94105
+ dollyDistFactor = 1;
94106
+ followPointerWorldPos = null;
94102
94107
  }
94103
94108
 
94104
94109
  const dollyDeltaForDist = (updates.dollyDelta * dollyDistFactor);
@@ -16199,8 +16199,7 @@ Math.floor(subPortionId/512),// yoffset
16199
16199
  1,//height
16200
16200
  gl.RGBA_INTEGER,gl.UNSIGNED_BYTE,tempUint8Array4);// gl.bindTexture (gl.TEXTURE_2D, null);
16201
16201
  }},{key:"setTransparent",value:function setTransparent(portionId,flags,transparent){if(transparent){this._numTransparentLayerPortions++;this.model.numTransparentLayerPortions++;}else{this._numTransparentLayerPortions--;this.model.numTransparentLayerPortions--;}this._setFlags(portionId,flags,transparent);}},{key:"_setFlags",value:function _setFlags(portionId,flags,transparent){var deferred=arguments.length>3&&arguments[3]!==undefined?arguments[3]:false;var subPortionIds=this._portionToSubPortionsMap[portionId];for(var _i369=0,len=subPortionIds.length;_i369<len;_i369++){this._subPortionSetFlags(subPortionIds[_i369],flags,transparent,deferred);}}},{key:"_subPortionSetFlags",value:function _subPortionSetFlags(subPortionId,flags,transparent){var deferred=arguments.length>3&&arguments[3]!==undefined?arguments[3]:false;if(!this._finalized){throw"Not finalized";}var visible=!!(flags&ENTITY_FLAGS.VISIBLE);var xrayed=!!(flags&ENTITY_FLAGS.XRAYED);var highlighted=!!(flags&ENTITY_FLAGS.HIGHLIGHTED);var selected=!!(flags&ENTITY_FLAGS.SELECTED);var edges=!!(flags&ENTITY_FLAGS.EDGES);var pickable=!!(flags&ENTITY_FLAGS.PICKABLE);var culled=!!(flags&ENTITY_FLAGS.CULLED);// Color
16202
- var f0;if(!visible||culled||xrayed){// Highlight & select are layered on top of color - not mutually exclusive
16203
- f0=RENDER_PASSES.NOT_RENDERED;}else{if(transparent){f0=RENDER_PASSES.COLOR_TRANSPARENT;}else{f0=RENDER_PASSES.COLOR_OPAQUE;}}// Silhouette
16202
+ var f0;if(!visible||culled||xrayed||highlighted&&!this.model.scene.highlightMaterial.glowThrough||selected&&!this.model.scene.selectedMaterial.glowThrough){f0=RENDER_PASSES.NOT_RENDERED;}else{if(transparent){f0=RENDER_PASSES.COLOR_TRANSPARENT;}else{f0=RENDER_PASSES.COLOR_OPAQUE;}}// Silhouette
16204
16203
  var f1;if(!visible||culled){f1=RENDER_PASSES.NOT_RENDERED;}else if(selected){f1=RENDER_PASSES.SILHOUETTE_SELECTED;}else if(highlighted){f1=RENDER_PASSES.SILHOUETTE_HIGHLIGHTED;}else if(xrayed){f1=RENDER_PASSES.SILHOUETTE_XRAYED;}else{f1=RENDER_PASSES.NOT_RENDERED;}// Edges
16205
16204
  var f2=0;if(!visible||culled){f2=RENDER_PASSES.NOT_RENDERED;}else if(selected){f2=RENDER_PASSES.EDGES_SELECTED;}else if(highlighted){f2=RENDER_PASSES.EDGES_HIGHLIGHTED;}else if(xrayed){f2=RENDER_PASSES.EDGES_XRAYED;}else if(edges){if(transparent){f2=RENDER_PASSES.EDGES_COLOR_TRANSPARENT;}else{f2=RENDER_PASSES.EDGES_COLOR_OPAQUE;}}else{f2=RENDER_PASSES.NOT_RENDERED;}// Pick
16206
16205
  var f3=visible&&!culled&&pickable?RENDER_PASSES.PICK:RENDER_PASSES.NOT_RENDERED;var textureState=this._dtxState;var gl=this.model.scene.canvas.gl;tempUint8Array4[0]=f0;tempUint8Array4[1]=f1;tempUint8Array4[2]=f2;tempUint8Array4[3]=f3;// object flags
@@ -22137,7 +22136,7 @@ if(Math.abs(updates.rotateDeltaX)<EPSILON){updates.rotateDeltaX=0;}if(Math.abs(u
22137
22136
  // which empty background shows, that the pointer may inadvertently be over. In these cases, we don't
22138
22137
  // want dolly speed wildly varying depending on how accurately the user avoids the gaps with the pointer.
22139
22138
  //----------------------------------------------------------------------------------------------------------
22140
- if(configs.followPointer){if(--countDown<=0){countDown=SCALE_DOLLY_EACH_FRAME;if(updates.dollyDelta!==0){if(updates.rotateDeltaY===0&&updates.rotateDeltaX===0){if(configs.followPointer&&states.followPointerDirty){pickController.pickCursorPos=states.pointerCanvasPos;pickController.schedulePickSurface=true;pickController.update();if(pickController.pickResult&&pickController.pickResult.worldPos){followPointerWorldPos=pickController.pickResult.worldPos;}else{dollyDistFactor=1.0;followPointerWorldPos=null;}states.followPointerDirty=false;}}if(followPointerWorldPos){var dist=Math.abs(math.lenVec3(math.subVec3(followPointerWorldPos,scene.camera.eye,tempVec3$2)));dollyDistFactor=dist/configs.dollyProximityThreshold;}if(dollyDistFactor<configs.dollyMinSpeed){dollyDistFactor=configs.dollyMinSpeed;}}}}var dollyDeltaForDist=updates.dollyDelta*dollyDistFactor;//----------------------------------------------------------------------------------------------------------
22139
+ if(configs.followPointer){if(--countDown<=0){countDown=SCALE_DOLLY_EACH_FRAME;if(updates.dollyDelta!==0){if(updates.rotateDeltaY===0&&updates.rotateDeltaX===0){if(configs.followPointer&&states.followPointerDirty){pickController.pickCursorPos=states.pointerCanvasPos;pickController.schedulePickSurface=true;pickController.update();if(pickController.pickResult&&pickController.pickResult.worldPos){followPointerWorldPos=pickController.pickResult.worldPos;}else{dollyDistFactor=1.0;followPointerWorldPos=null;}states.followPointerDirty=false;}}if(followPointerWorldPos){var dist=Math.abs(math.lenVec3(math.subVec3(followPointerWorldPos,scene.camera.eye,tempVec3$2)));dollyDistFactor=dist/configs.dollyProximityThreshold;}if(dollyDistFactor<configs.dollyMinSpeed){dollyDistFactor=configs.dollyMinSpeed;}}}}else{dollyDistFactor=1;followPointerWorldPos=null;}var dollyDeltaForDist=updates.dollyDelta*dollyDistFactor;//----------------------------------------------------------------------------------------------------------
22141
22140
  // Rotation
22142
22141
  //----------------------------------------------------------------------------------------------------------
22143
22142
  if(updates.rotateDeltaY!==0||updates.rotateDeltaX!==0){if(!configs.firstPerson&&configs.followPointer&&pivotController.getPivoting()){pivotController.continuePivot(updates.rotateDeltaY,updates.rotateDeltaX);pivotController.showPivot();}else{if(updates.rotateDeltaX!==0){if(configs.firstPerson){camera.pitch(-updates.rotateDeltaX);}else{camera.orbitPitch(updates.rotateDeltaX);}}if(updates.rotateDeltaY!==0){if(configs.firstPerson){camera.yaw(updates.rotateDeltaY);}else{camera.orbitYaw(updates.rotateDeltaY);}}}updates.rotateDeltaX*=configs.rotationInertia;updates.rotateDeltaY*=configs.rotationInertia;cursorType="grabbing";}//----------------------------------------------------------------------------------------------------------