PageSourceSearch

https://beltz.de/theme/c5b651ba796b08a3748257755ceba02d/js/storefr…ont.spatial-base-viewer.plugin.ts.d065ba.js

js beltz.de collected 2026-09-24 08:38:19 UTC 11,146 bytes, 1 lines download raw bytes

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(){var t,e,i,s;this.rendering||(this.rendering=!0,requestAnimationFrame(this.render.bind(this)),(e=this.canvas)===null||void 0===e||(t=e.parentElement)===null||void 0===t||t.classList.add("spatial-canvas-rendering"),this.ready&&((s=this.canvas)===null||void 0===s||(i=s.parentElement)===null||void 0===i||i.classList.add("spatial-canvas-display")),this.$emitter.publish("Viewer/startRendering"))}stopRendering(){var t,e;this.rendering=!1,(e=this.canvas)===null||void 0===e||(t=e.parentElement)===null||void 0===t||t.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){var e,i,s,n;void 0!=this.canvas&&(t?(this.$emitter.publish("Viewer/ready"),(e=this.canvas.parentElement)===null||void 0===e||e.classList.add("spatial-canvas-ready"),this.rendering&&((i=this.canvas.parentElement)===null||void 0===i||i.classList.add("spatial-canvas-display"))):(this.$emitter.publish("Viewer/notReady"),(s=this.canvas.parentElement)===null||void 0===s||s.classList.remove("spatial-canvas-ready"),(n=this.canvas.parentElement)===null||void 0===n||n.classList.remove("spatial-canvas-display")))}constructor(...t){super(...t),this.ready=!1}}},9943:(t,e,i)=>{i.d(e,{Z:()=>s});class s{initAmbientLight(t){let e=new window.threeJs.AmbientLight(t.color,t.intensity);e.name=t.id,this.lightGroup.add(e)}initDirectionalLight(t){var e,i,s,n,o,a,l,d,r,h,c,v;let u=new window.threeJs.DirectionalLight(t.color,t.intensity);u.position.set((l=(e=t.position)===null||void 0===e?void 0:e.x)!==null&&void 0!==l?l:0,(d=(i=t.position)===null||void 0===i?void 0:i.y)!==null&&void 0!==d?d:0,(r=(s=t.position)===null||void 0===s?void 0:s.z)!==null&&void 0!==r?r:0),u.target.position.set((h=(n=t.target)===null||void 0===n?void 0:n.x)!==null&&void 0!==h?h:0,(c=(o=t.target)===null||void 0===o?void 0:o.y)!==null&&void 0!==c?c:0,(v=(a=t.target)===null||void 0===a?void 0:a.z)!==null&&void 0!==v?v:0),u.name=t.id,this.lightGroup.add(u)}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)}constructor(t,e,i){this.lights=null!=i?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)}}s.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}}]},5469:(t,e,i)=>{i.d(e,{Z:()=>s});class s{init(){this.plugin.canvas&&(this.lastHeight=this.plugin.canvas.clientHeight,this.lastWidth=this.plugin.canvas.clientWidth)}update(){var t,e,i,s,n;if(!this.plugin.canvas||!this.plugin.camera)return;let o=(s=(t=this.plugin.canvas.parentElement)===null||void 0===t?void 0:t.clientHeight)!==null&&void 0!==s?s:0,a=(n=(e=this.plugin.canvas.parentElement)===null||void 0===e?void 0:e.clientWidth)!==null&&void 0!==n?n:0;(o!==this.lastHeight||a!==this.lastWidth)&&(this.plugin.canvas.height=o,this.plugin.canvas.width=a,this.plugin.camera.aspect=a/o,this.plugin.camera.updateProjectionMatrix(),(i=this.plugin.renderer)===null||void 0===i||i.setSize(a,o),this.plugin.$emitter.publish("CanvasSizeUpdateUtil/sizeUpdate",{width:a,height:o}),this.lastHeight=o,this.lastWidth=a)}constructor(t){this.lastWidth=0,this.lastHeight=0,this.plugin=t,this.init()}}},9183:(t,e,i)=>{i.d(e,{Z:()=>n});var s=i(5206);
1class n{onMove(){var t;(t=this.note)===null||void 0===t||t.classList.add(n.options.hiddenClass),this.plugin.canvas&&this.plugin.canvas.removeEventListener("pointerup",this.onMove.bind(this))}constructor(t){var e,i,o,a;if(this.plugin=t,!this.plugin.canvas)return;if(this.note=(o=(i=this.plugin.canvas)===null||void 0===i?void 0:(e=i.parentElement)===null||void 0===e?void 0:e.querySelector(n.options.noteSelector))!==null&&void 0!==o?o:void 0,s.Z.isTouchDevice()){let t=(a=this.note)===null||void 0===a?void 0:a.getAttribute(n.options.touchTextDataAttribute);t&&this.note&&(this.note.innerText=t)}this.plugin.canvas.addEventListener("pointerup",this.onMove.bind(this))}}n.options={noteSelector:"[data-spatial-movement-note]",hiddenClass:"spatial-canvas-note--hidden",touchTextDataAttribute:"data-spatial-movement-note-touch-text"}},4161:(t,e,i)=>{i.d(e,{Z:()=>n});var s=i(9138);class n{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()})}constructor(t){this.gltfLoader=new window.threeJsAddons.GLTFLoader;let e=new window.threeJsAddons.DRACOLoader;e.setDecoderPath(null==t?void 0:t.options.dracoDecodersPath),this.gltfLoader.setDRACOLoader(e),this.loadStatus=new Map,(null==t?void 0:t.$emitter)instanceof s.Z&&(this.$emitter=null==t?void 0:t.$emitter)}}},7073:(t,e,i)=>{i.d(e,{Z:()=>s});class s{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){var i,s;let{minAzimuthAngle:n,maxAzimuthAngle:o,minPolarAngle:a,maxPolarAngle:l}=this.controls;this.controls.minAzimuthAngle=this.controls.maxAzimuthAngle=(i=window.threeJsAddons)===null||void 0===i?void 0:i.MathUtils.clamp(this.controls.getAzimuthalAngle()+t,n+t,o-t),this.controls.minPolarAngle=this.controls.maxPolarAngle=(s=window.threeJsAddons)===null||void 0===s?void 0:s.MathUtils.clamp(this.controls.getPolarAngle()+e,a+e,l-e),this.controls.update(),this.controls.minAzimuthAngle=n,this.controls.maxAzimuthAngle=o,this.controls.minPolarAngle=a,this.controls.maxPolarAngle=l}zoom(t){var e;let{minDistance:i,maxDistance:s}=this.controls;this.controls.minDistance=this.controls.maxDistance=(e=window.threeJsAddons)===null||void 0===e?void 0:e.MathUtils.clamp(this.controls.getDistance()-t,i+t,s-t),this.controls.update(),this.controls.minDistance=i,this.controls.maxDistance=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)}}}
1,6896:(t,e,i)=>{i.d(e,{n:()=>s});async function s(){var t,e,s,n,o,a,l;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={}),!((t=window.threeJsAddons)===null||void 0===t?void 0:t.OrbitControls)){let{OrbitControls:t}=await Promise.all([i.e(26173),i.e(96976)]).then(i.bind(i,6976));window.threeJsAddons.OrbitControls=t}if(!((e=window.threeJsAddons)===null||void 0===e?void 0:e.USDZExporter)){let{USDZExporter:t}=await Promise.all([i.e(26173),i.e(43707)]).then(i.bind(i,3707));window.threeJsAddons.USDZExporter=t}if(!((s=window.threeJsAddons)===null||void 0===s?void 0:s.XREstimatedLight)){let{XREstimatedLight:t}=await Promise.all([i.e(26173),i.e(96874)]).then(i.bind(i,6874));window.threeJsAddons.XREstimatedLight=t}if(!((n=window.threeJsAddons)===null||void 0===n?void 0:n.GLTFLoader)){let{GLTFLoader:t}=await Promise.all([i.e(26173),i.e(1990)]).then(i.bind(i,1990));window.threeJsAddons.GLTFLoader=t}if(!((o=window.threeJsAddons)===null||void 0===o?void 0:o.DRACOLoader)){let{DRACOLoader:t}=await Promise.all([i.e(26173),i.e(35157)]).then(i.bind(i,5157));window.threeJsAddons.DRACOLoader=t}((a=window.threeJsAddons)===null||void 0===a?void 0:a.DRACOLibPath)||(window.threeJsAddons.DRACOLibPath="three/examples/jsm/libs/draco/"),((l=window.threeJsAddons)===null||void 0===l?void 0:l.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.