@roomle/web-sdk 2.31.0-alpha.1 → 2.31.0-alpha.2
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-95bb0a36.nomodule.js +2 -0
- package/lib/{banana-for-scale-8bd9d916.nomodule.js.map → banana-for-scale-95bb0a36.nomodule.js.map} +1 -1
- package/lib/banana-for-scale-c62bb269.js +2 -0
- package/lib/{banana-for-scale-4405de18.js.map → banana-for-scale-c62bb269.js.map} +1 -1
- package/lib/{component-dimensioning-c4aed0a4.nomodule.js → component-dimensioning-032b19a5.nomodule.js} +2 -2
- package/lib/component-dimensioning-032b19a5.nomodule.js.map +1 -0
- package/lib/{component-dimensioning-27d53ffd.js → component-dimensioning-231c9af2.js} +2 -2
- package/lib/component-dimensioning-231c9af2.js.map +1 -0
- package/lib/configurator-08e58911.nomodule.js +2 -0
- package/lib/configurator-08e58911.nomodule.js.map +1 -0
- package/lib/configurator-3570c605.js +2 -0
- package/lib/configurator-3570c605.js.map +1 -0
- package/lib/configurator-main-d4562587.js +2 -0
- package/lib/configurator-main-d4562587.js.map +1 -0
- package/lib/configurator-main.nomodule.js +1 -1
- package/lib/{configurator-mesh-generator-48dd85a4.nomodule.js → configurator-mesh-generator-a69ff1e4.nomodule.js} +2 -2
- package/lib/configurator-mesh-generator-a69ff1e4.nomodule.js.map +1 -0
- package/lib/{configurator-mesh-generator-a75b5156.js → configurator-mesh-generator-ed7f42a4.js} +2 -2
- package/lib/configurator-mesh-generator-ed7f42a4.js.map +1 -0
- package/lib/{default-light-setting-4a25d176.nomodule.js → default-light-setting-86b8760c.nomodule.js} +2 -2
- package/lib/default-light-setting-86b8760c.nomodule.js.map +1 -0
- package/lib/{default-light-setting-d2e449e7.js → default-light-setting-88521da5.js} +2 -2
- package/lib/default-light-setting-88521da5.js.map +1 -0
- package/lib/definitions/common-core/src/utils/init-data.d.ts +0 -2
- package/lib/definitions/common-core/src/utils/shims.d.ts +0 -11
- package/lib/definitions/common-core/src/utils/threejs-utils.d.ts +1 -0
- package/lib/definitions/common-core/src/webgl/layer.d.ts +1 -2
- package/lib/definitions/common-core/src/webgl/roomle-component-factory.d.ts +1 -1
- package/lib/definitions/common-core/src/webgl/scene-manager.d.ts +19 -8
- package/lib/definitions/configurator-core/src/roomle-configurator.d.ts +8 -8
- package/lib/definitions/configurator-core/src/static-files/geometries.d.ts +0 -3
- package/lib/definitions/configurator-core/src/webgl/configurator-scene-event-handler.d.ts +1 -3
- package/lib/definitions/configurator-core/src/webgl/{scene-helper.d.ts → configurator-scene-manager.d.ts} +18 -77
- package/lib/definitions/glb-viewer-core/src/webgl/glb-viewer-scene-manager.d.ts +1 -1
- package/lib/definitions/material-viewer/src/webgl/material-viewer-scene-manager.d.ts +1 -1
- package/lib/definitions/planner-core/src/roomle-planner.d.ts +2 -1
- package/lib/definitions/planner-core/src/webgl/planner-scene-manager.d.ts +1 -1
- package/lib/dimensioning-helper-55aa9709.js +2 -0
- package/lib/dimensioning-helper-55aa9709.js.map +1 -0
- package/lib/dimensioning-helper-c69b5012.nomodule.js +2 -0
- package/lib/dimensioning-helper-c69b5012.nomodule.js.map +1 -0
- package/lib/glb-viewer-1482553f.nomodule.js +2 -0
- package/lib/{glb-viewer-aafdb02c.nomodule.js.map → glb-viewer-1482553f.nomodule.js.map} +1 -1
- package/lib/glb-viewer-75d1de15.js +2 -0
- package/lib/{glb-viewer-dc577f61.js.map → glb-viewer-75d1de15.js.map} +1 -1
- package/lib/glb-viewer-main-ee2c73a8.js +2 -0
- package/lib/glb-viewer-main-ee2c73a8.js.map +1 -0
- package/lib/glb-viewer-main.nomodule.js +1 -1
- package/lib/image-renderer-52bbd908.nomodule.js +2 -0
- package/lib/{image-renderer-70acb74b.nomodule.js.map → image-renderer-52bbd908.nomodule.js.map} +1 -1
- package/lib/image-renderer-757a6907.js +2 -0
- package/lib/{image-renderer-8df2f31f.js.map → image-renderer-757a6907.js.map} +1 -1
- package/lib/legacy/banana-for-scale-0854a7dc.legacy.js +2 -0
- package/lib/legacy/{banana-for-scale-65d969a1.legacy.js.map → banana-for-scale-0854a7dc.legacy.js.map} +1 -1
- package/lib/legacy/{component-dimensioning-f2993909.legacy.js → component-dimensioning-aaa05dd4.legacy.js} +2 -2
- package/lib/legacy/component-dimensioning-aaa05dd4.legacy.js.map +1 -0
- package/lib/legacy/configurator-21c32b82.legacy.js +2 -0
- package/lib/legacy/configurator-21c32b82.legacy.js.map +1 -0
- package/lib/legacy/configurator-main.legacy.js +1 -1
- package/lib/legacy/{configurator-mesh-generator-58490992.legacy.js → configurator-mesh-generator-62f318f2.legacy.js} +2 -2
- package/lib/legacy/configurator-mesh-generator-62f318f2.legacy.js.map +1 -0
- package/lib/legacy/{default-light-setting-b6840697.legacy.js → default-light-setting-d6e9de1f.legacy.js} +2 -2
- package/lib/legacy/default-light-setting-d6e9de1f.legacy.js.map +1 -0
- package/lib/legacy/dimensioning-helper-3878022f.legacy.js +2 -0
- package/lib/legacy/dimensioning-helper-3878022f.legacy.js.map +1 -0
- package/lib/legacy/glb-viewer-056c11ee.legacy.js +2 -0
- package/lib/legacy/{glb-viewer-46717172.legacy.js.map → glb-viewer-056c11ee.legacy.js.map} +1 -1
- package/lib/legacy/glb-viewer-main.legacy.js +1 -1
- package/lib/legacy/image-renderer-9a6a67fc.legacy.js +2 -0
- package/lib/legacy/{image-renderer-c1f09dc0.legacy.js.map → image-renderer-9a6a67fc.legacy.js.map} +1 -1
- package/lib/legacy/material-viewer-7a17728a.legacy.js +2 -0
- package/lib/legacy/material-viewer-7a17728a.legacy.js.map +1 -0
- package/lib/legacy/material-viewer-main.legacy.js +1 -1
- package/lib/legacy/{mesh-generator-4a93e27d.legacy.js → mesh-generator-f2c8bb17.legacy.js} +2 -2
- package/lib/legacy/mesh-generator-f2c8bb17.legacy.js.map +1 -0
- package/lib/legacy/pixotron-b2477d2d.legacy.js +2 -0
- package/lib/legacy/pixotron-b2477d2d.legacy.js.map +1 -0
- package/lib/legacy/planner-7afba417.legacy.js +2 -0
- package/lib/legacy/{planner-42d951cf.legacy.js.map → planner-7afba417.legacy.js.map} +1 -1
- package/lib/legacy/planner-main.legacy.js +1 -1
- package/lib/legacy/rapi-access-990628ad.legacy.js +16 -0
- package/lib/legacy/{rapi-access-daec98c8.legacy.js.map → rapi-access-990628ad.legacy.js.map} +1 -1
- package/lib/legacy/roomle-sdk.legacy.js +1 -1
- package/lib/legacy/static/ConfiguratorKernel-1814e60dbe690ae6.js +121 -0
- package/lib/legacy/static/ConfiguratorKernel-cbbc9ab4c6a45a73.wasm +0 -0
- package/lib/legacy/static/ConfiguratorKernelJs-4aa196fbd2db1290.js +143 -0
- package/lib/legacy/static/ConfiguratorKernelJs-83da6e4b5a0e6868.mem +0 -0
- package/lib/legacy/static/RoomleCore-1682cd0bfe5c84db.wasm +0 -0
- package/lib/legacy/static/RoomleCore-cf5eb8ac9b418bb8.js +130 -0
- package/lib/legacy/static/RoomleCoreJs-1a283c23fa3f057e.js +152 -0
- package/lib/legacy/static/RoomleCoreJs-c0e10f71d1afdef5.mem +0 -0
- package/lib/legacy/static/shaders-47c5850937e0536d.json +1 -0
- package/lib/legacy/{stats-helper-0c862b1b.legacy.js → stats-helper-12f49aa1.legacy.js} +2 -2
- package/lib/legacy/{stats-helper-0c862b1b.legacy.js.map → stats-helper-12f49aa1.legacy.js.map} +1 -1
- package/lib/material-viewer-37019048.js +2 -0
- package/lib/material-viewer-37019048.js.map +1 -0
- package/lib/material-viewer-b01a3995.nomodule.js +2 -0
- package/lib/material-viewer-b01a3995.nomodule.js.map +1 -0
- package/lib/material-viewer-main-9b09cbb2.js +2 -0
- package/lib/material-viewer-main-9b09cbb2.js.map +1 -0
- package/lib/material-viewer-main.nomodule.js +1 -1
- package/lib/{mesh-generator-1ab6446e.nomodule.js → mesh-generator-106a6ce1.nomodule.js} +2 -2
- package/lib/mesh-generator-106a6ce1.nomodule.js.map +1 -0
- package/lib/{mesh-generator-829100d1.js → mesh-generator-df801dc9.js} +2 -2
- package/lib/mesh-generator-df801dc9.js.map +1 -0
- package/lib/pixotron-76665c10.js +2 -0
- package/lib/pixotron-76665c10.js.map +1 -0
- package/lib/pixotron-c033394c.nomodule.js +2 -0
- package/lib/pixotron-c033394c.nomodule.js.map +1 -0
- package/lib/planner-59a8e189.nomodule.js +2 -0
- package/lib/{planner-4a060b05.nomodule.js.map → planner-59a8e189.nomodule.js.map} +1 -1
- package/lib/planner-5cbf6167.js +2 -0
- package/lib/{planner-a625e040.js.map → planner-5cbf6167.js.map} +1 -1
- package/lib/planner-main-8933f5be.js +2 -0
- package/lib/planner-main-8933f5be.js.map +1 -0
- package/lib/planner-main.nomodule.js +1 -1
- package/lib/rapi-access-21338f5f.js +16 -0
- package/lib/{rapi-access-5951f7d6.js.map → rapi-access-21338f5f.js.map} +1 -1
- package/lib/rapi-access-6a614458.nomodule.js +16 -0
- package/lib/{rapi-access-c0f4bbd9.nomodule.js.map → rapi-access-6a614458.nomodule.js.map} +1 -1
- package/lib/{roomle-sdk-8576bb12.js → roomle-sdk-6b970f8f.js} +2 -2
- package/lib/roomle-sdk-6b970f8f.js.map +1 -0
- package/lib/roomle-sdk.nomodule.js +1 -1
- package/lib/static/ConfiguratorKernel-1814e60dbe690ae6.js +1 -0
- package/lib/static/ConfiguratorKernel-1814e60dbe690ae6.js.map +1 -0
- package/lib/static/ConfiguratorKernel-cbbc9ab4c6a45a73.wasm +0 -0
- package/lib/static/ConfiguratorKernelJs-4aa196fbd2db1290.js +143 -0
- package/lib/static/ConfiguratorKernelJs-83da6e4b5a0e6868.mem +0 -0
- package/lib/static/RoomleCore-1682cd0bfe5c84db.wasm +0 -0
- package/lib/static/RoomleCore-cf5eb8ac9b418bb8.js +1 -0
- package/lib/static/RoomleCore-cf5eb8ac9b418bb8.js.map +1 -0
- package/lib/static/RoomleCoreJs-1a283c23fa3f057e.js +152 -0
- package/lib/static/RoomleCoreJs-c0e10f71d1afdef5.mem +0 -0
- package/lib/static/shaders-47c5850937e0536d.json +1 -0
- package/lib/{stats-helper-668db597.nomodule.js → stats-helper-37bc8127.nomodule.js} +2 -2
- package/lib/{stats-helper-668db597.nomodule.js.map → stats-helper-37bc8127.nomodule.js.map} +1 -1
- package/lib/{stats-helper-a723ffa2.js → stats-helper-50118506.js} +2 -2
- package/lib/{stats-helper-a723ffa2.js.map → stats-helper-50118506.js.map} +1 -1
- package/package.json +2 -2
- package/lib/banana-for-scale-4405de18.js +0 -2
- package/lib/banana-for-scale-8bd9d916.nomodule.js +0 -2
- package/lib/component-dimensioning-27d53ffd.js.map +0 -1
- package/lib/component-dimensioning-c4aed0a4.nomodule.js.map +0 -1
- package/lib/configurator-72fde8e8.js +0 -2
- package/lib/configurator-72fde8e8.js.map +0 -1
- package/lib/configurator-ecd46b23.nomodule.js +0 -2
- package/lib/configurator-ecd46b23.nomodule.js.map +0 -1
- package/lib/configurator-main-199a8f98.js +0 -2
- package/lib/configurator-main-199a8f98.js.map +0 -1
- package/lib/configurator-mesh-generator-48dd85a4.nomodule.js.map +0 -1
- package/lib/configurator-mesh-generator-a75b5156.js.map +0 -1
- package/lib/default-light-setting-4a25d176.nomodule.js.map +0 -1
- package/lib/default-light-setting-d2e449e7.js.map +0 -1
- package/lib/definitions/configurator-core/src/utils/addon-helper.d.ts +0 -39
- package/lib/definitions/configurator-core/src/webgl/environment/gltf-environment.d.ts +0 -18
- package/lib/dimensioning-helper-744f6bd1.js +0 -2
- package/lib/dimensioning-helper-744f6bd1.js.map +0 -1
- package/lib/dimensioning-helper-79c88f0b.nomodule.js +0 -2
- package/lib/dimensioning-helper-79c88f0b.nomodule.js.map +0 -1
- package/lib/glb-viewer-aafdb02c.nomodule.js +0 -2
- package/lib/glb-viewer-dc577f61.js +0 -2
- package/lib/glb-viewer-main-c020bd21.js +0 -2
- package/lib/glb-viewer-main-c020bd21.js.map +0 -1
- package/lib/image-renderer-70acb74b.nomodule.js +0 -2
- package/lib/image-renderer-8df2f31f.js +0 -2
- package/lib/legacy/banana-for-scale-65d969a1.legacy.js +0 -2
- package/lib/legacy/component-dimensioning-f2993909.legacy.js.map +0 -1
- package/lib/legacy/configurator-49ffd4d2.legacy.js +0 -2
- package/lib/legacy/configurator-49ffd4d2.legacy.js.map +0 -1
- package/lib/legacy/configurator-mesh-generator-58490992.legacy.js.map +0 -1
- package/lib/legacy/default-light-setting-b6840697.legacy.js.map +0 -1
- package/lib/legacy/dimensioning-helper-792a1d7a.legacy.js +0 -2
- package/lib/legacy/dimensioning-helper-792a1d7a.legacy.js.map +0 -1
- package/lib/legacy/glb-viewer-46717172.legacy.js +0 -2
- package/lib/legacy/image-renderer-c1f09dc0.legacy.js +0 -2
- package/lib/legacy/material-viewer-f97b6f16.legacy.js +0 -2
- package/lib/legacy/material-viewer-f97b6f16.legacy.js.map +0 -1
- package/lib/legacy/mesh-generator-4a93e27d.legacy.js.map +0 -1
- package/lib/legacy/pixotron-ec41bb9c.legacy.js +0 -2
- package/lib/legacy/pixotron-ec41bb9c.legacy.js.map +0 -1
- package/lib/legacy/planner-42d951cf.legacy.js +0 -2
- package/lib/legacy/rapi-access-daec98c8.legacy.js +0 -16
- package/lib/legacy/scene-manager-0842da82.legacy.js +0 -2
- package/lib/legacy/scene-manager-0842da82.legacy.js.map +0 -1
- package/lib/legacy/static/AddButtonRound-8004fa7dffdf7501.glb +0 -0
- package/lib/legacy/static/ConfiguratorKernel-4ca6a302619d4901.js +0 -121
- package/lib/legacy/static/ConfiguratorKernel-6713e1de96ef978c.wasm +0 -0
- package/lib/legacy/static/ConfiguratorKernelJs-48f878d7e377be5f.mem +0 -0
- package/lib/legacy/static/ConfiguratorKernelJs-df7e5e8c447ce141.js +0 -143
- package/lib/legacy/static/PhotoStudioRoom-5b94763849f82256.glb +0 -0
- package/lib/legacy/static/RoomleCore-0b27042fad1c1d39.js +0 -129
- package/lib/legacy/static/RoomleCore-e855c1668e7e1763.wasm +0 -0
- package/lib/legacy/static/RoomleCoreJs-582f2f94cdd9aadc.js +0 -151
- package/lib/legacy/static/RoomleCoreJs-fe17a5f3a30cab74.mem +0 -0
- package/lib/legacy/static/USM-config-gltf-ad488aada649b7a5.glb +0 -0
- package/lib/legacy/static/shaders-88ef4c916f20da62.json +0 -1
- package/lib/material-viewer-2f26bdee.js +0 -2
- package/lib/material-viewer-2f26bdee.js.map +0 -1
- package/lib/material-viewer-594bcf38.nomodule.js +0 -2
- package/lib/material-viewer-594bcf38.nomodule.js.map +0 -1
- package/lib/material-viewer-main-d78b0096.js +0 -2
- package/lib/material-viewer-main-d78b0096.js.map +0 -1
- package/lib/mesh-generator-1ab6446e.nomodule.js.map +0 -1
- package/lib/mesh-generator-829100d1.js.map +0 -1
- package/lib/pixotron-20d1e014.nomodule.js +0 -2
- package/lib/pixotron-20d1e014.nomodule.js.map +0 -1
- package/lib/pixotron-ce97d03b.js +0 -2
- package/lib/pixotron-ce97d03b.js.map +0 -1
- package/lib/planner-4a060b05.nomodule.js +0 -2
- package/lib/planner-a625e040.js +0 -2
- package/lib/planner-main-71b12706.js +0 -2
- package/lib/planner-main-71b12706.js.map +0 -1
- package/lib/rapi-access-5951f7d6.js +0 -16
- package/lib/rapi-access-c0f4bbd9.nomodule.js +0 -16
- package/lib/roomle-sdk-8576bb12.js.map +0 -1
- package/lib/scene-manager-4ea4e330.js +0 -2
- package/lib/scene-manager-4ea4e330.js.map +0 -1
- package/lib/scene-manager-804c99cd.nomodule.js +0 -2
- package/lib/scene-manager-804c99cd.nomodule.js.map +0 -1
- package/lib/static/AddButtonRound-8004fa7dffdf7501.glb +0 -0
- package/lib/static/ConfiguratorKernel-4ca6a302619d4901.js +0 -1
- package/lib/static/ConfiguratorKernel-4ca6a302619d4901.js.map +0 -1
- package/lib/static/ConfiguratorKernel-6713e1de96ef978c.wasm +0 -0
- package/lib/static/ConfiguratorKernelJs-48f878d7e377be5f.mem +0 -0
- package/lib/static/ConfiguratorKernelJs-df7e5e8c447ce141.js +0 -143
- package/lib/static/PhotoStudioRoom-5b94763849f82256.glb +0 -0
- package/lib/static/RoomleCore-0b27042fad1c1d39.js +0 -1
- package/lib/static/RoomleCore-0b27042fad1c1d39.js.map +0 -1
- package/lib/static/RoomleCore-e855c1668e7e1763.wasm +0 -0
- package/lib/static/RoomleCoreJs-582f2f94cdd9aadc.js +0 -151
- package/lib/static/RoomleCoreJs-fe17a5f3a30cab74.mem +0 -0
- package/lib/static/USM-config-gltf-ad488aada649b7a5.glb +0 -0
- package/lib/static/shaders-88ef4c916f20da62.json +0 -1
package/lib/{configurator-mesh-generator-a75b5156.js → configurator-mesh-generator-ed7f42a4.js}
RENAMED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
//# sourceMappingURL=configurator-mesh-generator-
|
|
1
|
+
import{S as PREVIEW_MATERIAL_COLOR,T as PREVIEW_MATERIAL_OPACITY,U as PREVIEW_MATERIAL_ROUGHNESS}from"./rapi-access-21338f5f.js";import{M as MeshGenerator}from"./mesh-generator-df801dc9.js";class ConfiguratorMeshGenerator extends MeshGenerator{constructor(e){super(e),this._geometryComponentMaterialCache=new Map,this._configuratorPreviewMaterial=new THREE.MeshStandardMaterial({color:PREVIEW_MATERIAL_COLOR,transparent:!0,opacity:PREVIEW_MATERIAL_OPACITY,roughness:PREVIEW_MATERIAL_ROUGHNESS,envMap:null}),this._environmentLoader.setEnvMap(this._configuratorPreviewMaterial)}generateMesh(e=0,t=null,r,a,s,n,o,i=!1){let h;h=i?this._generateGeometry(t,a,s,n,o).clone():this._generateGeometry(t,a,s,n,o);const M=this._createMesh(e,t,h);return M.userData.materialId=r,M.layers.set(3),r&&this.materialQueue.push(this._assignMaterial(M,r).then(()=>{e&&t&&this._geometryComponentMaterialCache.set(this._getComponentMeshId(e,t),r)})),M}_createMesh(e,t,r){if(e&&t){const a=this._getComponentMeshId(e,t);if(this._geometryComponentMaterialCache.has(a)){const e=this._geometryComponentMaterialCache.get(a);if(this._cacheHolder.materialCache.has(e)){const t=this._cacheHolder.materialCache.get(e);return new THREE.Mesh(r,t)}}}return new THREE.Mesh(r,this._configuratorPreviewMaterial.clone())}_getComponentMeshId(e,t){return e+"_"+t}setMaterial(e,t,r){return this._assignMaterial(e,t)}loadMaterial(e,t,r){return super._loadMaterial(e,t,r)}loadTextures(e,t,r,a){return super._loadTextures(e,t,r,a)}}export{ConfiguratorMeshGenerator as C};
|
|
2
|
+
//# sourceMappingURL=configurator-mesh-generator-ed7f42a4.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"configurator-mesh-generator-ed7f42a4.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
System.register(["./rapi-access-
|
|
2
|
-
//# sourceMappingURL=default-light-setting-
|
|
1
|
+
System.register(["./rapi-access-6a614458.nomodule.js","./pixotron-c033394c.nomodule.js"],(function(i){var t,a;return{setters:[function(i){t=i.K},function(i){a=i.L}],execute:function(){i("D",class extends a{constructor(i,t){super(i,t),this._params={ambientLight:{color:"#ffffff"},mainDirLight:{position:{x:-3,y:4,z:4},color:"#ffffff"},secondDirLight:{position:{x:3,y:4,z:3},color:"#ffffff"}},this._mainDirectionalLight=new THREE.DirectionalLight(new THREE.Color(this._params.mainDirLight.color),.8),this._mainDirectionalLight.position.set(this._params.mainDirLight.position.x,this._params.mainDirLight.position.y,this._params.mainDirLight.position.z),this._mainDirectionalLight.layers.set(1),this._mainDirectionalLight.castShadow=!0,this._mainDirectionalLight.shadow.camera.near=.1,this._mainDirectionalLight.shadow.camera.far=100,this._mainDirectionalLight.shadow.mapSize=new THREE.Vector2(1024,1024),this._mainDirectionalLight.visible=!0,this._mainDirectionalLight.lookAt(new THREE.Vector3(0,0,0)),this._secondDirectionalLight=new THREE.DirectionalLight(new THREE.Color(this._params.secondDirLight.color),.2),this._secondDirectionalLight.position.set(this._params.secondDirLight.position.x,this._params.secondDirLight.position.y,this._params.secondDirLight.position.z),this._secondDirectionalLight.layers.set(1),this._secondDirectionalLight.castShadow=!1,this._secondDirectionalLight.shadow.camera.near=.1,this._secondDirectionalLight.shadow.camera.far=100,this._secondDirectionalLight.shadow.mapSize=new THREE.Vector2(1024,1024),this._secondDirectionalLight.visible=!0,this._secondDirectionalLight.lookAt(new THREE.Vector3(0,0,0)),this._ambientLight=new THREE.AmbientLight(new THREE.Color(this._params.ambientLight.color),.5),this._ambientLight.layers.set(1),this.addToScene()}needsBounds(){return!0}updateBounds(i){const t=i.getSize(new THREE.Vector3),a=Math.max(Math.max(t.x,t.y),t.z)+1,o=a/2;this._mainDirectionalLight.shadow.camera.top=o,this._mainDirectionalLight.shadow.camera.bottom=-o,this._mainDirectionalLight.shadow.camera.left=-o,this._mainDirectionalLight.shadow.camera.right=o,this._mainDirectionalLight.shadow.camera.near=.01,this._mainDirectionalLight.shadow.camera.far=4*a,this._mainDirectionalLight.shadow.camera.updateProjectionMatrix(),this._secondDirectionalLight.shadow.camera.top=o,this._secondDirectionalLight.shadow.camera.bottom=-o,this._secondDirectionalLight.shadow.camera.left=-o,this._secondDirectionalLight.shadow.camera.right=o,this._secondDirectionalLight.shadow.camera.near=.01,this._secondDirectionalLight.shadow.camera.far=4*a,this._secondDirectionalLight.shadow.camera.updateProjectionMatrix()}addToScene(){this._scene.add(this._mainDirectionalLight),this._scene.add(this._secondDirectionalLight),this._scene.add(this._ambientLight)}removeFromScene(){this._scene.remove(this._mainDirectionalLight),this._scene.remove(this._secondDirectionalLight),this._scene.remove(this._ambientLight)}reload(){this.removeFromScene(),this.addToScene()}showGUI(){let i=t();if(i){if(this._ambientLight){let t=i.addFolder("Ambient Light");t.add(this._ambientLight,"visible"),t.add(this._ambientLight,"intensity").min(0).max(5).step(.1),t.addColor(this._params.ambientLight,"color").onChange(i=>this._ambientLight.color=new THREE.Color(i))}if(this._mainDirectionalLight){let t=i.addFolder("Main Directional Light");t.add(this._mainDirectionalLight,"visible"),t.add(this._mainDirectionalLight,"intensity").min(0).max(10).step(.1),t.add(this._mainDirectionalLight,"castShadow"),t.addColor(this._params.mainDirLight,"color").onChange(i=>this._mainDirectionalLight.color=new THREE.Color(i)),t.add(this._mainDirectionalLight.position,"x").min(-10).max(10).step(.1).onChange(()=>this._mainDirectionalLight.lookAt(new THREE.Vector3(0,0,0))),t.add(this._mainDirectionalLight.position,"y").min(-10).max(50).step(.1).onChange(()=>this._mainDirectionalLight.lookAt(new THREE.Vector3(0,0,0))),t.add(this._mainDirectionalLight.position,"z").min(-10).max(10).step(.1).onChange(()=>this._mainDirectionalLight.lookAt(new THREE.Vector3(0,0,0)))}if(this._secondDirectionalLight){let t=i.addFolder("Second Directional Light");t.add(this._secondDirectionalLight,"visible"),t.add(this._secondDirectionalLight,"intensity").min(0).max(10).step(.1),t.add(this._secondDirectionalLight,"castShadow"),t.addColor(this._params.mainDirLight,"color").onChange(i=>this._mainDirectionalLight.color=new THREE.Color(i)),t.add(this._secondDirectionalLight.position,"x").min(-10).max(10).step(.1).onChange(()=>this._mainDirectionalLight.lookAt(new THREE.Vector3(0,0,0))),t.add(this._secondDirectionalLight.position,"y").min(-10).max(50).step(.1).onChange(()=>this._mainDirectionalLight.lookAt(new THREE.Vector3(0,0,0))),t.add(this._secondDirectionalLight.position,"z").min(-10).max(10).step(.1).onChange(()=>this._mainDirectionalLight.lookAt(new THREE.Vector3(0,0,0)))}}}})}}}));
|
|
2
|
+
//# sourceMappingURL=default-light-setting-86b8760c.nomodule.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"default-light-setting-86b8760c.nomodule.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
//# sourceMappingURL=default-light-setting-
|
|
1
|
+
import{K as getGUI}from"./rapi-access-21338f5f.js";import{L as LightSetting}from"./pixotron-76665c10.js";class DefaultLightSetting extends LightSetting{constructor(i,t){super(i,t),this._params={ambientLight:{color:"#ffffff"},mainDirLight:{position:{x:-3,y:4,z:4},color:"#ffffff"},secondDirLight:{position:{x:3,y:4,z:3},color:"#ffffff"}},this._mainDirectionalLight=new THREE.DirectionalLight(new THREE.Color(this._params.mainDirLight.color),.8),this._mainDirectionalLight.position.set(this._params.mainDirLight.position.x,this._params.mainDirLight.position.y,this._params.mainDirLight.position.z),this._mainDirectionalLight.layers.set(1),this._mainDirectionalLight.castShadow=!0,this._mainDirectionalLight.shadow.camera.near=.1,this._mainDirectionalLight.shadow.camera.far=100,this._mainDirectionalLight.shadow.mapSize=new THREE.Vector2(1024,1024),this._mainDirectionalLight.visible=!0,this._mainDirectionalLight.lookAt(new THREE.Vector3(0,0,0)),this._secondDirectionalLight=new THREE.DirectionalLight(new THREE.Color(this._params.secondDirLight.color),.2),this._secondDirectionalLight.position.set(this._params.secondDirLight.position.x,this._params.secondDirLight.position.y,this._params.secondDirLight.position.z),this._secondDirectionalLight.layers.set(1),this._secondDirectionalLight.castShadow=!1,this._secondDirectionalLight.shadow.camera.near=.1,this._secondDirectionalLight.shadow.camera.far=100,this._secondDirectionalLight.shadow.mapSize=new THREE.Vector2(1024,1024),this._secondDirectionalLight.visible=!0,this._secondDirectionalLight.lookAt(new THREE.Vector3(0,0,0)),this._ambientLight=new THREE.AmbientLight(new THREE.Color(this._params.ambientLight.color),.5),this._ambientLight.layers.set(1),this.addToScene()}needsBounds(){return!0}updateBounds(i){const t=i.getSize(new THREE.Vector3),a=Math.max(Math.max(t.x,t.y),t.z)+1,o=a/2;this._mainDirectionalLight.shadow.camera.top=o,this._mainDirectionalLight.shadow.camera.bottom=-o,this._mainDirectionalLight.shadow.camera.left=-o,this._mainDirectionalLight.shadow.camera.right=o,this._mainDirectionalLight.shadow.camera.near=.01,this._mainDirectionalLight.shadow.camera.far=4*a,this._mainDirectionalLight.shadow.camera.updateProjectionMatrix(),this._secondDirectionalLight.shadow.camera.top=o,this._secondDirectionalLight.shadow.camera.bottom=-o,this._secondDirectionalLight.shadow.camera.left=-o,this._secondDirectionalLight.shadow.camera.right=o,this._secondDirectionalLight.shadow.camera.near=.01,this._secondDirectionalLight.shadow.camera.far=4*a,this._secondDirectionalLight.shadow.camera.updateProjectionMatrix()}addToScene(){this._scene.add(this._mainDirectionalLight),this._scene.add(this._secondDirectionalLight),this._scene.add(this._ambientLight)}removeFromScene(){this._scene.remove(this._mainDirectionalLight),this._scene.remove(this._secondDirectionalLight),this._scene.remove(this._ambientLight)}reload(){this.removeFromScene(),this.addToScene()}showGUI(){let i=getGUI();if(i){if(this._ambientLight){let t=i.addFolder("Ambient Light");t.add(this._ambientLight,"visible"),t.add(this._ambientLight,"intensity").min(0).max(5).step(.1),t.addColor(this._params.ambientLight,"color").onChange(i=>this._ambientLight.color=new THREE.Color(i))}if(this._mainDirectionalLight){let t=i.addFolder("Main Directional Light");t.add(this._mainDirectionalLight,"visible"),t.add(this._mainDirectionalLight,"intensity").min(0).max(10).step(.1),t.add(this._mainDirectionalLight,"castShadow"),t.addColor(this._params.mainDirLight,"color").onChange(i=>this._mainDirectionalLight.color=new THREE.Color(i)),t.add(this._mainDirectionalLight.position,"x").min(-10).max(10).step(.1).onChange(()=>this._mainDirectionalLight.lookAt(new THREE.Vector3(0,0,0))),t.add(this._mainDirectionalLight.position,"y").min(-10).max(50).step(.1).onChange(()=>this._mainDirectionalLight.lookAt(new THREE.Vector3(0,0,0))),t.add(this._mainDirectionalLight.position,"z").min(-10).max(10).step(.1).onChange(()=>this._mainDirectionalLight.lookAt(new THREE.Vector3(0,0,0)))}if(this._secondDirectionalLight){let t=i.addFolder("Second Directional Light");t.add(this._secondDirectionalLight,"visible"),t.add(this._secondDirectionalLight,"intensity").min(0).max(10).step(.1),t.add(this._secondDirectionalLight,"castShadow"),t.addColor(this._params.mainDirLight,"color").onChange(i=>this._mainDirectionalLight.color=new THREE.Color(i)),t.add(this._secondDirectionalLight.position,"x").min(-10).max(10).step(.1).onChange(()=>this._mainDirectionalLight.lookAt(new THREE.Vector3(0,0,0))),t.add(this._secondDirectionalLight.position,"y").min(-10).max(50).step(.1).onChange(()=>this._mainDirectionalLight.lookAt(new THREE.Vector3(0,0,0))),t.add(this._secondDirectionalLight.position,"z").min(-10).max(10).step(.1).onChange(()=>this._mainDirectionalLight.lookAt(new THREE.Vector3(0,0,0)))}}}}export{DefaultLightSetting as D};
|
|
2
|
+
//# sourceMappingURL=default-light-setting-88521da5.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"default-light-setting-88521da5.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -30,8 +30,6 @@ export default class InitData implements Context, CommonInitData, ConfiguratorIn
|
|
|
30
30
|
disableDebugGUI?: boolean;
|
|
31
31
|
disableEnvMap?: boolean;
|
|
32
32
|
offlineSync?: string;
|
|
33
|
-
addOnSpots?: boolean;
|
|
34
|
-
plusInPreview?: boolean;
|
|
35
33
|
initialFloorMaterial?: string;
|
|
36
34
|
dls?: string;
|
|
37
35
|
ls?: string;
|
|
@@ -186,17 +186,6 @@ export interface ConfiguratorInitData {
|
|
|
186
186
|
* Download all necessary files to run the configurator in offline mode
|
|
187
187
|
*/
|
|
188
188
|
offlineSync?: string;
|
|
189
|
-
/**
|
|
190
|
-
* @deprecated
|
|
191
|
-
* If set to true we are showing plus icon where addons can be added.
|
|
192
|
-
* This has to be scripted. For more information ask your Roomle contact.
|
|
193
|
-
*/
|
|
194
|
-
addOnSpots?: boolean;
|
|
195
|
-
/**
|
|
196
|
-
* @deprecated
|
|
197
|
-
* If set to true we show a plus in the addon preview boxes.
|
|
198
|
-
*/
|
|
199
|
-
plusInPreview?: boolean;
|
|
200
189
|
/**
|
|
201
190
|
* Set the floor material which is used when loading the configurator
|
|
202
191
|
* For different options see {@link EnvironmentSetting}
|
|
@@ -48,3 +48,4 @@ export declare const getSelectionGeometry: (position: THREE.Vector3, size: THREE
|
|
|
48
48
|
export declare const vectorIsZero: (vector: THREE.Vector3) => boolean;
|
|
49
49
|
export declare const getMaterialId: (material: any, type?: KernelEnum) => string;
|
|
50
50
|
export declare const vectorIsEqual: (vector1: THREE.Vector3, vector2: THREE.Vector3, tolerance?: number) => boolean;
|
|
51
|
+
export declare const getYRotationOfObject: (object: THREE.Object3D) => number;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CanvasOffset } from '../common-interfaces';
|
|
2
2
|
import { KernelCube, KernelVector3 } from '../../../typings/kernel';
|
|
3
3
|
export interface RoomleComponent extends THREE.Object3D {
|
|
4
|
-
|
|
4
|
+
runtimeId: number;
|
|
5
5
|
parentObjectId: number;
|
|
6
6
|
meshes: THREE.Mesh[];
|
|
7
7
|
boundingBox: THREE.Box3;
|
|
@@ -17,6 +17,7 @@ import PixotronUtil from './pixotron-util';
|
|
|
17
17
|
import { DynamicLightSettingSource } from '../lightsetting/dynamic-light-setting-loader';
|
|
18
18
|
import InitData from '../utils/init-data';
|
|
19
19
|
import { PerspectiveOffsetCamera } from './roomle-component-factory';
|
|
20
|
+
import PluginSystem from '../../../configurator-core/src/webgl/plugin-system';
|
|
20
21
|
export default abstract class SceneManager implements Context, LifeCycleCallbacks, EventListenerObject {
|
|
21
22
|
_creator_: string;
|
|
22
23
|
protected _domHelper: DomHelper;
|
|
@@ -25,13 +26,16 @@ export default abstract class SceneManager implements Context, LifeCycleCallback
|
|
|
25
26
|
private _staticItemLoader;
|
|
26
27
|
protected _environmentLoader: EnvironmentLoader;
|
|
27
28
|
protected _initData: InitData;
|
|
29
|
+
protected _pluginSystem: PluginSystem;
|
|
28
30
|
protected _scene: THREE.Scene;
|
|
31
|
+
protected _uiScene: THREE.Scene;
|
|
32
|
+
private _depthWriteMaterial;
|
|
29
33
|
protected _cameraControl: CameraControl;
|
|
30
34
|
protected _lightSetting: LightSetting;
|
|
31
35
|
protected _environment: Environment;
|
|
32
36
|
protected _maxAnisotropy: number;
|
|
33
37
|
protected _renderer: THREE.WebGLRenderer;
|
|
34
|
-
|
|
38
|
+
protected _renderTarget: THREE.WebGLRenderTarget | THREE.WebGLMultisampleRenderTarget;
|
|
35
39
|
private _clock;
|
|
36
40
|
private _delta;
|
|
37
41
|
protected _renderLoopFunction: () => void;
|
|
@@ -45,7 +49,7 @@ export default abstract class SceneManager implements Context, LifeCycleCallback
|
|
|
45
49
|
private _running;
|
|
46
50
|
private _statsHelper;
|
|
47
51
|
private _canvasID;
|
|
48
|
-
protected abstract createCameraControl(mode: CAMERA_TYPE): void;
|
|
52
|
+
protected abstract createCameraControl(mode: CAMERA_TYPE, offset: CanvasOffset): void;
|
|
49
53
|
protected abstract _getInputManager(): InputManager;
|
|
50
54
|
abstract sceneChanged(): void;
|
|
51
55
|
abstract getPixotronParams(): any;
|
|
@@ -53,7 +57,7 @@ export default abstract class SceneManager implements Context, LifeCycleCallback
|
|
|
53
57
|
abstract getBakedShadowParams(): BakedShadowParams;
|
|
54
58
|
protected onBeforeRender(): void;
|
|
55
59
|
protected _onAfterRender: () => void;
|
|
56
|
-
constructor(creator: string, offset: CanvasOffset, canvasID: string, mode?: CAMERA_TYPE, transparent?: boolean);
|
|
60
|
+
protected constructor(creator: string, offset: CanvasOffset, canvasID: string, mode?: CAMERA_TYPE, transparent?: boolean);
|
|
57
61
|
protected _changeCameraControl(cameraControl: CameraControl): void;
|
|
58
62
|
cameraControlChanged(): void;
|
|
59
63
|
protected _addCameraControlListener(): void;
|
|
@@ -68,20 +72,24 @@ export default abstract class SceneManager implements Context, LifeCycleCallback
|
|
|
68
72
|
*/
|
|
69
73
|
protected _renderWithoutShadowsAndAO(): void;
|
|
70
74
|
protected _requestRender(): void;
|
|
75
|
+
private _shouldRenderUi;
|
|
76
|
+
private _renderUi;
|
|
71
77
|
private _animateCamera;
|
|
78
|
+
protected shouldClearShadowsAndAO(): boolean;
|
|
72
79
|
protected _setupScene(offset?: CanvasOffset, transparent?: boolean): void;
|
|
73
80
|
private _tabVisible;
|
|
74
|
-
|
|
75
|
-
updateCamera(): void;
|
|
81
|
+
updateCamera(_changeCamera?: boolean): void;
|
|
76
82
|
private _onWindowResize;
|
|
77
83
|
protected _isPartOfScene(object: THREE.Object3D): boolean;
|
|
78
84
|
cleanUp(): void;
|
|
79
85
|
clearScene(): void;
|
|
80
|
-
enableHD(): void;
|
|
86
|
+
enableHD(source?: DynamicLightSettingSource): void;
|
|
87
|
+
private _enableAutoQuality;
|
|
88
|
+
private _enableSSR;
|
|
81
89
|
protected _loadGLTF(gltfJSON: string, position?: THREE.Vector3, rotation?: number, size?: THREE.Vector3, scale?: THREE.Vector3, color?: number, callback?: (percent: number) => void): Promise<THREE.Object3D>;
|
|
82
90
|
protected _loadGLB(url: string, position?: THREE.Vector3, rotation?: number, size?: THREE.Vector3, scale?: THREE.Vector3, color?: number, colorable?: boolean, callback?: (percent: number) => void): Promise<THREE.Object3D>;
|
|
83
91
|
private _setCamera;
|
|
84
|
-
showGUI(): void
|
|
92
|
+
showGUI(): Promise<void>;
|
|
85
93
|
protected _guiLoaded(): void;
|
|
86
94
|
protected _addGUIListener(gui: GUI): void;
|
|
87
95
|
protected _guiParamChanged(): void;
|
|
@@ -93,12 +101,15 @@ export default abstract class SceneManager implements Context, LifeCycleCallback
|
|
|
93
101
|
destroy(): void;
|
|
94
102
|
handleEvent(evt: Event): void;
|
|
95
103
|
loadSceneSettings(sceneSetting: SceneSettings): Promise<void>;
|
|
104
|
+
setBackgroundColor(hex: string): void;
|
|
105
|
+
setBackgroundImage(url: string): void;
|
|
106
|
+
setBakedShadow(hex: string, url: string): void;
|
|
96
107
|
protected _setEnvironment(environment: Environment): void;
|
|
97
108
|
loadQualitySetting(qualitySetting: QualitySetting): void;
|
|
98
109
|
loadDynamicLightSetting(source: DynamicLightSettingSource): Promise<void>;
|
|
99
110
|
getScene(): THREE.Scene;
|
|
100
111
|
updateScene(): void;
|
|
101
|
-
protected _updateBounds(bounds: THREE.Box3): void;
|
|
112
|
+
protected _updateBounds(bounds: THREE.Box3, geometryChanged?: boolean): void;
|
|
102
113
|
setCameraOffset(offset: CanvasOffset): void;
|
|
103
114
|
getCameraOffset(): CanvasOffset;
|
|
104
115
|
getPerspectiveOffsetCamera(): PerspectiveOffsetCamera;
|
|
@@ -42,7 +42,7 @@ export default class RoomleConfigurator implements GlobalAPI, Context, KernelUti
|
|
|
42
42
|
private _threeLoader;
|
|
43
43
|
private _scriptLoader;
|
|
44
44
|
private _configuratorContext;
|
|
45
|
-
private
|
|
45
|
+
private _configuratorSceneManager;
|
|
46
46
|
private _initData;
|
|
47
47
|
private _globalInitData;
|
|
48
48
|
private _globalCallback;
|
|
@@ -587,15 +587,15 @@ export default class RoomleConfigurator implements GlobalAPI, Context, KernelUti
|
|
|
587
587
|
*/
|
|
588
588
|
highlightParts(ids: number[]): void;
|
|
589
589
|
/**
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
590
|
+
* Undo last action
|
|
591
|
+
* calls configuratorHistory.undo where array of last configuration are stored
|
|
592
|
+
*/
|
|
593
593
|
undo(): void;
|
|
594
594
|
/**
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
595
|
+
* Redo last action
|
|
596
|
+
* calls configuratorHistory.redo where array of last configuration are stored
|
|
597
|
+
* only possible if undo was called before
|
|
598
|
+
*/
|
|
599
599
|
redo(): void;
|
|
600
600
|
/**
|
|
601
601
|
* clears current configurator history
|
|
@@ -1,4 +1 @@
|
|
|
1
|
-
export { default as ADD_BUTTON_ROUND_FILE_NAME } from '../../public/geometry/AddButtonRound.glb';
|
|
2
1
|
export { default as BANANA_FILE_NAME } from '../../public/geometry/banana_div2.glb';
|
|
3
|
-
export { default as PHOTO_STUDIO_ROOM_FILE_NAME } from '../../public/geometry/PhotoStudioRoom.glb';
|
|
4
|
-
export { default as USM_CONFIG_GLTF_FILE_NAME } from '../../public/geometry/USM-config-gltf.glb';
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { PreviewComponent, PreviewLineComponent, RoomleComponent } from '../../../common-core/src/webgl/roomle-component-factory';
|
|
2
2
|
import InputManager, { INPUT_EVENT_TYPE } from '../../../common-core/src/input/input-manager';
|
|
3
3
|
import { SELECTION_MODE } from '../utils/selection-handler';
|
|
4
|
-
import AddonHelper from '../utils/addon-helper';
|
|
5
4
|
import SceneEventHandler from '../../../common-core/src/webgl/scene-event-handler';
|
|
6
5
|
export declare const enum SCENE_EVENT {
|
|
7
6
|
INTERACTION = 0,
|
|
@@ -40,14 +39,13 @@ export default class ConfiguratorSceneEventHandler extends SceneEventHandler<Sce
|
|
|
40
39
|
_creator_: string;
|
|
41
40
|
private _selectionHandler;
|
|
42
41
|
private _cameraMoving;
|
|
43
|
-
private _addonHelper;
|
|
44
42
|
private _hoveredComponent;
|
|
45
43
|
private _hoveredPreview;
|
|
46
44
|
private _draggedComponent;
|
|
47
45
|
private _previewLineIntersection;
|
|
48
46
|
private _dragStartPosition;
|
|
49
47
|
private _dragStartRotation;
|
|
50
|
-
constructor(creator: string, scene: THREE.Scene, camera: THREE.PerspectiveCamera, inputManager: InputManager
|
|
48
|
+
constructor(creator: string, scene: THREE.Scene, camera: THREE.PerspectiveCamera, inputManager: InputManager);
|
|
51
49
|
private _addInputListeners;
|
|
52
50
|
addComponentHandlers(component: RoomleComponent): void;
|
|
53
51
|
addComponentDragInHandler(component: RoomleComponent): void;
|
|
@@ -1,95 +1,47 @@
|
|
|
1
1
|
import { PreviewComponent, PreviewLineComponent, RoomleComponent } from '../../../common-core/src/webgl/roomle-component-factory';
|
|
2
|
+
import InputManager from '../../../common-core/src/input/input-manager';
|
|
2
3
|
import { SELECTION_MODE } from '../utils/selection-handler';
|
|
3
4
|
import { Base64Image, CanvasOffset } from '../../../common-core/src/common-interfaces';
|
|
4
5
|
import { KernelComponent, PlanObject, UiPossibleChild } from '../../../typings/kernel';
|
|
5
|
-
import { DynamicLightSettingSource } from '../../../common-core/src/lightsetting/dynamic-light-setting-loader';
|
|
6
6
|
import { SceneSettings } from '../../../common-core/src/scene-settings-loader';
|
|
7
7
|
import { RapiMaterial } from '../../../typings/rapi-types';
|
|
8
|
-
import {
|
|
9
|
-
import { LifeCycleCallbacks } from '../../../common-core/src/life-cycle-manager';
|
|
8
|
+
import { BakedShadowParams } from '../../../typings/pixotron';
|
|
10
9
|
import { ConfiguratorViewModelCallbackI } from '../../../common-core/src/view-model/configurator-view-model';
|
|
11
10
|
import { CameraParameter } from '../../../common-core/src/cameracontrol/camera-control';
|
|
12
11
|
import { PrepareImageOptions, RenderOptions } from '../../../common-core/src/webgl/image-renderer';
|
|
13
|
-
|
|
12
|
+
import SceneManager from '../../../common-core/src/webgl/scene-manager';
|
|
13
|
+
import { CAMERA_TYPE } from '../../../common-core/src/cameracontrol/camera-type';
|
|
14
|
+
export default class ConfiguratorSceneManager extends SceneManager implements ConfiguratorViewModelCallbackI {
|
|
14
15
|
_creator_: string;
|
|
15
|
-
private _domHelper;
|
|
16
|
-
private _scriptLoader;
|
|
17
16
|
private _configuratorInputManager;
|
|
18
17
|
private _configuratorUiCallbacks;
|
|
19
18
|
private _configuratorMeshGenerator;
|
|
20
19
|
private _memoryManager;
|
|
21
|
-
private _lifeCycleManager;
|
|
22
20
|
private _configuratorContext;
|
|
23
21
|
private _kernelAccess;
|
|
24
22
|
private _componentDimensioningHelper;
|
|
25
23
|
private _configuratorViewModel;
|
|
26
|
-
private _environmentLoader;
|
|
27
|
-
private _pluginSystem;
|
|
28
|
-
private _initData;
|
|
29
24
|
private _configuratorHistory;
|
|
30
25
|
private _componentFactory;
|
|
31
26
|
private _componentRaycastHelper;
|
|
32
|
-
private _pixotron;
|
|
33
|
-
private _pixotronUtil;
|
|
34
|
-
private _composer;
|
|
35
|
-
private _outlinePass;
|
|
36
|
-
private _forceRender;
|
|
37
|
-
private _updateShadowsAndAO;
|
|
38
|
-
private _statsHelper;
|
|
39
|
-
private _renderer;
|
|
40
|
-
private _renderTarget;
|
|
41
|
-
private _maxAnisotropy;
|
|
42
|
-
private _clock;
|
|
43
|
-
private _delta;
|
|
44
27
|
private _dimensionHelper;
|
|
45
28
|
private _uiIntersectionHelper;
|
|
46
29
|
private _sceneEventHandler;
|
|
47
|
-
private _cameraControl;
|
|
48
|
-
private _addonHelper;
|
|
49
|
-
private _scene;
|
|
50
|
-
private _uiScene;
|
|
51
|
-
private _depthWriteMaterial;
|
|
52
30
|
private _camera;
|
|
53
|
-
private _environment;
|
|
54
|
-
private _lightSetting;
|
|
55
|
-
private _lastChange;
|
|
56
|
-
private _running;
|
|
57
|
-
private _onAfterRender;
|
|
58
31
|
constructor(creator: string, offset: CanvasOffset);
|
|
59
32
|
private _initOptionalModules;
|
|
60
33
|
private _showDockings;
|
|
61
34
|
cancelDockings(): void;
|
|
62
35
|
private _cancelDockings;
|
|
63
|
-
stopRenderLoop(): void;
|
|
64
36
|
private _onHoverOn;
|
|
65
37
|
private _onHoverOff;
|
|
66
38
|
private _highlight;
|
|
67
|
-
|
|
68
|
-
private _renderUi;
|
|
69
|
-
/**
|
|
70
|
-
* Start render loop and update everything (AA, AO, Shadows, etc)
|
|
71
|
-
* @private
|
|
72
|
-
*/
|
|
73
|
-
private _renderEverything;
|
|
74
|
-
/**
|
|
75
|
-
* Start render loop and render the scene but keep shadows and AO, needed for material changes
|
|
76
|
-
* @private
|
|
77
|
-
*/
|
|
78
|
-
private _renderWithoutShadowsAndAO;
|
|
79
|
-
/**
|
|
80
|
-
* start render loop
|
|
81
|
-
* @private
|
|
82
|
-
*/
|
|
83
|
-
private _requestRender;
|
|
84
|
-
private _checkLayers;
|
|
85
|
-
private _animateCamera;
|
|
39
|
+
protected shouldClearShadowsAndAO(): boolean;
|
|
86
40
|
resume(): void;
|
|
87
41
|
private _materialLoaded;
|
|
88
42
|
private _applySSR;
|
|
89
43
|
pause(): void;
|
|
90
|
-
destroy(): void;
|
|
91
44
|
protected _setupScene(offset?: CanvasOffset): void;
|
|
92
|
-
private _tabVisible;
|
|
93
45
|
sceneCleared(shouldHardReset: boolean): void;
|
|
94
46
|
display(component: RoomleComponent): void;
|
|
95
47
|
debugSceneGraph(id?: number): void;
|
|
@@ -105,7 +57,6 @@ export default class SceneHelper implements Context, LifeCycleCallbacks, EventLi
|
|
|
105
57
|
private _externalMeshesAndMaterialsReady;
|
|
106
58
|
prepareTopImage(options?: PrepareImageOptions): Promise<Base64Image>;
|
|
107
59
|
enableDragIn(dragEvent: DragEvent): void;
|
|
108
|
-
private _getYRotationOfObject;
|
|
109
60
|
zoomToComponent(component: RoomleComponent): void;
|
|
110
61
|
resetCamera(): void;
|
|
111
62
|
resetCameraToState(): void;
|
|
@@ -113,41 +64,26 @@ export default class SceneHelper implements Context, LifeCycleCallbacks, EventLi
|
|
|
113
64
|
private _clearSelectionAndHovers;
|
|
114
65
|
resetPreviews(): void;
|
|
115
66
|
changeOffset(offset: CanvasOffset): void;
|
|
116
|
-
|
|
117
|
-
updateSize(changeCamera?: boolean): void;
|
|
67
|
+
updateCamera(changeCamera?: boolean): void;
|
|
118
68
|
setCameraOffset(offset: CanvasOffset): void;
|
|
119
69
|
getCameraOffset(): CanvasOffset;
|
|
120
|
-
|
|
121
|
-
|
|
70
|
+
protected _onKeyDown(event: KeyboardEvent): void;
|
|
71
|
+
protected _onKeyUp(event: KeyboardEvent): void;
|
|
122
72
|
cancelPreviousDockings(): void;
|
|
123
73
|
cancelSelection(resetCamera?: boolean): void;
|
|
124
74
|
private _cancelSelection;
|
|
125
75
|
private _selectComponent;
|
|
126
76
|
private _deselectComponent;
|
|
127
77
|
getScreenXY(position: THREE.Vector3): import("three").Vector3;
|
|
128
|
-
cleanUp(): void;
|
|
129
78
|
setSelectionMode(mode: SELECTION_MODE): void;
|
|
130
79
|
changeFloorMaterial(material: RapiMaterial): Promise<void>;
|
|
131
|
-
enableHD(source?: DynamicLightSettingSource): void;
|
|
132
|
-
private reEnableHD;
|
|
133
|
-
private _enableAutoQuality;
|
|
134
|
-
private _enableSSR;
|
|
135
|
-
loadDynamicLightSetting(source: DynamicLightSettingSource): Promise<void>;
|
|
136
80
|
exportGLB(): void;
|
|
137
|
-
showGUI(): void;
|
|
138
|
-
private _addGUIListener;
|
|
139
81
|
zoomIn(value?: number): void;
|
|
140
82
|
zoomOut(value?: number): void;
|
|
141
|
-
showStats(): void;
|
|
142
83
|
showDimensions(): Promise<void>;
|
|
143
84
|
private _initDimensions;
|
|
144
85
|
hideDimensions(): void;
|
|
145
86
|
loadSceneSettings(sceneSetting: SceneSettings): Promise<void>;
|
|
146
|
-
setBackgroundColor(hex: string): void;
|
|
147
|
-
setBackgroundImage(url: string): void;
|
|
148
|
-
setBakedShadow(hex: string, url: string): void;
|
|
149
|
-
private _setEnvironment;
|
|
150
|
-
handleEvent(evt: Event): void;
|
|
151
87
|
private _updateCameraToBounds;
|
|
152
88
|
requestDockingsPreview(userInitiated: boolean, possibleChild?: UiPossibleChild, dragEvent?: DragEvent, dragIn?: boolean): void;
|
|
153
89
|
private _requestDockingsPreviewWithDrag;
|
|
@@ -155,7 +91,7 @@ export default class SceneHelper implements Context, LifeCycleCallbacks, EventLi
|
|
|
155
91
|
private _onSelectedRuntimeComponentsChange;
|
|
156
92
|
private _onSelectedRuntimeComponentChange;
|
|
157
93
|
requestDeleteSelectedComponent(): void;
|
|
158
|
-
componentUpdated(component: RoomleComponent,
|
|
94
|
+
componentUpdated(component: RoomleComponent, _kernelComponent: KernelComponent): void;
|
|
159
95
|
planObjectUpdated(planObject: PlanObject, geometryChanged: boolean): void;
|
|
160
96
|
componentDeleted(component: RoomleComponent): void;
|
|
161
97
|
previewConstructionDone(component: RoomleComponent, hasPreviews: boolean): void;
|
|
@@ -164,11 +100,16 @@ export default class SceneHelper implements Context, LifeCycleCallbacks, EventLi
|
|
|
164
100
|
addPreviewHandlers(previewComponent: PreviewComponent): void;
|
|
165
101
|
addPreviewLineHandlers(previewLineComponent: PreviewLineComponent): void;
|
|
166
102
|
private _updateComponentPosition;
|
|
167
|
-
|
|
168
|
-
private _updateBounds;
|
|
169
|
-
updateScene(): void;
|
|
103
|
+
protected _updateBounds(box: THREE.Box3, geometryChanged?: boolean): void;
|
|
170
104
|
moveCamera(cameraParameter: CameraParameter): Promise<void>;
|
|
171
105
|
selectComponent(runtimeId: number): void;
|
|
172
106
|
highlightParts(ids: number[]): void;
|
|
173
107
|
private _shouldHighlight;
|
|
108
|
+
protected _getInputManager(): InputManager;
|
|
109
|
+
createCameraControl(_mode: CAMERA_TYPE, offset: CanvasOffset): void;
|
|
110
|
+
getBakedShadowParams(): BakedShadowParams;
|
|
111
|
+
getBounds(): THREE.Box3;
|
|
112
|
+
getPixotronParams(): any;
|
|
113
|
+
sceneChanged(): void;
|
|
114
|
+
private _getCameraControl;
|
|
174
115
|
}
|
|
@@ -11,7 +11,7 @@ export default class GLBViewerSceneManager extends SceneManager implements GLBRe
|
|
|
11
11
|
private _standardSceneBackgroundColor;
|
|
12
12
|
private _itemsCount;
|
|
13
13
|
constructor(creator: string, offset: CanvasOffset);
|
|
14
|
-
protected createCameraControl(_mode: CAMERA_TYPE): void;
|
|
14
|
+
protected createCameraControl(_mode: CAMERA_TYPE, _offset: CanvasOffset): void;
|
|
15
15
|
protected _getInputManager(): InputManager;
|
|
16
16
|
loadStaticItem(id: string, callback?: (percent: number) => void): Promise<void>;
|
|
17
17
|
loadGLB(url: string, automaticallyAdjustCamera?: boolean, scaling?: THREE.Vector3, callback?: (percent: number) => void): Promise<void>;
|
|
@@ -28,7 +28,7 @@ export default class MaterialViewerSceneManager extends SceneManager {
|
|
|
28
28
|
loadMaterialShading(materialShading: RapiMaterialShading): Promise<void>;
|
|
29
29
|
private _setMaterial;
|
|
30
30
|
getMaterialShading(): RapiMaterialShading;
|
|
31
|
-
protected createCameraControl(_mode: CAMERA_TYPE): void;
|
|
31
|
+
protected createCameraControl(_mode: CAMERA_TYPE, _offset: CanvasOffset): void;
|
|
32
32
|
protected _getInputManager(): InputManager;
|
|
33
33
|
sceneChanged(): void;
|
|
34
34
|
getPixotronParams(): any;
|
|
@@ -12,6 +12,7 @@ import InitData from '../../common-core/src/utils/init-data';
|
|
|
12
12
|
import { CanvasOffset, Position3 } from '../../common-core/src/common-interfaces';
|
|
13
13
|
import { KernelPlanObject } from '../../typings/kernel';
|
|
14
14
|
import { PrepareImageOptions } from '../../common-core/src/webgl/image-renderer';
|
|
15
|
+
import { DynamicLightSettingSource } from '../../common-core/src/lightsetting/dynamic-light-setting-loader';
|
|
15
16
|
export interface RoomlePlannerCallback {
|
|
16
17
|
switchToConfigurator: () => Promise<Configurator>;
|
|
17
18
|
switchToViewer: () => Promise<GlbViewer>;
|
|
@@ -63,7 +64,7 @@ export default class RoomlePlanner implements KernelAccessCallbackI, RoomlePlann
|
|
|
63
64
|
exportGLB(): void;
|
|
64
65
|
importGLB(url: string): void;
|
|
65
66
|
private _initPromiseCallback;
|
|
66
|
-
enableHD(): Promise<void>;
|
|
67
|
+
enableHD(source?: DynamicLightSettingSource): Promise<void>;
|
|
67
68
|
isReady(): void;
|
|
68
69
|
showBenchmarks(): void;
|
|
69
70
|
switchToConfigurator(): Promise<Configurator>;
|
|
@@ -33,7 +33,7 @@ export default class PlannerSceneManager extends SceneManager implements Planner
|
|
|
33
33
|
protected _setupScene(offset?: CanvasOffset, transparent?: boolean): void;
|
|
34
34
|
protected onBeforeRender(): void;
|
|
35
35
|
protected _getInputManager(): InputManager;
|
|
36
|
-
protected createCameraControl(mode: CAMERA_TYPE): void;
|
|
36
|
+
protected createCameraControl(mode: CAMERA_TYPE, _offset: CanvasOffset): void;
|
|
37
37
|
resetCamera(): void;
|
|
38
38
|
resetCameraToState(): void;
|
|
39
39
|
resetCameraPositionToStart(): void;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import"./query-params-helper-a271f9dc.js";import{f as dispose,_ as __decorate,i as inject,z as AsyncGuard}from"./rapi-access-21338f5f.js";import"./main-thread-to-worker-5447c1c5.js";import"./image-renderer-757a6907.js";import"./pixotron-76665c10.js";import{A as AsyncDependencyLoader}from"./configurator-3570c605.js";import"./mesh-generator-df801dc9.js";import"./configurator-mesh-generator-ed7f42a4.js";import"./default-light-setting-88521da5.js";const PLANE_MATERIAL="component_dimensioning_plane_material",TEXT_MATERIAL="component_dimensioning_text_material";let TextWithBackground=(()=>{class e extends THREE.Object3D{constructor(e){super(),this._label="",this._parameters={font:null,size:.1,height:.001,curveSegments:2,bevelEnabled:!0,bevelThickness:.001,bevelSize:.001},this.topDown=!1,this._parameters.font=e,this._position=new THREE.Vector3,this._initMaterials(),this._init(),this._update()}_initMaterials(){this._cacheHolder.materialCache.has(PLANE_MATERIAL)?this._planeMaterial=this._cacheHolder.materialCache.get(PLANE_MATERIAL):(this._planeMaterial=new THREE.MeshBasicMaterial({color:16777215,side:THREE.DoubleSide,opacity:.8,transparent:!0}),this._cacheHolder.materialCache.set(PLANE_MATERIAL,this._planeMaterial)),this._cacheHolder.materialCache.has(TEXT_MATERIAL)?this._textMaterial=this._cacheHolder.materialCache.get(TEXT_MATERIAL):(this._textMaterial=new THREE.MeshPhongMaterial({color:3618615}),this._cacheHolder.materialCache.set(TEXT_MATERIAL,this._textMaterial))}_init(){let e=new THREE.Geometry;this._text=new THREE.Mesh(e,this._textMaterial),this._text.name="text with background text "+this._label,this._plane=new THREE.Mesh(e,this._planeMaterial),this._plane.name="text with background plane "+this._label,this._textGeometry=new THREE.TextGeometry(this._label,this._parameters),this._textGeometry.computeBoundingBox(),this._text.geometry=this._textGeometry,this.add(this._text),this.add(this._plane)}update(e,i,t,s){this._position.copy(e),this._dimensioningType=i,this._cameraPosition=s,this._label=t;const n=this._cameraPosition.distanceTo(this._text.position),h=Math.max(.01,n/100),o=Math.max(5e-4,n/5e3);this._parameters.bevelThickness=o,this._parameters.bevelSize=o,this._parameters.size=h,this._textGeometry=new THREE.TextGeometry(this._label,this._parameters),this._textGeometry.computeBoundingBox(),this._text.geometry=this._textGeometry,this._update()}_update(){if(this.topDown){let e=new THREE.Quaternion;e.setFromAxisAngle(new THREE.Vector3(-1,0,0),Math.PI/2),this._updateText(this._textGeometry,e,new THREE.Vector3)}else if(this._updateText(this._textGeometry,new THREE.Quaternion,new THREE.Vector3),this._cameraPosition){const e=Math.atan2(this._cameraPosition.x-this._position.x,this._cameraPosition.z-this._position.z);this._text.rotation.y=e,this._plane.rotation.y=e}}_updateText(e,i,t){let s=new THREE.Vector3;s.copy(this._position),t.x*=this._getXSign(),s.add(t);let n=e.boundingBox.getSize(new THREE.Vector3);e.center(),this._text.position.copy(s),this._text.quaternion.copy(i);let h=new THREE.PlaneGeometry(n.x+.02,n.y+.02,32);h.center(),this._plane.geometry=h,this._plane.position.copy(s),this._plane.quaternion.copy(i)}_getXSign(){return!this._cameraPosition||this._cameraPosition.x>=0?1:-1}dispose(){dispose(this)}}return __decorate([inject],e.prototype,"_cacheHolder",void 0),e})(),DimensioningHelper=(()=>{class e{constructor(e){this._cameraPosition=new THREE.Vector3,this._textUpdated=!1,this._topDimensions=!1,this._initialized=new AsyncGuard,this._enabled=!1,this._dimensionsVisible=!1,this._creator_=e,this._lineMaterial=new THREE.LineBasicMaterial({color:3618615,linewidth:2});let i=new THREE.Geometry;this._widthLine=new THREE.Line(i,this._lineMaterial),this._widthLine.name="dimension width line",this._heightLine=new THREE.Line(i,this._lineMaterial),this._heightLine.name="dimension height line",this._depthLine=new THREE.Line(i,this._lineMaterial),this._depthLine.name="dimension depth line",this._planeMaterial=new THREE.MeshBasicMaterial({color:16777215,side:THREE.DoubleSide,opacity:.8,transparent:!0}),AsyncDependencyLoader.loadFont("static/rubik_regular_sub-eb3f3b61078695cc.json").then(e=>{this._font=e,this._loaded()})}_loaded(){this.update(!1),this.addToScene(this._scene,this._uiScene),this._initialized.resolve()}_performUpdate(e){this._enabled&&(this._lineBounds||e)&&this._font&&(this._updateHeight(),this._updateWidth(),this._updateDepth())}_updateWidth(){let e=new THREE.Geometry,i=this._getWidthEdge();e.vertices.push(i.start,i.end),this._widthLine.geometry.dispose(),this._widthLine.geometry=e;let t=i.getCenter(new THREE.Vector3);this._widthText||(this._widthText=new TextWithBackground(this._font)),this._widthText.topDown=this._topDimensions;const s=this._unitFormatter.formatMMValueToUnitString(1e3*this._dimensions.x);this._widthText.update(t,0,s,this._cameraPosition)}_updateHeight(){let e=new THREE.Geometry,i=this._getHeightEdge();e.vertices.push(i.start,i.end),this._heightLine.geometry.dispose(),this._heightLine.geometry=e;let t=i.getCenter(new THREE.Vector3);this._heightText||(this._heightText=new TextWithBackground(this._font)),this._heightText.topDown=this._topDimensions;const s=this._unitFormatter.formatMMValueToUnitString(1e3*this._dimensions.y);this._heightText.update(t,1,s,this._cameraPosition)}_updateDepth(){let e=new THREE.Geometry,i=this._getDepthEdge();e.vertices.push(i.start,i.end),this._depthLine.geometry.dispose(),this._depthLine.geometry=e;let t=i.getCenter(new THREE.Vector3);this._depthText||(this._depthText=new TextWithBackground(this._font)),this._depthText.topDown=this._topDimensions;const s=this._unitFormatter.formatMMValueToUnitString(1e3*this._dimensions.z);this._depthText.update(t,2,s,this._cameraPosition)}updateBounds(e){this._dimensions=e.getSize(new THREE.Vector3),this._lineBounds=e.clone();let i=this._lineBounds.min.y<0?this._lineBounds.min.y:0;i-=.01,this._lineBounds.expandByVector(new THREE.Vector3(.05,i,.05)),this._textUpdated=!1,this.update()}update(e=!1){this._enabled&&!this._dimensionsVisible&&(this._dimensionsVisible=!0,this._visibilityChangedCallback()),this._performUpdate(e)}addToScene(e,i){this._widthText&&this._widthLine&&this._heightText&&this._heightLine&&this._heightText&&this._heightLine&&(e.add(this._widthLine),i.add(this._widthText),e.add(this._heightLine),i.add(this._heightText),e.add(this._depthLine),i.add(this._depthText))}removeFromScene(e,i){e.remove(this._widthLine),i.remove(this._widthText),e.remove(this._heightLine),i.remove(this._heightText),e.remove(this._depthLine),i.remove(this._depthText)}_getWidthEdge(){return this._cameraPosition.z>=0?new THREE.Line3(new THREE.Vector3(this._lineBounds.min.x,this._lineBounds.min.y,this._lineBounds.max.z),new THREE.Vector3(this._lineBounds.max.x,this._lineBounds.min.y,this._lineBounds.max.z)):new THREE.Line3(new THREE.Vector3(this._lineBounds.min.x,this._lineBounds.min.y,this._lineBounds.min.z),new THREE.Vector3(this._lineBounds.max.x,this._lineBounds.min.y,this._lineBounds.min.z))}_getDepthEdge(){return this._cameraPosition.x>=0?new THREE.Line3(new THREE.Vector3(this._lineBounds.max.x,this._lineBounds.min.y,this._lineBounds.min.z),new THREE.Vector3(this._lineBounds.max.x,this._lineBounds.min.y,this._lineBounds.max.z)):new THREE.Line3(new THREE.Vector3(this._lineBounds.min.x,this._lineBounds.min.y,this._lineBounds.min.z),new THREE.Vector3(this._lineBounds.min.x,this._lineBounds.min.y,this._lineBounds.max.z))}_getHeightEdge(){return this._cameraPosition.x>=0&&this._cameraPosition.z>=0?new THREE.Line3(new THREE.Vector3(this._lineBounds.max.x,this._lineBounds.min.y,this._lineBounds.max.z),new THREE.Vector3(this._lineBounds.max.x,this._lineBounds.max.y,this._lineBounds.max.z)):this._cameraPosition.x<0&&this._cameraPosition.z>=0?new THREE.Line3(new THREE.Vector3(this._lineBounds.min.x,this._lineBounds.min.y,this._lineBounds.max.z),new THREE.Vector3(this._lineBounds.min.x,this._lineBounds.max.y,this._lineBounds.max.z)):this._cameraPosition.x>=0&&this._cameraPosition.z<0?new THREE.Line3(new THREE.Vector3(this._lineBounds.max.x,this._lineBounds.min.y,this._lineBounds.min.z),new THREE.Vector3(this._lineBounds.max.x,this._lineBounds.max.y,this._lineBounds.min.z)):new THREE.Line3(new THREE.Vector3(this._lineBounds.min.x,this._lineBounds.min.y,this._lineBounds.min.z),new THREE.Vector3(this._lineBounds.min.x,this._lineBounds.max.y,this._lineBounds.min.z))}onDimensionsVisibilityChanged(e){this._onChange=e}enableTopDimensions(){this.enableDimensions(),this._topDimensions=!0,this._heightLine.visible=!1,this._heightText.visible=!1,this.update(!0)}disableTopDimensions(){this._topDimensions=!1,this._heightLine.visible=!0,this._heightText.visible=!0,this.disableDimensions()}enableDimensions(){this._enabled=!0,this.update(!0),this.addToScene(this._scene,this._uiScene)}disableDimensions(){this._enabled=!1,this._dimensionsVisible&&(this._dimensionsVisible=!1,this._visibilityChangedCallback()),this.removeFromScene(this._scene,this._uiScene)}_visibilityChangedCallback(){this._onChange&&this._onChange(this._dimensionsVisible)}_clear(){this._lineMaterial.dispose(),this._planeMaterial.dispose(),this._widthLine.geometry.dispose(),this._heightLine.geometry.dispose(),this._depthLine.geometry.dispose(),this._heightText.dispose(),this._heightText.dispose(),this._depthText.dispose()}getBoundingBox(){const e=new THREE.Box3;return e.expandByObject(this._widthLine),e.expandByObject(this._widthText),e.expandByObject(this._heightLine),e.expandByObject(this._heightText),e.expandByObject(this._depthLine),e.expandByObject(this._depthText),e}setVisibility(e){this._heightLine&&this._widthLine&&this._depthLine&&this._heightText&&this._widthText&&this._depthText&&(this._heightLine.visible=e,this._heightText.visible=e,this._widthLine.visible=e,this._widthText.visible=e,this._depthLine.visible=e,this._depthText.visible=e)}moveCameraStart(e){this.setVisibility(!1),this._cameraPosition=e,this.update()}moveCameraEnd(e){this.setVisibility(!0),this._cameraPosition=e,this.update()}clearScene(e){this._clear()}setScene(e){this._scene=e}setUiScene(e){this._uiScene=e}needsUiScene(){return!0}isInitialized(){return this._initialized.wait()}areDimensionsEnabled(){return this._enabled}}return __decorate([inject],e.prototype,"_unitFormatter",void 0),e})();export default DimensioningHelper;
|
|
2
|
+
//# sourceMappingURL=dimensioning-helper-55aa9709.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dimensioning-helper-55aa9709.js","sources":["../../packages/configurator-core/public/fonts/rubik_regular_sub.json"],"sourcesContent":["export default \"static/rubik_regular_sub-eb3f3b61078695cc.json\""],"names":[],"mappings":"ggIAAe"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
System.register(["./query-params-helper-c231e1b8.nomodule.js","./rapi-access-6a614458.nomodule.js","./main-thread-to-worker-4fc95d50.nomodule.js","./image-renderer-52bbd908.nomodule.js","./pixotron-c033394c.nomodule.js","./configurator-08e58911.nomodule.js","./mesh-generator-106a6ce1.nomodule.js","./configurator-mesh-generator-a69ff1e4.nomodule.js","./default-light-setting-86b8760c.nomodule.js"],(function(e){var t,i,s,n,h;return{setters:[function(){},function(e){t=e.f,i=e._,s=e.i,n=e.z},function(){},function(){},function(){},function(e){h=e.A},function(){},function(){},function(){}],execute:function(){const o="component_dimensioning_plane_material",a="component_dimensioning_text_material";let _=(()=>{class e extends THREE.Object3D{constructor(e){super(),this._label="",this._parameters={font:null,size:.1,height:.001,curveSegments:2,bevelEnabled:!0,bevelThickness:.001,bevelSize:.001},this.topDown=!1,this._parameters.font=e,this._position=new THREE.Vector3,this._initMaterials(),this._init(),this._update()}_initMaterials(){this._cacheHolder.materialCache.has(o)?this._planeMaterial=this._cacheHolder.materialCache.get(o):(this._planeMaterial=new THREE.MeshBasicMaterial({color:16777215,side:THREE.DoubleSide,opacity:.8,transparent:!0}),this._cacheHolder.materialCache.set(o,this._planeMaterial)),this._cacheHolder.materialCache.has(a)?this._textMaterial=this._cacheHolder.materialCache.get(a):(this._textMaterial=new THREE.MeshPhongMaterial({color:3618615}),this._cacheHolder.materialCache.set(a,this._textMaterial))}_init(){let e=new THREE.Geometry;this._text=new THREE.Mesh(e,this._textMaterial),this._text.name="text with background text "+this._label,this._plane=new THREE.Mesh(e,this._planeMaterial),this._plane.name="text with background plane "+this._label,this._textGeometry=new THREE.TextGeometry(this._label,this._parameters),this._textGeometry.computeBoundingBox(),this._text.geometry=this._textGeometry,this.add(this._text),this.add(this._plane)}update(e,t,i,s){this._position.copy(e),this._dimensioningType=t,this._cameraPosition=s,this._label=i;const n=this._cameraPosition.distanceTo(this._text.position),h=Math.max(.01,n/100),o=Math.max(5e-4,n/5e3);this._parameters.bevelThickness=o,this._parameters.bevelSize=o,this._parameters.size=h,this._textGeometry=new THREE.TextGeometry(this._label,this._parameters),this._textGeometry.computeBoundingBox(),this._text.geometry=this._textGeometry,this._update()}_update(){if(this.topDown){let e=new THREE.Quaternion;e.setFromAxisAngle(new THREE.Vector3(-1,0,0),Math.PI/2),this._updateText(this._textGeometry,e,new THREE.Vector3)}else if(this._updateText(this._textGeometry,new THREE.Quaternion,new THREE.Vector3),this._cameraPosition){const e=Math.atan2(this._cameraPosition.x-this._position.x,this._cameraPosition.z-this._position.z);this._text.rotation.y=e,this._plane.rotation.y=e}}_updateText(e,t,i){let s=new THREE.Vector3;s.copy(this._position),i.x*=this._getXSign(),s.add(i);let n=e.boundingBox.getSize(new THREE.Vector3);e.center(),this._text.position.copy(s),this._text.quaternion.copy(t);let h=new THREE.PlaneGeometry(n.x+.02,n.y+.02,32);h.center(),this._plane.geometry=h,this._plane.position.copy(s),this._plane.quaternion.copy(t)}_getXSign(){return!this._cameraPosition||this._cameraPosition.x>=0?1:-1}dispose(){t(this)}}return i([s],e.prototype,"_cacheHolder",void 0),e})();e("default",(()=>{class e{constructor(e){this._cameraPosition=new THREE.Vector3,this._textUpdated=!1,this._topDimensions=!1,this._initialized=new n,this._enabled=!1,this._dimensionsVisible=!1,this._creator_=e,this._lineMaterial=new THREE.LineBasicMaterial({color:3618615,linewidth:2});let t=new THREE.Geometry;this._widthLine=new THREE.Line(t,this._lineMaterial),this._widthLine.name="dimension width line",this._heightLine=new THREE.Line(t,this._lineMaterial),this._heightLine.name="dimension height line",this._depthLine=new THREE.Line(t,this._lineMaterial),this._depthLine.name="dimension depth line",this._planeMaterial=new THREE.MeshBasicMaterial({color:16777215,side:THREE.DoubleSide,opacity:.8,transparent:!0}),h.loadFont("static/rubik_regular_sub-eb3f3b61078695cc.json").then(e=>{this._font=e,this._loaded()})}_loaded(){this.update(!1),this.addToScene(this._scene,this._uiScene),this._initialized.resolve()}_performUpdate(e){this._enabled&&(this._lineBounds||e)&&this._font&&(this._updateHeight(),this._updateWidth(),this._updateDepth())}_updateWidth(){let e=new THREE.Geometry,t=this._getWidthEdge();e.vertices.push(t.start,t.end),this._widthLine.geometry.dispose(),this._widthLine.geometry=e;let i=t.getCenter(new THREE.Vector3);this._widthText||(this._widthText=new _(this._font)),this._widthText.topDown=this._topDimensions;const s=this._unitFormatter.formatMMValueToUnitString(1e3*this._dimensions.x);this._widthText.update(i,0,s,this._cameraPosition)}_updateHeight(){let e=new THREE.Geometry,t=this._getHeightEdge();e.vertices.push(t.start,t.end),this._heightLine.geometry.dispose(),this._heightLine.geometry=e;let i=t.getCenter(new THREE.Vector3);this._heightText||(this._heightText=new _(this._font)),this._heightText.topDown=this._topDimensions;const s=this._unitFormatter.formatMMValueToUnitString(1e3*this._dimensions.y);this._heightText.update(i,1,s,this._cameraPosition)}_updateDepth(){let e=new THREE.Geometry,t=this._getDepthEdge();e.vertices.push(t.start,t.end),this._depthLine.geometry.dispose(),this._depthLine.geometry=e;let i=t.getCenter(new THREE.Vector3);this._depthText||(this._depthText=new _(this._font)),this._depthText.topDown=this._topDimensions;const s=this._unitFormatter.formatMMValueToUnitString(1e3*this._dimensions.z);this._depthText.update(i,2,s,this._cameraPosition)}updateBounds(e){this._dimensions=e.getSize(new THREE.Vector3),this._lineBounds=e.clone();let t=this._lineBounds.min.y<0?this._lineBounds.min.y:0;t-=.01,this._lineBounds.expandByVector(new THREE.Vector3(.05,t,.05)),this._textUpdated=!1,this.update()}update(e=!1){this._enabled&&!this._dimensionsVisible&&(this._dimensionsVisible=!0,this._visibilityChangedCallback()),this._performUpdate(e)}addToScene(e,t){this._widthText&&this._widthLine&&this._heightText&&this._heightLine&&this._heightText&&this._heightLine&&(e.add(this._widthLine),t.add(this._widthText),e.add(this._heightLine),t.add(this._heightText),e.add(this._depthLine),t.add(this._depthText))}removeFromScene(e,t){e.remove(this._widthLine),t.remove(this._widthText),e.remove(this._heightLine),t.remove(this._heightText),e.remove(this._depthLine),t.remove(this._depthText)}_getWidthEdge(){return this._cameraPosition.z>=0?new THREE.Line3(new THREE.Vector3(this._lineBounds.min.x,this._lineBounds.min.y,this._lineBounds.max.z),new THREE.Vector3(this._lineBounds.max.x,this._lineBounds.min.y,this._lineBounds.max.z)):new THREE.Line3(new THREE.Vector3(this._lineBounds.min.x,this._lineBounds.min.y,this._lineBounds.min.z),new THREE.Vector3(this._lineBounds.max.x,this._lineBounds.min.y,this._lineBounds.min.z))}_getDepthEdge(){return this._cameraPosition.x>=0?new THREE.Line3(new THREE.Vector3(this._lineBounds.max.x,this._lineBounds.min.y,this._lineBounds.min.z),new THREE.Vector3(this._lineBounds.max.x,this._lineBounds.min.y,this._lineBounds.max.z)):new THREE.Line3(new THREE.Vector3(this._lineBounds.min.x,this._lineBounds.min.y,this._lineBounds.min.z),new THREE.Vector3(this._lineBounds.min.x,this._lineBounds.min.y,this._lineBounds.max.z))}_getHeightEdge(){return this._cameraPosition.x>=0&&this._cameraPosition.z>=0?new THREE.Line3(new THREE.Vector3(this._lineBounds.max.x,this._lineBounds.min.y,this._lineBounds.max.z),new THREE.Vector3(this._lineBounds.max.x,this._lineBounds.max.y,this._lineBounds.max.z)):this._cameraPosition.x<0&&this._cameraPosition.z>=0?new THREE.Line3(new THREE.Vector3(this._lineBounds.min.x,this._lineBounds.min.y,this._lineBounds.max.z),new THREE.Vector3(this._lineBounds.min.x,this._lineBounds.max.y,this._lineBounds.max.z)):this._cameraPosition.x>=0&&this._cameraPosition.z<0?new THREE.Line3(new THREE.Vector3(this._lineBounds.max.x,this._lineBounds.min.y,this._lineBounds.min.z),new THREE.Vector3(this._lineBounds.max.x,this._lineBounds.max.y,this._lineBounds.min.z)):new THREE.Line3(new THREE.Vector3(this._lineBounds.min.x,this._lineBounds.min.y,this._lineBounds.min.z),new THREE.Vector3(this._lineBounds.min.x,this._lineBounds.max.y,this._lineBounds.min.z))}onDimensionsVisibilityChanged(e){this._onChange=e}enableTopDimensions(){this.enableDimensions(),this._topDimensions=!0,this._heightLine.visible=!1,this._heightText.visible=!1,this.update(!0)}disableTopDimensions(){this._topDimensions=!1,this._heightLine.visible=!0,this._heightText.visible=!0,this.disableDimensions()}enableDimensions(){this._enabled=!0,this.update(!0),this.addToScene(this._scene,this._uiScene)}disableDimensions(){this._enabled=!1,this._dimensionsVisible&&(this._dimensionsVisible=!1,this._visibilityChangedCallback()),this.removeFromScene(this._scene,this._uiScene)}_visibilityChangedCallback(){this._onChange&&this._onChange(this._dimensionsVisible)}_clear(){this._lineMaterial.dispose(),this._planeMaterial.dispose(),this._widthLine.geometry.dispose(),this._heightLine.geometry.dispose(),this._depthLine.geometry.dispose(),this._heightText.dispose(),this._heightText.dispose(),this._depthText.dispose()}getBoundingBox(){const e=new THREE.Box3;return e.expandByObject(this._widthLine),e.expandByObject(this._widthText),e.expandByObject(this._heightLine),e.expandByObject(this._heightText),e.expandByObject(this._depthLine),e.expandByObject(this._depthText),e}setVisibility(e){this._heightLine&&this._widthLine&&this._depthLine&&this._heightText&&this._widthText&&this._depthText&&(this._heightLine.visible=e,this._heightText.visible=e,this._widthLine.visible=e,this._widthText.visible=e,this._depthLine.visible=e,this._depthText.visible=e)}moveCameraStart(e){this.setVisibility(!1),this._cameraPosition=e,this.update()}moveCameraEnd(e){this.setVisibility(!0),this._cameraPosition=e,this.update()}clearScene(e){this._clear()}setScene(e){this._scene=e}setUiScene(e){this._uiScene=e}needsUiScene(){return!0}isInitialized(){return this._initialized.wait()}areDimensionsEnabled(){return this._enabled}}return i([s],e.prototype,"_unitFormatter",void 0),e})())}}}));
|
|
2
|
+
//# sourceMappingURL=dimensioning-helper-c69b5012.nomodule.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dimensioning-helper-c69b5012.nomodule.js","sources":["../../packages/configurator-core/public/fonts/rubik_regular_sub.json"],"sourcesContent":["export default \"static/rubik_regular_sub-eb3f3b61078695cc.json\""],"names":[],"mappings":"o/HAAe"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
System.register(["./query-params-helper-c231e1b8.nomodule.js","./rapi-access-6a614458.nomodule.js","./main-thread-to-worker-4fc95d50.nomodule.js","./pixotron-c033394c.nomodule.js","./default-light-setting-86b8760c.nomodule.js"],(function(e){var t,i,r,s,n,a,o,h,c,l,d,_,m,u,p,g,w,E,f,b,S,v,L,C,M;return{setters:[function(){},function(e){t=e.n,i=e.L,r=e.o,s=e.K,n=e._,a=e.i,o=e.d,h=e.e,c=e.P,l=e.f,d=e.a9,_=e.aa,m=e.s},function(e){u=e.f},function(e){p=e.I,g=e.b,w=e.C,E=e.L,f=e.S,b=e.B,S=e.T,v=e.P,L=e.d,C=e.M},function(e){M=e.D}],execute:function(){const y=[new t("script-loader",g),new t("glb-input-manager",class extends p{},1),new t("logger",i),new t("rapi-access",r)];class R extends w{constructor(){super(...arguments),this.shouldIgnoreStandardBehavior=!1}adjust(e,t,i,r,s){let n=new THREE.Vector3(-e.x/2,0,-e.z/2),a=new THREE.Vector3(e.x/2,e.y,e.z/2);this._boundingBox=new THREE.Box3(n,a);let o=new THREE.Euler(-Math.PI/2+r,i,0,"ZYX"),h=(new THREE.Quaternion).setFromEuler(o);this._camera.updateProjectionMatrix(),this._camera.quaternion.copy(h),this._camera.position.copy(t)}_update(e){this.shouldIgnoreStandardBehavior?this._saveYawAndPitch():super._update(e)}animateCamera(e){return!!this.shouldIgnoreStandardBehavior||super.animateCamera(e)}}class B extends E{constructor(e,t){super(e,t),this._params={ambientLight:{color:"#ffffff"}},this._ambientLight=new THREE.AmbientLight(new THREE.Color(this._params.ambientLight.color),.5),this.addToScene()}addToScene(){this._scene.add(this._ambientLight)}removeFromScene(){this._scene.remove(this._ambientLight)}reload(){this.removeFromScene(),this.addToScene()}showGUI(){let e=s();if(e&&this._ambientLight){let t=e.addFolder("Ambient Light");t.add(this._ambientLight,"visible"),t.add(this._ambientLight,"intensity").min(0).max(5).step(.1),t.addColor(this._params.ambientLight,"color").onChange(e=>{this._ambientLight.color=new THREE.Color(e)})}}}let T=(()=>{class e extends f{constructor(e,t){super(e,t,o.GLB,"3D"),this._itemsCount=0,this._standardSceneBackgroundColor=this._scene.background,this._renderer.capabilities.maxTextures>8?this.loadDynamicLightSetting(h.createDynamicLightSettingSource(null,c.CAMERA)):(console.warn("this device has a maximum of 8 texture units thus we are using a simpler light setting"),this._lightSetting=new B(this._scene)),this._setEnvironment(new b(this._scene,this._environment))}createCameraControl(e,t){this._cameraControl=new R(this._creator_,this._getInputManager(),new THREE.Vector3(-1,1,1))}_getInputManager(){return this._glbInputManager}async loadStaticItem(e,t){const i=await this._rapiAccess.getItem(e);if(i.configuration)return Promise.reject();const r=u(i);return r?this.loadGLB(r,!0,void 0,t):Promise.reject(new Error("GLB Url not detected"))}loadGLB(e,t=!0,i=new THREE.Vector3(1,1,1),r){return this.clearScene(),new Promise((s,n)=>{this._loadGLB(e,new THREE.Vector3(0,0,0),0,void 0,i,void 0,void 0,r).then(e=>{this._currentGLB=e,this._scene.add(this._currentGLB);let i=(new THREE.Box3).setFromObject(this._currentGLB);if(t){let e=i.getCenter(new THREE.Vector3);this._cameraControl instanceof R&&(this._cameraControl.updateToBounds(i,!1,!0,e),this._cameraControl.reset(i,e,-15,0))}this._updateBounds(i),s()},n)})}preparePerspectiveImage(e,t,i){return new Promise(r=>{t||(t=1e3),i||(i=1e3),e||((e=new THREE.WebGLRenderer({antialias:!0})).setSize(t,i),e.outputEncoding=THREE.sRGBEncoding,e.autoClear=!1,e.shadowMap.enabled=!0,e.shadowMap.type=THREE.BasicShadowMap);let s=this._cameraControl.getCamera().clone();s instanceof THREE.PerspectiveCamera&&(s.aspect=t/i,s.updateProjectionMatrix()),this._lightSetting.removeFromScene();let n=new M(this._scene);e.render(this._scene,s);let a=e.domElement.toDataURL();e.domElement.toBlob(e=>{r({image:a,width:t,height:i,blob:e})},"image/png"),n.removeFromScene(),this._lightSetting.addToScene()})}adjustCamera(e,t,i,r){if(this._cameraControl instanceof R){let s=(new THREE.Box3).setFromObject(this._scene).getSize(new THREE.Vector3);this._cameraControl.adjust(s,e,t,i,r),this._requestRender()}}onStart(e){this._itemsCount=e,this._scene.background=null,this._cameraControl instanceof R&&(this._cameraControl.shouldIgnoreStandardBehavior=!0)}onElementFinished(e){this._itemsCount,Math.round(100/this._itemsCount*e)}onFinished(e){this._scene.background=this._standardSceneBackgroundColor,this._cameraControl instanceof R&&(this._cameraControl.shouldIgnoreStandardBehavior=!1)}clearScene(){this._currentGLB&&(this._scene.remove(this._currentGLB),l(this._currentGLB),this._currentGLB=null),super.clearScene()}enableHD(){super.enableHD(),this._pixotron.enableAA=!1,this._pixotron.getSAOPass().enabled=!0}sceneChanged(){}getPixotronParams(){return{saoparams:{intensity:.25,occlusionWorldRadius:.4,smoothTransition:!0,samplesPerFrame:4,bias:.016,numSamples:200,accumulative:!1,falloff:1.5},shadowparams:{shadowMapResolution:1024,shadowRadius:3,shadowQuality:1,smoothTransition:!0,enableAccumulation:!0,shadowBiasMultiplier:.6,nearPlane:.01,farPlane:50,fov:110,side:THREE.FrontSide,numSamples:100}}}getBakedShadowParams(){return{enable:!0,shadowMapResolution:512,smoothTransition:!0,numSamples:500,numSamplesPerFrame:4,bShadowMaterial:!0,falloff:1.5,darkness:.2,size:1.6,lightDirection:new THREE.Vector3(0,1,.5),lightSolidAngle:40}}getBounds(){return this._currentGLB?(new THREE.Box3).setFromObject(this._currentGLB):null}}return n([a],e.prototype,"_glbInputManager",void 0),n([a],e.prototype,"_rapiAccess",void 0),e})();class x{constructor(e,t,i){this._prefix="https://furniture.roomle.com/3d/glb/",this._listeners=new Set,this._finishedItems=0,this._sceneManager=e,this._renderer=new THREE.WebGLRenderer({antialias:!0,alpha:!0}),this._width=t,this._height=i,this._renderer.setSize(t,i),this._renderer.setClearColor(16777215,0),this._renderer.outputEncoding=THREE.sRGBEncoding}addListener(e){this._listeners.add(e)}removeListener(e){this._listeners.delete(e)}start(e){return this._entries=[],e.forEach(e=>{this._entries.push(this._transform(e))}),this._finishedItems=0,this._listeners.forEach(e=>e.onStart(this._entries.length)),this._zip=new window.JSZip,this._doNextEntry(),new Promise(e=>{this._resolve=e})}_transform(e){return{name:e.path.replace(".glb",".png"),url:this._prefix+e.path,position:new THREE.Vector3(e.camera.position.x,e.camera.position.z,-e.camera.position.y),fov:2*e.camera.fieldOfView,yaw:e.camera.rotation.z,pitch:e.camera.rotation.x}}_doNextEntry(){0===this._entries.length?(this._listeners.forEach(e=>e.onFinished(this._zip)),this._resolve(this._zip)):this._processEntry(this._entries[0])}_processEntry(e){this._sceneManager.loadGLB(e.url,!1,void 0).then(()=>{this._sceneManager.adjustCamera(e.position,e.yaw,e.pitch,e.fov),this._sceneManager.preparePerspectiveImage(this._renderer,this._width,this._height).then(t=>{this._entryFinished(e,t)})})}_entryFinished(e,t){let i=this._entries.indexOf(e);i>-1&&this._entries.splice(i,1),this._finishedItems++,this._listeners.forEach(e=>e.onElementFinished(this._finishedItems)),this._zip.file(e.name,t.blob),this._doNextEntry()}}let H=(()=>{class e{constructor(e){this._currentIdOrUrl=null,this._creator_=e}setCameraOffset(e){this._sceneManager.setCameraOffset(e)}getCameraOffset(){return this._sceneManager.getCameraOffset()}init(e,t){return this.setOverrides(t),this._domHelper.setDomElement(e),this._sceneManager?(this._lifeCycleManager.resume(),Promise.resolve()):new Promise(this._initPromiseCallback.bind(this))}_initPromiseCallback(e,t){this._threeLoader.fetch().then(()=>{let t=this._scriptLoader.fetch(d,{id:"gltf-loader"}),i=this._scriptLoader.fetch(_,{id:"draco-loader"}),r=this._scriptLoader.fetch(S,{id:"tween-js"});Promise.all([t,i,r]).then(()=>{this._sceneManager=new T(this._creator_,{left:0,top:1,right:1,bottom:0}),this.enableHD(),e()})})}enableHD(){return new Promise((e,t)=>{const i=()=>{this._sceneManager.enableHD(),e()};Promise.all(v.map(e=>this._scriptLoader.fetch(e,{id:e}))).then(()=>{this._scriptLoader.fetch(L,{id:"pi-js"}).then(i,t)},t)})}clearScene(){this._sceneManager.clearScene()}loadGLB(e,t=1,i){return this._currentIdOrUrl=e,this._rapiAccess.trackView(e),this._sceneManager.loadGLB(e,!0,new THREE.Vector3(t,t,t),i)}loadStaticItem(e,t){return this._currentIdOrUrl=e,this._rapiAccess.trackView(e),this._sceneManager.loadStaticItem(e,t)}getCurrentId(){return this._currentIdOrUrl}loadSceneSetting(e){return this._sceneManager.loadSceneSettings(e)}loadQualitySetting(e){this._sceneManager.loadQualitySetting(e)}preparePerspectiveImage(){return this._sceneManager.preparePerspectiveImage()}processRenderList(e,t=320,i=320){let r=JSON.parse(e);this._scriptLoader.fetch("static/jszip.min-dd6c9829408677a1.js",{id:"jszip-js"}).then(()=>{let e=new x(this._sceneManager,t,i);e.addListener(this._sceneManager),e.start(r.items).then(t=>{t.generateAsync({type:"blob"}).then(t=>{let i=document.createElement("a");i.href=URL.createObjectURL(t),i.download="content.zip",i.style.display="none",document.body.appendChild(i),i.click(),document.body.removeChild(i),e.removeListener(this._sceneManager)})})})}setOverrides(e){e&&(this._initData.setOverrides(e),this._globalInitData.setOverrides(e))}updateSize(){this._sceneManager.updateCamera()}getMain(){}resumeTest(e){this._domHelper.setDomElement(e),this._lifeCycleManager.resume()}pauseTest(){this._lifeCycleManager.pause()}showGUI(){this._sceneManager.showGUI()}get callbacks(){return{}}getScene(){return this._sceneManager.getScene()}updateScene(){this._sceneManager.updateScene()}}return n([a],e.prototype,"_rapiAccess",void 0),n([a],e.prototype,"_domHelper",void 0),n([a],e.prototype,"_scriptLoader",void 0),n([a],e.prototype,"_lifeCycleManager",void 0),n([a],e.prototype,"_threeLoader",void 0),n([a],e.prototype,"_initData",void 0),n([a],e.prototype,"_globalInitData",void 0),e})();e("GlbViewer",class extends C{setupGlobals(){}setupDependencies(){m.setup(y),this.lookup("logger",this._context)}cleanUpGlobals(){throw new Error("Method not implemented.")}cleanUpDependencies(){throw new Error("Method not implemented.")}bootFinished(){this._viewer=new H(this._context),window.RoomleGLBViewer||(window.RoomleGLBViewer=this._viewer)}getApi(){return this._viewer}getContextName(){return"glb-viewer"}})}}}));
|
|
2
|
+
//# sourceMappingURL=glb-viewer-1482553f.nomodule.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"glb-viewer-
|
|
1
|
+
{"version":3,"file":"glb-viewer-1482553f.nomodule.js","sources":["../../node_modules/jszip/dist/jszip.min.js"],"sourcesContent":["export default \"static/jszip.min-dd6c9829408677a1.js\""],"names":[],"mappings":"i5QAAe"}
|