@roomle/web-sdk 2.24.0 → 2.26.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/{banana-for-scale-38289e07.js → banana-for-scale-b228863b.js} +2 -2
- package/lib/{banana-for-scale-38289e07.js.map → banana-for-scale-b228863b.js.map} +1 -1
- package/lib/{banana-for-scale-e00072d6.nomodule.js → banana-for-scale-df1b1bb8.nomodule.js} +2 -2
- package/lib/{banana-for-scale-e00072d6.nomodule.js.map → banana-for-scale-df1b1bb8.nomodule.js.map} +1 -1
- package/lib/{component-dimensioning-51dc6778.nomodule.js → component-dimensioning-6a25fd82.nomodule.js} +2 -2
- package/lib/component-dimensioning-6a25fd82.nomodule.js.map +1 -0
- package/lib/{component-dimensioning-fcb45d9d.js → component-dimensioning-d50d3d3c.js} +2 -2
- package/lib/component-dimensioning-d50d3d3c.js.map +1 -0
- package/lib/{configurator-6109818c.js → configurator-db2822d4.js} +2 -2
- package/lib/{configurator-6109818c.js.map → configurator-db2822d4.js.map} +1 -1
- package/lib/{configurator-ff0bc414.nomodule.js → configurator-f1ffaf19.nomodule.js} +2 -2
- package/lib/{configurator-ff0bc414.nomodule.js.map → configurator-f1ffaf19.nomodule.js.map} +1 -1
- package/lib/configurator-main-6843570e.js +2 -0
- package/lib/configurator-main-6843570e.js.map +1 -0
- package/lib/configurator-main.nomodule.js +1 -1
- package/lib/{configurator-mesh-generator-3589a327.js → configurator-mesh-generator-47bd6b01.js} +2 -2
- package/lib/configurator-mesh-generator-47bd6b01.js.map +1 -0
- package/lib/configurator-mesh-generator-8caa9353.nomodule.js +2 -0
- package/lib/configurator-mesh-generator-8caa9353.nomodule.js.map +1 -0
- package/lib/{default-light-setting-55fb6098.nomodule.js → default-light-setting-04da95d3.nomodule.js} +2 -2
- package/lib/default-light-setting-04da95d3.nomodule.js.map +1 -0
- package/lib/{default-light-setting-9833e287.js → default-light-setting-23ee65f7.js} +2 -2
- package/lib/default-light-setting-23ee65f7.js.map +1 -0
- package/lib/{dimensioning-helper-42d242c9.nomodule.js → dimensioning-helper-8d625fbe.nomodule.js} +2 -2
- package/lib/dimensioning-helper-8d625fbe.nomodule.js.map +1 -0
- package/lib/{dimensioning-helper-5f55ea73.js → dimensioning-helper-f0fe672f.js} +2 -2
- package/lib/dimensioning-helper-f0fe672f.js.map +1 -0
- package/lib/{glb-viewer-1a144c15.nomodule.js → glb-viewer-8c6f7fad.nomodule.js} +2 -2
- package/lib/{glb-viewer-1a144c15.nomodule.js.map → glb-viewer-8c6f7fad.nomodule.js.map} +1 -1
- package/lib/{glb-viewer-1664bd4e.js → glb-viewer-a4d3ce66.js} +2 -2
- package/lib/{glb-viewer-1664bd4e.js.map → glb-viewer-a4d3ce66.js.map} +1 -1
- package/lib/glb-viewer-main-8ba1eb94.js +2 -0
- package/lib/glb-viewer-main-8ba1eb94.js.map +1 -0
- package/lib/glb-viewer-main.nomodule.js +1 -1
- package/lib/{image-renderer-d9eef54c.js → image-renderer-33e3e4a8.js} +2 -2
- package/lib/{image-renderer-d9eef54c.js.map → image-renderer-33e3e4a8.js.map} +1 -1
- package/lib/{image-renderer-66960cf5.nomodule.js → image-renderer-b2b9aa49.nomodule.js} +2 -2
- package/lib/{image-renderer-66960cf5.nomodule.js.map → image-renderer-b2b9aa49.nomodule.js.map} +1 -1
- package/lib/legacy/{banana-for-scale-034e08ec.legacy.js → banana-for-scale-0a65a3a5.legacy.js} +2 -2
- package/lib/legacy/{banana-for-scale-034e08ec.legacy.js.map → banana-for-scale-0a65a3a5.legacy.js.map} +1 -1
- package/lib/legacy/{component-dimensioning-82c00f0b.legacy.js → component-dimensioning-dbb6521b.legacy.js} +2 -2
- package/lib/legacy/component-dimensioning-dbb6521b.legacy.js.map +1 -0
- package/lib/legacy/{configurator-e87486e5.legacy.js → configurator-195d3e1f.legacy.js} +2 -2
- package/lib/legacy/{configurator-e87486e5.legacy.js.map → configurator-195d3e1f.legacy.js.map} +1 -1
- package/lib/legacy/configurator-main.legacy.js +1 -1
- package/lib/legacy/configurator-mesh-generator-5e0b9925.legacy.js +2 -0
- package/lib/legacy/configurator-mesh-generator-5e0b9925.legacy.js.map +1 -0
- package/lib/legacy/{default-light-setting-da9820bf.legacy.js → default-light-setting-a00451cf.legacy.js} +2 -2
- package/lib/legacy/default-light-setting-a00451cf.legacy.js.map +1 -0
- package/lib/legacy/{dimensioning-helper-cbc774b6.legacy.js → dimensioning-helper-3e1d769e.legacy.js} +2 -2
- package/lib/legacy/dimensioning-helper-3e1d769e.legacy.js.map +1 -0
- package/lib/legacy/{glb-viewer-51506dd6.legacy.js → glb-viewer-022725cd.legacy.js} +2 -2
- package/lib/legacy/{glb-viewer-51506dd6.legacy.js.map → glb-viewer-022725cd.legacy.js.map} +1 -1
- package/lib/legacy/glb-viewer-main.legacy.js +1 -1
- package/lib/legacy/{image-renderer-9c6ba29f.legacy.js → image-renderer-22bbe74a.legacy.js} +2 -2
- package/lib/legacy/{image-renderer-9c6ba29f.legacy.js.map → image-renderer-22bbe74a.legacy.js.map} +1 -1
- package/lib/legacy/{material-viewer-22f49d15.legacy.js → material-viewer-a4bfcd35.legacy.js} +2 -2
- package/lib/legacy/material-viewer-a4bfcd35.legacy.js.map +1 -0
- package/lib/legacy/material-viewer-main.legacy.js +1 -1
- package/lib/legacy/{mesh-generator-35e07d52.legacy.js → mesh-generator-fec97699.legacy.js} +2 -2
- package/lib/legacy/mesh-generator-fec97699.legacy.js.map +1 -0
- package/lib/legacy/{pixotron-6a0524d5.legacy.js → pixotron-aa629432.legacy.js} +2 -2
- package/lib/legacy/{pixotron-6a0524d5.legacy.js.map → pixotron-aa629432.legacy.js.map} +1 -1
- package/lib/legacy/{planner-7b89bd0a.legacy.js → planner-5dd00ee6.legacy.js} +2 -2
- package/lib/legacy/{planner-7b89bd0a.legacy.js.map → planner-5dd00ee6.legacy.js.map} +1 -1
- package/lib/legacy/planner-main.legacy.js +1 -1
- package/lib/legacy/{rapi-access-566a7f37.legacy.js → rapi-access-f9757752.legacy.js} +2 -2
- package/lib/legacy/{rapi-access-566a7f37.legacy.js.map → rapi-access-f9757752.legacy.js.map} +1 -1
- package/lib/legacy/roomle-sdk.legacy.js +1 -1
- package/lib/legacy/{scene-manager-eb181041.legacy.js → scene-manager-b424d6dc.legacy.js} +2 -2
- package/lib/legacy/scene-manager-b424d6dc.legacy.js.map +1 -0
- package/lib/legacy/static/{ConfiguratorKernel-b9d27237a98f26a3.js → ConfiguratorKernel-1e2f7d6ca24383c9.js} +4 -4
- package/lib/legacy/static/ConfiguratorKernel-baaee80927c9ed3c.wasm +0 -0
- package/lib/legacy/static/ConfiguratorKernelJs-6f8adeacebb2ea38.js +185 -0
- package/lib/legacy/static/ConfiguratorKernelJs-fda4a7e216d411c4.mem +0 -0
- package/lib/legacy/static/{RoomleCore-6c85835960a9c92c.js → RoomleCore-a56b243722499a86.js} +4 -4
- package/lib/legacy/static/RoomleCore-ac2181c23d7e3088.wasm +0 -0
- package/lib/legacy/static/RoomleCoreJs-112bc1e3e8657dd1.mem +0 -0
- package/lib/legacy/static/RoomleCoreJs-be869bde68ed4601.js +199 -0
- package/lib/legacy/static/shaders-8d2fd88b905dbc7d.json +1 -0
- package/lib/legacy/{stats-helper-29547ac3.legacy.js → stats-helper-2cf7f29f.legacy.js} +2 -2
- package/lib/legacy/{stats-helper-29547ac3.legacy.js.map → stats-helper-2cf7f29f.legacy.js.map} +1 -1
- package/lib/{material-viewer-343dbd1c.nomodule.js → material-viewer-085df4c0.nomodule.js} +2 -2
- package/lib/material-viewer-085df4c0.nomodule.js.map +1 -0
- package/lib/{material-viewer-51e7e373.js → material-viewer-89afa810.js} +2 -2
- package/lib/material-viewer-89afa810.js.map +1 -0
- package/lib/material-viewer-main-5b004c8b.js +2 -0
- package/lib/material-viewer-main-5b004c8b.js.map +1 -0
- package/lib/material-viewer-main.nomodule.js +1 -1
- package/lib/{mesh-generator-082efe40.js → mesh-generator-48e35ad8.js} +2 -2
- package/lib/mesh-generator-48e35ad8.js.map +1 -0
- package/lib/{mesh-generator-bfaf61da.nomodule.js → mesh-generator-4b18e48e.nomodule.js} +2 -2
- package/lib/mesh-generator-4b18e48e.nomodule.js.map +1 -0
- package/lib/{pixotron-746bbe49.js → pixotron-c0772e60.js} +2 -2
- package/lib/{pixotron-746bbe49.js.map → pixotron-c0772e60.js.map} +1 -1
- package/lib/{pixotron-503ad49f.nomodule.js → pixotron-f387b36e.nomodule.js} +2 -2
- package/lib/{pixotron-503ad49f.nomodule.js.map → pixotron-f387b36e.nomodule.js.map} +1 -1
- package/lib/{planner-0f272b17.js → planner-3d893e2e.js} +2 -2
- package/lib/{planner-0f272b17.js.map → planner-3d893e2e.js.map} +1 -1
- package/lib/{planner-3d1a7b54.nomodule.js → planner-c2f06c28.nomodule.js} +2 -2
- package/lib/{planner-3d1a7b54.nomodule.js.map → planner-c2f06c28.nomodule.js.map} +1 -1
- package/lib/planner-main-d7556843.js +2 -0
- package/lib/planner-main-d7556843.js.map +1 -0
- package/lib/planner-main.nomodule.js +1 -1
- package/lib/{rapi-access-2ad74585.nomodule.js → rapi-access-334aa357.nomodule.js} +2 -2
- package/lib/{rapi-access-2ad74585.nomodule.js.map → rapi-access-334aa357.nomodule.js.map} +1 -1
- package/lib/{rapi-access-eb61bbf4.js → rapi-access-c94b7d75.js} +2 -2
- package/lib/{rapi-access-eb61bbf4.js.map → rapi-access-c94b7d75.js.map} +1 -1
- package/lib/{roomle-sdk-eca74c37.js → roomle-sdk-eb2b6d72.js} +2 -2
- package/lib/roomle-sdk-eb2b6d72.js.map +1 -0
- package/lib/roomle-sdk.nomodule.js +1 -1
- package/lib/{scene-manager-aaf4a020.nomodule.js → scene-manager-b680c131.nomodule.js} +2 -2
- package/lib/scene-manager-b680c131.nomodule.js.map +1 -0
- package/lib/{scene-manager-b11f335d.js → scene-manager-c2a821d2.js} +2 -2
- package/lib/scene-manager-c2a821d2.js.map +1 -0
- package/lib/static/{ConfiguratorKernel-b9d27237a98f26a3.js → ConfiguratorKernel-1e2f7d6ca24383c9.js} +1 -1
- package/lib/static/{ConfiguratorKernel-b9d27237a98f26a3.js.map → ConfiguratorKernel-1e2f7d6ca24383c9.js.map} +0 -0
- package/lib/static/ConfiguratorKernel-baaee80927c9ed3c.wasm +0 -0
- package/lib/static/ConfiguratorKernelJs-6f8adeacebb2ea38.js +185 -0
- package/lib/static/ConfiguratorKernelJs-fda4a7e216d411c4.mem +0 -0
- package/lib/static/{RoomleCore-6c85835960a9c92c.js → RoomleCore-a56b243722499a86.js} +1 -1
- package/lib/static/{RoomleCore-6c85835960a9c92c.js.map → RoomleCore-a56b243722499a86.js.map} +0 -0
- package/lib/static/RoomleCore-ac2181c23d7e3088.wasm +0 -0
- package/lib/static/RoomleCoreJs-112bc1e3e8657dd1.mem +0 -0
- package/lib/static/RoomleCoreJs-be869bde68ed4601.js +199 -0
- package/lib/static/shaders-8d2fd88b905dbc7d.json +1 -0
- package/lib/{stats-helper-fbe3d5f5.nomodule.js → stats-helper-968cb9b2.nomodule.js} +2 -2
- package/lib/{stats-helper-fbe3d5f5.nomodule.js.map → stats-helper-968cb9b2.nomodule.js.map} +1 -1
- package/lib/{stats-helper-417bec06.js → stats-helper-c7d3b24c.js} +2 -2
- package/lib/{stats-helper-417bec06.js.map → stats-helper-c7d3b24c.js.map} +1 -1
- package/package.json +2 -2
- package/lib/component-dimensioning-51dc6778.nomodule.js.map +0 -1
- package/lib/component-dimensioning-fcb45d9d.js.map +0 -1
- package/lib/configurator-main-5aa749dc.js +0 -2
- package/lib/configurator-main-5aa749dc.js.map +0 -1
- package/lib/configurator-mesh-generator-3589a327.js.map +0 -1
- package/lib/configurator-mesh-generator-68e6228f.nomodule.js +0 -2
- package/lib/configurator-mesh-generator-68e6228f.nomodule.js.map +0 -1
- package/lib/default-light-setting-55fb6098.nomodule.js.map +0 -1
- package/lib/default-light-setting-9833e287.js.map +0 -1
- package/lib/dimensioning-helper-42d242c9.nomodule.js.map +0 -1
- package/lib/dimensioning-helper-5f55ea73.js.map +0 -1
- package/lib/glb-viewer-main-6a009153.js +0 -2
- package/lib/glb-viewer-main-6a009153.js.map +0 -1
- package/lib/legacy/component-dimensioning-82c00f0b.legacy.js.map +0 -1
- package/lib/legacy/configurator-mesh-generator-2847dfb1.legacy.js +0 -2
- package/lib/legacy/configurator-mesh-generator-2847dfb1.legacy.js.map +0 -1
- package/lib/legacy/default-light-setting-da9820bf.legacy.js.map +0 -1
- package/lib/legacy/dimensioning-helper-cbc774b6.legacy.js.map +0 -1
- package/lib/legacy/material-viewer-22f49d15.legacy.js.map +0 -1
- package/lib/legacy/mesh-generator-35e07d52.legacy.js.map +0 -1
- package/lib/legacy/scene-manager-eb181041.legacy.js.map +0 -1
- package/lib/legacy/static/ConfiguratorKernel-0674e08a262bd8eb.wasm +0 -0
- package/lib/legacy/static/ConfiguratorKernelJs-e3837f8bd4e80217.mem +0 -0
- package/lib/legacy/static/ConfiguratorKernelJs-febcef44f7319c60.js +0 -185
- package/lib/legacy/static/RoomleCore-ffe3a7e6fc94d23f.wasm +0 -0
- package/lib/legacy/static/RoomleCoreJs-29d64484914f0f59.mem +0 -0
- package/lib/legacy/static/RoomleCoreJs-6a97ca626b0d018b.js +0 -199
- package/lib/legacy/static/shaders-59c3e51f5dee7064.json +0 -1
- package/lib/material-viewer-343dbd1c.nomodule.js.map +0 -1
- package/lib/material-viewer-51e7e373.js.map +0 -1
- package/lib/material-viewer-main-23624a6b.js +0 -2
- package/lib/material-viewer-main-23624a6b.js.map +0 -1
- package/lib/mesh-generator-082efe40.js.map +0 -1
- package/lib/mesh-generator-bfaf61da.nomodule.js.map +0 -1
- package/lib/planner-main-0596f8ec.js +0 -2
- package/lib/planner-main-0596f8ec.js.map +0 -1
- package/lib/roomle-sdk-eca74c37.js.map +0 -1
- package/lib/scene-manager-aaf4a020.nomodule.js.map +0 -1
- package/lib/scene-manager-b11f335d.js.map +0 -1
- package/lib/static/ConfiguratorKernel-0674e08a262bd8eb.wasm +0 -0
- package/lib/static/ConfiguratorKernelJs-e3837f8bd4e80217.mem +0 -0
- package/lib/static/ConfiguratorKernelJs-febcef44f7319c60.js +0 -185
- package/lib/static/RoomleCore-ffe3a7e6fc94d23f.wasm +0 -0
- package/lib/static/RoomleCoreJs-29d64484914f0f59.mem +0 -0
- package/lib/static/RoomleCoreJs-6a97ca626b0d018b.js +0 -199
- package/lib/static/shaders-59c3e51f5dee7064.json +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
System.register(["./rapi-access-566a7f37.legacy.js","./main-thread-to-worker-880d5b78.legacy.js","./pixotron-6a0524d5.legacy.js"],(function(t,e){var i,s,n,r,a,o,h,_,d,c,p,m,l,u,g,E,w,y,C,v,R;return{setters:[function(t){i=t.t,s=t.u,n=t.a8,r=t.a9,a=t.v,o=t._,h=t.i,_=t.e,d=t.h,c=t.f,p=t.R,m=t.aa},function(t){l=t.i},function(t){u=t.d,g=t.i,E=t.D,w=t.C,y=t.b,C=t.B,v=t.f,R=t.c}],execute:function(){class f extends u{constructor(t,e,i){super(t,e,i),this._scale=1,this._state=0,this._size=20,this._center=new THREE.Vector3,this._raycaster=new THREE.Raycaster,this._lastPosition=new THREE.Vector2,this._zoomPosition=new THREE.Vector3,this._lastZoom=0,this._zoomSpeed=Math.pow(.95,2),this._cameraZoom=1,this._initCamera(i||new THREE.Vector3(0,10,0));let s=new THREE.PlaneGeometry(1e3,1e3);s.rotateX(-Math.PI/2),this._plane=new THREE.Mesh(s,new THREE.MeshStandardMaterial)}_getCamera(){return this._camera||this._initCamera(new THREE.Vector3(0,10,0)),this._camera}_initCamera(t){let{x:e,y:i}=this._domHelper.getClientDimensions(),s=e/i*this._size,n=this._size;this._camera=new THREE.OrthographicCamera(s/-2,s/2,n/2,n/-2,1,1e3),this._camera.position.copy(t),this._cameraPosition=t,this._camera.lookAt(new THREE.Vector3(0,0,0))}updateCamera(){let{x:t,y:e}=this._domHelper.getClientDimensions(),i=t/e*this._size,s=this._size;this._camera.left=i/-2,this._camera.right=i/2,this._camera.top=s/2,this._camera.bottom=s/-2,this._camera.updateProjectionMatrix()}_initInputListener(){this._inputListeners.push({key:3,fun:t=>{this._locked||(this._state=1,this._lastPosition.set(t.position.x,t.position.y),this.dispatchEvent(0))}}),this._inputListeners.push({key:6,fun:t=>{1!==this._state||this._locked||(this._move(new THREE.Vector2(t.position.x,t.position.y),t.type),this.dispatchEvent(1))}}),this._inputListeners.push({key:4,fun:t=>{1===this._state&&this.dispatchEvent(2),this._state=0}}),this._inputListeners.push({key:7,fun:t=>{t.event&&(t.event.stopPropagation(),t.event.preventDefault()),this._scale/=this._zoomSpeed,this._zoomTo(t.position,1),this._update()}}),this._inputListeners.push({key:8,fun:t=>{t.event&&(t.event.stopPropagation(),t.event.preventDefault()),this._scale*=this._zoomSpeed,this._zoomTo(t.position,-1),this._update()}})}_zoomTo(t,e){if(Date.now()-this._lastZoom>200){if(e>0||this._cameraZoom>=1){const e=this.getInputPosition(t);this._raycaster.setFromCamera(e,this._camera);const i=this._raycaster.intersectObject(this._plane);if(i.length<=0)return;const s=i.pop().point;this._zoomPosition.copy(s)}else this._zoomPosition.copy(this._center);this._cameraPosition.x=this._zoomPosition.x,this._cameraPosition.z=this._zoomPosition.z}this._lastZoom=Date.now()}_move(t,e){let i=new THREE.Vector2;i.subVectors(this._lastPosition,t),i.divideScalar(100),this._cameraPosition.x+=i.x*(2===e?1.1:1),this._cameraPosition.z+=i.y*(2===e?1.1:1),this._lastPosition.copy(t)}updateToBounds(t,e){let{x:i,y:s}=this._domHelper.getClientDimensions(),n=i/s;this._size=Math.max(t.x,t.z);let r=this._size,a=this._size;n>1?r=this._size*n:a=this._size*(s/i),this._center.copy(e),this._camera.left=r/-2,this._camera.right=r/2,this._camera.top=a/2,this._camera.bottom=a/-2,this._camera.zoom=1,this._camera.position.set(this._center.x,10,this._center.z),this._cameraPosition.copy(this._camera.position)}_update(t){this._scale=Math.min(this._scale,5),this._scale=Math.max(this._scale,.8),this._cameraZoom=this._scale,this._camera.updateProjectionMatrix()}animateCamera(t){return!(!super.animateCamera(t)&&Math.abs(this._cameraZoom-this._camera.zoom)<=.01||(this._camera.zoom=THREE.MathUtils.lerp(this._camera.zoom,this._cameraZoom,10*t),0))}}t("C",f);const L=Math.PI/4;class x extends u{constructor(t,e,s,n){super(t,e,s),this._state=0,this._rotationSpeed=1,this._keyMap=new Map,this.minPolarAngle=i(-60),this.maxPolarAngle=i(60),this._camera=n||new THREE.PerspectiveCamera,this._camera.fov=70,this._camera.aspect=this._width/this._height,this._camera.near=.1,this._camera.far=100,this._camera.updateProjectionMatrix(),this._camera.layers.set(3),this._camera.layers.enable(1),this._camera.layers.enable(2),this._camera.layers.enable(5),this._camera.layers.enable(4),s?this._camera.position.set(s.x,1.5,s.z):this._camera.position.set(0,1.5,0),this._cameraPosition=new THREE.Vector3,this._cameraPosition.copy(this._camera.position),this._cameraRotation=new THREE.Quaternion,this._pitch=0,this._yaw=0;let r=new THREE.Euler(-this._pitch,this._yaw,0,"ZYX");this._cameraRotation.setFromEuler(r),window.addEventListener("gamepadconnected",this._gamepadConnected.bind(this)),window.addEventListener("gamepaddisconnected",this._gamepadDisconnected.bind(this))}_gamepadConnected(t){this.startButtonPressListener()}_gamepadDisconnected(t){window.cancelAnimationFrame(this._listenerLoopAnimationFrame)}startButtonPressListener(){this._listenerLoopAnimationFrame=window.requestAnimationFrame(()=>{this.buttonPressListener()})}buttonPressListener(){let t=navigator.getGamepads()[0];this._checkRightStick(t),this._checkLeftStick(t),this._checkButtons(t),this._processKeyMap(this._keyMap,.001),this.startButtonPressListener()}_checkRightStick(t){let e=t.axes[2],i=t.axes[3];Math.abs(e)>.2&&(this._rotateHorizontal(.01*L*e),this._update(),this.dispatchEvent(1)),Math.abs(i)>.2&&(this._rotateVertical(.01*L*i),this._update(),this.dispatchEvent(1))}_checkLeftStick(t){let e=t.axes[0],i=t.axes[1];Math.abs(i)>.2?i<0?this._keyMap.set(87,!0):this._keyMap.set(83,!0):t.buttons&&t.buttons[12]&&t.buttons[12].pressed?this._keyMap.set(87,!0):t.buttons&&t.buttons[13]&&t.buttons[13].pressed?this._keyMap.set(83,!0):(this._keyMap.set(87,!1),this._keyMap.set(83,!1)),Math.abs(e)>.2?e<0?this._keyMap.set(65,!0):this._keyMap.set(68,!0):(this._keyMap.set(65,!1),this._keyMap.set(68,!1))}_checkButtons(t){t.buttons&&t.buttons[6]&&t.buttons[6].pressed?this._keyMap.set(16,!0):this._keyMap.set(16,!1),t.buttons&&t.buttons[14]&&t.buttons[14].pressed?(this._keyMap.set(37,!0),this.dispatchEvent(1)):this._keyMap.set(37,!1),t.buttons&&t.buttons[15]&&t.buttons[15].pressed?(this._keyMap.set(39,!0),this.dispatchEvent(1)):this._keyMap.set(39,!1)}animateCamera(t){let e=this._cameraPosition,i=this._cameraRotation,r=this.getCamera(),a=s(e,r.position),o=n(i,r.quaternion);if(!e||a&&o)return!1;let h=this.getCamera().position.clone(),_=Math.min(10*t,1);h.lerp(e,_),this.getCamera().position.copy(h);let d=this.getCamera().quaternion.clone(),c=Math.min(5*t,1);d.slerp(i,c),this.getCamera().setRotationFromQuaternion(d);let p=!1;return this._keyMap.forEach(t=>{t&&(p=!0)}),p&&this._processKeyMap(this._keyMap,t),!0}_getCamera(){return this._camera}_initInputListener(){window.addEventListener("keyup",this._onKeyChanged.bind(this),!1),window.addEventListener("keydown",this._onKeyChanged.bind(this),!1),this._inputListeners.push({key:3,fun:t=>{this._down(t)}}),this._inputListeners.push({key:6,fun:t=>{this._move(t)}}),this._inputListeners.push({key:4,fun:t=>{this._up(t)}})}_down(t){this._downPosition=t.position,this._position=t.position,this._state=1,2===t.type&&window.setTimeout(this._onLongDown.bind(this),350),2===t.type?this._rotationSpeed=.6:this._rotationSpeed=1}_move(t){this._position=t.position,1!==this._state||this._locked||this._orbit(new THREE.Vector2(t.position.x,t.position.y)),2!==this._state||this._locked||(this._orbit(new THREE.Vector2(t.position.x,t.position.y)),this._moveForward())}_up(t){1===this._state&&this.dispatchEvent(2),2===this._state&&this._keyMap.set(87,!1),this._state=0,this._orbitPosition=null}_onLongDown(){r(this._downPosition,this._position)<g&&1===this._state&&(this._state=2,this._orbit(new THREE.Vector2(this._position.x,this._position.y)),this._moveForward())}_update(t){let e=new THREE.Euler(-this._pitch,this._yaw,0,"ZYX");this._cameraRotation.setFromEuler(e)}updateCamera(){let{x:t,y:e}=this._domHelper.getClientDimensions();this._camera.aspect=t/e,this._camera.updateProjectionMatrix()}_onKeyChanged(t){this._keyMap.set(t.keyCode,"keydown"===t.type),this.dispatchEvent(6),this._processKeyMap(this._keyMap,.001)&&t.preventDefault()}_processKeyMap(t,e){e=Math.min(e,.1);let i=new THREE.Vector3(0,0,0),s=!1;return this._processUpDown(t,i,e),t.get(65)&&(i.x=-1*e),t.get(68)&&(i.x=1*e),t.get(37)&&(this._rotateHorizontal(-L*this._rotationSpeed*e),s=!0),t.get(39)&&(this._rotateHorizontal(L*this._rotationSpeed*e),s=!0),t.get(16)&&(i.x*=3,i.z*=3),!(0===i.x&&0===i.y&&0===i.z&&!s||(i.applyQuaternion(this.getCamera().quaternion),this._cameraPosition.add(new THREE.Vector3(i.x,0,i.z)),this._update(),0))}_processUpDown(t,e,i){(t.get(87)||t.get(38))&&(e.z=-1*i),(t.get(83)||t.get(40))&&(e.z=1*i)}_orbit(t){this._orbitPosition||(this._orbitPosition=new THREE.Vector2(t.x,t.y),this.dispatchEvent(0));let e=t.clone().sub(this._orbitPosition),i=this._domHelper.element instanceof Document?this._domHelper.element.body:this._domHelper.element;e.multiplyScalar(-1),this._rotateHorizontal(2*Math.PI*e.x/i.clientWidth*1),this._rotateVertical(2*Math.PI*e.y/i.clientHeight*1),a(this._orbitPosition,t)||this.dispatchEvent(1),this._orbitPosition.copy(t),this._update()}_moveForward(){this._keyMap.set(87,!0),this._processKeyMap(this._keyMap,.001)}_rotateVertical(t){let e=this._pitch+t;e>this.maxPolarAngle||e<this.minPolarAngle||(this._pitch=e,this._pitch<-Math.PI?this._pitch+=2*Math.PI:this._pitch>Math.PI&&(this._pitch-=2*Math.PI),this._saveYawAndPitch())}}t("a",x),t("S",(()=>{class t{constructor(t,e,i,s,n){this._maxAnisotropy=1,this._clock=new THREE.Clock,this._delta=0,this._renderListener=null,this._stopRendering=!1,this._forceRender=!1,this._updateShadowsAndAO=!0,this._lastChange=Date.now(),this._running=!1,this._onAfterRender=()=>{},this._creator_=t,this._canvasID=i,this.createCameraControl(s),this._addCameraControlListener(),this._setupScene(e,n),document.addEventListener("visibilitychange",this._tabVisible.bind(this)),this._renderListener=()=>{this._requestRender()},this._getInputManager().addEventListener(7,this._renderListener,this),this._getInputManager().addEventListener(8,this._renderListener,this),this._lifeCycleManager.addEventListener(this)}onBeforeRender(){}_changeCameraControl(t){this._cameraControl&&this._cameraControl.cleanUp(),t instanceof x&&(this._getInputManager().removeEventListener(7,this._renderListener),this._getInputManager().removeEventListener(8,this._renderListener)),this._cameraControl instanceof x&&(this._getInputManager().addEventListener(7,this._renderListener,this),this._getInputManager().addEventListener(8,this._renderListener,this)),this._cameraControl=t,this.cameraControlChanged()}cameraControlChanged(){}_addCameraControlListener(){this._cameraControl.addEventListener(0,this._requestRender,this),this._cameraControl.addEventListener(1,this._requestRender,this),this._cameraControl.addEventListener(2,this._requestRender,this),this._cameraControl.addEventListener(6,this._requestRender,this)}_renderEverything(){this._pixotron&&(this._forceRender=!0,this._updateShadowsAndAO=!0),this._requestRender()}_renderWithoutShadowsAndAO(){this._pixotron&&(this._forceRender=!0,this._updateShadowsAndAO=!1),this._requestRender()}_requestRender(){if(!this._renderer)return;const t=()=>{this._delta=this._clock.getDelta(),this._animateCamera(),this._cameraControl.getCamera().layers.mask=65535,this._renderLoopFunction&&(this._renderLoopFunction(),this._renderLoopFunction=null),this.onBeforeRender(),this._statsHelper&&this._statsHelper.updateRenderInfo(this._renderer.info),this._pixotron?(this._pixotron.autoShadowsClear=this._updateShadowsAndAO,this._pixotron.autoSAOClear=this._updateShadowsAndAO,this._forceRender&&(this._pixotron.needsUpdate=!0),this._pixotron.render(this._renderer,this._scene,this._cameraControl.getCamera(),this._renderTarget),this._forceRender=!1,this._updateShadowsAndAO=!0,this._pixotron.blit()):(this._renderer.clear(),this._renderer.render(this._scene,this._cameraControl.getCamera()),this._renderer.clearDepth()),this._onAfterRender(),window.TWEEN&&TWEEN.update(),this._lastChange+3e3<Date.now()||this._stopRendering?this._running=!1:(this._running=!0,requestAnimationFrame(t))};this._lastChange=Date.now(),this._running||this._stopRendering||(this._running=!0,requestAnimationFrame(t))}_animateCamera(){this._cameraControl&&(this._cameraControl.animateCamera(this._delta)||!this._pixotron||this._forceRender?(this._lightSetting instanceof E&&this._cameraControl.getCamera()instanceof THREE.PerspectiveCamera&&this._lightSetting.update(this._cameraControl.getCamera(),this._cameraControl.getTargetPosition()),this._pixotron&&(this._pixotron.needsUpdate=!0)):(this._pixotron.autoShadowsClear=!1,this._pixotron.autoSAOClear=!1)),this._environment&&this._environment.needsCamera()&&this._cameraControl instanceof w&&this._environment.updateCamera(this._cameraControl.getCamera())}_setupScene(t,e){const{x:i,y:s}=this._domHelper.getClientDimensions();this._scene=new THREE.Scene,(e=e||!1)||(this._scene.background=new THREE.Color(this._initData.colors.DEFAULT_BACKGROUND)),THREE.Math={DEG2RAD:THREE.MathUtils.DEG2RAD};const n={format:THREE.RGBAFormat,minFilter:THREE.NearestFilter,magFilter:THREE.NearestFilter},r=THREE.sRGBEncoding,a=Math.floor(i*window.devicePixelRatio),o=Math.floor(s*window.devicePixelRatio);l()?this._renderTarget=new THREE.WebGLMultisampleRenderTarget(a,o,n):this._renderTarget=new THREE.WebGLRenderTarget(a,o,n),this._renderTarget.texture.encoding=r,this._renderer=new THREE.WebGLRenderer({antialias:!0,alpha:!0}),this._renderer.setPixelRatio(window.devicePixelRatio),this._renderer.setSize(i,s),this._renderer.outputEncoding=THREE.sRGBEncoding,this._renderer.gammaFactor=2.2,this._renderer.autoClear=!1,this._renderer.shadowMap.enabled=!0,this._renderer.shadowMap.type=THREE.PCFSoftShadowMap,this._maxAnisotropy=this._renderer.capabilities.getMaxAnisotropy(),this._renderer.domElement.classList.add(this._canvasID),this._domHelper.element.appendChild(this._renderer.domElement),this._getInputManager().addEvents(this._renderer.domElement),this._environmentLoader.setRendererAndScene(this._renderer,this._scene),this._environmentLoader.registerEnvironmentChangedCallback(()=>this._requestRender()),this._requestRender(),window.addEventListener("resize",this,!1),window.addEventListener("keydown",this,!1),window.addEventListener("keyup",this,!1),this.sceneChanged()}_tabVisible(t){this.updateCamera(),this._renderEverything()}setupScene(t,e){this._setupScene(t,e)}updateCamera(){const{x:t,y:e}=this._domHelper.getClientDimensions();this._renderer.setSize(t,e);const i=this._renderer.getPixelRatio();if(this._renderTarget){const s=Math.floor(t*i),n=Math.floor(e*i);this._renderTarget.setSize(s,n)}if(this._pixotron){this._pixotron.autoShadowsClear=!0,this._pixotron.autoSAOClear=!0,this._forceRender=!0;try{this._pixotron.setSize(t,e)}catch(t){console.warn(t)}}this._cameraControl.updateCamera(),this._requestRender()}_onWindowResize(){const t=this._getInputManager();t&&t.updateSize(),this.updateCamera(),this._requestRender()}_isPartOfScene(t){return"Object3D"===t.type||"Mesh"===t.type||"GLB"===t.type||"GLTF"===t.type||"Group"===t.type}cleanUp(){this._getInputManager().removeEventListener(7,this._renderListener),this._getInputManager().removeEventListener(8,this._renderListener),this._cameraControl&&this._cameraControl.cleanUp()}clearScene(){let t=[];this._scene.children.forEach(e=>{this._isPartOfScene(e)&&t.push(e)}),t.forEach(t=>{_(t),this._scene.remove(t)}),this._renderer.renderLists.dispose()}enableHD(){this._pixotron=new window.PIXOTRON.Pixotron(this.getPixotronParams()),this._pixotronUtil=new y(this._pixotron),this._environment instanceof C&&(this._environment.setPixotron(this._pixotron,this._renderer,this._cameraControl.getCamera(),this.getBakedShadowParams()),this._environment.setLoadedCallback(()=>setTimeout(()=>this._requestRender(),500))),this._requestRender()}_loadGLTF(t,e,i,s,n,r,a){return new Promise((o,h)=>{this._staticItemLoader.loadGLTF(t,e,i,s,n,r,null,a).then(t=>{this._setCamera("GLTF",t),o(t)},h)})}_loadGLB(t,e,i,s,n,r,a,o){return new Promise((h,_)=>{this._staticItemLoader.loadGLB(t,e,i,s,n,r,a,o).then(t=>{this._setCamera("GLB",t),h(t)},_)})}_setCamera(t,e){if(!e)return void console.warn("could not set camera for gltf",e);const i=new THREE.Box3;i.setFromObject(e),"GLB"===t?this._cameraControl instanceof w&&this._cameraControl.updateToBounds(i,!1):"GLTF"===t&&(this._cameraControl instanceof w&&this._cameraControl.updateAndReset(i.getSize(new THREE.Vector3),i.getCenter(new THREE.Vector3),-15,70,5,!1),this._cameraControl instanceof f&&this._cameraControl.updateToBounds(i.getSize(new THREE.Vector3),i.getCenter(new THREE.Vector3))),this.updateCamera()}showGUI(){if(this._initData.disableDebugGUI)return;const t=document.createElement("style");t.innerText=".dg.main{position:absolute;z-index:100;top:0;left:0;}",document.head.appendChild(t),this._scriptLoader.fetch(v,{id:"dat-gui-js"}).then(()=>{let t=d(!1);t&&(this._domHelper.element.appendChild(t.domElement),this._guiLoaded())},t=>console.error(t))}_guiLoaded(){let t=d();t&&(this._lightSetting&&this._lightSetting.showGUI(),this._pixotron&&this._pixotronUtil.showGUI(),this._environment&&this._environment.showGUI(),this._addGUIListener(t))}_addGUIListener(t){let e=t.__folders;Object.keys(e).forEach(t=>{let i=e[t];i.__folders&&Object.keys(i.__folders).forEach(t=>{let i=e[t];this._addGUIListener(i)}),i.__controllers&&i.__controllers.forEach(t=>{t.onFinishChange(()=>{this._guiParamChanged()})})})}_guiParamChanged(){this._requestRender()}showStats(){e.import("./stats-helper-29547ac3.legacy.js").then(t=>this._statsHelper=new t.default)}_onKeyDown(t){}_onKeyUp(t){}pause(){this._getInputManager().removeEvents(this._renderer.domElement),window.removeEventListener("resize",this,!1),window.removeEventListener("keydown",this,!1),window.removeEventListener("keyup",this,!1)}resume(){this.updateCamera(),this._renderer.domElement.classList.add(this._canvasID),this._domHelper.element.appendChild(this._renderer.domElement),this._getInputManager().addEvents(this._renderer.domElement),window.addEventListener("resize",this,!1),window.addEventListener("keydown",this,!1),window.addEventListener("keyup",this,!1),this._renderEverything()}destroy(){this.pause(),this.cleanUp()}handleEvent(t){switch(t.type){case"resize":this._onWindowResize();break;case"keydown":this._onKeyDown(t);break;case"keyup":this._onKeyUp(t)}}loadSceneSettings(t){let e,i;return e=t.environment?new Promise(e=>{(new R).load(this._scene,this._renderer.domElement,this._environment,t).then(t=>{this._setEnvironment(t),e()})}):Promise.resolve(),t.lights?(this._lightSetting=new E(this._scene,this._lightSetting),i=this._lightSetting.loadFromObject(t)):i=Promise.resolve(),new Promise((t,s)=>{Promise.all([e,i]).then(()=>{this._requestRender(),t()},s)})}_setEnvironment(t){this._environment=t,this._pixotron&&this._environment instanceof C&&(this._environment.setPixotron(this._pixotron,this._renderer,this._cameraControl.getCamera(),this.getBakedShadowParams()),this._environment.setLoadedCallback(()=>setTimeout(()=>this._requestRender(),500)))}loadQualitySetting(t){this._pixotron&&(new m).set(this._pixotron,t)}async loadDynamicLightSetting(t){this._lightSetting=new E(this._scene,this._lightSetting);let e=!1;if(t.url)await this._lightSetting.loadFromURL(t.url),e=!0;else if(t.json)await this._lightSetting.loadFromJSON(t.json),e=!0;else if(t.object)await this._lightSetting.loadFromObject(t.object),e=!0;else if(t.ls){const i=c.createDynamicLightSettingSource(null,t.ls);await this._lightSetting.loadFromURL(i.url),e=!0}if(!e)throw new Error("No dynamic light setting source set");this._requestRender()}getScene(){return this._scene}updateScene(){this._updateBounds(this.getBounds()),this._renderEverything()}_updateBounds(t){if(t){if(this.updateEnvironment(t),this._lightSetting&&this._lightSetting.needsBounds()&&this._lightSetting.updateBounds(t),this._pixotronUtil){const e=new THREE.Sphere;t.getBoundingSphere(e),this._pixotronUtil.updateBounds(e)}this._requestRender()}}setCameraOffset(t){const e=this._cameraControl.getCamera();e.offset?(e.offset=t,this._requestRender()):console.warn("Cannot set offset, current camera does not support it")}getCameraOffset(){const t=this._cameraControl.getCamera();return t.offset?JSON.parse(JSON.stringify(t.offset)):{left:0,top:0,right:1,bottom:1}}getPerspectiveOffsetCamera(){const t=this._domHelper.getClientDimensions(),e=t.x,i=t.y;return p().createCamera(30,e/i,.1,20)}updateEnvironment(t,e=!1){if(t&&this._environment&&this._environment.needsBounds()){const i=t.getSize(new THREE.Vector3);i.x+i.y+i.z!==0&&this._environment.updateBounds(t.getSize(new THREE.Vector3),e)}}}return o([h],t.prototype,"_domHelper",void 0),o([h],t.prototype,"_scriptLoader",void 0),o([h],t.prototype,"_lifeCycleManager",void 0),o([h],t.prototype,"_staticItemLoader",void 0),o([h],t.prototype,"_environmentLoader",void 0),o([h],t.prototype,"_initData",void 0),t})())}}}));
|
|
2
|
-
//# sourceMappingURL=scene-manager-
|
|
1
|
+
System.register(["./rapi-access-f9757752.legacy.js","./main-thread-to-worker-880d5b78.legacy.js","./pixotron-aa629432.legacy.js"],(function(t,e){var i,s,n,r,a,o,h,_,d,c,p,m,l,u,g,E,w,y,C,v,R;return{setters:[function(t){i=t.t,s=t.u,n=t.a8,r=t.a9,a=t.v,o=t._,h=t.i,_=t.e,d=t.h,c=t.f,p=t.R,m=t.aa},function(t){l=t.i},function(t){u=t.d,g=t.i,E=t.D,w=t.C,y=t.b,C=t.B,v=t.f,R=t.c}],execute:function(){class f extends u{constructor(t,e,i){super(t,e,i),this._scale=1,this._state=0,this._size=20,this._center=new THREE.Vector3,this._raycaster=new THREE.Raycaster,this._lastPosition=new THREE.Vector2,this._zoomPosition=new THREE.Vector3,this._lastZoom=0,this._zoomSpeed=Math.pow(.95,2),this._cameraZoom=1,this._initCamera(i||new THREE.Vector3(0,10,0));let s=new THREE.PlaneGeometry(1e3,1e3);s.rotateX(-Math.PI/2),this._plane=new THREE.Mesh(s,new THREE.MeshStandardMaterial)}_getCamera(){return this._camera||this._initCamera(new THREE.Vector3(0,10,0)),this._camera}_initCamera(t){let{x:e,y:i}=this._domHelper.getClientDimensions(),s=e/i*this._size,n=this._size;this._camera=new THREE.OrthographicCamera(s/-2,s/2,n/2,n/-2,1,1e3),this._camera.position.copy(t),this._cameraPosition=t,this._camera.lookAt(new THREE.Vector3(0,0,0))}updateCamera(){let{x:t,y:e}=this._domHelper.getClientDimensions(),i=t/e*this._size,s=this._size;this._camera.left=i/-2,this._camera.right=i/2,this._camera.top=s/2,this._camera.bottom=s/-2,this._camera.updateProjectionMatrix()}_initInputListener(){this._inputListeners.push({key:3,fun:t=>{this._locked||(this._state=1,this._lastPosition.set(t.position.x,t.position.y),this.dispatchEvent(0))}}),this._inputListeners.push({key:6,fun:t=>{1!==this._state||this._locked||(this._move(new THREE.Vector2(t.position.x,t.position.y),t.type),this.dispatchEvent(1))}}),this._inputListeners.push({key:4,fun:t=>{1===this._state&&this.dispatchEvent(2),this._state=0}}),this._inputListeners.push({key:7,fun:t=>{t.event&&(t.event.stopPropagation(),t.event.preventDefault()),this._scale/=this._zoomSpeed,this._zoomTo(t.position,1),this._update()}}),this._inputListeners.push({key:8,fun:t=>{t.event&&(t.event.stopPropagation(),t.event.preventDefault()),this._scale*=this._zoomSpeed,this._zoomTo(t.position,-1),this._update()}})}_zoomTo(t,e){if(Date.now()-this._lastZoom>200){if(e>0||this._cameraZoom>=1){const e=this.getInputPosition(t);this._raycaster.setFromCamera(e,this._camera);const i=this._raycaster.intersectObject(this._plane);if(i.length<=0)return;const s=i.pop().point;this._zoomPosition.copy(s)}else this._zoomPosition.copy(this._center);this._cameraPosition.x=this._zoomPosition.x,this._cameraPosition.z=this._zoomPosition.z}this._lastZoom=Date.now()}_move(t,e){let i=new THREE.Vector2;i.subVectors(this._lastPosition,t),i.divideScalar(100),this._cameraPosition.x+=i.x*(2===e?1.1:1),this._cameraPosition.z+=i.y*(2===e?1.1:1),this._lastPosition.copy(t)}updateToBounds(t,e){let{x:i,y:s}=this._domHelper.getClientDimensions(),n=i/s;this._size=Math.max(t.x,t.z);let r=this._size,a=this._size;n>1?r=this._size*n:a=this._size*(s/i),this._center.copy(e),this._camera.left=r/-2,this._camera.right=r/2,this._camera.top=a/2,this._camera.bottom=a/-2,this._camera.zoom=1,this._camera.position.set(this._center.x,10,this._center.z),this._cameraPosition.copy(this._camera.position)}_update(t){this._scale=Math.min(this._scale,5),this._scale=Math.max(this._scale,.8),this._cameraZoom=this._scale,this._camera.updateProjectionMatrix()}animateCamera(t){return!(!super.animateCamera(t)&&Math.abs(this._cameraZoom-this._camera.zoom)<=.01||(this._camera.zoom=THREE.MathUtils.lerp(this._camera.zoom,this._cameraZoom,10*t),0))}}t("C",f);const L=Math.PI/4;class x extends u{constructor(t,e,s,n){super(t,e,s),this._state=0,this._rotationSpeed=1,this._keyMap=new Map,this.minPolarAngle=i(-60),this.maxPolarAngle=i(60),this._camera=n||new THREE.PerspectiveCamera,this._camera.fov=70,this._camera.aspect=this._width/this._height,this._camera.near=.1,this._camera.far=100,this._camera.updateProjectionMatrix(),this._camera.layers.set(3),this._camera.layers.enable(1),this._camera.layers.enable(2),this._camera.layers.enable(5),this._camera.layers.enable(4),s?this._camera.position.set(s.x,1.5,s.z):this._camera.position.set(0,1.5,0),this._cameraPosition=new THREE.Vector3,this._cameraPosition.copy(this._camera.position),this._cameraRotation=new THREE.Quaternion,this._pitch=0,this._yaw=0;let r=new THREE.Euler(-this._pitch,this._yaw,0,"ZYX");this._cameraRotation.setFromEuler(r),window.addEventListener("gamepadconnected",this._gamepadConnected.bind(this)),window.addEventListener("gamepaddisconnected",this._gamepadDisconnected.bind(this))}_gamepadConnected(t){this.startButtonPressListener()}_gamepadDisconnected(t){window.cancelAnimationFrame(this._listenerLoopAnimationFrame)}startButtonPressListener(){this._listenerLoopAnimationFrame=window.requestAnimationFrame(()=>{this.buttonPressListener()})}buttonPressListener(){let t=navigator.getGamepads()[0];this._checkRightStick(t),this._checkLeftStick(t),this._checkButtons(t),this._processKeyMap(this._keyMap,.001),this.startButtonPressListener()}_checkRightStick(t){let e=t.axes[2],i=t.axes[3];Math.abs(e)>.2&&(this._rotateHorizontal(.01*L*e),this._update(),this.dispatchEvent(1)),Math.abs(i)>.2&&(this._rotateVertical(.01*L*i),this._update(),this.dispatchEvent(1))}_checkLeftStick(t){let e=t.axes[0],i=t.axes[1];Math.abs(i)>.2?i<0?this._keyMap.set(87,!0):this._keyMap.set(83,!0):t.buttons&&t.buttons[12]&&t.buttons[12].pressed?this._keyMap.set(87,!0):t.buttons&&t.buttons[13]&&t.buttons[13].pressed?this._keyMap.set(83,!0):(this._keyMap.set(87,!1),this._keyMap.set(83,!1)),Math.abs(e)>.2?e<0?this._keyMap.set(65,!0):this._keyMap.set(68,!0):(this._keyMap.set(65,!1),this._keyMap.set(68,!1))}_checkButtons(t){t.buttons&&t.buttons[6]&&t.buttons[6].pressed?this._keyMap.set(16,!0):this._keyMap.set(16,!1),t.buttons&&t.buttons[14]&&t.buttons[14].pressed?(this._keyMap.set(37,!0),this.dispatchEvent(1)):this._keyMap.set(37,!1),t.buttons&&t.buttons[15]&&t.buttons[15].pressed?(this._keyMap.set(39,!0),this.dispatchEvent(1)):this._keyMap.set(39,!1)}animateCamera(t){let e=this._cameraPosition,i=this._cameraRotation,r=this.getCamera(),a=s(e,r.position),o=n(i,r.quaternion);if(!e||a&&o)return!1;let h=this.getCamera().position.clone(),_=Math.min(10*t,1);h.lerp(e,_),this.getCamera().position.copy(h);let d=this.getCamera().quaternion.clone(),c=Math.min(5*t,1);d.slerp(i,c),this.getCamera().setRotationFromQuaternion(d);let p=!1;return this._keyMap.forEach(t=>{t&&(p=!0)}),p&&this._processKeyMap(this._keyMap,t),!0}_getCamera(){return this._camera}_initInputListener(){window.addEventListener("keyup",this._onKeyChanged.bind(this),!1),window.addEventListener("keydown",this._onKeyChanged.bind(this),!1),this._inputListeners.push({key:3,fun:t=>{this._down(t)}}),this._inputListeners.push({key:6,fun:t=>{this._move(t)}}),this._inputListeners.push({key:4,fun:t=>{this._up(t)}})}_down(t){this._downPosition=t.position,this._position=t.position,this._state=1,2===t.type&&window.setTimeout(this._onLongDown.bind(this),350),2===t.type?this._rotationSpeed=.6:this._rotationSpeed=1}_move(t){this._position=t.position,1!==this._state||this._locked||this._orbit(new THREE.Vector2(t.position.x,t.position.y)),2!==this._state||this._locked||(this._orbit(new THREE.Vector2(t.position.x,t.position.y)),this._moveForward())}_up(t){1===this._state&&this.dispatchEvent(2),2===this._state&&this._keyMap.set(87,!1),this._state=0,this._orbitPosition=null}_onLongDown(){r(this._downPosition,this._position)<g&&1===this._state&&(this._state=2,this._orbit(new THREE.Vector2(this._position.x,this._position.y)),this._moveForward())}_update(t){let e=new THREE.Euler(-this._pitch,this._yaw,0,"ZYX");this._cameraRotation.setFromEuler(e)}updateCamera(){let{x:t,y:e}=this._domHelper.getClientDimensions();this._camera.aspect=t/e,this._camera.updateProjectionMatrix()}_onKeyChanged(t){this._keyMap.set(t.keyCode,"keydown"===t.type),this.dispatchEvent(6),this._processKeyMap(this._keyMap,.001)&&t.preventDefault()}_processKeyMap(t,e){e=Math.min(e,.1);let i=new THREE.Vector3(0,0,0),s=!1;return this._processUpDown(t,i,e),t.get(65)&&(i.x=-1*e),t.get(68)&&(i.x=1*e),t.get(37)&&(this._rotateHorizontal(-L*this._rotationSpeed*e),s=!0),t.get(39)&&(this._rotateHorizontal(L*this._rotationSpeed*e),s=!0),t.get(16)&&(i.x*=3,i.z*=3),!(0===i.x&&0===i.y&&0===i.z&&!s||(i.applyQuaternion(this.getCamera().quaternion),this._cameraPosition.add(new THREE.Vector3(i.x,0,i.z)),this._update(),0))}_processUpDown(t,e,i){(t.get(87)||t.get(38))&&(e.z=-1*i),(t.get(83)||t.get(40))&&(e.z=1*i)}_orbit(t){this._orbitPosition||(this._orbitPosition=new THREE.Vector2(t.x,t.y),this.dispatchEvent(0));let e=t.clone().sub(this._orbitPosition),i=this._domHelper.element instanceof Document?this._domHelper.element.body:this._domHelper.element;e.multiplyScalar(-1),this._rotateHorizontal(2*Math.PI*e.x/i.clientWidth*1),this._rotateVertical(2*Math.PI*e.y/i.clientHeight*1),a(this._orbitPosition,t)||this.dispatchEvent(1),this._orbitPosition.copy(t),this._update()}_moveForward(){this._keyMap.set(87,!0),this._processKeyMap(this._keyMap,.001)}_rotateVertical(t){let e=this._pitch+t;e>this.maxPolarAngle||e<this.minPolarAngle||(this._pitch=e,this._pitch<-Math.PI?this._pitch+=2*Math.PI:this._pitch>Math.PI&&(this._pitch-=2*Math.PI),this._saveYawAndPitch())}}t("a",x),t("S",(()=>{class t{constructor(t,e,i,s,n){this._maxAnisotropy=1,this._clock=new THREE.Clock,this._delta=0,this._renderListener=null,this._stopRendering=!1,this._forceRender=!1,this._updateShadowsAndAO=!0,this._lastChange=Date.now(),this._running=!1,this._onAfterRender=()=>{},this._creator_=t,this._canvasID=i,this.createCameraControl(s),this._addCameraControlListener(),this._setupScene(e,n),document.addEventListener("visibilitychange",this._tabVisible.bind(this)),this._renderListener=()=>{this._requestRender()},this._getInputManager().addEventListener(7,this._renderListener,this),this._getInputManager().addEventListener(8,this._renderListener,this),this._lifeCycleManager.addEventListener(this)}onBeforeRender(){}_changeCameraControl(t){this._cameraControl&&this._cameraControl.cleanUp(),t instanceof x&&(this._getInputManager().removeEventListener(7,this._renderListener),this._getInputManager().removeEventListener(8,this._renderListener)),this._cameraControl instanceof x&&(this._getInputManager().addEventListener(7,this._renderListener,this),this._getInputManager().addEventListener(8,this._renderListener,this)),this._cameraControl=t,this.cameraControlChanged()}cameraControlChanged(){}_addCameraControlListener(){this._cameraControl.addEventListener(0,this._requestRender,this),this._cameraControl.addEventListener(1,this._requestRender,this),this._cameraControl.addEventListener(2,this._requestRender,this),this._cameraControl.addEventListener(6,this._requestRender,this)}_renderEverything(){this._pixotron&&(this._forceRender=!0,this._updateShadowsAndAO=!0),this._requestRender()}_renderWithoutShadowsAndAO(){this._pixotron&&(this._forceRender=!0,this._updateShadowsAndAO=!1),this._requestRender()}_requestRender(){if(!this._renderer)return;const t=()=>{this._delta=this._clock.getDelta(),this._animateCamera(),this._cameraControl.getCamera().layers.mask=65535,this._renderLoopFunction&&(this._renderLoopFunction(),this._renderLoopFunction=null),this.onBeforeRender(),this._statsHelper&&this._statsHelper.updateRenderInfo(this._renderer.info),this._pixotron?(this._pixotron.autoShadowsClear=this._updateShadowsAndAO,this._pixotron.autoSAOClear=this._updateShadowsAndAO,this._forceRender&&(this._pixotron.needsUpdate=!0),this._pixotron.render(this._renderer,this._scene,this._cameraControl.getCamera(),this._renderTarget),this._forceRender=!1,this._updateShadowsAndAO=!0,this._pixotron.blit()):(this._renderer.clear(),this._renderer.render(this._scene,this._cameraControl.getCamera()),this._renderer.clearDepth()),this._onAfterRender(),window.TWEEN&&TWEEN.update(),this._lastChange+3e3<Date.now()||this._stopRendering?this._running=!1:(this._running=!0,requestAnimationFrame(t))};this._lastChange=Date.now(),this._running||this._stopRendering||(this._running=!0,requestAnimationFrame(t))}_animateCamera(){this._cameraControl&&(this._cameraControl.animateCamera(this._delta)||!this._pixotron||this._forceRender?(this._lightSetting instanceof E&&this._cameraControl.getCamera()instanceof THREE.PerspectiveCamera&&this._lightSetting.update(this._cameraControl.getCamera(),this._cameraControl.getTargetPosition()),this._pixotron&&(this._pixotron.needsUpdate=!0)):(this._pixotron.autoShadowsClear=!1,this._pixotron.autoSAOClear=!1)),this._environment&&this._environment.needsCamera()&&this._cameraControl instanceof w&&this._environment.updateCamera(this._cameraControl.getCamera())}_setupScene(t,e){const{x:i,y:s}=this._domHelper.getClientDimensions();this._scene=new THREE.Scene,(e=e||!1)||(this._scene.background=new THREE.Color(this._initData.colors.DEFAULT_BACKGROUND)),THREE.Math={DEG2RAD:THREE.MathUtils.DEG2RAD};const n={format:THREE.RGBAFormat,minFilter:THREE.NearestFilter,magFilter:THREE.NearestFilter},r=THREE.sRGBEncoding,a=Math.floor(i*window.devicePixelRatio),o=Math.floor(s*window.devicePixelRatio);l()?this._renderTarget=new THREE.WebGLMultisampleRenderTarget(a,o,n):this._renderTarget=new THREE.WebGLRenderTarget(a,o,n),this._renderTarget.texture.encoding=r,this._renderer=new THREE.WebGLRenderer({antialias:!0,alpha:!0}),this._renderer.setPixelRatio(window.devicePixelRatio),this._renderer.setSize(i,s),this._renderer.outputEncoding=THREE.sRGBEncoding,this._renderer.gammaFactor=2.2,this._renderer.autoClear=!1,this._renderer.shadowMap.enabled=!0,this._renderer.shadowMap.type=THREE.PCFSoftShadowMap,this._maxAnisotropy=this._renderer.capabilities.getMaxAnisotropy(),this._renderer.domElement.classList.add(this._canvasID),this._domHelper.element.appendChild(this._renderer.domElement),this._getInputManager().addEvents(this._renderer.domElement),this._environmentLoader.setRendererAndScene(this._renderer,this._scene),this._environmentLoader.registerEnvironmentChangedCallback(()=>this._requestRender()),this._requestRender(),window.addEventListener("resize",this,!1),window.addEventListener("keydown",this,!1),window.addEventListener("keyup",this,!1),this.sceneChanged()}_tabVisible(t){this.updateCamera(),this._renderEverything()}setupScene(t,e){this._setupScene(t,e)}updateCamera(){const{x:t,y:e}=this._domHelper.getClientDimensions();this._renderer.setSize(t,e);const i=this._renderer.getPixelRatio();if(this._renderTarget){const s=Math.floor(t*i),n=Math.floor(e*i);this._renderTarget.setSize(s,n)}if(this._pixotron){this._pixotron.autoShadowsClear=!0,this._pixotron.autoSAOClear=!0,this._forceRender=!0;try{this._pixotron.setSize(t,e)}catch(t){console.warn(t)}}this._cameraControl.updateCamera(),this._requestRender()}_onWindowResize(){const t=this._getInputManager();t&&t.updateSize(),this.updateCamera(),this._requestRender()}_isPartOfScene(t){return"Object3D"===t.type||"Mesh"===t.type||"GLB"===t.type||"GLTF"===t.type||"Group"===t.type}cleanUp(){this._getInputManager().removeEventListener(7,this._renderListener),this._getInputManager().removeEventListener(8,this._renderListener),this._cameraControl&&this._cameraControl.cleanUp()}clearScene(){let t=[];this._scene.children.forEach(e=>{this._isPartOfScene(e)&&t.push(e)}),t.forEach(t=>{_(t),this._scene.remove(t)}),this._renderer.renderLists.dispose()}enableHD(){this._pixotron=new window.PIXOTRON.Pixotron(this.getPixotronParams()),this._pixotronUtil=new y(this._pixotron),this._environment instanceof C&&(this._environment.setPixotron(this._pixotron,this._renderer,this._cameraControl.getCamera(),this.getBakedShadowParams()),this._environment.setLoadedCallback(()=>setTimeout(()=>this._requestRender(),500))),this._requestRender()}_loadGLTF(t,e,i,s,n,r,a){return new Promise((o,h)=>{this._staticItemLoader.loadGLTF(t,e,i,s,n,r,null,a).then(t=>{this._setCamera("GLTF",t),o(t)},h)})}_loadGLB(t,e,i,s,n,r,a,o){return new Promise((h,_)=>{this._staticItemLoader.loadGLB(t,e,i,s,n,r,a,o).then(t=>{this._setCamera("GLB",t),h(t)},_)})}_setCamera(t,e){if(!e)return void console.warn("could not set camera for gltf",e);const i=new THREE.Box3;i.setFromObject(e),"GLB"===t?this._cameraControl instanceof w&&this._cameraControl.updateToBounds(i,!1):"GLTF"===t&&(this._cameraControl instanceof w&&this._cameraControl.updateAndReset(i.getSize(new THREE.Vector3),i.getCenter(new THREE.Vector3),-15,70,5,!1),this._cameraControl instanceof f&&this._cameraControl.updateToBounds(i.getSize(new THREE.Vector3),i.getCenter(new THREE.Vector3))),this.updateCamera()}showGUI(){if(this._initData.disableDebugGUI)return;const t=document.createElement("style");t.innerText=".dg.main{position:absolute;z-index:100;top:0;left:0;}",document.head.appendChild(t),this._scriptLoader.fetch(v,{id:"dat-gui-js"}).then(()=>{let t=d(!1);t&&(this._domHelper.element.appendChild(t.domElement),this._guiLoaded())},t=>console.error(t))}_guiLoaded(){let t=d();t&&(this._lightSetting&&this._lightSetting.showGUI(),this._pixotron&&this._pixotronUtil.showGUI(),this._environment&&this._environment.showGUI(),this._addGUIListener(t))}_addGUIListener(t){let e=t.__folders;Object.keys(e).forEach(t=>{let i=e[t];i.__folders&&Object.keys(i.__folders).forEach(t=>{let i=e[t];this._addGUIListener(i)}),i.__controllers&&i.__controllers.forEach(t=>{t.onFinishChange(()=>{this._guiParamChanged()})})})}_guiParamChanged(){this._requestRender()}showStats(){e.import("./stats-helper-2cf7f29f.legacy.js").then(t=>this._statsHelper=new t.default)}_onKeyDown(t){}_onKeyUp(t){}pause(){this._getInputManager().removeEvents(this._renderer.domElement),window.removeEventListener("resize",this,!1),window.removeEventListener("keydown",this,!1),window.removeEventListener("keyup",this,!1)}resume(){this.updateCamera(),this._renderer.domElement.classList.add(this._canvasID),this._domHelper.element.appendChild(this._renderer.domElement),this._getInputManager().addEvents(this._renderer.domElement),window.addEventListener("resize",this,!1),window.addEventListener("keydown",this,!1),window.addEventListener("keyup",this,!1),this._renderEverything()}destroy(){this.pause(),this.cleanUp()}handleEvent(t){switch(t.type){case"resize":this._onWindowResize();break;case"keydown":this._onKeyDown(t);break;case"keyup":this._onKeyUp(t)}}loadSceneSettings(t){let e,i;return e=t.environment?new Promise(e=>{(new R).load(this._scene,this._renderer.domElement,this._environment,t).then(t=>{this._setEnvironment(t),e()})}):Promise.resolve(),t.lights?(this._lightSetting=new E(this._scene,this._lightSetting),i=this._lightSetting.loadFromObject(t)):i=Promise.resolve(),new Promise((t,s)=>{Promise.all([e,i]).then(()=>{this._requestRender(),t()},s)})}_setEnvironment(t){this._environment=t,this._pixotron&&this._environment instanceof C&&(this._environment.setPixotron(this._pixotron,this._renderer,this._cameraControl.getCamera(),this.getBakedShadowParams()),this._environment.setLoadedCallback(()=>setTimeout(()=>this._requestRender(),500)))}loadQualitySetting(t){this._pixotron&&(new m).set(this._pixotron,t)}async loadDynamicLightSetting(t){this._lightSetting=new E(this._scene,this._lightSetting);let e=!1;if(t.url)await this._lightSetting.loadFromURL(t.url),e=!0;else if(t.json)await this._lightSetting.loadFromJSON(t.json),e=!0;else if(t.object)await this._lightSetting.loadFromObject(t.object),e=!0;else if(t.ls){const i=c.createDynamicLightSettingSource(null,t.ls);await this._lightSetting.loadFromURL(i.url),e=!0}if(!e)throw new Error("No dynamic light setting source set");this._requestRender()}getScene(){return this._scene}updateScene(){this._updateBounds(this.getBounds()),this._renderEverything()}_updateBounds(t){if(t){if(this.updateEnvironment(t),this._lightSetting&&this._lightSetting.needsBounds()&&this._lightSetting.updateBounds(t),this._pixotronUtil){const e=new THREE.Sphere;t.getBoundingSphere(e),this._pixotronUtil.updateBounds(e)}this._requestRender()}}setCameraOffset(t){const e=this._cameraControl.getCamera();e.offset?(e.offset=t,this._requestRender()):console.warn("Cannot set offset, current camera does not support it")}getCameraOffset(){const t=this._cameraControl.getCamera();return t.offset?JSON.parse(JSON.stringify(t.offset)):{left:0,top:0,right:1,bottom:1}}getPerspectiveOffsetCamera(){const t=this._domHelper.getClientDimensions(),e=t.x,i=t.y;return p().createCamera(30,e/i,.1,20)}updateEnvironment(t,e=!1){if(t&&this._environment&&this._environment.needsBounds()){const i=t.getSize(new THREE.Vector3);i.x+i.y+i.z!==0&&this._environment.updateBounds(t.getSize(new THREE.Vector3),e)}}}return o([h],t.prototype,"_domHelper",void 0),o([h],t.prototype,"_scriptLoader",void 0),o([h],t.prototype,"_lifeCycleManager",void 0),o([h],t.prototype,"_staticItemLoader",void 0),o([h],t.prototype,"_environmentLoader",void 0),o([h],t.prototype,"_initData",void 0),t})())}}}));
|
|
2
|
+
//# sourceMappingURL=scene-manager-b424d6dc.legacy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scene-manager-b424d6dc.legacy.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -13,7 +13,7 @@ function la(a,b,c,d){if(0<d){d=c+d-1;for(var f=0;f<a.length;++f){var g=a.charCod
|
|
|
13
13
|
function ma(a){for(var b=0,c=0;c<a.length;++c){var d=a.charCodeAt(c);55296<=d&&57343>=d&&(d=65536+((d&1023)<<10)|a.charCodeAt(++c)&1023);127>=d?++b:b=2047>=d?b+2:65535>=d?b+3:b+4}return b}var na="undefined"!==typeof TextDecoder?new TextDecoder("utf-16le"):void 0;function oa(a){var b;for(b=a>>1;C[b];)++b;b<<=1;if(32<b-a&&na)return na.decode(A.subarray(a,b));b=0;for(var c="";;){var d=C[a+2*b>>1];if(0==d)return c;++b;c+=String.fromCharCode(d)}}
|
|
14
14
|
function pa(a,b,c){void 0===c&&(c=2147483647);if(2>c)return 0;c-=2;var d=b;c=c<2*a.length?c/2:a.length;for(var f=0;f<c;++f)C[b>>1]=a.charCodeAt(f),b+=2;C[b>>1]=0;return b-d}function qa(a){return 2*a.length}function ra(a){for(var b=0,c="";;){var d=D[a+4*b>>2];if(0==d)return c;++b;65536<=d?(d-=65536,c+=String.fromCharCode(55296|d>>10,56320|d&1023)):c+=String.fromCharCode(d)}}
|
|
15
15
|
function sa(a,b,c){void 0===c&&(c=2147483647);if(4>c)return 0;var d=b;c=d+c-4;for(var f=0;f<a.length;++f){var g=a.charCodeAt(f);if(55296<=g&&57343>=g){var k=a.charCodeAt(++f);g=65536+((g&1023)<<10)|k&1023}D[b>>2]=g;b+=4;if(b+4>c)break}D[b>>2]=0;return b-d}function ta(a){for(var b=0,c=0;c<a.length;++c){var d=a.charCodeAt(c);55296<=d&&57343>=d&&++c;b+=4}return b}var ua,E,A,C,va,D,F,wa,xa;
|
|
16
|
-
function ya(a){ua=a;e.HEAP8=E=new Int8Array(a);e.HEAP16=C=new Int16Array(a);e.HEAP32=D=new Int32Array(a);e.HEAPU8=A=new Uint8Array(a);e.HEAPU16=va=new Uint16Array(a);e.HEAPU32=F=new Uint32Array(a);e.HEAPF32=wa=new Float32Array(a);e.HEAPF64=xa=new Float64Array(a)}var za=e.INITIAL_MEMORY||167772160;e.wasmMemory?z=e.wasmMemory:z=new WebAssembly.Memory({initial:za/65536});z&&(ua=z.buffer);za=ua.byteLength;ya(ua);D[
|
|
16
|
+
function ya(a){ua=a;e.HEAP8=E=new Int8Array(a);e.HEAP16=C=new Int16Array(a);e.HEAP32=D=new Int32Array(a);e.HEAPU8=A=new Uint8Array(a);e.HEAPU16=va=new Uint16Array(a);e.HEAPU32=F=new Uint32Array(a);e.HEAPF32=wa=new Float32Array(a);e.HEAPF64=xa=new Float64Array(a)}var za=e.INITIAL_MEMORY||167772160;e.wasmMemory?z=e.wasmMemory:z=new WebAssembly.Memory({initial:za/65536});z&&(ua=z.buffer);za=ua.byteLength;ya(ua);D[38004]=5395072;
|
|
17
17
|
function Aa(a){for(;0<a.length;){var b=a.shift();if("function"==typeof b)b();else{var c=b.Kd;"number"===typeof c?void 0===b.yd?e.dynCall_v(c):e.dynCall_vi(c,b.yd):c(void 0===b.yd?null:b.yd)}}}var Ba=[],Ca=[],Da=[],Ea=[],Fa=[];function Ga(){var a=e.preRun.shift();Ba.unshift(a)}var Ha=Math.ceil,Ia=Math.floor,G=0,Ja=null,Ka=null;e.preloadedImages={};e.preloadedAudios={};
|
|
18
18
|
function La(a){if(e.onAbort)e.onAbort(a);da(a);t(a);ha=!0;throw new WebAssembly.RuntimeError("abort("+a+"). Build with -s ASSERTIONS=1 for more info.");}function Ma(){var a=Na;return String.prototype.startsWith?a.startsWith("data:application/octet-stream;base64,"):0===a.indexOf("data:application/octet-stream;base64,")}var Na="ConfiguratorKernel.wasm";if(!Ma()){var Oa=Na;Na=e.locateFile?e.locateFile(Oa,r):r+Oa}
|
|
19
19
|
function Pa(){try{if(ea)return new Uint8Array(ea);throw"both async and sync fetching of the wasm failed";}catch(a){La(a)}}function Qa(){return ea||"function"!==typeof fetch?new Promise(function(a){a(Pa())}):fetch(Na,{credentials:"same-origin"}).then(function(a){if(!a.ok)throw"failed to load wasm binary file at '"+Na+"'";return a.arrayBuffer()}).catch(function(){return Pa()})}Ca.push({Kd:function(){Ra()}});var H={},J=[];
|
|
@@ -58,9 +58,9 @@ R.prototype.deleteLater=function(){this.bd.dd||nb(this);this.bd.pd&&!this.bd.ud&
|
|
|
58
58
|
T.prototype.fromWireType=function(a){function b(){return this.Bd?Hb(this.cd.qd,{ed:this.Wd,dd:c,kd:this,hd:a}):Hb(this.cd.qd,{ed:this,dd:a})}var c=this.Qd(a);if(!c)return this.td(a),null;var d=Gb(this.cd,c);if(void 0!==d){if(0===d.bd.count.value)return d.bd.dd=c,d.bd.hd=a,d.clone();d=d.clone();this.td(a);return d}d=this.cd.Pd(c);d=vb[d];if(!d)return b.call(this);d=this.Ad?d.Md:d.pointerType;var f=Eb(c,this.cd,d.cd);return null===f?b.call(this):this.Bd?Hb(d.cd.qd,{ed:d,dd:f,kd:this,hd:a}):Hb(d.cd.qd,
|
|
59
59
|
{ed:d,dd:f})};e.getInheritedInstanceCount=function(){return Object.keys(Fb).length};e.getLiveInheritedInstances=function(){var a=[],b;for(b in Fb)Fb.hasOwnProperty(b)&&a.push(Fb[b]);return a};e.flushPendingDeletes=ub;e.setDelayFunction=function(a){sb=a;tb.length&&sb&&sb(ub)};Jb=e.UnboundTypeError=gb("UnboundTypeError");e.count_emval_handles=function(){for(var a=0,b=5;b<V.length;++b)void 0!==V[b]&&++a;return a};e.get_first_emval=function(){for(var a=5;a<V.length;++a)if(void 0!==V[a])return V[a];return null};
|
|
60
60
|
function nc(a){var b=Array(ma(a)+1);la(a,b,0,b.length);return b}
|
|
61
|
-
var zd={n:function(a){return qc(a)},p:function(a){var b=H[a];b&&!b.Id&&(b.Id=!0,rc.Hd--);b&&(b.vd=!1);J.push(a);(b=Sa(a))&&H[b].nd++;return a},Ua:function(){var a=J[J.length-1]||0;if(a){var b=Sa(a);b&&H[b].nd++}return a},xa:function(a){Ua(Sa(a))},t:function(){X(0);var a=J.pop();a&&(Ua(Sa(a)),L=0)},b:function(){var a=L;if(!a)return x=0;var b=H[a],c=b.type;if(!c)return x=0,a|0;var d=Array.prototype.slice.call(arguments);sc(c);D[
|
|
62
|
-
D[a>>2],b.sd.push(a),x=d[f],a|0;a=D[a>>2];x=c;return a|0},h:function(){var a=L;if(!a)return x=0;var b=H[a],c=b.type;if(!c)return x=0,a|0;var d=Array.prototype.slice.call(arguments);sc(c);D[
|
|
63
|
-
tc(d[f],c,a))return a=D[a>>2],b.sd.push(a),x=d[f],a|0;a=D[a>>2];x=c;return a|0},Ba:function(){var a=L;if(!a)return x=0;var b=H[a],c=b.type;if(!c)return x=0,a|0;var d=Array.prototype.slice.call(arguments);sc(c);D[
|
|
61
|
+
var zd={n:function(a){return qc(a)},p:function(a){var b=H[a];b&&!b.Id&&(b.Id=!0,rc.Hd--);b&&(b.vd=!1);J.push(a);(b=Sa(a))&&H[b].nd++;return a},Ua:function(){var a=J[J.length-1]||0;if(a){var b=Sa(a);b&&H[b].nd++}return a},xa:function(a){Ua(Sa(a))},t:function(){X(0);var a=J.pop();a&&(Ua(Sa(a)),L=0)},b:function(){var a=L;if(!a)return x=0;var b=H[a],c=b.type;if(!c)return x=0,a|0;var d=Array.prototype.slice.call(arguments);sc(c);D[38044]=a;a=152176;for(var f=0;f<d.length;f++)if(d[f]&&tc(d[f],c,a))return a=
|
|
62
|
+
D[a>>2],b.sd.push(a),x=d[f],a|0;a=D[a>>2];x=c;return a|0},h:function(){var a=L;if(!a)return x=0;var b=H[a],c=b.type;if(!c)return x=0,a|0;var d=Array.prototype.slice.call(arguments);sc(c);D[38044]=a;a=152176;for(var f=0;f<d.length;f++)if(d[f]&&tc(d[f],c,a))return a=D[a>>2],b.sd.push(a),x=d[f],a|0;a=D[a>>2];x=c;return a|0},G:function(){var a=L;if(!a)return x=0;var b=H[a],c=b.type;if(!c)return x=0,a|0;var d=Array.prototype.slice.call(arguments);sc(c);D[38044]=a;a=152176;for(var f=0;f<d.length;f++)if(d[f]&&
|
|
63
|
+
tc(d[f],c,a))return a=D[a>>2],b.sd.push(a),x=d[f],a|0;a=D[a>>2];x=c;return a|0},Ba:function(){var a=L;if(!a)return x=0;var b=H[a],c=b.type;if(!c)return x=0,a|0;var d=Array.prototype.slice.call(arguments);sc(c);D[38044]=a;a=152176;for(var f=0;f<d.length;f++)if(d[f]&&tc(d[f],c,a))return a=D[a>>2],b.sd.push(a),x=d[f],a|0;a=D[a>>2];x=c;return a|0},q:Ta,wa:function(a){(a=Sa(a))&&H[a].nd++},sa:Va,Ta:function(a){a&&(a=Sa(a),J.push(a),H[a].vd=!0,Va())},ya:function(a,b){Ea.unshift({Kd:a,yd:b})},B:function(a,
|
|
64
64
|
b,c){H[a]={dd:a,sd:[a],type:b,td:c,nd:0,Id:!1,vd:!1};L=a;"uncaught_exception"in rc?rc.Hd++:rc.Hd=1;throw a;},Va:function(){return rc.Hd},Qa:function(){e.___errno_location&&(D[e.___errno_location()>>2]=63);return-1},d:function(a){L||(L=a);throw a;},Pa:function(a,b){if(-1===a||0===b)a=-28;else{var c=Wa[a];c&&b===c.je&&(Wa[a]=null,c.ge&&K(c.ke));a=0}return a},_a:function(a){var b=Za[a];delete Za[a];var c=b.Gd,d=b.md,f=b.Jd,g=f.map(function(k){return k.Td}).concat(f.map(function(k){return k.$d}));M([a],
|
|
65
65
|
g,function(k){var h={};f.forEach(function(n,m){var p=k[m],v=n.Rd,w=n.Sd,l=k[m+f.length],u=n.Zd,y=n.ae;h[n.Od]={read:function(B){return p.fromWireType(v(w,B))},write:function(B,I){var Q=[];u(y,B,l.toWireType(Q,I));$a(Q)}}});return[{name:b.name,fromWireType:function(n){var m={},p;for(p in h)m[p]=h[p].read(n);d(n);return m},toWireType:function(n,m){for(var p in h)if(!(p in m))throw new TypeError("Missing field");var v=c();for(p in h)h[p].write(v,m[p]);null!==n&&n.push(d,v);return v},argPackAdvance:8,
|
|
66
66
|
readValueFromPointer:ab,jd:d}]})},Ma:function(a,b,c,d,f){var g=jb(c);b=O(b);N(a,{name:b,fromWireType:function(k){return!!k},toWireType:function(k,h){return h?d:f},argPackAdvance:8,readValueFromPointer:function(k){if(1===c)var h=E;else if(2===c)h=C;else if(4===c)h=D;else throw new TypeError("Unknown boolean type size: "+b);return this.fromWireType(h[k>>g])},jd:null})},D:function(a,b,c,d,f,g,k,h,n,m,p,v,w){p=O(p);g=U(f,g);h&&(h=U(k,h));m&&(m=U(n,m));w=U(v,w);var l=eb(p);xb(l,function(){Mb("Cannot construct "+
|
|
Binary file
|