@xeokit/xeokit-sdk 2.6.40 → 2.6.41

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.
@@ -2771,7 +2771,8 @@ _this15._onEntityModelDestroyed=null;});}else{this._onEntityDestroyed=this._enti
2771
2771
  * @final
2772
2772
  */},{key:"visible",get:function get(){return!!this._visible;}/**
2773
2773
  * Destroys this Marker.
2774
- */},{key:"destroy",value:function destroy(){this.fire("destroyed",true);this.scene.camera.off(this._onCameraViewMatrix);this.scene.camera.off(this._onCameraProjMatrix);if(this._entity){if(this._onEntityDestroyed!==null){this._entity.model.off(this._onEntityDestroyed);}if(this._onEntityModelDestroyed!==null){this._entity.model.off(this._onEntityModelDestroyed);}}this._renderer.removeMarker(this);_get(_getPrototypeOf(Marker.prototype),"destroy",this).call(this);}}]);return Marker;}(Component);var nop=function nop(){};function transformToNode(from,to,vec){var fromRec=from.getBoundingClientRect();var toRec=to.getBoundingClientRect();vec[0]+=fromRec.left-toRec.left;vec[1]+=fromRec.top-toRec.top;}var Dot3D=/*#__PURE__*/function(_Marker){_inherits(Dot3D,_Marker);var _super5=_createSuper(Dot3D);function Dot3D(scene,markerCfg,parentElement){var _this16;var cfg=arguments.length>3&&arguments[3]!==undefined?arguments[3]:{};_classCallCheck(this,Dot3D);_this16=_super5.call(this,scene,markerCfg);var handler=function handler(cfgEvent,componentEvent){return function(event){if(cfgEvent){cfgEvent(event);}_this16.fire(componentEvent,event,true);};};_this16._dot=new Dot(parentElement,{fillColor:cfg.fillColor,zIndex:cfg.zIndex,onMouseOver:handler(cfg.onMouseOver,"mouseover"),onMouseLeave:handler(cfg.onMouseLeave,"mouseleave"),onMouseWheel:handler(cfg.onMouseWheel,"wheel"),onMouseDown:handler(cfg.onMouseDown,"mousedown"),onMouseUp:handler(cfg.onMouseUp,"mouseup"),onMouseMove:handler(cfg.onMouseMove,"mousemove"),onTouchstart:handler(cfg.onTouchstart,"touchstart"),onTouchmove:handler(cfg.onTouchmove,"touchmove"),onTouchend:handler(cfg.onTouchend,"touchend"),onContextMenu:handler(cfg.onContextMenu,"contextmenu")});var updateDotPos=function updateDotPos(){var pos=_this16.canvasPos.slice();transformToNode(scene.canvas.canvas,parentElement,pos);_this16._dot.setPos(pos[0],pos[1]);};_this16.on("worldPos",updateDotPos);var onViewMatrix=scene.camera.on("viewMatrix",updateDotPos);var onProjMatrix=scene.camera.on("projMatrix",updateDotPos);_this16._cleanup=function(){scene.camera.off(onViewMatrix);scene.camera.off(onProjMatrix);_this16._dot.destroy();};return _this16;}_createClass(Dot3D,[{key:"setClickable",value:function setClickable(value){this._dot.setClickable(value);}},{key:"setCulled",value:function setCulled(value){this._dot.setCulled(value);}},{key:"setFillColor",value:function setFillColor(value){this._dot.setFillColor(value);}},{key:"setHighlighted",value:function setHighlighted(value){this._dot.setHighlighted(value);}},{key:"setOpacity",value:function setOpacity(value){this._dot.setOpacity(value);}},{key:"setVisible",value:function setVisible(value){this._dot.setVisible(value);}},{key:"destroy",value:function destroy(){this._cleanup();_get(_getPrototypeOf(Dot3D.prototype),"destroy",this).call(this);}}]);return Dot3D;}(Marker);function activateDraggableDot(dot,cfg){var extractCFG=function extractCFG(propName,defaultValue){if(propName in cfg){return cfg[propName];}else if(defaultValue!==undefined){return defaultValue;}else{throw"config missing: "+propName;}};var viewer=extractCFG("viewer");var ray2WorldPos=extractCFG("ray2WorldPos");var handleMouseEvents=extractCFG("handleMouseEvents",false);var handleTouchEvents=extractCFG("handleTouchEvents",false);var onStart=extractCFG("onStart",nop);var onMove=extractCFG("onMove",nop);var onEnd=extractCFG("onEnd",nop);var scene=viewer.scene;var canvas=scene.canvas.canvas;var pickWorldPos=function pickWorldPos(canvasPos){var origin=math.vec3();var direction=math.vec3();math.canvasPosToWorldRay(canvas,scene.camera.viewMatrix,scene.camera.projMatrix,scene.camera.projection,canvasPos,origin,direction);return ray2WorldPos(origin,direction,canvasPos);};var onChange=function onChange(event){var canvasPos=math.vec2([event.clientX,event.clientY]);transformToNode(canvas.ownerDocument.documentElement,canvas,canvasPos);onMove(canvasPos,pickWorldPos(canvasPos));};var currentDrag=null;var onDragMove=function onDragMove(event){var e=currentDrag.matchesEvent(event);if(e){onChange(e);}};var onDragEnd=function onDragEnd(event){var e=currentDrag.matchesEvent(event);if(e){dot.setOpacity(idleOpacity);currentDrag.cleanup();onChange(e);onEnd();}};var startDrag=function startDrag(matchesEvent,cleanupHandlers){if(currentDrag){currentDrag.cleanup();}dot.setOpacity(1.0);dot.setClickable(false);viewer.cameraControl.active=false;currentDrag={matchesEvent:matchesEvent,cleanup:function cleanup(){currentDrag=null;dot.setClickable(true);viewer.cameraControl.active=true;cleanupHandlers();}};onStart();};var cleanupDotHandlers=[];var dot_on=function dot_on(event,callback){var id=dot.on(event,callback);cleanupDotHandlers.push(function(){return dot.off(id);});};if(handleMouseEvents){dot_on("mouseover",function(){return!currentDrag&&dot.setOpacity(1.0);});dot_on("mouseleave",function(){return!currentDrag&&dot.setOpacity(idleOpacity);});dot_on("mousedown",function(event){if(event.which===1){canvas.addEventListener("mousemove",onDragMove);canvas.addEventListener("mouseup",onDragEnd);startDrag(function(event){return event.which===1&&event;},function(){canvas.removeEventListener("mousemove",onDragMove);canvas.removeEventListener("mouseup",onDragEnd);});}});}if(handleTouchEvents){var touchStartId;dot_on("touchstart",function(event){event.preventDefault();if(event.touches.length===1){touchStartId=event.touches[0].identifier;startDrag(function(event){return _toConsumableArray(event.changedTouches).find(function(e){return e.identifier===touchStartId;});},function(){touchStartId=null;});}});dot_on("touchmove",function(event){event.preventDefault();onDragMove(event);});dot_on("touchend",function(event){event.preventDefault();onDragEnd(event);});}var idleOpacity=0.8;dot.setOpacity(idleOpacity);return function(){currentDrag&&currentDrag.cleanup();cleanupDotHandlers.forEach(function(c){return c();});dot.setOpacity(1.0);};}function activateDraggableDots(cfg){var extractCFG=function extractCFG(propName,defaultValue){if(propName in cfg){return cfg[propName];}else if(defaultValue!==undefined){return defaultValue;}else{throw"config missing: "+propName;}};var viewer=extractCFG("viewer");var handleMouseEvents=extractCFG("handleMouseEvents",false);var handleTouchEvents=extractCFG("handleTouchEvents",false);var pointerLens=extractCFG("pointerLens",null);var dots=extractCFG("dots");var _ray2WorldPos=extractCFG("ray2WorldPos");var _onEnd=extractCFG("onEnd",nop);var updatePointerLens=pointerLens?function(canvasPos){pointerLens.visible=!!canvasPos;if(canvasPos){pointerLens.canvasPos=canvasPos;}}:function(){};var cleanups=dots.map(function(dot){var initPos;return activateDraggableDot(dot,{handleMouseEvents:handleMouseEvents,handleTouchEvents:handleTouchEvents,viewer:viewer,ray2WorldPos:function ray2WorldPos(orig,dir,canvasPos){return _ray2WorldPos(orig,dir,canvasPos)||initPos;},onStart:function onStart(){initPos=dot.worldPos.slice();setOtherDotsActive(false,dot);},onMove:function onMove(canvasPos,worldPos){updatePointerLens(canvasPos);dot.worldPos=worldPos;},onEnd:function onEnd(){if(!_onEnd(initPos,dot)){dot.worldPos=initPos;}updatePointerLens(null);setOtherDotsActive(true,dot);}});});var setOtherDotsActive=function setOtherDotsActive(active,dot){return dots.forEach(function(d){return d!==dot&&d.setClickable(active);});};setOtherDotsActive(true);return function(){cleanups.forEach(function(c){return c();});updatePointerLens(null);};}/** @private */var Wire=/*#__PURE__*/function(){function Wire(parentElement){var _this17=this;var cfg=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};_classCallCheck(this,Wire);this._color=cfg.color||"black";this._highlightClass="viewer-ruler-wire-highlighted";this._wire=document.createElement('div');this._wire.className+=this._wire.className?' viewer-ruler-wire':'viewer-ruler-wire';this._wireClickable=document.createElement('div');this._wireClickable.className+=this._wireClickable.className?' viewer-ruler-wire-clickable':'viewer-ruler-wire-clickable';this._thickness=cfg.thickness||1.0;this._thicknessClickable=cfg.thicknessClickable||6.0;this._visible=true;this._culled=false;var wire=this._wire;var wireStyle=wire.style;wireStyle.border="solid "+this._thickness+"px "+this._color;wireStyle.position="absolute";wireStyle["z-index"]=cfg.zIndex===undefined?"2000001":cfg.zIndex;wireStyle.width=0+"px";wireStyle.height=0+"px";wireStyle.visibility="visible";wireStyle.top=0+"px";wireStyle.left=0+"px";wireStyle['-webkit-transform-origin']="0 0";wireStyle['-moz-transform-origin']="0 0";wireStyle['-ms-transform-origin']="0 0";wireStyle['-o-transform-origin']="0 0";wireStyle['transform-origin']="0 0";wireStyle['-webkit-transform']='rotate(0deg)';wireStyle['-moz-transform']='rotate(0deg)';wireStyle['-ms-transform']='rotate(0deg)';wireStyle['-o-transform']='rotate(0deg)';wireStyle['transform']='rotate(0deg)';wireStyle["opacity"]=1.0;wireStyle["pointer-events"]="none";if(cfg.onContextMenu);parentElement.appendChild(wire);var wireClickable=this._wireClickable;var wireClickableStyle=wireClickable.style;wireClickableStyle.border="solid "+this._thicknessClickable+"px "+this._color;wireClickableStyle.position="absolute";wireClickableStyle["z-index"]=cfg.zIndex===undefined?"2000002":cfg.zIndex+1;wireClickableStyle.width=0+"px";wireClickableStyle.height=0+"px";wireClickableStyle.visibility="visible";wireClickableStyle.top=0+"px";wireClickableStyle.left=0+"px";// wireClickableStyle["pointer-events"] = "none";
2774
+ */},{key:"destroy",value:function destroy(){this.fire("destroyed",true);this.scene.camera.off(this._onCameraViewMatrix);this.scene.camera.off(this._onCameraProjMatrix);if(this._entity){if(this._onEntityDestroyed!==null){this._entity.model.off(this._onEntityDestroyed);}if(this._onEntityModelDestroyed!==null){this._entity.model.off(this._onEntityModelDestroyed);}}this._renderer.removeMarker(this);_get(_getPrototypeOf(Marker.prototype),"destroy",this).call(this);}}]);return Marker;}(Component);var nop=function nop(){};function transformToNode(from,to,vec){var fromRec=from.getBoundingClientRect();var toRec=to.getBoundingClientRect();vec[0]+=fromRec.left-toRec.left;vec[1]+=fromRec.top-toRec.top;}var Dot3D=/*#__PURE__*/function(_Marker){_inherits(Dot3D,_Marker);var _super5=_createSuper(Dot3D);function Dot3D(scene,markerCfg,parentElement){var _this16;var cfg=arguments.length>3&&arguments[3]!==undefined?arguments[3]:{};_classCallCheck(this,Dot3D);_this16=_super5.call(this,scene,markerCfg);var handler=function handler(cfgEvent,componentEvent){return function(event){if(cfgEvent){cfgEvent(event);}_this16.fire(componentEvent,event,true);};};_this16._dot=new Dot(parentElement,{fillColor:cfg.fillColor,zIndex:cfg.zIndex,onMouseOver:handler(cfg.onMouseOver,"mouseover"),onMouseLeave:handler(cfg.onMouseLeave,"mouseleave"),onMouseWheel:handler(cfg.onMouseWheel,"wheel"),onMouseDown:handler(cfg.onMouseDown,"mousedown"),onMouseUp:handler(cfg.onMouseUp,"mouseup"),onMouseMove:handler(cfg.onMouseMove,"mousemove"),onTouchstart:handler(cfg.onTouchstart,"touchstart"),onTouchmove:handler(cfg.onTouchmove,"touchmove"),onTouchend:handler(cfg.onTouchend,"touchend"),onContextMenu:handler(cfg.onContextMenu,"contextmenu")});var updateDotPos=function updateDotPos(){var pos=_this16.canvasPos.slice();transformToNode(scene.canvas.canvas,parentElement,pos);_this16._dot.setPos(pos[0],pos[1]);};_this16.on("worldPos",updateDotPos);var onViewMatrix=scene.camera.on("viewMatrix",updateDotPos);var onProjMatrix=scene.camera.on("projMatrix",updateDotPos);_this16._cleanup=function(){scene.camera.off(onViewMatrix);scene.camera.off(onProjMatrix);_this16._dot.destroy();};return _this16;}_createClass(Dot3D,[{key:"setClickable",value:function setClickable(value){this._dot.setClickable(value);}},{key:"setCulled",value:function setCulled(value){this._dot.setCulled(value);}},{key:"setFillColor",value:function setFillColor(value){this._dot.setFillColor(value);}},{key:"setHighlighted",value:function setHighlighted(value){this._dot.setHighlighted(value);}},{key:"setOpacity",value:function setOpacity(value){this._dot.setOpacity(value);}},{key:"setVisible",value:function setVisible(value){this._dot.setVisible(value);}},{key:"destroy",value:function destroy(){this._cleanup();_get(_getPrototypeOf(Dot3D.prototype),"destroy",this).call(this);}}]);return Dot3D;}(Marker);function activateDraggableDot(dot,cfg){var extractCFG=function extractCFG(propName,defaultValue){if(propName in cfg){return cfg[propName];}else if(defaultValue!==undefined){return defaultValue;}else{throw"config missing: "+propName;}};var viewer=extractCFG("viewer");var ray2WorldPos=extractCFG("ray2WorldPos");var handleMouseEvents=extractCFG("handleMouseEvents",false);var handleTouchEvents=extractCFG("handleTouchEvents",false);var onStart=extractCFG("onStart",nop);var onMove=extractCFG("onMove",nop);var onEnd=extractCFG("onEnd",nop);var scene=viewer.scene;var canvas=scene.canvas.canvas;var pickWorldPos=function pickWorldPos(canvasPos){var origin=math.vec3();var direction=math.vec3();math.canvasPosToWorldRay(canvas,scene.camera.viewMatrix,scene.camera.projMatrix,scene.camera.projection,canvasPos,origin,direction);return ray2WorldPos(origin,direction,canvasPos);};var onChange=function onChange(event){var canvasPos=math.vec2([event.clientX,event.clientY]);transformToNode(canvas.ownerDocument.documentElement,canvas,canvasPos);onMove(canvasPos,pickWorldPos(canvasPos));};var currentDrag=null;var onDragMove=function onDragMove(event){var e=currentDrag.matchesEvent(event);if(e){onChange(e);}};var onDragEnd=function onDragEnd(event){var e=currentDrag.matchesEvent(event);if(e){dot.setOpacity(idleOpacity);currentDrag.cleanup();onChange(e);onEnd();}};var startDrag=function startDrag(matchesEvent,cleanupHandlers){if(currentDrag){currentDrag.cleanup();}dot.setOpacity(1.0);dot.setClickable(false);viewer.cameraControl.active=false;currentDrag={matchesEvent:matchesEvent,cleanup:function cleanup(){currentDrag=null;dot.setClickable(true);viewer.cameraControl.active=true;cleanupHandlers();}};onStart();};var cleanupDotHandlers=[];var dot_on=function dot_on(event,callback){var id=dot.on(event,callback);cleanupDotHandlers.push(function(){return dot.off(id);});};if(handleMouseEvents){dot_on("mouseover",function(){return!currentDrag&&dot.setOpacity(1.0);});dot_on("mouseleave",function(){return!currentDrag&&dot.setOpacity(idleOpacity);});dot_on("mousedown",function(event){if(event.which===1){canvas.addEventListener("mousemove",onDragMove);canvas.addEventListener("mouseup",onDragEnd);startDrag(function(event){return event.which===1&&event;},function(){canvas.removeEventListener("mousemove",onDragMove);canvas.removeEventListener("mouseup",onDragEnd);});}});}if(handleTouchEvents){var touchStartId;dot_on("touchstart",function(event){event.preventDefault();if(event.touches.length===1){touchStartId=event.touches[0].identifier;startDrag(function(event){return _toConsumableArray(event.changedTouches).find(function(e){return e.identifier===touchStartId;});},function(){touchStartId=null;});}});dot_on("touchmove",function(event){event.preventDefault();onDragMove(event);});dot_on("touchend",function(event){event.preventDefault();onDragEnd(event);});}var idleOpacity=0.8;dot.setOpacity(idleOpacity);return function(){currentDrag&&currentDrag.cleanup();cleanupDotHandlers.forEach(function(c){return c();});dot.setOpacity(1.0);};}function activateDraggableDots(cfg){var extractCFG=function extractCFG(propName,defaultValue){if(propName in cfg){return cfg[propName];}else if(defaultValue!==undefined){return defaultValue;}else{throw"config missing: "+propName;}};var viewer=extractCFG("viewer");var handleMouseEvents=extractCFG("handleMouseEvents",false);var handleTouchEvents=extractCFG("handleTouchEvents",false);var pointerLens=extractCFG("pointerLens",null);var dots=extractCFG("dots");var _ray2WorldPos=extractCFG("ray2WorldPos");var _onEnd=extractCFG("onEnd",nop);var updatePointerLens=pointerLens?function(canvasPos){pointerLens.visible=!!canvasPos;if(canvasPos){pointerLens.canvasPos=canvasPos;}}:function(){};var cleanups=dots.map(function(dot){var initPos;return activateDraggableDot(dot,{handleMouseEvents:handleMouseEvents,handleTouchEvents:handleTouchEvents,viewer:viewer,ray2WorldPos:function ray2WorldPos(orig,dir,canvasPos){return _ray2WorldPos(orig,dir,canvasPos)||initPos;},onStart:function onStart(){initPos=dot.worldPos.slice();setOtherDotsActive(false,dot);},onMove:function onMove(canvasPos,worldPos){updatePointerLens(canvasPos);dot.worldPos=worldPos;},onEnd:function onEnd(){if(!_onEnd(initPos,dot)){dot.worldPos=initPos;}updatePointerLens(null);setOtherDotsActive(true,dot);}});});var setOtherDotsActive=function setOtherDotsActive(active,dot){return dots.forEach(function(d){return d!==dot&&d.setClickable(active);});};setOtherDotsActive(true);return function(){cleanups.forEach(function(c){return c();});updatePointerLens(null);};}var touchPointSelector$1=function touchPointSelector$1(viewer,pointerCircle,ray2WorldPos){return function(onCancel,onChange,onCommit){var scene=viewer.scene;var canvas=scene.canvas.canvas;var longTouchTimeoutMs=300;var moveTolerance=20;var copyCanvasPos=function copyCanvasPos(event,vec2){vec2[0]=event.clientX;vec2[1]=event.clientY;transformToNode(canvas.ownerDocument.documentElement,canvas,vec2);return vec2;};var pickWorldPos=function pickWorldPos(canvasPos){var origin=math.vec3();var direction=math.vec3();math.canvasPosToWorldRay(canvas,scene.camera.viewMatrix,scene.camera.projMatrix,scene.camera.projection,canvasPos,origin,direction);return ray2WorldPos(origin,direction);};var longTouchTimeout=null;var nop=function nop(){};var onSingleTouchMove=nop;var startTouchIdentifier;var resetAction=function resetAction(){pointerCircle.stop();clearTimeout(longTouchTimeout);viewer.cameraControl.active=true;onSingleTouchMove=nop;startTouchIdentifier=null;};var cleanup=function cleanup(){resetAction();canvas.removeEventListener("touchstart",onCanvasTouchStart);canvas.removeEventListener("touchmove",onCanvasTouchMove);canvas.removeEventListener("touchend",onCanvasTouchEnd);};var onCanvasTouchStart=function onCanvasTouchStart(event){var touches=event.touches;if(touches.length!==1){resetAction();onCancel();}else{var startTouch=touches[0];var startCanvasPos=copyCanvasPos(startTouch,math.vec2());var startWorldPos=pickWorldPos(startCanvasPos);if(startWorldPos){startTouchIdentifier=startTouch.identifier;onSingleTouchMove=function onSingleTouchMove(canvasPos){if(math.distVec2(startCanvasPos,canvasPos)>moveTolerance){resetAction();}};longTouchTimeout=setTimeout(function(){pointerCircle.start(startCanvasPos);longTouchTimeout=setTimeout(function(){pointerCircle.stop();viewer.cameraControl.active=false;onSingleTouchMove=function onSingleTouchMove(canvasPos){onChange(canvasPos,pickWorldPos(canvasPos));};onSingleTouchMove(startCanvasPos);},longTouchTimeoutMs);},250);}}};canvas.addEventListener("touchstart",onCanvasTouchStart,{passive:true});// canvas.addEventListener("touchcancel", e => console.log("touchcancel", e), {passive: true});
2775
+ var onCanvasTouchMove=function onCanvasTouchMove(event){var touch=_toConsumableArray(event.changedTouches).find(function(e){return e.identifier===startTouchIdentifier;});if(touch){onSingleTouchMove(copyCanvasPos(touch,math.vec2()));}};canvas.addEventListener("touchmove",onCanvasTouchMove,{passive:true});var onCanvasTouchEnd=function onCanvasTouchEnd(event){var touch=_toConsumableArray(event.changedTouches).find(function(e){return e.identifier===startTouchIdentifier;});if(touch){cleanup();var _canvasPos=copyCanvasPos(touch,math.vec2());onCommit(_canvasPos,pickWorldPos(_canvasPos));}};canvas.addEventListener("touchend",onCanvasTouchEnd,{passive:true});return cleanup;};};/** @private */var Wire=/*#__PURE__*/function(){function Wire(parentElement){var _this17=this;var cfg=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};_classCallCheck(this,Wire);this._color=cfg.color||"black";this._highlightClass="viewer-ruler-wire-highlighted";this._wire=document.createElement('div');this._wire.className+=this._wire.className?' viewer-ruler-wire':'viewer-ruler-wire';this._wireClickable=document.createElement('div');this._wireClickable.className+=this._wireClickable.className?' viewer-ruler-wire-clickable':'viewer-ruler-wire-clickable';this._thickness=cfg.thickness||1.0;this._thicknessClickable=cfg.thicknessClickable||6.0;this._visible=true;this._culled=false;var wire=this._wire;var wireStyle=wire.style;wireStyle.border="solid "+this._thickness+"px "+this._color;wireStyle.position="absolute";wireStyle["z-index"]=cfg.zIndex===undefined?"2000001":cfg.zIndex;wireStyle.width=0+"px";wireStyle.height=0+"px";wireStyle.visibility="visible";wireStyle.top=0+"px";wireStyle.left=0+"px";wireStyle['-webkit-transform-origin']="0 0";wireStyle['-moz-transform-origin']="0 0";wireStyle['-ms-transform-origin']="0 0";wireStyle['-o-transform-origin']="0 0";wireStyle['transform-origin']="0 0";wireStyle['-webkit-transform']='rotate(0deg)';wireStyle['-moz-transform']='rotate(0deg)';wireStyle['-ms-transform']='rotate(0deg)';wireStyle['-o-transform']='rotate(0deg)';wireStyle['transform']='rotate(0deg)';wireStyle["opacity"]=1.0;wireStyle["pointer-events"]="none";if(cfg.onContextMenu);parentElement.appendChild(wire);var wireClickable=this._wireClickable;var wireClickableStyle=wireClickable.style;wireClickableStyle.border="solid "+this._thicknessClickable+"px "+this._color;wireClickableStyle.position="absolute";wireClickableStyle["z-index"]=cfg.zIndex===undefined?"2000002":cfg.zIndex+1;wireClickableStyle.width=0+"px";wireClickableStyle.height=0+"px";wireClickableStyle.visibility="visible";wireClickableStyle.top=0+"px";wireClickableStyle.left=0+"px";// wireClickableStyle["pointer-events"] = "none";
2775
2776
  wireClickableStyle['-webkit-transform-origin']="0 0";wireClickableStyle['-moz-transform-origin']="0 0";wireClickableStyle['-ms-transform-origin']="0 0";wireClickableStyle['-o-transform-origin']="0 0";wireClickableStyle['transform-origin']="0 0";wireClickableStyle['-webkit-transform']='rotate(0deg)';wireClickableStyle['-moz-transform']='rotate(0deg)';wireClickableStyle['-ms-transform']='rotate(0deg)';wireClickableStyle['-o-transform']='rotate(0deg)';wireClickableStyle['transform']='rotate(0deg)';wireClickableStyle["opacity"]=0.0;wireClickableStyle["pointer-events"]="none";if(cfg.onContextMenu);parentElement.appendChild(wireClickable);if(cfg.onMouseOver){wireClickable.addEventListener('mouseover',function(event){cfg.onMouseOver(event,_this17);});}if(cfg.onMouseLeave){wireClickable.addEventListener('mouseleave',function(event){cfg.onMouseLeave(event,_this17);});}if(cfg.onMouseWheel){wireClickable.addEventListener('wheel',function(event){cfg.onMouseWheel(event,_this17);});}if(cfg.onMouseDown){wireClickable.addEventListener('mousedown',function(event){cfg.onMouseDown(event,_this17);});}if(cfg.onMouseUp){wireClickable.addEventListener('mouseup',function(event){cfg.onMouseUp(event,_this17);});}if(cfg.onMouseMove){wireClickable.addEventListener('mousemove',function(event){cfg.onMouseMove(event,_this17);});}if(cfg.onContextMenu){if(os.isIphoneSafari()){wireClickable.addEventListener('touchstart',function(event){event.preventDefault();if(_this17._timeout){clearTimeout(_this17._timeout);_this17._timeout=null;}_this17._timeout=setTimeout(function(){event.clientX=event.touches[0].clientX;event.clientY=event.touches[0].clientY;cfg.onContextMenu(event,_this17);clearTimeout(_this17._timeout);_this17._timeout=null;},500);});wireClickable.addEventListener('touchend',function(event){event.preventDefault();//stops short touches from calling the timeout
2776
2777
  if(_this17._timeout){clearTimeout(_this17._timeout);_this17._timeout=null;}});}else{wireClickable.addEventListener('contextmenu',function(event){console.log(event);cfg.onContextMenu(event,_this17);event.preventDefault();event.stopPropagation();console.log("Label context menu");});}}this._x1=0;this._y1=0;this._x2=0;this._y2=0;this._update();}_createClass(Wire,[{key:"visible",get:function get(){return this._wire.style.visibility==="visible";}},{key:"_update",value:function _update(){var length=Math.abs(Math.sqrt((this._x1-this._x2)*(this._x1-this._x2)+(this._y1-this._y2)*(this._y1-this._y2)));var angle=Math.atan2(this._y2-this._y1,this._x2-this._x1)*180.0/Math.PI;var wireStyle=this._wire.style;wireStyle["width"]=Math.round(length)+'px';wireStyle["left"]=Math.round(this._x1)+'px';wireStyle["top"]=Math.round(this._y1)+'px';wireStyle['-webkit-transform']='rotate('+angle+'deg)';wireStyle['-moz-transform']='rotate('+angle+'deg)';wireStyle['-ms-transform']='rotate('+angle+'deg)';wireStyle['-o-transform']='rotate('+angle+'deg)';wireStyle['transform']='rotate('+angle+'deg)';var wireClickableStyle=this._wireClickable.style;wireClickableStyle["width"]=Math.round(length)+'px';wireClickableStyle["left"]=Math.round(this._x1)+'px';wireClickableStyle["top"]=Math.round(this._y1)+'px';wireClickableStyle['-webkit-transform']='rotate('+angle+'deg)';wireClickableStyle['-moz-transform']='rotate('+angle+'deg)';wireClickableStyle['-ms-transform']='rotate('+angle+'deg)';wireClickableStyle['-o-transform']='rotate('+angle+'deg)';wireClickableStyle['transform']='rotate('+angle+'deg)';}},{key:"setStartAndEnd",value:function setStartAndEnd(x1,y1,x2,y2){this._x1=x1;this._y1=y1;this._x2=x2;this._y2=y2;this._update();}},{key:"setColor",value:function setColor(color){this._color=color||"black";this._wire.style.border="solid "+this._thickness+"px "+this._color;}},{key:"setOpacity",value:function setOpacity(opacity){this._wire.style.opacity=opacity;}},{key:"setVisible",value:function setVisible(visible){if(this._visible===visible){return;}this._visible=!!visible;this._wire.style.visibility=this._visible&&!this._culled?"visible":"hidden";}},{key:"setCulled",value:function setCulled(culled){if(this._culled===culled){return;}this._culled=!!culled;this._wire.style.visibility=this._visible&&!this._culled?"visible":"hidden";}},{key:"setClickable",value:function setClickable(clickable){this._wireClickable.style["pointer-events"]=clickable?"all":"none";}},{key:"setHighlighted",value:function setHighlighted(highlighted){if(this._highlighted===highlighted){return;}this._highlighted=!!highlighted;if(this._highlighted){this._wire.classList.add(this._highlightClass);}else{this._wire.classList.remove(this._highlightClass);}}},{key:"destroy",value:function destroy(visible){if(this._wire.parentElement){this._wire.parentElement.removeChild(this._wire);}if(this._wireClickable.parentElement){this._wireClickable.parentElement.removeChild(this._wireClickable);}}}]);return Wire;}();/** @private */var Label=/*#__PURE__*/function(){function Label(parentElement){var _this18=this;var cfg=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};_classCallCheck(this,Label);this._highlightClass="viewer-ruler-label-highlighted";this._prefix=cfg.prefix||"";this._x=0;this._y=0;this._visible=true;this._culled=false;this._label=document.createElement('div');this._label.className+=this._label.className?' viewer-ruler-label':'viewer-ruler-label';this._timeout=null;var label=this._label;var style=label.style;style["border-radius"]=5+"px";style.color="white";style.padding="4px";style.border="solid 1px";style.background="lightgreen";style.position="absolute";style["z-index"]=cfg.zIndex===undefined?"5000005":cfg.zIndex;style.width="auto";style.height="auto";style.visibility="visible";style.top=0+"px";style.left=0+"px";style["pointer-events"]="all";style["opacity"]=1.0;if(cfg.onContextMenu);label.innerText="";parentElement.appendChild(label);this.setPos(cfg.x||0,cfg.y||0);this.setFillColor(cfg.fillColor);this.setBorderColor(cfg.fillColor);this.setText(cfg.text);if(cfg.onMouseOver){label.addEventListener('mouseover',function(event){cfg.onMouseOver(event,_this18);event.preventDefault();});}if(cfg.onMouseLeave){label.addEventListener('mouseleave',function(event){cfg.onMouseLeave(event,_this18);event.preventDefault();});}if(cfg.onMouseWheel){label.addEventListener('wheel',function(event){cfg.onMouseWheel(event,_this18);});}if(cfg.onMouseDown){label.addEventListener('mousedown',function(event){cfg.onMouseDown(event,_this18);event.stopPropagation();});}if(cfg.onMouseUp){label.addEventListener('mouseup',function(event){cfg.onMouseUp(event,_this18);event.stopPropagation();});}if(cfg.onMouseMove){label.addEventListener('mousemove',function(event){cfg.onMouseMove(event,_this18);});}if(cfg.onContextMenu){if(os.isIphoneSafari()){label.addEventListener('touchstart',function(event){event.preventDefault();if(_this18._timeout){clearTimeout(_this18._timeout);_this18._timeout=null;}_this18._timeout=setTimeout(function(){event.clientX=event.touches[0].clientX;event.clientY=event.touches[0].clientY;cfg.onContextMenu(event,_this18);clearTimeout(_this18._timeout);_this18._timeout=null;},500);});label.addEventListener('touchend',function(event){event.preventDefault();//stops short touches from calling the timeout
2777
2778
  if(_this18._timeout){clearTimeout(_this18._timeout);_this18._timeout=null;}});}else{label.addEventListener('contextmenu',function(event){console.log(event);cfg.onContextMenu(event,_this18);event.preventDefault();event.stopPropagation();console.log("Label context menu");});}}}_createClass(Label,[{key:"setPos",value:function setPos(x,y){this._x=x;this._y=y;var style=this._label.style;style["left"]=Math.round(x)-20+'px';style["top"]=Math.round(y)-12+'px';}},{key:"setPosOnWire",value:function setPosOnWire(x1,y1,x2,y2){var x=x1+(x2-x1)*0.5;var y=y1+(y2-y1)*0.5;var style=this._label.style;style["left"]=Math.round(x)-20+'px';style["top"]=Math.round(y)-12+'px';}},{key:"setPosBetweenWires",value:function setPosBetweenWires(x1,y1,x2,y2,x3,y3){var x=(x1+x2+x3)/3;var y=(y1+y2+y3)/3;var style=this._label.style;style["left"]=Math.round(x)-20+'px';style["top"]=Math.round(y)-12+'px';}},{key:"setText",value:function setText(text){this._label.innerHTML=this._prefix+(text||"");}},{key:"setFillColor",value:function setFillColor(color){this._fillColor=color||"lightgreen";this._label.style.background=this._fillColor;}},{key:"setBorderColor",value:function setBorderColor(color){this._borderColor=color||"black";this._label.style.border="solid 1px "+this._borderColor;}},{key:"setOpacity",value:function setOpacity(opacity){this._label.style.opacity=opacity;}},{key:"setVisible",value:function setVisible(visible){if(this._visible===visible){return;}this._visible=!!visible;this._label.style.visibility=this._visible&&!this._culled?"visible":"hidden";}},{key:"setCulled",value:function setCulled(culled){if(this._culled===culled){return;}this._culled=!!culled;this._label.style.visibility=this._visible&&!this._culled?"visible":"hidden";}},{key:"setHighlighted",value:function setHighlighted(highlighted){if(this._highlighted===highlighted){return;}this._highlighted=!!highlighted;if(this._highlighted){this._label.classList.add(this._highlightClass);}else{this._label.classList.remove(this._highlightClass);}}},{key:"setClickable",value:function setClickable(clickable){this._label.style["pointer-events"]=clickable?"all":"none";}},{key:"setPrefix",value:function setPrefix(prefix){if(this._prefix===prefix){return;}this._prefix=prefix;}},{key:"destroy",value:function destroy(){if(this._label.parentElement){this._label.parentElement.removeChild(this._label);}}}]);return Label;}();var originVec=math.vec3();var targetVec=math.vec3();/**
@@ -4702,7 +4703,7 @@ this._buildPositions();this.positionsDirty=false;this.aabbDirty=true;this.vbosDi
4702
4703
  this.positionsBuf.setData(new Float32Array(this.positions));// Indices don't need updating
4703
4704
  return;}this.positionsBuf.destroy();this.positionsBuf=null;this.indicesBuf.destroy();this.indicesBuf=null;}var gl=this.scene.canvas.gl;var lenPositions=this.numMarkers*3;var lenIndices=this.numMarkers;this.positionsBuf=new ArrayBuf(gl,gl.ARRAY_BUFFER,new Float32Array(this.positions),lenPositions,3,gl.STATIC_DRAW);this.indicesBuf=new ArrayBuf(gl,gl.ELEMENT_ARRAY_BUFFER,new Uint16Array(this.indices),lenIndices,1,gl.STATIC_DRAW);this.lenPositionsBuf=this.positions.length;}},{key:"_buildOcclusionTestList",value:function _buildOcclusionTestList(){var canvas=this.scene.canvas;var near=this.scene.camera.perspective.near;// Assume near enough to ortho near
4704
4705
  var boundary=canvas.boundary;var canvasWidth=boundary[2];var canvasHeight=boundary[3];var lenPixels=0;this.lenOcclusionTestList=0;for(var _i53=0;_i53<this.numMarkers;_i53++){var marker=this.markerList[_i53];var _viewPos=marker.viewPos;if(_viewPos[2]>-near){// Clipped by near plane
4705
- marker._setVisible(false);continue;}var _canvasPos=marker.canvasPos;var canvasX=_canvasPos[0];var canvasY=_canvasPos[1];if(canvasX+10<0||canvasY+10<0||canvasX-10>canvasWidth||canvasY-10>canvasHeight){marker._setVisible(false);continue;}if(marker.entity&&!marker.entity.visible){marker._setVisible(false);continue;}if(marker.occludable){this.occlusionTestList[this.lenOcclusionTestList++]=marker;this.pixels[lenPixels++]=canvasX;this.pixels[lenPixels++]=canvasY;continue;}marker._setVisible(true);}}},{key:"_updateActiveSectionPlanes",value:function _updateActiveSectionPlanes(){var sectionPlanes=this.scene._sectionPlanesState.sectionPlanes;var numSectionPlanes=sectionPlanes.length;if(numSectionPlanes>0){for(var _i54=0;_i54<numSectionPlanes;_i54++){var sectionPlane=sectionPlanes[_i54];if(!sectionPlane.active){this.sectionPlanesActive[_i54]=false;}else{var intersect=math.planeAABB3Intersect(sectionPlane.dir,sectionPlane.dist,this.aabb);var outside=intersect===-1;if(outside){this.culledBySectionPlanes=true;return;}var intersecting=intersect===0;this.sectionPlanesActive[_i54]=intersecting;}}}this.culledBySectionPlanes=false;}},{key:"destroy",value:function destroy(){this.markers={};this.markerList.length=0;if(this.positionsBuf){this.positionsBuf.destroy();}if(this.indicesBuf){this.indicesBuf.destroy();}}}]);return OcclusionLayer;}();var MARKER_COLOR=math.vec3([1.0,0.0,0.0]);var POINT_SIZE=20;var tempVec3a$J=math.vec3();/**
4706
+ marker._setVisible(false);continue;}var _canvasPos2=marker.canvasPos;var canvasX=_canvasPos2[0];var canvasY=_canvasPos2[1];if(canvasX+10<0||canvasY+10<0||canvasX-10>canvasWidth||canvasY-10>canvasHeight){marker._setVisible(false);continue;}if(marker.entity&&!marker.entity.visible){marker._setVisible(false);continue;}if(marker.occludable){this.occlusionTestList[this.lenOcclusionTestList++]=marker;this.pixels[lenPixels++]=canvasX;this.pixels[lenPixels++]=canvasY;continue;}marker._setVisible(true);}}},{key:"_updateActiveSectionPlanes",value:function _updateActiveSectionPlanes(){var sectionPlanes=this.scene._sectionPlanesState.sectionPlanes;var numSectionPlanes=sectionPlanes.length;if(numSectionPlanes>0){for(var _i54=0;_i54<numSectionPlanes;_i54++){var sectionPlane=sectionPlanes[_i54];if(!sectionPlane.active){this.sectionPlanesActive[_i54]=false;}else{var intersect=math.planeAABB3Intersect(sectionPlane.dir,sectionPlane.dist,this.aabb);var outside=intersect===-1;if(outside){this.culledBySectionPlanes=true;return;}var intersecting=intersect===0;this.sectionPlanesActive[_i54]=intersecting;}}}this.culledBySectionPlanes=false;}},{key:"destroy",value:function destroy(){this.markers={};this.markerList.length=0;if(this.positionsBuf){this.positionsBuf.destroy();}if(this.indicesBuf){this.indicesBuf.destroy();}}}]);return OcclusionLayer;}();var MARKER_COLOR=math.vec3([1.0,0.0,0.0]);var POINT_SIZE=20;var tempVec3a$J=math.vec3();/**
4706
4707
  * Manages occlusion testing. Private member of a Renderer.
4707
4708
  * @private
4708
4709
  */var OcclusionTester=/*#__PURE__*/function(){function OcclusionTester(scene,renderBufferManager){var _this33=this;_classCallCheck(this,OcclusionTester);this._scene=scene;this._renderBufferManager=renderBufferManager;this._occlusionLayers={};this._occlusionLayersList=[];this._occlusionLayersListDirty=false;this._shaderSource=null;this._program=null;this._shaderSourceHash=null;this._shaderSourceDirty=true;// Need to build shader source code ?
@@ -15040,7 +15041,7 @@ this._silhouetteRenderer=new TrianglesSilhouetteRenderer$1(this._scene);}if(!thi
15040
15041
  * Gets the maximum batched geometry VBO size.
15041
15042
  */function get(){return maxGeometryBatchSize;},set:function set(value){if(value<100000){value=100000;}else if(value>5000000){value=5000000;}maxGeometryBatchSize=value;}}]);return Configs;}();var configs$2=new Configs();/**
15042
15043
  * @private
15043
- */var VBOBatchingTrianglesBuffer=/*#__PURE__*/_createClass(function VBOBatchingTrianglesBuffer(){_classCallCheck(this,VBOBatchingTrianglesBuffer);this.maxVerts=configs$2.maxGeometryBatchSize;this.maxIndices=configs$2.maxGeometryBatchSize*3;// Rough rule-of-thumb
15044
+ */var VBOBatchingTrianglesBuffer=/*#__PURE__*/_createClass(function VBOBatchingTrianglesBuffer(){var maxBatchSize=arguments.length>0&&arguments[0]!==undefined?arguments[0]:configs$2.maxGeometryBatchSize;_classCallCheck(this,VBOBatchingTrianglesBuffer);this.maxVerts=maxBatchSize;this.maxIndices=maxBatchSize*3;// Rough rule-of-thumb
15044
15045
  this.positions=[];this.colors=[];this.uv=[];this.metallicRoughness=[];this.normals=[];this.pickColors=[];this.offsets=[];this.indices=[];this.edgeIndices=[];});var translate=math.mat4();var scale=math.mat4();/**
15045
15046
  * @private
15046
15047
  */function quantizePositions(positions,aabb,positionsDecodeMatrix){// http://cg.postech.ac.kr/research/mesh_comp_mobile/mesh_comp_mobile_conference.pdf
@@ -18927,7 +18928,9 @@ cfg.normals=null;}this._geometries[cfg.id]=cfg;this._numTriangles+=cfg.indices?M
18927
18928
  * @param {Number} [cfg.encoding=LinearEncoding] Encoding format. Supported values are {@link LinearEncoding} and {@link sRGBEncoding}.
18928
18929
  */},{key:"createTexture",value:function createTexture(cfg){var _this81=this;var textureId=cfg.id;if(textureId===undefined||textureId===null){this.error("[createTexture] Config missing: id");return;}if(this._textures[textureId]){this.error("[createTexture] Texture already created: "+textureId);return;}if(!cfg.src&&!cfg.image&&!cfg.buffers){this.error("[createTexture] Param expected: `src`, `image' or 'buffers'");return null;}var minFilter=cfg.minFilter||LinearMipmapLinearFilter;if(minFilter!==LinearFilter&&minFilter!==LinearMipMapNearestFilter&&minFilter!==LinearMipmapLinearFilter&&minFilter!==NearestMipMapLinearFilter&&minFilter!==NearestMipMapNearestFilter){this.error("[createTexture] Unsupported value for 'minFilter' - \n supported values are LinearFilter, LinearMipMapNearestFilter, NearestMipMapNearestFilter, \n NearestMipMapLinearFilter and LinearMipmapLinearFilter. Defaulting to LinearMipmapLinearFilter.");minFilter=LinearMipmapLinearFilter;}var magFilter=cfg.magFilter||LinearFilter;if(magFilter!==LinearFilter&&magFilter!==NearestFilter){this.error("[createTexture] Unsupported value for 'magFilter' - supported values are LinearFilter and NearestFilter. Defaulting to LinearFilter.");magFilter=LinearFilter;}var wrapS=cfg.wrapS||RepeatWrapping;if(wrapS!==ClampToEdgeWrapping&&wrapS!==MirroredRepeatWrapping&&wrapS!==RepeatWrapping){this.error("[createTexture] Unsupported value for 'wrapS' - supported values are ClampToEdgeWrapping, MirroredRepeatWrapping and RepeatWrapping. Defaulting to RepeatWrapping.");wrapS=RepeatWrapping;}var wrapT=cfg.wrapT||RepeatWrapping;if(wrapT!==ClampToEdgeWrapping&&wrapT!==MirroredRepeatWrapping&&wrapT!==RepeatWrapping){this.error("[createTexture] Unsupported value for 'wrapT' - supported values are ClampToEdgeWrapping, MirroredRepeatWrapping and RepeatWrapping. Defaulting to RepeatWrapping.");wrapT=RepeatWrapping;}var wrapR=cfg.wrapR||RepeatWrapping;if(wrapR!==ClampToEdgeWrapping&&wrapR!==MirroredRepeatWrapping&&wrapR!==RepeatWrapping){this.error("[createTexture] Unsupported value for 'wrapR' - supported values are ClampToEdgeWrapping, MirroredRepeatWrapping and RepeatWrapping. Defaulting to RepeatWrapping.");wrapR=RepeatWrapping;}var encoding=cfg.encoding||LinearEncoding;if(encoding!==LinearEncoding&&encoding!==sRGBEncoding){this.error("[createTexture] Unsupported value for 'encoding' - supported values are LinearEncoding and sRGBEncoding. Defaulting to LinearEncoding.");encoding=LinearEncoding;}var texture=new Texture2D({gl:this.scene.canvas.gl,minFilter:minFilter,magFilter:magFilter,wrapS:wrapS,wrapT:wrapT,wrapR:wrapR,// flipY: cfg.flipY,
18929
18930
  encoding:encoding});if(cfg.preloadColor){texture.setPreloadColor(cfg.preloadColor);}if(cfg.image){// Ignore transcoder for Images
18930
- var _image2=cfg.image;_image2.crossOrigin="Anonymous";texture.setImage(_image2,{minFilter:minFilter,magFilter:magFilter,wrapS:wrapS,wrapT:wrapT,wrapR:wrapR,flipY:cfg.flipY,encoding:encoding});}else if(cfg.src){var ext=cfg.src.split('.').pop();switch(ext){// Don't transcode recognized image file types
18931
+ var _image2=cfg.image;_image2.crossOrigin="Anonymous";if(_image2.compressed){// see `parsedImage` in @loaders.gl/gltf/src/lib/parsers/parse-gltf.ts
18932
+ // NOTE: @loaders.gl in its current version discards potential mipmaps, leaving only a single one
18933
+ var data=_image2.data;texture.setCompressedData({mipmaps:data,props:{format:data[0].format,minFilter:minFilter,magFilter:magFilter}});}else{texture.setImage(_image2,{minFilter:minFilter,magFilter:magFilter,wrapS:wrapS,wrapT:wrapT,wrapR:wrapR,flipY:cfg.flipY,encoding:encoding});}}else if(cfg.src){var ext=cfg.src.split('.').pop();switch(ext){// Don't transcode recognized image file types
18931
18934
  case"jpeg":case"jpg":case"png":case"gif":var _image3=new Image();_image3.onload=function(){texture.setImage(_image3,{minFilter:minFilter,magFilter:magFilter,wrapS:wrapS,wrapT:wrapT,wrapR:wrapR,flipY:cfg.flipY,encoding:encoding});_this81.glRedraw();};_image3.src=cfg.src;// URL or Base64 string
18932
18935
  break;default:// Assume other file types need transcoding
18933
18936
  if(!this._textureTranscoder){this.error("[createTexture] Can't create texture from 'src' - SceneModel needs to be configured with a TextureTranscoder for this file type ('".concat(ext,"')"));}else{utils.loadArraybuffer(cfg.src,function(arrayBuffer){if(!arrayBuffer.byteLength){_this81.error("[createTexture] Can't create texture from 'src': file data is zero length");return;}_this81._textureTranscoder.transcode([arrayBuffer],texture).then(function(){_this81.glRedraw();});},function(errMsg){this.error("[createTexture] Can't create texture from 'src': ".concat(errMsg));});}break;}}else if(cfg.buffers){// Buffers implicitly require transcoding
@@ -20704,7 +20707,11 @@ return pickResult&&pickResult.worldPos?pickResult.worldPos:snap&&tryPickWorldPos
20704
20707
  * Default data access strategy for {@link GLTFLoaderPlugin}.
20705
20708
  *
20706
20709
  * This just loads assets using XMLHttpRequest.
20707
- */var GLTFDefaultDataSource=/*#__PURE__*/function(){function GLTFDefaultDataSource(){var cfg=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};_classCallCheck(this,GLTFDefaultDataSource);this.cacheBuster=cfg.cacheBuster!==false;}_createClass(GLTFDefaultDataSource,[{key:"_cacheBusterURL",value:function _cacheBusterURL(url){if(!this.cacheBuster){return url;}var timestamp=new Date().getTime();if(url.indexOf('?')>-1){return url+'&_='+timestamp;}else{return url+'?_='+timestamp;}}/**
20710
+ */var GLTFDefaultDataSource=/*#__PURE__*/function(){function GLTFDefaultDataSource(){var cfg=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};_classCallCheck(this,GLTFDefaultDataSource);/**
20711
+ * Set `true` to enable cache busting for HTTP GETs.
20712
+ * This is `true` by default.
20713
+ * @type {boolean}
20714
+ */this.cacheBuster=cfg.cacheBuster!==false;}_createClass(GLTFDefaultDataSource,[{key:"_cacheBusterURL",value:function _cacheBusterURL(url){if(!this.cacheBuster){return url;}var timestamp=new Date().getTime();if(url.indexOf('?')>-1){return url+'&_='+timestamp;}else{return url+'?_='+timestamp;}}/**
20708
20715
  * Gets metamodel JSON.
20709
20716
  *
20710
20717
  * @param {String|Number} metaModelSrc Identifies the metamodel JSON asset.
@@ -27553,7 +27560,7 @@ _this152._sortNodes=cfg.sortNodes;_this152._pruneEmptyNodes=cfg.pruneEmptyNodes;
27553
27560
  *
27554
27561
  * @param {String} objectId ID of the {@link Entity}.
27555
27562
  */},{key:"showNode",value:function showNode(objectId){this.unShowNode();var node=this._objectNodes[objectId];if(!node){return;// Node may not exist for the given object if (this._pruneEmptyNodes == true)
27556
- }var nodeId=node.nodeId;var switchElement=this._renderService.getSwitchElement(nodeId);if(switchElement){this._expandSwitchElement(switchElement);switchElement.scrollIntoView();return true;}var path=[];path.unshift(node);var parent=node.parent;while(parent){path.unshift(parent);parent=parent.parent;}for(var _i546=0,len=path.length;_i546<len;_i546++){var _switchElement=this._renderService.getSwitchElement(path[_i546].nodeId);if(_switchElement){this._expandSwitchElement(_switchElement);}}this._renderService.setHighlighted(nodeId,true);this._showListItemElementId=nodeId;}/**
27563
+ }this.collapse();var nodeId=node.nodeId;var switchElement=this._renderService.getSwitchElement(nodeId);if(switchElement){this._expandSwitchElement(switchElement);switchElement.scrollIntoView();return true;}var path=[];path.unshift(node);var parent=node.parent;while(parent){path.unshift(parent);parent=parent.parent;}for(var _i546=0,len=path.length;_i546<len;_i546++){var _switchElement=this._renderService.getSwitchElement(path[_i546].nodeId);if(_switchElement){this._expandSwitchElement(_switchElement);}}this._renderService.setHighlighted(nodeId,true);this._showListItemElementId=nodeId;}/**
27557
27564
  * De-highlights the node previously shown with {@link TreeViewPlugin#showNode}.
27558
27565
  *
27559
27566
  * Does nothing if no node is currently shown.
@@ -30381,8 +30388,7 @@ var ind=(_ref23=[]).concat.apply(_ref23,_toConsumableArray(baseTriangles));mesh=
30381
30388
  geometry:new ReadableGeometry(scene,{positions:positions,indices:ind,normals:math.buildNormals(positions,ind)}),material:new PhongMaterial(scene,{alpha:alpha!==undefined?alpha:0.5,backfaces:true,diffuse:hex2rgb(color)})});}catch(e){mesh=null;}}if(mesh){mesh.visible=!!points;}};updateBase(null);return{updateBase:updateBase,destroy:function destroy(){return mesh&&mesh.destroy();}};};var startAARectCreateUI=function startAARectCreateUI(scene,markersColor,pointerLens,select3dPoint,withPoints,onPointsSelected){var marker1=marker3D(scene,markersColor);var marker2=marker3D(scene,markersColor);var updatePointerLens=pointerLens?function(canvasPos){pointerLens.visible=!!canvasPos;if(canvasPos){pointerLens.canvasPos=canvasPos;}}:function(){};var deactivatePointSelection=select3dPoint(function(){updatePointerLens(null);marker1.update(null);},function(canvasPos,worldPos){updatePointerLens(canvasPos);marker1.update(worldPos);},function(point1CanvasPos,point1WorldPos){marker1.update(point1WorldPos);deactivatePointSelection=select3dPoint(function(){updatePointerLens(null);marker2.update(null);withPoints(null);},function(canvasPos,point2WorldPos){updatePointerLens(canvasPos);marker2.update(point2WorldPos);withPoints(math.distVec3(point1WorldPos,point2WorldPos)>0.01&&[point1WorldPos,point2WorldPos]);},function(point2CanvasPos,point2WorldPos){// `marker2.update' makes sure marker's position has been updated from its default [0,0,0]
30382
30389
  // This works around an unidentified bug somewhere around OcclusionLayer, that causes error
30383
30390
  // [.WebGL-0x13400c47e00] GL_INVALID_OPERATION: Vertex buffer is not big enough for the draw call
30384
- marker2.update(point2WorldPos);marker1.destroy();marker2.destroy();updatePointerLens(null);onPointsSelected([point1WorldPos,point2WorldPos]);});});return{deactivate:function deactivate(){deactivatePointSelection();marker1.destroy();marker2.destroy();updatePointerLens(null);}};};var mousePointSelector=function mousePointSelector(viewer,ray2WorldPos){return function(onCancel,onChange,onCommit){var scene=viewer.scene;var canvas=scene.canvas.canvas;var moveTolerance=20;var copyCanvasPos=function copyCanvasPos(event,vec2){vec2[0]=event.clientX;vec2[1]=event.clientY;transformToNode(canvas.ownerDocument.documentElement,canvas,vec2);return vec2;};var pickWorldPos=function pickWorldPos(canvasPos){var origin=math.vec3();var direction=math.vec3();math.canvasPosToWorldRay(canvas,scene.camera.viewMatrix,scene.camera.projMatrix,scene.camera.projection,canvasPos,origin,direction);return ray2WorldPos(origin,direction);};var buttonDown=false;var resetAction=function resetAction(){buttonDown=false;};var cleanup=function cleanup(){resetAction();canvas.removeEventListener("mousedown",onMouseDown);canvas.removeEventListener("mousemove",onMouseMove);viewer.cameraControl.off(onCameraControlRayMove);canvas.removeEventListener("mouseup",onMouseUp);};var startCanvasPos=math.vec2();var onMouseDown=function onMouseDown(event){if(event.which===1){copyCanvasPos(event,startCanvasPos);buttonDown=true;}};canvas.addEventListener("mousedown",onMouseDown);var onMouseMove=function onMouseMove(event){var canvasPos=copyCanvasPos(event,math.vec2());if(buttonDown&&math.distVec2(startCanvasPos,canvasPos)>moveTolerance){resetAction();onCancel();}};canvas.addEventListener("mousemove",onMouseMove);var onCameraControlRayMove=viewer.cameraControl.on("rayMove",function(event){var canvasPos=event.canvasPos;onChange(canvasPos,pickWorldPos(canvasPos));});var onMouseUp=function onMouseUp(event){if(event.which===1&&buttonDown){cleanup();var _canvasPos2=copyCanvasPos(event,math.vec2());onCommit(_canvasPos2,pickWorldPos(_canvasPos2));}};canvas.addEventListener("mouseup",onMouseUp);return cleanup;};};var touchPointSelector=function touchPointSelector(viewer,pointerCircle,ray2WorldPos){return function(onCancel,onChange,onCommit){var scene=viewer.scene;var canvas=scene.canvas.canvas;var longTouchTimeoutMs=300;var moveTolerance=20;var copyCanvasPos=function copyCanvasPos(event,vec2){vec2[0]=event.clientX;vec2[1]=event.clientY;transformToNode(canvas.ownerDocument.documentElement,canvas,vec2);return vec2;};var pickWorldPos=function pickWorldPos(canvasPos){var origin=math.vec3();var direction=math.vec3();math.canvasPosToWorldRay(canvas,scene.camera.viewMatrix,scene.camera.projMatrix,scene.camera.projection,canvasPos,origin,direction);return ray2WorldPos(origin,direction);};var longTouchTimeout=null;var nop=function nop(){};var onSingleTouchMove=nop;var startTouchIdentifier;var resetAction=function resetAction(){pointerCircle.stop();clearTimeout(longTouchTimeout);viewer.cameraControl.active=true;onSingleTouchMove=nop;startTouchIdentifier=null;};var cleanup=function cleanup(){resetAction();canvas.removeEventListener("touchstart",onCanvasTouchStart);canvas.removeEventListener("touchmove",onCanvasTouchMove);canvas.removeEventListener("touchend",onCanvasTouchEnd);};var onCanvasTouchStart=function onCanvasTouchStart(event){var touches=event.touches;if(touches.length!==1){resetAction();onCancel();}else{var startTouch=touches[0];var startCanvasPos=copyCanvasPos(startTouch,math.vec2());var startWorldPos=pickWorldPos(startCanvasPos);if(startWorldPos){startTouchIdentifier=startTouch.identifier;onSingleTouchMove=function onSingleTouchMove(canvasPos){if(math.distVec2(startCanvasPos,canvasPos)>moveTolerance){resetAction();}};longTouchTimeout=setTimeout(function(){pointerCircle.start(startCanvasPos);longTouchTimeout=setTimeout(function(){pointerCircle.stop();viewer.cameraControl.active=false;onSingleTouchMove=function onSingleTouchMove(canvasPos){onChange(canvasPos,pickWorldPos(canvasPos));};onSingleTouchMove(startCanvasPos);},longTouchTimeoutMs);},250);}}};canvas.addEventListener("touchstart",onCanvasTouchStart,{passive:true});// canvas.addEventListener("touchcancel", e => console.log("touchcancel", e), {passive: true});
30385
- var onCanvasTouchMove=function onCanvasTouchMove(event){var touch=_toConsumableArray(event.changedTouches).find(function(e){return e.identifier===startTouchIdentifier;});if(touch){onSingleTouchMove(copyCanvasPos(touch,math.vec2()));}};canvas.addEventListener("touchmove",onCanvasTouchMove,{passive:true});var onCanvasTouchEnd=function onCanvasTouchEnd(event){var touch=_toConsumableArray(event.changedTouches).find(function(e){return e.identifier===startTouchIdentifier;});if(touch){cleanup();var _canvasPos3=copyCanvasPos(touch,math.vec2());onCommit(_canvasPos3,pickWorldPos(_canvasPos3));}};canvas.addEventListener("touchend",onCanvasTouchEnd,{passive:true});return cleanup;};};var planeIntersect=function planeIntersect(p0,n,origin,direction){var t=-(math.dotVec3(origin,n)-p0)/math.dotVec3(direction,n);{var worldPos=math.vec3();math.mulVec3Scalar(direction,t,worldPos);math.addVec3(origin,worldPos,worldPos);return worldPos;}};/**
30391
+ marker2.update(point2WorldPos);marker1.destroy();marker2.destroy();updatePointerLens(null);onPointsSelected([point1WorldPos,point2WorldPos]);});});return{deactivate:function deactivate(){deactivatePointSelection();marker1.destroy();marker2.destroy();updatePointerLens(null);}};};var mousePointSelector=function mousePointSelector(viewer,ray2WorldPos){return function(onCancel,onChange,onCommit){var scene=viewer.scene;var canvas=scene.canvas.canvas;var moveTolerance=20;var copyCanvasPos=function copyCanvasPos(event,vec2){vec2[0]=event.clientX;vec2[1]=event.clientY;transformToNode(canvas.ownerDocument.documentElement,canvas,vec2);return vec2;};var pickWorldPos=function pickWorldPos(canvasPos){var origin=math.vec3();var direction=math.vec3();math.canvasPosToWorldRay(canvas,scene.camera.viewMatrix,scene.camera.projMatrix,scene.camera.projection,canvasPos,origin,direction);return ray2WorldPos(origin,direction);};var buttonDown=false;var resetAction=function resetAction(){buttonDown=false;};var cleanup=function cleanup(){resetAction();canvas.removeEventListener("mousedown",onMouseDown);canvas.removeEventListener("mousemove",onMouseMove);viewer.cameraControl.off(onCameraControlRayMove);canvas.removeEventListener("mouseup",onMouseUp);};var startCanvasPos=math.vec2();var onMouseDown=function onMouseDown(event){if(event.which===1){copyCanvasPos(event,startCanvasPos);buttonDown=true;}};canvas.addEventListener("mousedown",onMouseDown);var onMouseMove=function onMouseMove(event){var canvasPos=copyCanvasPos(event,math.vec2());if(buttonDown&&math.distVec2(startCanvasPos,canvasPos)>moveTolerance){resetAction();onCancel();}};canvas.addEventListener("mousemove",onMouseMove);var onCameraControlRayMove=viewer.cameraControl.on("rayMove",function(event){var canvasPos=event.canvasPos;onChange(canvasPos,pickWorldPos(canvasPos));});var onMouseUp=function onMouseUp(event){if(event.which===1&&buttonDown){cleanup();var _canvasPos3=copyCanvasPos(event,math.vec2());onCommit(_canvasPos3,pickWorldPos(_canvasPos3));}};canvas.addEventListener("mouseup",onMouseUp);return cleanup;};};var planeIntersect=function planeIntersect(p0,n,origin,direction){var t=-(math.dotVec3(origin,n)-p0)/math.dotVec3(direction,n);{var worldPos=math.vec3();math.mulVec3Scalar(direction,t,worldPos);math.addVec3(origin,worldPos,worldPos);return worldPos;}};/**
30386
30392
  * @desc Renders a transparent box between two 3D points.
30387
30393
  *
30388
30394
  * See {@link ZonesPlugin} for more info.
@@ -30497,4 +30503,4 @@ o4===0&&onSegment(c,b,d))// c, d and b are collinear and b lies on segment cd
30497
30503
  {return true;}}return false;};}();deactivatePointSelection=select3dPoint(function(){updatePointerLens(null);marker.update(null);wire&&wire.update(null);basePolygon.updateBase(markers.length>2?markers.map(function(m){return m.getWorldPos();}):null);},function(canvasPos,worldPos){var snappedFirst=markers.length>2&&getSnappedFirst(canvasPos);firstMarker&&firstMarker.setHighlighted(!!snappedFirst);updatePointerLens(snappedFirst?snappedFirst.canvasPos:canvasPos);marker.update(!snappedFirst&&worldPos);wire&&wire.update(snappedFirst?snappedFirst.worldPos:worldPos);if(markers.length>=2){var pos=markers.map(function(m){return m.getWorldPos();}).concat(snappedFirst?[]:[worldPos]);var inter=lastSegmentIntersects(pos.map(function(p){return[p[0],p[2]];}),snappedFirst);basePolygon.updateBase(inter?null:pos);}else basePolygon.updateBase(null);},function(canvasPos,worldPos){var snappedFirst=markers.length>2&&getSnappedFirst(canvasPos);var pos=markers.map(function(m){return m.getWorldPos();}).concat(snappedFirst?[]:[worldPos]);basePolygon.updateBase(pos);var pos2D=pos.map(function(p){return[p[0],p[2]];});if(markers.length>2&&lastSegmentIntersects(pos2D,snappedFirst)){cleanups.pop()();selectNextPoint(markers);}else if(snappedFirst){// `marker2.update' makes sure marker's position has been updated from its default [0,0,0]
30498
30504
  // This works around an unidentified bug somewhere around OcclusionLayer, that causes error
30499
30505
  // [.WebGL-0x13400c47e00] GL_INVALID_OPERATION: Vertex buffer is not big enough for the draw call
30500
- marker.update(worldPos);cleanups.forEach(function(c){return c();});onZoneCreated(zonesPlugin.createZone({id:math.createUUID(),geometry:{planeCoordinates:pos2D,altitude:zoneAltitude,height:zoneHeight},alpha:zoneAlpha,color:zoneColor}));}else{marker.update(worldPos);wire&&wire.update(worldPos);selectNextPoint(markers.concat(marker));}});})([]);return{closeSurface:function closeSurface(){throw"TODO";},deactivate:function deactivate(){deactivatePointSelection();cleanups.forEach(function(c){return c();});}};};var ZonesPolysurfaceMouseControl=/*#__PURE__*/function(_Component44){_inherits(ZonesPolysurfaceMouseControl,_Component44);var _super179=_createSuper(ZonesPolysurfaceMouseControl);function ZonesPolysurfaceMouseControl(zonesPlugin){var _this183;var cfg=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};_classCallCheck(this,ZonesPolysurfaceMouseControl);_this183=_super179.call(this,zonesPlugin.viewer.scene);_this183.zonesPlugin=zonesPlugin;_this183.pointerLens=cfg.pointerLens;_this183._action=null;return _this183;}_createClass(ZonesPolysurfaceMouseControl,[{key:"active",get:function get(){return!!this._action;}},{key:"activate",value:function activate(zoneAltitude,zoneHeight,zoneColor,zoneAlpha){if(_typeof(zoneAltitude)==="object"&&zoneAltitude!==null){var params=zoneAltitude;var param=function param(name,defaultValue){if(name in params){return params[name];}else if(defaultValue!==undefined){return defaultValue;}else{throw"config missing: "+name;}};zoneAltitude=param("altitude");zoneHeight=param("height");zoneColor=param("color","#008000");zoneAlpha=param("alpha",0.5);}if(this._action){return;}var zonesPlugin=this.zonesPlugin;var viewer=zonesPlugin.viewer;var scene=viewer.scene;var self=this;var select3dPoint=mousePointSelector(viewer,function(origin,direction){return planeIntersect(zoneAltitude,math.vec3([0,1,0]),origin,direction);});(function rec(){self._action=startPolysurfaceZoneCreateUI(scene,zoneAltitude,zoneHeight,zoneColor,zoneAlpha,self.pointerLens,zonesPlugin,select3dPoint,function(zone){var reactivate=true;self._action={deactivate:function deactivate(){reactivate=false;}};self.fire("zoneEnd",zone);if(reactivate){rec();}});})();}},{key:"deactivate",value:function deactivate(){if(this._action){this._action.deactivate();this._action=null;}}},{key:"destroy",value:function destroy(){this.deactivate();_get(_getPrototypeOf(ZonesPolysurfaceMouseControl.prototype),"destroy",this).call(this);}}]);return ZonesPolysurfaceMouseControl;}(Component);var ZonesPolysurfaceTouchControl=/*#__PURE__*/function(_Component45){_inherits(ZonesPolysurfaceTouchControl,_Component45);var _super180=_createSuper(ZonesPolysurfaceTouchControl);function ZonesPolysurfaceTouchControl(zonesPlugin){var _this184;var cfg=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};_classCallCheck(this,ZonesPolysurfaceTouchControl);_this184=_super180.call(this,zonesPlugin.viewer.scene);_this184.zonesPlugin=zonesPlugin;_this184.pointerLens=cfg.pointerLens;_this184.pointerCircle=new PointerCircle(zonesPlugin.viewer);_this184._action=null;return _this184;}_createClass(ZonesPolysurfaceTouchControl,[{key:"active",get:function get(){return!!this._action;}},{key:"activate",value:function activate(zoneAltitude,zoneHeight,zoneColor,zoneAlpha){if(_typeof(zoneAltitude)==="object"&&zoneAltitude!==null){var params=zoneAltitude;var param=function param(name,defaultValue){if(name in params){return params[name];}else if(defaultValue!==undefined){return defaultValue;}else{throw"config missing: "+name;}};zoneAltitude=param("altitude");zoneHeight=param("height");zoneColor=param("color","#008000");zoneAlpha=param("alpha",0.5);}if(this._action){return;}var zonesPlugin=this.zonesPlugin;var viewer=zonesPlugin.viewer;var scene=viewer.scene;var self=this;var select3dPoint=touchPointSelector(viewer,this.pointerCircle,function(origin,direction){return planeIntersect(zoneAltitude,math.vec3([0,1,0]),origin,direction);});(function rec(){self._action=startPolysurfaceZoneCreateUI(scene,zoneAltitude,zoneHeight,zoneColor,zoneAlpha,self.pointerLens,zonesPlugin,select3dPoint,function(zone){var reactivate=true;self._action={deactivate:function deactivate(){reactivate=false;}};self.fire("zoneEnd",zone);if(reactivate){rec();}});})();}},{key:"deactivate",value:function deactivate(){if(this._action){this._action.deactivate();this._action=null;}}},{key:"destroy",value:function destroy(){this.deactivate();_get(_getPrototypeOf(ZonesPolysurfaceTouchControl.prototype),"destroy",this).call(this);}}]);return ZonesPolysurfaceTouchControl;}(Component);var ZoneEditControl=/*#__PURE__*/function(_Component46){_inherits(ZoneEditControl,_Component46);var _super181=_createSuper(ZoneEditControl);function ZoneEditControl(zone,cfg,handleMouseEvents,handleTouchEvents){var _this185;_classCallCheck(this,ZoneEditControl);var viewer=zone.plugin.viewer;var scene=viewer.scene;_this185=_super181.call(this,scene);var altitude=zone._geometry.altitude;var dots=zone._geometry.planeCoordinates.map(function(planeCoord){var dotParent=scene.canvas.canvas.ownerDocument.body;var dot=new Dot3D(scene,{},dotParent,{fillColor:zone._color});dot.worldPos=math.vec3([planeCoord[0],altitude,planeCoord[1]]);dot.on("worldPos",function(){planeCoord[0]=dot.worldPos[0];planeCoord[1]=dot.worldPos[2];try{zone._rebuildMesh();}catch(e){if(zone._zoneMesh){zone._zoneMesh.destroy();zone._zoneMesh=null;}}});return dot;});var cleanupDrag=activateDraggableDots({viewer:viewer,handleMouseEvents:handleMouseEvents,handleTouchEvents:handleTouchEvents,pointerLens:cfg&&cfg.pointerLens,dots:dots,ray2WorldPos:function ray2WorldPos(orig,dir){return planeIntersect(altitude,math.vec3([0,1,0]),orig,dir);},onEnd:function onEnd(initPos,dot){if(zone._zoneMesh){_this185.fire("edited");}return!!zone._zoneMesh;}});var cleanup=function cleanup(){cleanupDrag();dots.forEach(function(d){return d.destroy();});};var destroyCb=zone.on("destroyed",cleanup);_this185._deactivate=function(){zone.off("destroyed",destroyCb);cleanup();};return _this185;}_createClass(ZoneEditControl,[{key:"deactivate",value:function deactivate(){this._deactivate();_get(_getPrototypeOf(ZoneEditControl.prototype),"destroy",this).call(this);}}]);return ZoneEditControl;}(Component);var ZoneEditMouseControl=/*#__PURE__*/function(_ZoneEditControl){_inherits(ZoneEditMouseControl,_ZoneEditControl);var _super182=_createSuper(ZoneEditMouseControl);function ZoneEditMouseControl(zone,cfg){_classCallCheck(this,ZoneEditMouseControl);return _super182.call(this,zone,cfg,true,false);}return _createClass(ZoneEditMouseControl);}(ZoneEditControl);var ZoneEditTouchControl=/*#__PURE__*/function(_ZoneEditControl2){_inherits(ZoneEditTouchControl,_ZoneEditControl2);var _super183=_createSuper(ZoneEditTouchControl);function ZoneEditTouchControl(zone,cfg){_classCallCheck(this,ZoneEditTouchControl);return _super183.call(this,zone,cfg,false,true);}return _createClass(ZoneEditTouchControl);}(ZoneEditControl);var ZoneTranslateControl=/*#__PURE__*/function(_Component47){_inherits(ZoneTranslateControl,_Component47);var _super184=_createSuper(ZoneTranslateControl);function ZoneTranslateControl(zone,cfg,handleMouseEvents,handleTouchEvents){var _this186;_classCallCheck(this,ZoneTranslateControl);var viewer=zone.plugin.viewer;var scene=viewer.scene;var canvas=scene.canvas.canvas;_this186=_super184.call(this,scene);var self=_assertThisInitialized(_this186);var altitude=zone._geometry.altitude;var pointerLens=cfg&&cfg.pointerLens;var updatePointerLens=pointerLens?function(canvasPos){pointerLens.visible=!!canvasPos;if(canvasPos){pointerLens.canvasPos=canvasPos;}}:function(){};var ray2WorldPos=function ray2WorldPos(orig,dir){return planeIntersect(altitude,math.vec3([0,1,0]),orig,dir);};var pickWorldPos=function pickWorldPos(canvasPos){var origin=math.vec3();var direction=math.vec3();math.canvasPosToWorldRay(canvas,scene.camera.viewMatrix,scene.camera.projMatrix,scene.camera.projection,canvasPos,origin,direction);return ray2WorldPos(origin,direction);};var copyCanvasPos=function copyCanvasPos(event,vec2){vec2[0]=event.clientX;vec2[1]=event.clientY;transformToNode(canvas.ownerDocument.documentElement,canvas,vec2);return vec2;};var canvasHandle=function canvasHandle(type,cb){var callback=function callback(event){event.preventDefault();cb(event);};canvas.addEventListener(type,callback);return function(){return canvas.removeEventListener(type,callback);};};var _cleanupCurrentDrag=function cleanupCurrentDrag(){};var startDrag=function startDrag(event,onMoveType,onEndType,matchesEvent){var e=matchesEvent(event);var canvasPos=copyCanvasPos(e,math.vec2());var pickRecord=viewer.scene.pick({canvasPos:canvasPos,includeEntities:[zone._zoneMesh.id]});var pickZone=pickRecord&&pickRecord.entity&&pickRecord.entity.zone;if(pickZone===zone){_cleanupCurrentDrag();canvas.style.cursor="move";viewer.cameraControl.active=false;var onChange=function(){var initCoords=zone._geometry.planeCoordinates.map(function(c){return c.slice();});var initWorldPos=pickWorldPos(canvasPos);var initDragCoord=math.vec2([initWorldPos[0],initWorldPos[2]]);var dPos=math.vec2();return function(canvasPos){var worldPos=pickWorldPos(canvasPos);dPos[0]=worldPos[0];dPos[1]=worldPos[2];math.subVec2(initDragCoord,dPos,dPos);zone._geometry.planeCoordinates.forEach(function(planeCoord,idx){math.subVec2(initCoords[idx],dPos,planeCoord);});try{zone._rebuildMesh();}catch(e){if(zone._zoneMesh){zone._zoneMesh.destroy();zone._zoneMesh=null;}}};}();var cleanupMove=canvasHandle(onMoveType,function(event){var e=matchesEvent(event);if(e){var _canvasPos4=copyCanvasPos(e,math.vec2());onChange(_canvasPos4);updatePointerLens(_canvasPos4);}});var cleanupEnd=canvasHandle(onEndType,function(event){var e=matchesEvent(event);if(e){var _canvasPos5=copyCanvasPos(e,math.vec2());onChange(_canvasPos5);updatePointerLens(null);_cleanupCurrentDrag();self.fire("translated");}});_cleanupCurrentDrag=function cleanupCurrentDrag(){_cleanupCurrentDrag=function cleanupCurrentDrag(){};canvas.style.cursor="default";viewer.cameraControl.active=true;cleanupMove();cleanupEnd();};}};var startDragCbs=[];if(handleMouseEvents){startDragCbs.push(canvasHandle("mousedown",function(event){if(event.which===1){startDrag(event,"mousemove","mouseup",function(event){return event.which===1&&event;});}}));}if(handleTouchEvents){startDragCbs.push(canvasHandle("touchstart",function(event){if(event.touches.length===1){var touchStartId=event.touches[0].identifier;startDrag(event,"touchmove","touchend",function(event){return _toConsumableArray(event.changedTouches).find(function(e){return e.identifier===touchStartId;});});}}));}var cleanup=function cleanup(){_cleanupCurrentDrag();startDragCbs.forEach(function(cb){return cb();});updatePointerLens(null);};var destroyCb=zone.on("destroyed",cleanup);_this186._deactivate=function(){zone.off("destroyed",destroyCb);cleanup();};return _this186;}_createClass(ZoneTranslateControl,[{key:"deactivate",value:function deactivate(){this._deactivate();_get(_getPrototypeOf(ZoneTranslateControl.prototype),"destroy",this).call(this);}}]);return ZoneTranslateControl;}(Component);var ZoneTranslateMouseControl=/*#__PURE__*/function(_ZoneTranslateControl){_inherits(ZoneTranslateMouseControl,_ZoneTranslateControl);var _super185=_createSuper(ZoneTranslateMouseControl);function ZoneTranslateMouseControl(zone,cfg){_classCallCheck(this,ZoneTranslateMouseControl);return _super185.call(this,zone,cfg,true,false);}return _createClass(ZoneTranslateMouseControl);}(ZoneTranslateControl);var ZoneTranslateTouchControl=/*#__PURE__*/function(_ZoneTranslateControl2){_inherits(ZoneTranslateTouchControl,_ZoneTranslateControl2);var _super186=_createSuper(ZoneTranslateTouchControl);function ZoneTranslateTouchControl(zone,cfg){_classCallCheck(this,ZoneTranslateTouchControl);return _super186.call(this,zone,cfg,false,true);}return _createClass(ZoneTranslateTouchControl);}(ZoneTranslateControl);export{AlphaFormat,AmbientLight,AngleMeasurementEditMouseControl,AngleMeasurementEditTouchControl,AngleMeasurementsControl,AngleMeasurementsMouseControl,AngleMeasurementsPlugin,AngleMeasurementsTouchControl,AnnotationsPlugin,AxisGizmoPlugin,BCFViewpointsPlugin,Bitmap,ByteType,CameraMemento,CameraPath,CameraPathAnimation,CityJSONLoaderPlugin,ClampToEdgeWrapping,Component,CompressedMediaType,Configs,ContextMenu,CubicBezierCurve,Curve,DefaultLoadingManager,DepthFormat,DepthStencilFormat,DirLight,DistanceMeasurementEditControl,DistanceMeasurementEditMouseControl,DistanceMeasurementEditTouchControl,DistanceMeasurementsControl,DistanceMeasurementsMouseControl,DistanceMeasurementsPlugin,DistanceMeasurementsTouchControl,DotBIMDefaultDataSource,DotBIMLoaderPlugin,EdgeMaterial,EmphasisMaterial,FaceAlignedSectionPlanesPlugin,FastNavPlugin,FloatType,Fresnel,Frustum$1 as Frustum,FrustumPlane,GIFMediaType,GLTFDefaultDataSource,GLTFLoaderPlugin,HalfFloatType,ImagePlane,IntType,JPEGMediaType,KTX2TextureTranscoder,LASLoaderPlugin,LambertMaterial,LightMap,LineSet,LinearEncoding,LinearFilter,LinearMipMapLinearFilter,LinearMipMapNearestFilter,LinearMipmapLinearFilter,LinearMipmapNearestFilter,Loader,LoadingManager,LocaleService,LuminanceAlphaFormat,LuminanceFormat,Map$1 as Map,Marker,MarqueePicker,MarqueePickerMouseControl,Mesh,MeshSurfaceArea,MeshVolume,MetallicMaterial,MirroredRepeatWrapping,ModelMemento,NavCubePlugin,NearestFilter,NearestMipMapLinearFilter,NearestMipMapNearestFilter,NearestMipmapLinearFilter,NearestMipmapNearestFilter,Node$2 as Node,OBJLoaderPlugin,ObjectsKdTree3,ObjectsMemento,PNGMediaType,Path,PerformanceModel,PhongMaterial,PickResult,Plugin,PointLight,PointerCircle,PointerLens,QuadraticBezierCurve,Queue,RGBAFormat,RGBAIntegerFormat,RGBA_ASTC_10x10_Format,RGBA_ASTC_10x5_Format,RGBA_ASTC_10x6_Format,RGBA_ASTC_10x8_Format,RGBA_ASTC_12x10_Format,RGBA_ASTC_12x12_Format,RGBA_ASTC_4x4_Format,RGBA_ASTC_5x4_Format,RGBA_ASTC_5x5_Format,RGBA_ASTC_6x5_Format,RGBA_ASTC_6x6_Format,RGBA_ASTC_8x5_Format,RGBA_ASTC_8x6_Format,RGBA_ASTC_8x8_Format,RGBA_BPTC_Format,RGBA_ETC2_EAC_Format,RGBA_PVRTC_2BPPV1_Format,RGBA_PVRTC_4BPPV1_Format,RGBA_S3TC_DXT1_Format,RGBA_S3TC_DXT3_Format,RGBA_S3TC_DXT5_Format,RGBFormat,RGB_ETC1_Format,RGB_ETC2_Format,RGB_PVRTC_2BPPV1_Format,RGB_PVRTC_4BPPV1_Format,RGB_S3TC_DXT1_Format,RGFormat,RGIntegerFormat,ReadableGeometry,RedFormat,RedIntegerFormat,ReflectionMap,RepeatWrapping,STLDefaultDataSource,STLLoaderPlugin,SceneModel,SceneModelMesh,SceneModelTransform,SectionPlane,SectionPlanesPlugin,ShortType,Skybox,SkyboxesPlugin,SpecularMaterial,SplineCurve,SpriteMarker,StoreyViewsPlugin,Texture,TextureTranscoder,TreeViewPlugin,UnsignedByteType,UnsignedInt248Type,UnsignedIntType,UnsignedShort4444Type,UnsignedShort5551Type,UnsignedShortType,VBOGeometry,ViewCullPlugin,Viewer,WebIFCLoaderPlugin,WorkerPool$1 as WorkerPool,XKTDefaultDataSource,XKTLoaderPlugin,XML3DLoaderPlugin,ZoneEditControl,ZoneEditMouseControl,ZoneEditTouchControl,ZoneTranslateControl,ZoneTranslateMouseControl,ZoneTranslateTouchControl,ZonesMouseControl,ZonesPlugin,ZonesPolysurfaceMouseControl,ZonesPolysurfaceTouchControl,ZonesTouchControl,buildBoxGeometry,buildBoxLinesGeometry,buildBoxLinesGeometryFromAABB,buildCylinderGeometry,buildGridGeometry,buildLineGeometry,buildPlaneGeometry,buildPolylineGeometry,buildPolylineGeometryFromCurve,buildSphereGeometry,buildTorusGeometry,buildVectorTextGeometry,createRTCViewMat,frustumIntersectsAABB3,getKTX2TextureTranscoder,getPlaneRTCPos,isTriangleMeshSolid,load3DSGeometry,loadOBJGeometry,math,meshSurfaceArea,meshVolume,rtcToWorldPos,sRGBEncoding,setFrustum,stats,utils,worldToRTCPos,worldToRTCPositions};
30506
+ marker.update(worldPos);cleanups.forEach(function(c){return c();});onZoneCreated(zonesPlugin.createZone({id:math.createUUID(),geometry:{planeCoordinates:pos2D,altitude:zoneAltitude,height:zoneHeight},alpha:zoneAlpha,color:zoneColor}));}else{marker.update(worldPos);wire&&wire.update(worldPos);selectNextPoint(markers.concat(marker));}});})([]);return{closeSurface:function closeSurface(){throw"TODO";},deactivate:function deactivate(){deactivatePointSelection();cleanups.forEach(function(c){return c();});}};};var ZonesPolysurfaceMouseControl=/*#__PURE__*/function(_Component44){_inherits(ZonesPolysurfaceMouseControl,_Component44);var _super179=_createSuper(ZonesPolysurfaceMouseControl);function ZonesPolysurfaceMouseControl(zonesPlugin){var _this183;var cfg=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};_classCallCheck(this,ZonesPolysurfaceMouseControl);_this183=_super179.call(this,zonesPlugin.viewer.scene);_this183.zonesPlugin=zonesPlugin;_this183.pointerLens=cfg.pointerLens;_this183._action=null;return _this183;}_createClass(ZonesPolysurfaceMouseControl,[{key:"active",get:function get(){return!!this._action;}},{key:"activate",value:function activate(zoneAltitude,zoneHeight,zoneColor,zoneAlpha){if(_typeof(zoneAltitude)==="object"&&zoneAltitude!==null){var params=zoneAltitude;var param=function param(name,defaultValue){if(name in params){return params[name];}else if(defaultValue!==undefined){return defaultValue;}else{throw"config missing: "+name;}};zoneAltitude=param("altitude");zoneHeight=param("height");zoneColor=param("color","#008000");zoneAlpha=param("alpha",0.5);}if(this._action){return;}var zonesPlugin=this.zonesPlugin;var viewer=zonesPlugin.viewer;var scene=viewer.scene;var self=this;var select3dPoint=mousePointSelector(viewer,function(origin,direction){return planeIntersect(zoneAltitude,math.vec3([0,1,0]),origin,direction);});(function rec(){self._action=startPolysurfaceZoneCreateUI(scene,zoneAltitude,zoneHeight,zoneColor,zoneAlpha,self.pointerLens,zonesPlugin,select3dPoint,function(zone){var reactivate=true;self._action={deactivate:function deactivate(){reactivate=false;}};self.fire("zoneEnd",zone);if(reactivate){rec();}});})();}},{key:"deactivate",value:function deactivate(){if(this._action){this._action.deactivate();this._action=null;}}},{key:"destroy",value:function destroy(){this.deactivate();_get(_getPrototypeOf(ZonesPolysurfaceMouseControl.prototype),"destroy",this).call(this);}}]);return ZonesPolysurfaceMouseControl;}(Component);var ZonesPolysurfaceTouchControl=/*#__PURE__*/function(_Component45){_inherits(ZonesPolysurfaceTouchControl,_Component45);var _super180=_createSuper(ZonesPolysurfaceTouchControl);function ZonesPolysurfaceTouchControl(zonesPlugin){var _this184;var cfg=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};_classCallCheck(this,ZonesPolysurfaceTouchControl);_this184=_super180.call(this,zonesPlugin.viewer.scene);_this184.zonesPlugin=zonesPlugin;_this184.pointerLens=cfg.pointerLens;_this184.pointerCircle=new PointerCircle(zonesPlugin.viewer);_this184._action=null;return _this184;}_createClass(ZonesPolysurfaceTouchControl,[{key:"active",get:function get(){return!!this._action;}},{key:"activate",value:function activate(zoneAltitude,zoneHeight,zoneColor,zoneAlpha){if(_typeof(zoneAltitude)==="object"&&zoneAltitude!==null){var params=zoneAltitude;var param=function param(name,defaultValue){if(name in params){return params[name];}else if(defaultValue!==undefined){return defaultValue;}else{throw"config missing: "+name;}};zoneAltitude=param("altitude");zoneHeight=param("height");zoneColor=param("color","#008000");zoneAlpha=param("alpha",0.5);}if(this._action){return;}var zonesPlugin=this.zonesPlugin;var viewer=zonesPlugin.viewer;var scene=viewer.scene;var self=this;var select3dPoint=touchPointSelector(viewer,this.pointerCircle,function(origin,direction){return planeIntersect(zoneAltitude,math.vec3([0,1,0]),origin,direction);});(function rec(){self._action=startPolysurfaceZoneCreateUI(scene,zoneAltitude,zoneHeight,zoneColor,zoneAlpha,self.pointerLens,zonesPlugin,select3dPoint,function(zone){var reactivate=true;self._action={deactivate:function deactivate(){reactivate=false;}};self.fire("zoneEnd",zone);if(reactivate){rec();}});})();}},{key:"deactivate",value:function deactivate(){if(this._action){this._action.deactivate();this._action=null;}}},{key:"destroy",value:function destroy(){this.deactivate();_get(_getPrototypeOf(ZonesPolysurfaceTouchControl.prototype),"destroy",this).call(this);}}]);return ZonesPolysurfaceTouchControl;}(Component);var ZoneEditControl=/*#__PURE__*/function(_Component46){_inherits(ZoneEditControl,_Component46);var _super181=_createSuper(ZoneEditControl);function ZoneEditControl(zone,cfg,handleMouseEvents,handleTouchEvents){var _this185;_classCallCheck(this,ZoneEditControl);var viewer=zone.plugin.viewer;var scene=viewer.scene;_this185=_super181.call(this,scene);var altitude=zone._geometry.altitude;var dots=zone._geometry.planeCoordinates.map(function(planeCoord){var dotParent=scene.canvas.canvas.ownerDocument.body;var dot=new Dot3D(scene,{},dotParent,{fillColor:zone._color});dot.worldPos=math.vec3([planeCoord[0],altitude,planeCoord[1]]);dot.on("worldPos",function(){planeCoord[0]=dot.worldPos[0];planeCoord[1]=dot.worldPos[2];try{zone._rebuildMesh();}catch(e){if(zone._zoneMesh){zone._zoneMesh.destroy();zone._zoneMesh=null;}}});return dot;});var cleanupDrag=activateDraggableDots({viewer:viewer,handleMouseEvents:handleMouseEvents,handleTouchEvents:handleTouchEvents,pointerLens:cfg&&cfg.pointerLens,dots:dots,ray2WorldPos:function ray2WorldPos(orig,dir){return planeIntersect(altitude,math.vec3([0,1,0]),orig,dir);},onEnd:function onEnd(initPos,dot){if(zone._zoneMesh){_this185.fire("edited");}return!!zone._zoneMesh;}});var cleanup=function cleanup(){cleanupDrag();dots.forEach(function(d){return d.destroy();});};var destroyCb=zone.on("destroyed",cleanup);_this185._deactivate=function(){zone.off("destroyed",destroyCb);cleanup();};return _this185;}_createClass(ZoneEditControl,[{key:"deactivate",value:function deactivate(){this._deactivate();_get(_getPrototypeOf(ZoneEditControl.prototype),"destroy",this).call(this);}}]);return ZoneEditControl;}(Component);var ZoneEditMouseControl=/*#__PURE__*/function(_ZoneEditControl){_inherits(ZoneEditMouseControl,_ZoneEditControl);var _super182=_createSuper(ZoneEditMouseControl);function ZoneEditMouseControl(zone,cfg){_classCallCheck(this,ZoneEditMouseControl);return _super182.call(this,zone,cfg,true,false);}return _createClass(ZoneEditMouseControl);}(ZoneEditControl);var ZoneEditTouchControl=/*#__PURE__*/function(_ZoneEditControl2){_inherits(ZoneEditTouchControl,_ZoneEditControl2);var _super183=_createSuper(ZoneEditTouchControl);function ZoneEditTouchControl(zone,cfg){_classCallCheck(this,ZoneEditTouchControl);return _super183.call(this,zone,cfg,false,true);}return _createClass(ZoneEditTouchControl);}(ZoneEditControl);var ZoneTranslateControl=/*#__PURE__*/function(_Component47){_inherits(ZoneTranslateControl,_Component47);var _super184=_createSuper(ZoneTranslateControl);function ZoneTranslateControl(zone,cfg,handleMouseEvents,handleTouchEvents){var _this186;_classCallCheck(this,ZoneTranslateControl);var viewer=zone.plugin.viewer;var scene=viewer.scene;var canvas=scene.canvas.canvas;_this186=_super184.call(this,scene);var self=_assertThisInitialized(_this186);var altitude=zone._geometry.altitude;var pointerLens=cfg&&cfg.pointerLens;var updatePointerLens=pointerLens?function(canvasPos){pointerLens.visible=!!canvasPos;if(canvasPos){pointerLens.canvasPos=canvasPos;}}:function(){};var ray2WorldPos=function ray2WorldPos(orig,dir){return planeIntersect(altitude,math.vec3([0,1,0]),orig,dir);};var pickWorldPos=function pickWorldPos(canvasPos){var origin=math.vec3();var direction=math.vec3();math.canvasPosToWorldRay(canvas,scene.camera.viewMatrix,scene.camera.projMatrix,scene.camera.projection,canvasPos,origin,direction);return ray2WorldPos(origin,direction);};var copyCanvasPos=function copyCanvasPos(event,vec2){vec2[0]=event.clientX;vec2[1]=event.clientY;transformToNode(canvas.ownerDocument.documentElement,canvas,vec2);return vec2;};var canvasHandle=function canvasHandle(type,cb){var callback=function callback(event){event.preventDefault();cb(event);};canvas.addEventListener(type,callback);return function(){return canvas.removeEventListener(type,callback);};};var _cleanupCurrentDrag=function cleanupCurrentDrag(){};var startDrag=function startDrag(event,onMoveType,onEndType,matchesEvent){var e=matchesEvent(event);var canvasPos=copyCanvasPos(e,math.vec2());var pickRecord=viewer.scene.pick({canvasPos:canvasPos,includeEntities:[zone._zoneMesh.id]});var pickZone=pickRecord&&pickRecord.entity&&pickRecord.entity.zone;if(pickZone===zone){_cleanupCurrentDrag();canvas.style.cursor="move";viewer.cameraControl.active=false;var onChange=function(){var initCoords=zone._geometry.planeCoordinates.map(function(c){return c.slice();});var initWorldPos=pickWorldPos(canvasPos);var initDragCoord=math.vec2([initWorldPos[0],initWorldPos[2]]);var dPos=math.vec2();return function(canvasPos){var worldPos=pickWorldPos(canvasPos);dPos[0]=worldPos[0];dPos[1]=worldPos[2];math.subVec2(initDragCoord,dPos,dPos);zone._geometry.planeCoordinates.forEach(function(planeCoord,idx){math.subVec2(initCoords[idx],dPos,planeCoord);});try{zone._rebuildMesh();}catch(e){if(zone._zoneMesh){zone._zoneMesh.destroy();zone._zoneMesh=null;}}};}();var cleanupMove=canvasHandle(onMoveType,function(event){var e=matchesEvent(event);if(e){var _canvasPos4=copyCanvasPos(e,math.vec2());onChange(_canvasPos4);updatePointerLens(_canvasPos4);}});var cleanupEnd=canvasHandle(onEndType,function(event){var e=matchesEvent(event);if(e){var _canvasPos5=copyCanvasPos(e,math.vec2());onChange(_canvasPos5);updatePointerLens(null);_cleanupCurrentDrag();self.fire("translated");}});_cleanupCurrentDrag=function cleanupCurrentDrag(){_cleanupCurrentDrag=function cleanupCurrentDrag(){};canvas.style.cursor="default";viewer.cameraControl.active=true;cleanupMove();cleanupEnd();};}};var startDragCbs=[];if(handleMouseEvents){startDragCbs.push(canvasHandle("mousedown",function(event){if(event.which===1){startDrag(event,"mousemove","mouseup",function(event){return event.which===1&&event;});}}));}if(handleTouchEvents){startDragCbs.push(canvasHandle("touchstart",function(event){if(event.touches.length===1){var touchStartId=event.touches[0].identifier;startDrag(event,"touchmove","touchend",function(event){return _toConsumableArray(event.changedTouches).find(function(e){return e.identifier===touchStartId;});});}}));}var cleanup=function cleanup(){_cleanupCurrentDrag();startDragCbs.forEach(function(cb){return cb();});updatePointerLens(null);};var destroyCb=zone.on("destroyed",cleanup);_this186._deactivate=function(){zone.off("destroyed",destroyCb);cleanup();};return _this186;}_createClass(ZoneTranslateControl,[{key:"deactivate",value:function deactivate(){this._deactivate();_get(_getPrototypeOf(ZoneTranslateControl.prototype),"destroy",this).call(this);}}]);return ZoneTranslateControl;}(Component);var ZoneTranslateMouseControl=/*#__PURE__*/function(_ZoneTranslateControl){_inherits(ZoneTranslateMouseControl,_ZoneTranslateControl);var _super185=_createSuper(ZoneTranslateMouseControl);function ZoneTranslateMouseControl(zone,cfg){_classCallCheck(this,ZoneTranslateMouseControl);return _super185.call(this,zone,cfg,true,false);}return _createClass(ZoneTranslateMouseControl);}(ZoneTranslateControl);var ZoneTranslateTouchControl=/*#__PURE__*/function(_ZoneTranslateControl2){_inherits(ZoneTranslateTouchControl,_ZoneTranslateControl2);var _super186=_createSuper(ZoneTranslateTouchControl);function ZoneTranslateTouchControl(zone,cfg){_classCallCheck(this,ZoneTranslateTouchControl);return _super186.call(this,zone,cfg,false,true);}return _createClass(ZoneTranslateTouchControl);}(ZoneTranslateControl);export{AlphaFormat,AmbientLight,AngleMeasurementEditMouseControl,AngleMeasurementEditTouchControl,AngleMeasurementsControl,AngleMeasurementsMouseControl,AngleMeasurementsPlugin,AngleMeasurementsTouchControl,AnnotationsPlugin,AxisGizmoPlugin,BCFViewpointsPlugin,Bitmap,ByteType,CameraMemento,CameraPath,CameraPathAnimation,CityJSONLoaderPlugin,ClampToEdgeWrapping,Component,CompressedMediaType,Configs,ContextMenu,CubicBezierCurve,Curve,DefaultLoadingManager,DepthFormat,DepthStencilFormat,DirLight,DistanceMeasurementEditControl,DistanceMeasurementEditMouseControl,DistanceMeasurementEditTouchControl,DistanceMeasurementsControl,DistanceMeasurementsMouseControl,DistanceMeasurementsPlugin,DistanceMeasurementsTouchControl,Dot3D,DotBIMDefaultDataSource,DotBIMLoaderPlugin,EdgeMaterial,EmphasisMaterial,FaceAlignedSectionPlanesPlugin,FastNavPlugin,FloatType,Fresnel,Frustum$1 as Frustum,FrustumPlane,GIFMediaType,GLTFDefaultDataSource,GLTFLoaderPlugin,HalfFloatType,ImagePlane,IntType,JPEGMediaType,KTX2TextureTranscoder,LASLoaderPlugin,LambertMaterial,LightMap,LineSet,LinearEncoding,LinearFilter,LinearMipMapLinearFilter,LinearMipMapNearestFilter,LinearMipmapLinearFilter,LinearMipmapNearestFilter,Loader,LoadingManager,LocaleService,LuminanceAlphaFormat,LuminanceFormat,Map$1 as Map,Marker,MarqueePicker,MarqueePickerMouseControl,Mesh,MeshSurfaceArea,MeshVolume,MetallicMaterial,MirroredRepeatWrapping,ModelMemento,NavCubePlugin,NearestFilter,NearestMipMapLinearFilter,NearestMipMapNearestFilter,NearestMipmapLinearFilter,NearestMipmapNearestFilter,Node$2 as Node,OBJLoaderPlugin,ObjectsKdTree3,ObjectsMemento,PNGMediaType,Path,PerformanceModel,PhongMaterial,PickResult,Plugin,PointLight,PointerCircle,PointerLens,QuadraticBezierCurve,Queue,RGBAFormat,RGBAIntegerFormat,RGBA_ASTC_10x10_Format,RGBA_ASTC_10x5_Format,RGBA_ASTC_10x6_Format,RGBA_ASTC_10x8_Format,RGBA_ASTC_12x10_Format,RGBA_ASTC_12x12_Format,RGBA_ASTC_4x4_Format,RGBA_ASTC_5x4_Format,RGBA_ASTC_5x5_Format,RGBA_ASTC_6x5_Format,RGBA_ASTC_6x6_Format,RGBA_ASTC_8x5_Format,RGBA_ASTC_8x6_Format,RGBA_ASTC_8x8_Format,RGBA_BPTC_Format,RGBA_ETC2_EAC_Format,RGBA_PVRTC_2BPPV1_Format,RGBA_PVRTC_4BPPV1_Format,RGBA_S3TC_DXT1_Format,RGBA_S3TC_DXT3_Format,RGBA_S3TC_DXT5_Format,RGBFormat,RGB_ETC1_Format,RGB_ETC2_Format,RGB_PVRTC_2BPPV1_Format,RGB_PVRTC_4BPPV1_Format,RGB_S3TC_DXT1_Format,RGFormat,RGIntegerFormat,ReadableGeometry,RedFormat,RedIntegerFormat,ReflectionMap,RepeatWrapping,STLDefaultDataSource,STLLoaderPlugin,SceneModel,SceneModelMesh,SceneModelTransform,SectionPlane,SectionPlanesPlugin,ShortType,Skybox,SkyboxesPlugin,SpecularMaterial,SplineCurve,SpriteMarker,StoreyViewsPlugin,Texture,TextureTranscoder,TreeViewPlugin,UnsignedByteType,UnsignedInt248Type,UnsignedIntType,UnsignedShort4444Type,UnsignedShort5551Type,UnsignedShortType,VBOGeometry,ViewCullPlugin,Viewer,WebIFCLoaderPlugin,WorkerPool$1 as WorkerPool,XKTDefaultDataSource,XKTLoaderPlugin,XML3DLoaderPlugin,ZoneEditControl,ZoneEditMouseControl,ZoneEditTouchControl,ZoneTranslateControl,ZoneTranslateMouseControl,ZoneTranslateTouchControl,ZonesMouseControl,ZonesPlugin,ZonesPolysurfaceMouseControl,ZonesPolysurfaceTouchControl,ZonesTouchControl,activateDraggableDot,activateDraggableDots,buildBoxGeometry,buildBoxLinesGeometry,buildBoxLinesGeometryFromAABB,buildCylinderGeometry,buildGridGeometry,buildLineGeometry,buildPlaneGeometry,buildPolylineGeometry,buildPolylineGeometryFromCurve,buildSphereGeometry,buildTorusGeometry,buildVectorTextGeometry,createRTCViewMat,frustumIntersectsAABB3,getKTX2TextureTranscoder,getPlaneRTCPos,isTriangleMeshSolid,load3DSGeometry,loadOBJGeometry,math,meshSurfaceArea,meshVolume,rtcToWorldPos,sRGBEncoding,setFrustum,stats,touchPointSelector$1 as touchPointSelector,transformToNode,utils,worldToRTCPos,worldToRTCPositions};