1"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[75989],{8077:(t,e,i)=>{i.d(e,{Z:()=>o});var s=i(9568),n=i(6896);class o extends s.Z{async init(){await (0,n.n)(),this.initViewer(!0)}initViewer(t){this.setReady(!1),this.canvas=this.el,this.canvas.tabIndex=0,(void 0==this.camera||t)&&(this.camera=new window.threeJs.PerspectiveCamera(70,this.canvas.clientWidth/this.canvas.clientHeight,.01,10)),(void 0==this.scene||t)&&(this.scene=new window.threeJs.Scene),this.rendering=!1,this.clock=new window.threeJs.Clock,this.renderer=new window.threeJs.WebGLRenderer({canvas:this.canvas,antialias:!0}),this.$emitter.publish("Viewer/initViewer")}startRendering(){this.rendering||(this.rendering=!0,requestAnimationFrame(this.render.bind(this)),this.canvas?.parentElement?.classList.add("spatial-canvas-rendering"),this.ready&&this.canvas?.parentElement?.classList.add("spatial-canvas-display"),this.$emitter.publish("Viewer/startRendering"))}stopRendering(){this.rendering=!1,this.canvas?.parentElement?.classList.remove("spatial-canvas-rendering"),this.$emitter.publish("Viewer/stopRendering")}render(){if(!this.rendering||(requestAnimationFrame(this.render.bind(this)),!this.clock))return;let t=this.clock.getDelta();this.preRender(t),void 0!=this.camera&&void 0!=this.scene&&void 0!=this.renderer&&this.renderer.render(this.scene,this.camera),this.postRender(t)}preRender(t){}postRender(t){}setReady(t){this.ready!==t&&(this.ready=t,this.onReady(t))}onReady(t){void 0!=this.canvas&&(t?(this.$emitter.publish("Viewer/ready"),this.canvas.parentElement?.classList.add("spatial-canvas-ready"),this.rendering&&this.canvas.parentElement?.classList.add("spatial-canvas-display")):(this.$emitter.publish("Viewer/notReady"),this.canvas.parentElement?.classList.remove("spatial-canvas-ready"),this.canvas.parentElement?.classList.remove("spatial-canvas-display")))}constructor(...t){super(...t),this.ready=!1}}},9943:(t,e,i)=>{i.d(e,{Z:()=>s});class s{static #t=this.defaultLights=[{id:"ambient",type:"ambient",color:"#ffffff",intensity:1},{id:"directional",type:"directional",color:"#ffffff",intensity:1,position:{x:-5,y:2,z:2},target:{x:0,y:0,z:0}},{id:"directional",type:"directional",color:"#ffffff",intensity:1,position:{x:0,y:2,z:2},target:{x:0,y:0,z:0}},{id:"directional",type:"directional",color:"#ffffff",intensity:1,position:{x:5,y:2,z:2},target:{x:0,y:0,z:0}}];constructor(t,e,i){this.lights=i??s.defaultLights,e&&this.lights.forEach(t=>{t.intensity=Number(e)/100}),this.scene=t,this.lightGroup=new window.threeJs.Group,this.lightGroup.name="lightGroup",this.lights.forEach(t=>{this.addLight(t)}),this.scene.add(this.lightGroup)}initAmbientLight(t){let e=new window.threeJs.AmbientLight(t.color,t.intensity);e.name=t.id,this.lightGroup.add(e)}initDirectionalLight(t){let e=new window.threeJs.DirectionalLight(t.color,t.intensity);e.position.set(t.position?.x??0,t.position?.y??0,t.position?.z??0),e.target.position.set(t.target?.x??0,t.target?.y??0,t.target?.z??0),e.name=t.id,this.lightGroup.add(e)}addLight(t){switch(t.type){case"ambient":this.initAmbientLight(t);break;case"directional":this.initDirectionalLight(t)}}removeLight(t){this.removeLightById(t.id)}removeLightById(t){this.lights=this.lights.filter(e=>e.id!==t);let e=this.lightGroup.getObjectByName(t);e&&this.lightGroup.remove(e)}dispose(){this.lights=[],this.scene.remove(this.lightGroup)}}},5469:(t,e,i)=>{i.d(e,{Z:()=>s});class s{constructor(t){this.lastWidth=0,this.lastHeight=0,this.plugin=t,this.init()}init(){this.plugin.canvas&&(this.lastHeight=this.plugin.canvas.clientHeight,this.lastWidth=this.plugin.canvas.clientWidth)}update(){if(!this.plugin.canvas||!this.plugin.camera)return;let t=this.plugin.canvas.parentElement?.clientHeight??0,e=this.plugin.canvas.parentElement?.clientWidth??0;(t!==this.lastHeight||e!==this.lastWidth)&&(this.plugin.canvas.height=t,this.plugin.canvas.width=e,this.plugin.camera.aspect=e/t,this.plugin.camera.updateProjectionMatrix(),this.plugin.renderer?.setSize(e,t),this.plugin.$emitter.publish("CanvasSizeUpdateUtil/sizeUpdate",{width:e,height:t}),this.lastHeight=t,this.lastWidth=e)}}},9183:(t,e,i)=>{i.d(e,{Z:()=>n});var s=i(5206);
1class n{static #t=this.options={noteSelector:"[data-spatial-movement-note]",hiddenClass:"spatial-canvas-note--hidden",touchTextDataAttribute:"data-spatial-movement-note-touch-text"};constructor(t){if(this.plugin=t,!this.plugin.canvas)return;if(this.note=this.plugin.canvas?.parentElement?.querySelector(n.options.noteSelector)??void 0,s.Z.isTouchDevice()){let t=this.note?.getAttribute(n.options.touchTextDataAttribute);t&&this.note&&(this.note.innerText=t)}this.plugin.canvas.addEventListener("pointerup",this.onMove.bind(this))}onMove(){this.note?.classList.add(n.options.hiddenClass),this.plugin.canvas&&this.plugin.canvas.removeEventListener("pointerup",this.onMove.bind(this))}}},4161:(t,e,i)=>{i.d(e,{Z:()=>n});var s=i(9138);class n{constructor(t){this.gltfLoader=new window.threeJsAddons.GLTFLoader;let e=new window.threeJsAddons.DRACOLoader;e.setDecoderPath(t?.options.dracoDecodersPath),this.gltfLoader.setDRACOLoader(e),this.loadStatus=new Map,t?.$emitter instanceof s.Z&&(this.$emitter=t?.$emitter)}async loadSingleObjectByUrl(t,e){this.loadStatus.set(t,0),this.emitLoadingUpdate();let i=await new Promise((e,i)=>{this.gltfLoader.load(t,i=>{this.loadStatus.set(t,1),this.emitLoadingUpdate(),e(i.scene)},e=>{this.loadStatus.set(t,e.loaded/e.total),this.emitLoadingUpdate()},e=>{this.loadStatus.set(t,-1),this.emitLoadingUpdate(),i(e)})});return e.clampSize&&(i=this.clampSize(i,e.clampMaxSize)),e.center&&(i=this.centerObject(i)),i}centerObject(t){let e=new window.threeJs.Box3().setFromObject(t).getCenter(new window.threeJs.Vector3);t.position.copy(e),t.position.multiplyScalar(-1);let i=new window.threeJs.Group;return i.name="centered",i.add(t),i}clampSize(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{x:1,y:1,z:1},i=new window.threeJs.Box3().setFromObject(t).getSize(new window.threeJs.Vector3),s=Math.max(i.x*(1/e.x),i.y*(1/e.y),i.z*(1/e.z));return t.scale.multiplyScalar(1/s),t}percentageLoaded(){let t=0,e=0;return this.loadStatus.forEach(i=>{e+=i,t++}),e/t}detailLoaded(){return this.loadStatus}emitLoadingUpdate(){this.$emitter&&this.$emitter.publish("ObjectLoaderUtil/loadingUpdate",{percentage:this.percentageLoaded(),detailed:this.detailLoaded()})}}},7073:(t,e,i)=>{i.d(e,{Z:()=>s});class s{constructor(t,e){this.controls=new window.threeJsAddons.OrbitControls(t,e),this.controls.enableDamping=!0,this.controls.dampingFactor=.25,this.controls.enableZoom=!0,this.controls.enablePan=!1,this.unbindEventListeners=this.bindEventListeners(e)}bindEventListeners(t){return t.addEventListener("keydown",this.onKeyDown.bind(this)),()=>{t.removeEventListener("keydown",this.onKeyDown.bind(this))}}onKeyDown(t){if("ArrowRight"!==t.key&&"ArrowLeft"!==t.key&&"ArrowUp"!==t.key&&"ArrowDown"!==t.key&&"+"!==t.key&&"-"!==t.key)return;t.stopPropagation(),t.preventDefault();let e=Math.PI/16,i=Math.PI/16;"ArrowRight"===t.key&&this.move(-e,0),"ArrowLeft"===t.key&&this.move(e,0),"ArrowUp"===t.key&&this.move(0,-e),"ArrowDown"===t.key&&this.move(0,e),"+"===t.key&&this.zoom(i),"-"===t.key&&this.zoom(-i)}update(){this.controls.update()}enable(){this.controls.enabled=!0}disable(){this.controls.enabled=!1}dispose(){this.unbindEventListeners(),this.controls.dispose()}reset(){this.controls.target.set(0,0,0)}enableZoom(){this.controls.enableZoom=!0}disableZoom(){this.controls.enableZoom=!1}move(t,e){let{minAzimuthAngle:i,maxAzimuthAngle:s,minPolarAngle:n,maxPolarAngle:o}=this.controls;this.controls.minAzimuthAngle=this.controls.maxAzimuthAngle=window.threeJsAddons?.MathUtils.clamp(this.controls.getAzimuthalAngle()+t,i+t,s-t),this.controls.minPolarAngle=this.controls.maxPolarAngle=window.threeJsAddons?.MathUtils.clamp(this.controls.getPolarAngle()+e,n+e,o-e),this.controls.update(),this.controls.minAzimuthAngle=i,this.controls.maxAzimuthAngle=s,this.controls.minPolarAngle=n,this.controls.maxPolarAngle=o}zoom(t){let{minDistance:e,maxDistance:i}=this.controls;this.controls.minDistance=this.controls.maxDistance=window.threeJsAddons?.MathUtils.clamp(this.controls.getDistance()-t,e+t,i-t),this.controls.update(),this.controls.minDistance=e,this.controls.maxDistance=i}}}
1,6896:(t,e,i)=>{i.d(e,{n:()=>s});async function s(){if(window.loadThreeJsUtil||(window.loadThreeJsUtil={isLoaded:!1,promise:null,promiseResolve:null}),!window.loadThreeJsUtil.isLoaded){if(window.loadThreeJsUtil.promise){await window.loadThreeJsUtil.promise;return}if(window.loadThreeJsUtil.promise=new Promise(t=>{window.loadThreeJsUtil.promiseResolve=t}),window.threeJs||(window.threeJs=await i.e(26173).then(i.bind(i,6173))),window.threeJsAddons||(window.threeJsAddons={}),!window.threeJsAddons?.OrbitControls){let{OrbitControls:t}=await Promise.all([i.e(26173),i.e(96976)]).then(i.bind(i,6976));window.threeJsAddons.OrbitControls=t}if(!window.threeJsAddons?.USDZExporter){let{USDZExporter:t}=await Promise.all([i.e(26173),i.e(43707)]).then(i.bind(i,3707));window.threeJsAddons.USDZExporter=t}if(!window.threeJsAddons?.XREstimatedLight){let{XREstimatedLight:t}=await Promise.all([i.e(26173),i.e(96874)]).then(i.bind(i,6874));window.threeJsAddons.XREstimatedLight=t}if(!window.threeJsAddons?.GLTFLoader){let{GLTFLoader:t}=await Promise.all([i.e(26173),i.e(1990)]).then(i.bind(i,1990));window.threeJsAddons.GLTFLoader=t}if(!window.threeJsAddons?.DRACOLoader){let{DRACOLoader:t}=await Promise.all([i.e(26173),i.e(35157)]).then(i.bind(i,5157));window.threeJsAddons.DRACOLoader=t}window.threeJsAddons?.DRACOLibPath||(window.threeJsAddons.DRACOLibPath="three/examples/jsm/libs/draco/"),window.threeJsAddons?.MathUtils||(window.threeJsAddons.MathUtils=await i.e(57062).then(i.bind(i,7062))),window.loadThreeJsUtil.promiseResolve(),window.loadThreeJsUtil.isLoaded=!0}}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.