@roomle/web-sdk 2.74.0-alpha.4 → 2.74.0-alpha.5
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-23ad92de.js → banana-for-scale-1781f1ff.js} +2 -2
- package/lib/{banana-for-scale-23ad92de.js.map → banana-for-scale-1781f1ff.js.map} +1 -1
- package/lib/{banana-for-scale-39cb1cf0.nomodule.js → banana-for-scale-8f1436e6.nomodule.js} +2 -2
- package/lib/{banana-for-scale-39cb1cf0.nomodule.js.map → banana-for-scale-8f1436e6.nomodule.js.map} +1 -1
- package/lib/{camera-behaviour-01fea02b.nomodule.js → camera-behaviour-2dd98c6c.nomodule.js} +2 -2
- package/lib/{camera-behaviour-01fea02b.nomodule.js.map → camera-behaviour-2dd98c6c.nomodule.js.map} +1 -1
- package/lib/{camera-behaviour-d75a763a.js → camera-behaviour-43b49b63.js} +2 -2
- package/lib/{camera-behaviour-d75a763a.js.map → camera-behaviour-43b49b63.js.map} +1 -1
- package/lib/{component-dimensioning-588e95c5.nomodule.js → component-dimensioning-4f239a17.nomodule.js} +2 -2
- package/lib/component-dimensioning-4f239a17.nomodule.js.map +1 -0
- package/lib/{component-dimensioning-f78ddb03.js → component-dimensioning-8a3b82ef.js} +2 -2
- package/lib/component-dimensioning-8a3b82ef.js.map +1 -0
- package/lib/{component-raycast-helper-e58503a0.js → component-raycast-helper-254d311b.js} +2 -2
- package/lib/component-raycast-helper-254d311b.js.map +1 -0
- package/lib/{component-raycast-helper-5dc0a9ee.nomodule.js → component-raycast-helper-53c7d3ec.nomodule.js} +2 -2
- package/lib/component-raycast-helper-53c7d3ec.nomodule.js.map +1 -0
- package/lib/{configurator-be3f5a34.js → configurator-4b1ce643.js} +2 -2
- package/lib/configurator-4b1ce643.js.map +1 -0
- package/lib/{configurator-59a2a6cb.nomodule.js → configurator-64332702.nomodule.js} +2 -2
- package/lib/configurator-64332702.nomodule.js.map +1 -0
- package/lib/configurator-main-ba354cae.js +2 -0
- package/lib/configurator-main-ba354cae.js.map +1 -0
- package/lib/configurator-main.nomodule.js +1 -1
- package/lib/{continuous-drawing-helper-c6bb89ae.js → continuous-drawing-helper-a1fa723a.js} +2 -2
- package/lib/continuous-drawing-helper-a1fa723a.js.map +1 -0
- package/lib/{continuous-drawing-helper-cfe76399.nomodule.js → continuous-drawing-helper-c5892ae8.nomodule.js} +2 -2
- package/lib/continuous-drawing-helper-c5892ae8.nomodule.js.map +1 -0
- package/lib/{default-light-setting-1ebe3f6c.nomodule.js → default-light-setting-ae3f47b4.nomodule.js} +2 -2
- package/lib/default-light-setting-ae3f47b4.nomodule.js.map +1 -0
- package/lib/{default-light-setting-8771d064.js → default-light-setting-b0a81c5b.js} +2 -2
- package/lib/default-light-setting-b0a81c5b.js.map +1 -0
- package/lib/{dimensioning-helper-3f1ce32a.nomodule.js → dimensioning-helper-edd8677a.nomodule.js} +2 -2
- package/lib/{dimensioning-helper-3f1ce32a.nomodule.js.map → dimensioning-helper-edd8677a.nomodule.js.map} +1 -1
- package/lib/{dimensioning-helper-971ab39c.js → dimensioning-helper-f516efaa.js} +2 -2
- package/lib/{dimensioning-helper-971ab39c.js.map → dimensioning-helper-f516efaa.js.map} +1 -1
- package/lib/{glb-viewer-17690c1b.nomodule.js → glb-viewer-52d79fe1.nomodule.js} +2 -2
- package/lib/{glb-viewer-17690c1b.nomodule.js.map → glb-viewer-52d79fe1.nomodule.js.map} +1 -1
- package/lib/{glb-viewer-camera-behaviour-39d258f2.nomodule.js → glb-viewer-camera-behaviour-58552b7f.nomodule.js} +2 -2
- package/lib/glb-viewer-camera-behaviour-58552b7f.nomodule.js.map +1 -0
- package/lib/{glb-viewer-camera-behaviour-3df0ca05.js → glb-viewer-camera-behaviour-a26b1098.js} +2 -2
- package/lib/glb-viewer-camera-behaviour-a26b1098.js.map +1 -0
- package/lib/{glb-viewer-99e4c9e7.js → glb-viewer-cbd4c89b.js} +2 -2
- package/lib/{glb-viewer-99e4c9e7.js.map → glb-viewer-cbd4c89b.js.map} +1 -1
- package/lib/glb-viewer-main-1cebbf59.js +2 -0
- package/lib/glb-viewer-main-1cebbf59.js.map +1 -0
- package/lib/glb-viewer-main.nomodule.js +1 -1
- package/lib/legacy/{banana-for-scale-89002040.legacy.js → banana-for-scale-f0c3fc8b.legacy.js} +2 -2
- package/lib/legacy/{banana-for-scale-89002040.legacy.js.map → banana-for-scale-f0c3fc8b.legacy.js.map} +1 -1
- package/lib/legacy/{camera-behaviour-8122e7f4.legacy.js → camera-behaviour-2c77ec60.legacy.js} +2 -2
- package/lib/legacy/{camera-behaviour-8122e7f4.legacy.js.map → camera-behaviour-2c77ec60.legacy.js.map} +1 -1
- package/lib/legacy/{component-dimensioning-fff47635.legacy.js → component-dimensioning-80984b38.legacy.js} +2 -2
- package/lib/legacy/component-dimensioning-80984b38.legacy.js.map +1 -0
- package/lib/legacy/{component-raycast-helper-aad007b8.legacy.js → component-raycast-helper-f2d1d895.legacy.js} +2 -2
- package/lib/legacy/component-raycast-helper-f2d1d895.legacy.js.map +1 -0
- package/lib/legacy/{configurator-1ee1bd4d.legacy.js → configurator-c167d81f.legacy.js} +2 -2
- package/lib/legacy/configurator-c167d81f.legacy.js.map +1 -0
- package/lib/legacy/configurator-main.legacy.js +1 -1
- package/lib/legacy/{continuous-drawing-helper-632757dd.legacy.js → continuous-drawing-helper-61dfc961.legacy.js} +2 -2
- package/lib/legacy/continuous-drawing-helper-61dfc961.legacy.js.map +1 -0
- package/lib/legacy/{default-light-setting-01055b7e.legacy.js → default-light-setting-4bf738f1.legacy.js} +2 -2
- package/lib/legacy/default-light-setting-4bf738f1.legacy.js.map +1 -0
- package/lib/legacy/{dimensioning-helper-56061636.legacy.js → dimensioning-helper-b2c1dcda.legacy.js} +2 -2
- package/lib/legacy/{dimensioning-helper-56061636.legacy.js.map → dimensioning-helper-b2c1dcda.legacy.js.map} +1 -1
- package/lib/legacy/{glb-viewer-7e9d7575.legacy.js → glb-viewer-bf5903b1.legacy.js} +2 -2
- package/lib/legacy/{glb-viewer-7e9d7575.legacy.js.map → glb-viewer-bf5903b1.legacy.js.map} +1 -1
- package/lib/legacy/{glb-viewer-camera-behaviour-ac8d484f.legacy.js → glb-viewer-camera-behaviour-2b59c805.legacy.js} +2 -2
- package/lib/legacy/glb-viewer-camera-behaviour-2b59c805.legacy.js.map +1 -0
- package/lib/legacy/glb-viewer-main.legacy.js +1 -1
- package/lib/legacy/{material-viewer-e2b5cb9f.legacy.js → material-viewer-38d60748.legacy.js} +2 -2
- package/lib/legacy/material-viewer-38d60748.legacy.js.map +1 -0
- package/lib/legacy/material-viewer-main.legacy.js +1 -1
- package/lib/legacy/{planner-9792a439.legacy.js → planner-860af5de.legacy.js} +2 -2
- package/lib/legacy/{planner-9792a439.legacy.js.map → planner-860af5de.legacy.js.map} +1 -1
- package/lib/legacy/planner-main.legacy.js +1 -1
- package/lib/legacy/{roomle-configurator-905ea538.legacy.js → roomle-configurator-40fa9f13.legacy.js} +2 -2
- package/lib/legacy/roomle-configurator-40fa9f13.legacy.js.map +1 -0
- package/lib/legacy/{roomle-dependency-injection-39dc143e.legacy.js → roomle-dependency-injection-423dbb39.legacy.js} +2 -2
- package/lib/legacy/{roomle-dependency-injection-39dc143e.legacy.js.map → roomle-dependency-injection-423dbb39.legacy.js.map} +1 -1
- package/lib/legacy/roomle-sdk.legacy.js +1 -1
- package/lib/legacy/{script-loader-9387dd60.legacy.js → script-loader-a0df9a54.legacy.js} +2 -2
- package/lib/legacy/script-loader-a0df9a54.legacy.js.map +1 -0
- package/lib/{static/ConfiguratorKernel-5dac71e7480481cc.wasm → legacy/static/ConfiguratorKernel-24c807805183b141.wasm} +0 -0
- package/lib/legacy/static/{ConfiguratorKernel-54827b72d9bb60ef.wasm → ConfiguratorKernel-4c22762cf5e8d990.wasm} +0 -0
- package/lib/{static/ConfiguratorKernelJs-628bf25d55520001.mem → legacy/static/ConfiguratorKernelJs-80a5e2d715bd0f40.mem} +0 -0
- package/lib/legacy/static/{ConfiguratorKernelJs-f176edb5c83c4b9d.js → ConfiguratorKernelJs-a5283faa75d966d9.js} +934 -934
- package/lib/{static/RoomleCore-b810b3ba99f8d761.wasm → legacy/static/RoomleCore-c637485b946d0f97.wasm} +0 -0
- package/lib/{static/RoomleCore-47c0d8e7d85e1d29.wasm → legacy/static/RoomleCore-d6a7edf06004c35f.wasm} +0 -0
- package/lib/legacy/static/{RoomleCoreJs-a2d0c927a6cbbe27.js → RoomleCoreJs-1d4f0d43e44998d3.js} +1391 -1323
- package/lib/{static/RoomleCoreJs-81af511fe9e04be0.mem → legacy/static/RoomleCoreJs-4be38a94462da31f.mem} +0 -0
- package/lib/legacy/static/{RoomleToolsCore-d8f4c262bc181cc2.wasm → RoomleToolsCore-361b7ff052238d41.wasm} +0 -0
- package/lib/legacy/static/{RoomleToolsCore-aa54f2e12b9fd90d.wasm → RoomleToolsCore-4bfbbbedbed81f9e.wasm} +0 -0
- package/lib/legacy/{stats-helper-ef15329b.legacy.js → stats-helper-9b4fda9a.legacy.js} +2 -2
- package/lib/legacy/stats-helper-9b4fda9a.legacy.js.map +1 -0
- package/lib/legacy/{tools-core-c09c795f.legacy.js → tools-core-213f1ad8.legacy.js} +2 -2
- package/lib/legacy/tools-core-213f1ad8.legacy.js.map +1 -0
- package/lib/{material-viewer-cbdb7a76.js → material-viewer-9240cc9b.js} +2 -2
- package/lib/material-viewer-9240cc9b.js.map +1 -0
- package/lib/{material-viewer-1ed38984.nomodule.js → material-viewer-f68c2c25.nomodule.js} +2 -2
- package/lib/material-viewer-f68c2c25.nomodule.js.map +1 -0
- package/lib/material-viewer-main-6d3cedba.js +2 -0
- package/lib/material-viewer-main-6d3cedba.js.map +1 -0
- package/lib/material-viewer-main.nomodule.js +1 -1
- package/lib/{planner-d47cf9f3.nomodule.js → planner-38459a58.nomodule.js} +2 -2
- package/lib/{planner-d47cf9f3.nomodule.js.map → planner-38459a58.nomodule.js.map} +1 -1
- package/lib/{planner-d33d0822.js → planner-4b79d3ab.js} +2 -2
- package/lib/{planner-d33d0822.js.map → planner-4b79d3ab.js.map} +1 -1
- package/lib/planner-main-2d43436c.js +2 -0
- package/lib/planner-main-2d43436c.js.map +1 -0
- package/lib/planner-main.nomodule.js +1 -1
- package/lib/{roomle-configurator-9f0b59e6.nomodule.js → roomle-configurator-32760d04.nomodule.js} +2 -2
- package/lib/roomle-configurator-32760d04.nomodule.js.map +1 -0
- package/lib/{roomle-configurator-f6b42ec3.js → roomle-configurator-b6455fa8.js} +2 -2
- package/lib/roomle-configurator-b6455fa8.js.map +1 -0
- package/lib/{roomle-dependency-injection-c6403d96.js → roomle-dependency-injection-914e3a85.js} +2 -2
- package/lib/{roomle-dependency-injection-c6403d96.js.map → roomle-dependency-injection-914e3a85.js.map} +1 -1
- package/lib/{roomle-dependency-injection-5db56e7e.nomodule.js → roomle-dependency-injection-c6e1570f.nomodule.js} +2 -2
- package/lib/{roomle-dependency-injection-5db56e7e.nomodule.js.map → roomle-dependency-injection-c6e1570f.nomodule.js.map} +1 -1
- package/lib/{roomle-sdk-571c93f3.js → roomle-sdk-307f5ffb.js} +2 -2
- package/lib/roomle-sdk-307f5ffb.js.map +1 -0
- package/lib/roomle-sdk.nomodule.js +1 -1
- package/lib/{script-loader-f055742a.js → script-loader-3211e543.js} +2 -2
- package/lib/script-loader-3211e543.js.map +1 -0
- package/lib/{script-loader-5ae13ded.nomodule.js → script-loader-c2627bed.nomodule.js} +2 -2
- package/lib/script-loader-c2627bed.nomodule.js.map +1 -0
- package/lib/{legacy/static/ConfiguratorKernel-5dac71e7480481cc.wasm → static/ConfiguratorKernel-24c807805183b141.wasm} +0 -0
- package/lib/static/{ConfiguratorKernel-54827b72d9bb60ef.wasm → ConfiguratorKernel-4c22762cf5e8d990.wasm} +0 -0
- package/lib/{legacy/static/ConfiguratorKernelJs-628bf25d55520001.mem → static/ConfiguratorKernelJs-80a5e2d715bd0f40.mem} +0 -0
- package/lib/static/{ConfiguratorKernelJs-f176edb5c83c4b9d.js → ConfiguratorKernelJs-a5283faa75d966d9.js} +934 -934
- package/lib/{legacy/static/RoomleCore-b810b3ba99f8d761.wasm → static/RoomleCore-c637485b946d0f97.wasm} +0 -0
- package/lib/{legacy/static/RoomleCore-47c0d8e7d85e1d29.wasm → static/RoomleCore-d6a7edf06004c35f.wasm} +0 -0
- package/lib/static/{RoomleCoreJs-a2d0c927a6cbbe27.js → RoomleCoreJs-1d4f0d43e44998d3.js} +1391 -1323
- package/lib/{legacy/static/RoomleCoreJs-81af511fe9e04be0.mem → static/RoomleCoreJs-4be38a94462da31f.mem} +0 -0
- package/lib/static/{RoomleToolsCore-d8f4c262bc181cc2.wasm → RoomleToolsCore-361b7ff052238d41.wasm} +0 -0
- package/lib/static/{RoomleToolsCore-aa54f2e12b9fd90d.wasm → RoomleToolsCore-4bfbbbedbed81f9e.wasm} +0 -0
- package/lib/{stats-helper-07734cfd.js → stats-helper-89d603cf.js} +2 -2
- package/lib/stats-helper-89d603cf.js.map +1 -0
- package/lib/{stats-helper-fe06fce3.nomodule.js → stats-helper-ba59a910.nomodule.js} +2 -2
- package/lib/stats-helper-ba59a910.nomodule.js.map +1 -0
- package/lib/{tools-core-b80b35f4.js → tools-core-5c815eca.js} +2 -2
- package/lib/tools-core-5c815eca.js.map +1 -0
- package/lib/{tools-core-9a7fb48d.nomodule.js → tools-core-a872b86a.nomodule.js} +2 -2
- package/lib/tools-core-a872b86a.nomodule.js.map +1 -0
- package/package.json +2 -2
- package/lib/component-dimensioning-588e95c5.nomodule.js.map +0 -1
- package/lib/component-dimensioning-f78ddb03.js.map +0 -1
- package/lib/component-raycast-helper-5dc0a9ee.nomodule.js.map +0 -1
- package/lib/component-raycast-helper-e58503a0.js.map +0 -1
- package/lib/configurator-59a2a6cb.nomodule.js.map +0 -1
- package/lib/configurator-be3f5a34.js.map +0 -1
- package/lib/configurator-main-d7c71b39.js +0 -2
- package/lib/configurator-main-d7c71b39.js.map +0 -1
- package/lib/continuous-drawing-helper-c6bb89ae.js.map +0 -1
- package/lib/continuous-drawing-helper-cfe76399.nomodule.js.map +0 -1
- package/lib/default-light-setting-1ebe3f6c.nomodule.js.map +0 -1
- package/lib/default-light-setting-8771d064.js.map +0 -1
- package/lib/glb-viewer-camera-behaviour-39d258f2.nomodule.js.map +0 -1
- package/lib/glb-viewer-camera-behaviour-3df0ca05.js.map +0 -1
- package/lib/glb-viewer-main-d8548d69.js +0 -2
- package/lib/glb-viewer-main-d8548d69.js.map +0 -1
- package/lib/legacy/component-dimensioning-fff47635.legacy.js.map +0 -1
- package/lib/legacy/component-raycast-helper-aad007b8.legacy.js.map +0 -1
- package/lib/legacy/configurator-1ee1bd4d.legacy.js.map +0 -1
- package/lib/legacy/continuous-drawing-helper-632757dd.legacy.js.map +0 -1
- package/lib/legacy/default-light-setting-01055b7e.legacy.js.map +0 -1
- package/lib/legacy/glb-viewer-camera-behaviour-ac8d484f.legacy.js.map +0 -1
- package/lib/legacy/material-viewer-e2b5cb9f.legacy.js.map +0 -1
- package/lib/legacy/roomle-configurator-905ea538.legacy.js.map +0 -1
- package/lib/legacy/script-loader-9387dd60.legacy.js.map +0 -1
- package/lib/legacy/stats-helper-ef15329b.legacy.js.map +0 -1
- package/lib/legacy/tools-core-c09c795f.legacy.js.map +0 -1
- package/lib/material-viewer-1ed38984.nomodule.js.map +0 -1
- package/lib/material-viewer-cbdb7a76.js.map +0 -1
- package/lib/material-viewer-main-39cfa624.js +0 -2
- package/lib/material-viewer-main-39cfa624.js.map +0 -1
- package/lib/planner-main-e36fec16.js +0 -2
- package/lib/planner-main-e36fec16.js.map +0 -1
- package/lib/roomle-configurator-9f0b59e6.nomodule.js.map +0 -1
- package/lib/roomle-configurator-f6b42ec3.js.map +0 -1
- package/lib/roomle-sdk-571c93f3.js.map +0 -1
- package/lib/script-loader-5ae13ded.nomodule.js.map +0 -1
- package/lib/script-loader-f055742a.js.map +0 -1
- package/lib/stats-helper-07734cfd.js.map +0 -1
- package/lib/stats-helper-fe06fce3.nomodule.js.map +0 -1
- package/lib/tools-core-9a7fb48d.nomodule.js.map +0 -1
- package/lib/tools-core-b80b35f4.js.map +0 -1
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
System.register(["./roomle-dependency-injection-
|
|
2
|
-
//# sourceMappingURL=stats-helper-
|
|
1
|
+
System.register(["./roomle-dependency-injection-423dbb39.legacy.js","./main-thread-to-worker-9cfabdfd.legacy.js"],(function(e){var t,a;return{setters:[function(e){t=e._,a=e.i},function(){}],execute:function(){class s{constructor(){this._statPanels=[]}_init(){let e=new Stats;e.showPanel(0),e.dom.style.cssText="position:absolute;top:0px;left:0px;z-index:110;",document.body.appendChild(e.dom),this._statPanels.push(e);let t=new Stats;t.showPanel(2),t.dom.style.cssText="position:absolute;top:50px;left:0px;z-index:110;",document.body.appendChild(t.dom),this._statPanels.push(t);let a=new Stats;this._drawPanel=a.addPanel(new Stats.Panel("draw","#0f0","#000")),a.showPanel(3),a.dom.style.cssText="position:absolute;top:100px;left:0px;z-index:110;",document.body.appendChild(a.dom),this._statPanels.push(a);let s=new Stats;this._trianglesPanel=s.addPanel(new Stats.Panel("poly","#0f0","#000")),s.showPanel(3),s.dom.style.cssText="position:absolute;top:150px;left:0px;z-index:110;",document.body.appendChild(s.dom),this._statPanels.push(s);let n=new Stats;this._geometryPanel=n.addPanel(new Stats.Panel("geo","#f00","#000")),n.showPanel(3),n.dom.style.cssText="position:absolute;top:200px;left:0px;z-index:110;",document.body.appendChild(n.dom),this._statPanels.push(n);let l=new Stats;this._texturePanel=l.addPanel(new Stats.Panel("tex","#f00","#000")),l.showPanel(3),l.dom.style.cssText="position:absolute;top:250px;left:0px;z-index:110;",document.body.appendChild(l.dom),this._statPanels.push(l);let o=new Stats;this._materialPanel=o.addPanel(new Stats.Panel("mat","#f00","#000")),o.showPanel(3),o.dom.style.cssText="position:absolute;top:300px;left:0px;z-index:110;",document.body.appendChild(o.dom),this._statPanels.push(o);let d=new Stats;this._qualityPanel=d.addPanel(new Stats.Panel("quality","#fff","#000")),d.showPanel(3),d.dom.style.cssText="position:absolute;top:350px;left:0px;z-index:110;",document.body.appendChild(d.dom),this._statPanels.push(d)}updateRenderInfo(e){this._drawPanel&&e.render.calls>0&&this._drawPanel.update(e.render.calls,500),this._trianglesPanel&&e.render.triangles>0&&this._trianglesPanel.update(e.render.triangles,1e4),this._geometryPanel&&e.memory.geometries>0&&this._geometryPanel.update(e.memory.geometries,1e4),this._texturePanel&&e.memory.textures>0&&this._texturePanel.update(e.memory.textures,1e4),this._materialPanel&&this._cacheHolder.materialCache.size>0&&this._materialPanel.update(this._cacheHolder.materialCache.size,1e3),this._statPanels.length>0&&this._statPanels.forEach(e=>e.update())}updateQualityInfo(e){this._qualityPanel&&e&&this._qualityPanel.update(e.getQuality(),5)}}e("default",s),t([a],s.prototype,"_cacheHolder",void 0)}}}));
|
|
2
|
+
//# sourceMappingURL=stats-helper-9b4fda9a.legacy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stats-helper-9b4fda9a.legacy.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
System.register(["./script-loader-
|
|
2
|
-
//# sourceMappingURL=tools-core-
|
|
1
|
+
System.register(["./script-loader-a0df9a54.legacy.js","./roomle-dependency-injection-423dbb39.legacy.js","./query-params-helper-62188bbd.legacy.js","./main-thread-to-worker-9cfabdfd.legacy.js"],(function(o){var e,t,s,n;return{setters:[function(o){e=o.S,t=o.M},function(o){s=o.D,n=o.b},function(){},function(){}],execute:function(){const l=[new s("script-loader",e)];o("ToolsCore",class extends t{setupGlobals(){}setupDependencies(){n.setup(l),this.lookup("logger",this._context)}cleanUpGlobals(){this._tools=void 0,window.RoomleToolsCore&&delete window.RoomleToolsCore}cleanUpDependencies(){const o=this.lookup("script-loader");o&&o.cleanUp()}bootFinished(){this._tools=this.lookup("roomle-tools-core",this._context),window.RoomleToolsCore||(window.RoomleToolsCore=this._tools)}getApi(){return this._tools}getContextName(){return"tools-core"}})}}}));
|
|
2
|
+
//# sourceMappingURL=tools-core-213f1ad8.legacy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tools-core-213f1ad8.legacy.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{S as ScriptLoader,M as Main}from"./script-loader-f055742a.js";import{_ as __decorate,i as inject,l as CANVAS_ID,p as DynamicLightSettingLoader,q as PREDEFINED_LIGHTSETTING,Z as MaterialCreator,ay as setMaterial,az as getMaterialShading,a1 as getGUI,aA as addExistingTexture,a0 as addTexture,aB as UiCallback,D as DependencyInjectionAssignment,L as Logger,aw as InputManager,aC as ConfiguratorMeshGenerator,R as RapiAccess,b as RoomleDependencyInjection}from"./roomle-dependency-injection-c6403d96.js";import{b as CameraBehaviour,S as SceneManager,B as BackgroundEnvironment,C as CameraControl3D,F as FloorEnvironment,T as TWEEN_FILE_NAME}from"./camera-behaviour-d75a763a.js";import{aE as CAMERA_TYPE,aP as BoxGeometry,z as Mesh,C as Color,ad as Box3,w as DoubleSide,a as Vector3,a7 as FrontSide,b0 as SphereGeometry,bb as PlaneGeometry,a9 as Texture}from"./main-thread-to-worker-86a19736.js";import"./query-params-helper-2def754b.js";class MaterialViewerCameraBehaviour extends CameraBehaviour{get cameraControl(){return this._cameraControl}}class MaterialViewerSceneManager extends SceneManager{constructor(e,a){super(e,a,CANVAS_ID.RMV,CAMERA_TYPE.CAMERA_3D),this._sceneParams={type:"cube"},this._materialParams={color:"#ffffff",metallic:.5,alpha:0,alphaCutoff:0,doubleSided:!1},this._renderer.capabilities.maxTextures>8&&this.loadDynamicLightSetting(DynamicLightSettingLoader.createDynamicLightSettingSource(null,PREDEFINED_LIGHTSETTING.CAMERA)),this._initScene()}_initScene(){const e=new BoxGeometry(1,1,1,100,100,100),a=MaterialCreator.createMeshPhysicalMaterial({color:this._initData.colors.PRIMARY});this._setMaterial(a),this._mesh=new Mesh(e,this._material),this._mesh.castShadow=!0,this._mesh.position.setY(.5),this._scene.add(this._mesh);const{initialFloorMaterial:t}=this._initData;if(t?this.changeFloorMaterialById(t):this._environment=new BackgroundEnvironment(this._scene,null,new Color(16777215)),this.cameraBehaviour.cameraControl instanceof CameraControl3D){const e=new Box3;e.setFromObject(this._mesh),console.trace("reset camera"),this.cameraBehaviour.cameraControl.updateAndReset(e)}this.showGUI()}loadMaterialId(e){return new Promise(a=>{this._configuratorMeshGenerator.loadMaterial(e,1e3,1e3).then(e=>{this._setMaterial(e),this._mesh.material=this._material,this._updateGUI(),this._requestRender(),a()})})}loadMaterial(e){return new Promise(a=>{e.__rapi_path__||(e.__rapi_path__="materials"),this._mesh.material=this._material,this._configuratorMeshGenerator.loadTextures(e,this._material,100,100).then(()=>{this._updateGUI(),this._requestRender()}),a()})}loadMaterialShading(e){return new Promise(a=>{let t={shading:e};this._setMaterial(setMaterial(this._material,t)),this._mesh.material=this._material,this._updateGUI(),this._requestRender(),a()})}_setMaterial(e){this._material=e,this._materialParams.alpha=e.opacity,this._materialParams.alphaCutoff=e.alphaTest,this._materialParams.color="#"+e.color.getHexString(),this._materialParams.doubleSided=e.side===DoubleSide,this._materialParams.metallic=1===e.metalness?1:e.reflectivity}getMaterialShading(e=1){return getMaterialShading(this._material,e)}createCameraControl(e,a){this._changeCameraBehaviour(new MaterialViewerCameraBehaviour(new CameraControl3D(this._creator_,this._getInputManager(),new Vector3(-1,1,1)),this._cameraBehaviourState))}_getInputManager(){return this._inputManager}sceneChanged(){}getBounds(){return this._mesh?(new Box3).setFromObject(this._mesh):null}getGeometryBounds(){return null}_guiLoaded(){this._updateGUI()}_updateGUI(){let e=getGUI();e&&(this._guiGeometryFolder||(this._guiGeometryFolder=e.addFolder("Geometry"),this._guiGeometryFolder.add(this._sceneParams,"type",{Cube:"cube",Sphere:"sphere",PlaneVertical:"plane_vertical",PlaneHorizontal:"plane_horizontal"}).onChange(e=>{this._setGeometry()})),this._material&&(this._guiMaterialFolder&&e.removeFolder(this._guiMaterialFolder),this._guiMaterialFolder=e.addFolder("Material"),this._guiMaterialFolder.addColor(this._materialParams,"color").onChange(e=>{this._material.color=new Color(e),this._shadingChanged()}),this._guiMaterialFolder.add(this._materialParams,"metallic").min(0).max(1).step(.01).onChange(e=>{this._material.metalness=1===e?1:.5,this._material.reflectivity=e||.5,this._shadingChanged()}),this._guiMaterialFolder.add(this._material,"roughness").min(0).max(1).step(.01).onChange(e=>{this._shadingChanged()}),this._guiMaterialFolder.add(this._material,"transmission").min(0).max(1).step(.01).onChange(e=>{this._material.transmission=e,e>0&&(this._material.opacity=1,this._material.alphaTest=.5,this._material.depthWrite=!1,this._material.transparent=!0,this._material.metalness=0),this._mesh.castShadow=!this._material.transparent,this._shadingChanged()}),this._guiMaterialFolder.add(this._materialParams,"alpha").min(0).max(1).step(.01).onChange(e=>{this._material.transparent=e<1,this._material.opacity=e,this._material.depthWrite=e>=1,this._mesh.castShadow=!this._material.transparent,this._shadingChanged()}),this._guiMaterialFolder.add(this._materialParams,"alphaCutoff").min(0).max(1).step(.01).onChange(e=>{this._material.alphaTest=e||0,this._shadingChanged()}),this._guiMaterialFolder.add(this._materialParams,"doubleSided").onChange(e=>{this._material.side=e?DoubleSide:FrontSide,this._shadingChanged()})),this._addGUIListener(e))}_shadingChanged(){this._roomleMaterialViewerUiCallback.onMaterialShadingChanged(getMaterialShading(this._material))}setGeometry(e){this._sceneParams.type=e,this._setGeometry()}_setGeometry(){let e;"cube"===this._sceneParams.type&&(e=new BoxGeometry(1,1,1,100,100,100)),"sphere"===this._sceneParams.type&&(e=new SphereGeometry(.5,100,100)),"plane_horizontal"===this._sceneParams.type&&(e=new PlaneGeometry(1,1),e.rotateX(-Math.PI/2)),"plane_vertical"===this._sceneParams.type&&(e=new PlaneGeometry(1,1)),this._mesh.geometry=e,this._renderEverything()}async changeFloorMaterialById(e){const a=await this._rapiAccess.getMaterial(e);return this._environment&&this._environment instanceof FloorEnvironment||(this._environment=new FloorEnvironment(this._scene,this._environment,!0)),new Promise((e,t)=>{this._environment.changeFloorMaterial(a,this._maxAnisotropy).then(()=>{this._requestRender(),e()},t)})}async addTexture(e,a){const t=100/(0===e.mmWidth?1:e.mmWidth),r=100/(0===e.mmHeight?1:e.mmHeight);if(a){const i=new Image;i.src=a;const s=new Texture;s.image=i,i.onload=function(){s.needsUpdate=!0},addExistingTexture(s,e,this._material,this._maxAnisotropy,t,r,this._renderer.capabilities.maxTextures)}else await addTexture(e.image,e,this._material,this._maxAnisotropy,t,r,this._renderer.capabilities.maxTextures);this._requestRender()}removeTexture(e){"ORM"===e.mapping&&(this._material.aoMap=null,this._material.roughnessMap=null,this._material.metalnessMap=null),"RGB"!==e.mapping&&"RGBA"!==e.mapping||(this._material.map=null),"XYZ"===e.mapping&&(this._material.normalMap=null),this._material.needsUpdate=!0,this._requestRender()}clearCache(){this._configuratorMeshGenerator.clear()}}__decorate([inject],MaterialViewerSceneManager.prototype,"_inputManager",void 0),__decorate([inject],MaterialViewerSceneManager.prototype,"_configuratorMeshGenerator",void 0),__decorate([inject],MaterialViewerSceneManager.prototype,"_roomleMaterialViewerUiCallback",void 0),__decorate([inject],MaterialViewerSceneManager.prototype,"_rapiAccess",void 0);class RoomleMaterialViewer{constructor(e){this._creator_=e}setCameraOffset(e){this._sceneManager.setCameraOffset(e)}getCameraOffset(){return this._sceneManager.getCameraOffset()}init(e){return this._domHelper.setDomElement(e),this._sceneManager?(this._lifeCycleManager.resume(),Promise.resolve()):new Promise(this._initPromiseCallback.bind(this))}_initPromiseCallback(e,a){Promise.all([this._scriptLoader.fetch(TWEEN_FILE_NAME,{id:"tween-js"})]).then(()=>{this._sceneManager=new MaterialViewerSceneManager(this._creator_,{left:0,top:1,right:1,bottom:0}),this._sceneManager.enableHD(),e()})}get callbacks(){return this._roomleMaterialViewerUiCallback}set callbacks(e){this._roomleMaterialViewerUiCallback=e}loadMaterialShading(e){return this._sceneManager.loadMaterialShading(e)}loadMaterial(e,a={}){return a.flushCache&&this._clearCaches(),this._sceneManager.loadMaterial(e)}loadMaterialId(e,a={}){return a.flushCache&&this._clearCaches(),this._sceneManager.loadMaterialId(e)}getMaterialShading(e=1){return this._sceneManager.getMaterialShading(e)}loadSceneSetting(e){return this._sceneManager.loadSceneSettings(e)}setOverrides(e){e&&this._initData.setOverrides(e)}updateSize(){this._sceneManager.updateCamera()}getMain(){}resumeTest(e){this._domHelper.setDomElement(e),this._lifeCycleManager.resume()}pauseTest(){this._lifeCycleManager.pause()}showGUI(){this._sceneManager.showGUI()}async changeFloorMaterialById(e){return this._sceneManager.changeFloorMaterialById(e)}setGeometry(e){this._sceneManager.setGeometry(e)}async addTexture(e,a){return this._sceneManager.addTexture(e,a)}removeTexture(e){return this._sceneManager.removeTexture(e)}_clearCaches(){this._rapiAccess.cleanUp(),this._sceneManager.clearCache()}getScene(){return this._sceneManager.getScene()}updateScene(){this._sceneManager.updateScene()}getUnitFormatter(){return this._unitFormatter}getStorage(){return this._idbManager}setEnvironmentMap(e){const{url:a,intensity:t,rotation:r,maxLightSources:i}=e;this._sceneManager.setEnvironmentMap(a,t,r,i)}}__decorate([inject],RoomleMaterialViewer.prototype,"_domHelper",void 0),__decorate([inject],RoomleMaterialViewer.prototype,"_scriptLoader",void 0),__decorate([inject],RoomleMaterialViewer.prototype,"_lifeCycleManager",void 0),__decorate([inject],RoomleMaterialViewer.prototype,"_roomleMaterialViewerUiCallback",void 0),__decorate([inject],RoomleMaterialViewer.prototype,"_initData",void 0),__decorate([inject],RoomleMaterialViewer.prototype,"_rapiAccess",void 0),__decorate([inject],RoomleMaterialViewer.prototype,"_unitFormatter",void 0),__decorate([inject],RoomleMaterialViewer.prototype,"_idbManager",void 0);const INJECTABLES=[new DependencyInjectionAssignment("script-loader",ScriptLoader),new DependencyInjectionAssignment("logger",Logger),new DependencyInjectionAssignment("input-manager",InputManager,1),new DependencyInjectionAssignment("configurator-mesh-generator",ConfiguratorMeshGenerator),new DependencyInjectionAssignment("rapi-access",RapiAccess),new DependencyInjectionAssignment("roomle-material-viewer-ui-callback",class extends UiCallback{constructor(e){super(e),this.onMaterialShadingChanged=e=>{}}},1)];class MaterialViewer extends Main{setupGlobals(){}setupDependencies(){RoomleDependencyInjection.setup(INJECTABLES),this.lookup("logger",this._context)}cleanUpGlobals(){throw new Error("Method not implemented.")}cleanUpDependencies(){throw new Error("Method not implemented.")}bootFinished(){this._viewer=new RoomleMaterialViewer(this._context),window.RoomleMaterialViewer||(window.RoomleMaterialViewer=this._viewer)}getApi(){return this._viewer}getContextName(){return"material-viewer"}}export{MaterialViewer};
|
|
2
|
-
//# sourceMappingURL=material-viewer-
|
|
1
|
+
import{S as ScriptLoader,M as Main}from"./script-loader-3211e543.js";import{_ as __decorate,i as inject,l as CANVAS_ID,p as DynamicLightSettingLoader,q as PREDEFINED_LIGHTSETTING,Z as MaterialCreator,ay as setMaterial,az as getMaterialShading,a1 as getGUI,aA as addExistingTexture,a0 as addTexture,aB as UiCallback,D as DependencyInjectionAssignment,L as Logger,aw as InputManager,aC as ConfiguratorMeshGenerator,R as RapiAccess,b as RoomleDependencyInjection}from"./roomle-dependency-injection-914e3a85.js";import{b as CameraBehaviour,S as SceneManager,B as BackgroundEnvironment,C as CameraControl3D,F as FloorEnvironment,T as TWEEN_FILE_NAME}from"./camera-behaviour-43b49b63.js";import{aE as CAMERA_TYPE,aP as BoxGeometry,z as Mesh,C as Color,ad as Box3,w as DoubleSide,a as Vector3,a7 as FrontSide,b0 as SphereGeometry,bb as PlaneGeometry,a9 as Texture}from"./main-thread-to-worker-86a19736.js";import"./query-params-helper-2def754b.js";class MaterialViewerCameraBehaviour extends CameraBehaviour{get cameraControl(){return this._cameraControl}}class MaterialViewerSceneManager extends SceneManager{constructor(e,a){super(e,a,CANVAS_ID.RMV,CAMERA_TYPE.CAMERA_3D),this._sceneParams={type:"cube"},this._materialParams={color:"#ffffff",metallic:.5,alpha:0,alphaCutoff:0,doubleSided:!1},this._renderer.capabilities.maxTextures>8&&this.loadDynamicLightSetting(DynamicLightSettingLoader.createDynamicLightSettingSource(null,PREDEFINED_LIGHTSETTING.CAMERA)),this._initScene()}_initScene(){const e=new BoxGeometry(1,1,1,100,100,100),a=MaterialCreator.createMeshPhysicalMaterial({color:this._initData.colors.PRIMARY});this._setMaterial(a),this._mesh=new Mesh(e,this._material),this._mesh.castShadow=!0,this._mesh.position.setY(.5),this._scene.add(this._mesh);const{initialFloorMaterial:t}=this._initData;if(t?this.changeFloorMaterialById(t):this._environment=new BackgroundEnvironment(this._scene,null,new Color(16777215)),this.cameraBehaviour.cameraControl instanceof CameraControl3D){const e=new Box3;e.setFromObject(this._mesh),console.trace("reset camera"),this.cameraBehaviour.cameraControl.updateAndReset(e)}this.showGUI()}loadMaterialId(e){return new Promise(a=>{this._configuratorMeshGenerator.loadMaterial(e,1e3,1e3).then(e=>{this._setMaterial(e),this._mesh.material=this._material,this._updateGUI(),this._requestRender(),a()})})}loadMaterial(e){return new Promise(a=>{e.__rapi_path__||(e.__rapi_path__="materials"),this._mesh.material=this._material,this._configuratorMeshGenerator.loadTextures(e,this._material,100,100).then(()=>{this._updateGUI(),this._requestRender()}),a()})}loadMaterialShading(e){return new Promise(a=>{let t={shading:e};this._setMaterial(setMaterial(this._material,t)),this._mesh.material=this._material,this._updateGUI(),this._requestRender(),a()})}_setMaterial(e){this._material=e,this._materialParams.alpha=e.opacity,this._materialParams.alphaCutoff=e.alphaTest,this._materialParams.color="#"+e.color.getHexString(),this._materialParams.doubleSided=e.side===DoubleSide,this._materialParams.metallic=1===e.metalness?1:e.reflectivity}getMaterialShading(e=1){return getMaterialShading(this._material,e)}createCameraControl(e,a){this._changeCameraBehaviour(new MaterialViewerCameraBehaviour(new CameraControl3D(this._creator_,this._getInputManager(),new Vector3(-1,1,1)),this._cameraBehaviourState))}_getInputManager(){return this._inputManager}sceneChanged(){}getBounds(){return this._mesh?(new Box3).setFromObject(this._mesh):null}getGeometryBounds(){return null}_guiLoaded(){this._updateGUI()}_updateGUI(){let e=getGUI();e&&(this._guiGeometryFolder||(this._guiGeometryFolder=e.addFolder("Geometry"),this._guiGeometryFolder.add(this._sceneParams,"type",{Cube:"cube",Sphere:"sphere",PlaneVertical:"plane_vertical",PlaneHorizontal:"plane_horizontal"}).onChange(e=>{this._setGeometry()})),this._material&&(this._guiMaterialFolder&&e.removeFolder(this._guiMaterialFolder),this._guiMaterialFolder=e.addFolder("Material"),this._guiMaterialFolder.addColor(this._materialParams,"color").onChange(e=>{this._material.color=new Color(e),this._shadingChanged()}),this._guiMaterialFolder.add(this._materialParams,"metallic").min(0).max(1).step(.01).onChange(e=>{this._material.metalness=1===e?1:.5,this._material.reflectivity=e||.5,this._shadingChanged()}),this._guiMaterialFolder.add(this._material,"roughness").min(0).max(1).step(.01).onChange(e=>{this._shadingChanged()}),this._guiMaterialFolder.add(this._material,"transmission").min(0).max(1).step(.01).onChange(e=>{this._material.transmission=e,e>0&&(this._material.opacity=1,this._material.alphaTest=.5,this._material.depthWrite=!1,this._material.transparent=!0,this._material.metalness=0),this._mesh.castShadow=!this._material.transparent,this._shadingChanged()}),this._guiMaterialFolder.add(this._materialParams,"alpha").min(0).max(1).step(.01).onChange(e=>{this._material.transparent=e<1,this._material.opacity=e,this._material.depthWrite=e>=1,this._mesh.castShadow=!this._material.transparent,this._shadingChanged()}),this._guiMaterialFolder.add(this._materialParams,"alphaCutoff").min(0).max(1).step(.01).onChange(e=>{this._material.alphaTest=e||0,this._shadingChanged()}),this._guiMaterialFolder.add(this._materialParams,"doubleSided").onChange(e=>{this._material.side=e?DoubleSide:FrontSide,this._shadingChanged()})),this._addGUIListener(e))}_shadingChanged(){this._roomleMaterialViewerUiCallback.onMaterialShadingChanged(getMaterialShading(this._material))}setGeometry(e){this._sceneParams.type=e,this._setGeometry()}_setGeometry(){let e;"cube"===this._sceneParams.type&&(e=new BoxGeometry(1,1,1,100,100,100)),"sphere"===this._sceneParams.type&&(e=new SphereGeometry(.5,100,100)),"plane_horizontal"===this._sceneParams.type&&(e=new PlaneGeometry(1,1),e.rotateX(-Math.PI/2)),"plane_vertical"===this._sceneParams.type&&(e=new PlaneGeometry(1,1)),this._mesh.geometry=e,this._renderEverything()}async changeFloorMaterialById(e){const a=await this._rapiAccess.getMaterial(e);return this._environment&&this._environment instanceof FloorEnvironment||(this._environment=new FloorEnvironment(this._scene,this._environment,!0)),new Promise((e,t)=>{this._environment.changeFloorMaterial(a,this._maxAnisotropy).then(()=>{this._requestRender(),e()},t)})}async addTexture(e,a){const t=100/(0===e.mmWidth?1:e.mmWidth),r=100/(0===e.mmHeight?1:e.mmHeight);if(a){const i=new Image;i.src=a;const s=new Texture;s.image=i,i.onload=function(){s.needsUpdate=!0},addExistingTexture(s,e,this._material,this._maxAnisotropy,t,r,this._renderer.capabilities.maxTextures)}else await addTexture(e.image,e,this._material,this._maxAnisotropy,t,r,this._renderer.capabilities.maxTextures);this._requestRender()}removeTexture(e){"ORM"===e.mapping&&(this._material.aoMap=null,this._material.roughnessMap=null,this._material.metalnessMap=null),"RGB"!==e.mapping&&"RGBA"!==e.mapping||(this._material.map=null),"XYZ"===e.mapping&&(this._material.normalMap=null),this._material.needsUpdate=!0,this._requestRender()}clearCache(){this._configuratorMeshGenerator.clear()}}__decorate([inject],MaterialViewerSceneManager.prototype,"_inputManager",void 0),__decorate([inject],MaterialViewerSceneManager.prototype,"_configuratorMeshGenerator",void 0),__decorate([inject],MaterialViewerSceneManager.prototype,"_roomleMaterialViewerUiCallback",void 0),__decorate([inject],MaterialViewerSceneManager.prototype,"_rapiAccess",void 0);class RoomleMaterialViewer{constructor(e){this._creator_=e}setCameraOffset(e){this._sceneManager.setCameraOffset(e)}getCameraOffset(){return this._sceneManager.getCameraOffset()}init(e){return this._domHelper.setDomElement(e),this._sceneManager?(this._lifeCycleManager.resume(),Promise.resolve()):new Promise(this._initPromiseCallback.bind(this))}_initPromiseCallback(e,a){Promise.all([this._scriptLoader.fetch(TWEEN_FILE_NAME,{id:"tween-js"})]).then(()=>{this._sceneManager=new MaterialViewerSceneManager(this._creator_,{left:0,top:1,right:1,bottom:0}),this._sceneManager.enableHD(),e()})}get callbacks(){return this._roomleMaterialViewerUiCallback}set callbacks(e){this._roomleMaterialViewerUiCallback=e}loadMaterialShading(e){return this._sceneManager.loadMaterialShading(e)}loadMaterial(e,a={}){return a.flushCache&&this._clearCaches(),this._sceneManager.loadMaterial(e)}loadMaterialId(e,a={}){return a.flushCache&&this._clearCaches(),this._sceneManager.loadMaterialId(e)}getMaterialShading(e=1){return this._sceneManager.getMaterialShading(e)}loadSceneSetting(e){return this._sceneManager.loadSceneSettings(e)}setOverrides(e){e&&this._initData.setOverrides(e)}updateSize(){this._sceneManager.updateCamera()}getMain(){}resumeTest(e){this._domHelper.setDomElement(e),this._lifeCycleManager.resume()}pauseTest(){this._lifeCycleManager.pause()}showGUI(){this._sceneManager.showGUI()}async changeFloorMaterialById(e){return this._sceneManager.changeFloorMaterialById(e)}setGeometry(e){this._sceneManager.setGeometry(e)}async addTexture(e,a){return this._sceneManager.addTexture(e,a)}removeTexture(e){return this._sceneManager.removeTexture(e)}_clearCaches(){this._rapiAccess.cleanUp(),this._sceneManager.clearCache()}getScene(){return this._sceneManager.getScene()}updateScene(){this._sceneManager.updateScene()}getUnitFormatter(){return this._unitFormatter}getStorage(){return this._idbManager}setEnvironmentMap(e){const{url:a,intensity:t,rotation:r,maxLightSources:i}=e;this._sceneManager.setEnvironmentMap(a,t,r,i)}}__decorate([inject],RoomleMaterialViewer.prototype,"_domHelper",void 0),__decorate([inject],RoomleMaterialViewer.prototype,"_scriptLoader",void 0),__decorate([inject],RoomleMaterialViewer.prototype,"_lifeCycleManager",void 0),__decorate([inject],RoomleMaterialViewer.prototype,"_roomleMaterialViewerUiCallback",void 0),__decorate([inject],RoomleMaterialViewer.prototype,"_initData",void 0),__decorate([inject],RoomleMaterialViewer.prototype,"_rapiAccess",void 0),__decorate([inject],RoomleMaterialViewer.prototype,"_unitFormatter",void 0),__decorate([inject],RoomleMaterialViewer.prototype,"_idbManager",void 0);const INJECTABLES=[new DependencyInjectionAssignment("script-loader",ScriptLoader),new DependencyInjectionAssignment("logger",Logger),new DependencyInjectionAssignment("input-manager",InputManager,1),new DependencyInjectionAssignment("configurator-mesh-generator",ConfiguratorMeshGenerator),new DependencyInjectionAssignment("rapi-access",RapiAccess),new DependencyInjectionAssignment("roomle-material-viewer-ui-callback",class extends UiCallback{constructor(e){super(e),this.onMaterialShadingChanged=e=>{}}},1)];class MaterialViewer extends Main{setupGlobals(){}setupDependencies(){RoomleDependencyInjection.setup(INJECTABLES),this.lookup("logger",this._context)}cleanUpGlobals(){throw new Error("Method not implemented.")}cleanUpDependencies(){throw new Error("Method not implemented.")}bootFinished(){this._viewer=new RoomleMaterialViewer(this._context),window.RoomleMaterialViewer||(window.RoomleMaterialViewer=this._viewer)}getApi(){return this._viewer}getContextName(){return"material-viewer"}}export{MaterialViewer};
|
|
2
|
+
//# sourceMappingURL=material-viewer-9240cc9b.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"material-viewer-9240cc9b.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
System.register(["./script-loader-
|
|
2
|
-
//# sourceMappingURL=material-viewer-
|
|
1
|
+
System.register(["./script-loader-c2627bed.nomodule.js","./roomle-dependency-injection-c6e1570f.nomodule.js","./camera-behaviour-2dd98c6c.nomodule.js","./main-thread-to-worker-48fd8dbb.nomodule.js","./query-params-helper-fa98db72.nomodule.js"],(function(e){var t,a,i,r,s,n,o,h,l,m,_,d,c,g,u,p,M,w,y,C,f,v,b,S,P,x,F,G,I,U,R,A,T,B,D,k,E;return{setters:[function(e){t=e.S,a=e.M},function(e){i=e._,r=e.i,s=e.l,n=e.p,o=e.q,h=e.Z,l=e.ay,m=e.az,_=e.a1,d=e.aA,c=e.a0,g=e.aB,u=e.D,p=e.L,M=e.aw,w=e.aC,y=e.R,C=e.b},function(e){f=e.b,v=e.S,b=e.B,S=e.C,P=e.F,x=e.T},function(e){F=e.aE,G=e.aP,I=e.z,U=e.C,R=e.ad,A=e.w,T=e.a,B=e.a7,D=e.b0,k=e.bb,E=e.a9},function(){}],execute:function(){class V extends f{get cameraControl(){return this._cameraControl}}class j extends v{constructor(e,t){super(e,t,s.RMV,F.CAMERA_3D),this._sceneParams={type:"cube"},this._materialParams={color:"#ffffff",metallic:.5,alpha:0,alphaCutoff:0,doubleSided:!1},this._renderer.capabilities.maxTextures>8&&this.loadDynamicLightSetting(n.createDynamicLightSettingSource(null,o.CAMERA)),this._initScene()}_initScene(){const e=new G(1,1,1,100,100,100),t=h.createMeshPhysicalMaterial({color:this._initData.colors.PRIMARY});this._setMaterial(t),this._mesh=new I(e,this._material),this._mesh.castShadow=!0,this._mesh.position.setY(.5),this._scene.add(this._mesh);const{initialFloorMaterial:a}=this._initData;if(a?this.changeFloorMaterialById(a):this._environment=new b(this._scene,null,new U(16777215)),this.cameraBehaviour.cameraControl instanceof S){const e=new R;e.setFromObject(this._mesh),console.trace("reset camera"),this.cameraBehaviour.cameraControl.updateAndReset(e)}this.showGUI()}loadMaterialId(e){return new Promise(t=>{this._configuratorMeshGenerator.loadMaterial(e,1e3,1e3).then(e=>{this._setMaterial(e),this._mesh.material=this._material,this._updateGUI(),this._requestRender(),t()})})}loadMaterial(e){return new Promise(t=>{e.__rapi_path__||(e.__rapi_path__="materials"),this._mesh.material=this._material,this._configuratorMeshGenerator.loadTextures(e,this._material,100,100).then(()=>{this._updateGUI(),this._requestRender()}),t()})}loadMaterialShading(e){return new Promise(t=>{let a={shading:e};this._setMaterial(l(this._material,a)),this._mesh.material=this._material,this._updateGUI(),this._requestRender(),t()})}_setMaterial(e){this._material=e,this._materialParams.alpha=e.opacity,this._materialParams.alphaCutoff=e.alphaTest,this._materialParams.color="#"+e.color.getHexString(),this._materialParams.doubleSided=e.side===A,this._materialParams.metallic=1===e.metalness?1:e.reflectivity}getMaterialShading(e=1){return m(this._material,e)}createCameraControl(e,t){this._changeCameraBehaviour(new V(new S(this._creator_,this._getInputManager(),new T(-1,1,1)),this._cameraBehaviourState))}_getInputManager(){return this._inputManager}sceneChanged(){}getBounds(){return this._mesh?(new R).setFromObject(this._mesh):null}getGeometryBounds(){return null}_guiLoaded(){this._updateGUI()}_updateGUI(){let e=_();e&&(this._guiGeometryFolder||(this._guiGeometryFolder=e.addFolder("Geometry"),this._guiGeometryFolder.add(this._sceneParams,"type",{Cube:"cube",Sphere:"sphere",PlaneVertical:"plane_vertical",PlaneHorizontal:"plane_horizontal"}).onChange(e=>{this._setGeometry()})),this._material&&(this._guiMaterialFolder&&e.removeFolder(this._guiMaterialFolder),this._guiMaterialFolder=e.addFolder("Material"),this._guiMaterialFolder.addColor(this._materialParams,"color").onChange(e=>{this._material.color=new U(e),this._shadingChanged()}),this._guiMaterialFolder.add(this._materialParams,"metallic").min(0).max(1).step(.01).onChange(e=>{this._material.metalness=1===e?1:.5,this._material.reflectivity=e||.5,this._shadingChanged()}),this._guiMaterialFolder.add(this._material,"roughness").min(0).max(1).step(.01).onChange(e=>{this._shadingChanged()}),this._guiMaterialFolder.add(this._material,"transmission").min(0).max(1).step(.01).onChange(e=>{this._material.transmission=e,e>0&&(this._material.opacity=1,this._material.alphaTest=.5,this._material.depthWrite=!1,this._material.transparent=!0,this._material.metalness=0),this._mesh.castShadow=!this._material.transparent,this._shadingChanged()}),this._guiMaterialFolder.add(this._materialParams,"alpha").min(0).max(1).step(.01).onChange(e=>{this._material.transparent=e<1,this._material.opacity=e,this._material.depthWrite=e>=1,this._mesh.castShadow=!this._material.transparent,this._shadingChanged()}),this._guiMaterialFolder.add(this._materialParams,"alphaCutoff").min(0).max(1).step(.01).onChange(e=>{this._material.alphaTest=e||0,this._shadingChanged()}),this._guiMaterialFolder.add(this._materialParams,"doubleSided").onChange(e=>{this._material.side=e?A:B,this._shadingChanged()})),this._addGUIListener(e))}_shadingChanged(){this._roomleMaterialViewerUiCallback.onMaterialShadingChanged(m(this._material))}setGeometry(e){this._sceneParams.type=e,this._setGeometry()}_setGeometry(){let e;"cube"===this._sceneParams.type&&(e=new G(1,1,1,100,100,100)),"sphere"===this._sceneParams.type&&(e=new D(.5,100,100)),"plane_horizontal"===this._sceneParams.type&&(e=new k(1,1),e.rotateX(-Math.PI/2)),"plane_vertical"===this._sceneParams.type&&(e=new k(1,1)),this._mesh.geometry=e,this._renderEverything()}async changeFloorMaterialById(e){const t=await this._rapiAccess.getMaterial(e);return this._environment&&this._environment instanceof P||(this._environment=new P(this._scene,this._environment,!0)),new Promise((e,a)=>{this._environment.changeFloorMaterial(t,this._maxAnisotropy).then(()=>{this._requestRender(),e()},a)})}async addTexture(e,t){const a=100/(0===e.mmWidth?1:e.mmWidth),i=100/(0===e.mmHeight?1:e.mmHeight);if(t){const r=new Image;r.src=t;const s=new E;s.image=r,r.onload=function(){s.needsUpdate=!0},d(s,e,this._material,this._maxAnisotropy,a,i,this._renderer.capabilities.maxTextures)}else await c(e.image,e,this._material,this._maxAnisotropy,a,i,this._renderer.capabilities.maxTextures);this._requestRender()}removeTexture(e){"ORM"===e.mapping&&(this._material.aoMap=null,this._material.roughnessMap=null,this._material.metalnessMap=null),"RGB"!==e.mapping&&"RGBA"!==e.mapping||(this._material.map=null),"XYZ"===e.mapping&&(this._material.normalMap=null),this._material.needsUpdate=!0,this._requestRender()}clearCache(){this._configuratorMeshGenerator.clear()}}i([r],j.prototype,"_inputManager",void 0),i([r],j.prototype,"_configuratorMeshGenerator",void 0),i([r],j.prototype,"_roomleMaterialViewerUiCallback",void 0),i([r],j.prototype,"_rapiAccess",void 0);class O{constructor(e){this._creator_=e}setCameraOffset(e){this._sceneManager.setCameraOffset(e)}getCameraOffset(){return this._sceneManager.getCameraOffset()}init(e){return this._domHelper.setDomElement(e),this._sceneManager?(this._lifeCycleManager.resume(),Promise.resolve()):new Promise(this._initPromiseCallback.bind(this))}_initPromiseCallback(e,t){Promise.all([this._scriptLoader.fetch(x,{id:"tween-js"})]).then(()=>{this._sceneManager=new j(this._creator_,{left:0,top:1,right:1,bottom:0}),this._sceneManager.enableHD(),e()})}get callbacks(){return this._roomleMaterialViewerUiCallback}set callbacks(e){this._roomleMaterialViewerUiCallback=e}loadMaterialShading(e){return this._sceneManager.loadMaterialShading(e)}loadMaterial(e,t={}){return t.flushCache&&this._clearCaches(),this._sceneManager.loadMaterial(e)}loadMaterialId(e,t={}){return t.flushCache&&this._clearCaches(),this._sceneManager.loadMaterialId(e)}getMaterialShading(e=1){return this._sceneManager.getMaterialShading(e)}loadSceneSetting(e){return this._sceneManager.loadSceneSettings(e)}setOverrides(e){e&&this._initData.setOverrides(e)}updateSize(){this._sceneManager.updateCamera()}getMain(){}resumeTest(e){this._domHelper.setDomElement(e),this._lifeCycleManager.resume()}pauseTest(){this._lifeCycleManager.pause()}showGUI(){this._sceneManager.showGUI()}async changeFloorMaterialById(e){return this._sceneManager.changeFloorMaterialById(e)}setGeometry(e){this._sceneManager.setGeometry(e)}async addTexture(e,t){return this._sceneManager.addTexture(e,t)}removeTexture(e){return this._sceneManager.removeTexture(e)}_clearCaches(){this._rapiAccess.cleanUp(),this._sceneManager.clearCache()}getScene(){return this._sceneManager.getScene()}updateScene(){this._sceneManager.updateScene()}getUnitFormatter(){return this._unitFormatter}getStorage(){return this._idbManager}setEnvironmentMap(e){const{url:t,intensity:a,rotation:i,maxLightSources:r}=e;this._sceneManager.setEnvironmentMap(t,a,i,r)}}i([r],O.prototype,"_domHelper",void 0),i([r],O.prototype,"_scriptLoader",void 0),i([r],O.prototype,"_lifeCycleManager",void 0),i([r],O.prototype,"_roomleMaterialViewerUiCallback",void 0),i([r],O.prototype,"_initData",void 0),i([r],O.prototype,"_rapiAccess",void 0),i([r],O.prototype,"_unitFormatter",void 0),i([r],O.prototype,"_idbManager",void 0);const q=[new u("script-loader",t),new u("logger",p),new u("input-manager",M,1),new u("configurator-mesh-generator",w),new u("rapi-access",y),new u("roomle-material-viewer-ui-callback",class extends g{constructor(e){super(e),this.onMaterialShadingChanged=e=>{}}},1)];e("MaterialViewer",class extends a{setupGlobals(){}setupDependencies(){C.setup(q),this.lookup("logger",this._context)}cleanUpGlobals(){throw new Error("Method not implemented.")}cleanUpDependencies(){throw new Error("Method not implemented.")}bootFinished(){this._viewer=new O(this._context),window.RoomleMaterialViewer||(window.RoomleMaterialViewer=this._viewer)}getApi(){return this._viewer}getContextName(){return"material-viewer"}})}}}));
|
|
2
|
+
//# sourceMappingURL=material-viewer-f68c2c25.nomodule.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"material-viewer-f68c2c25.nomodule.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{MaterialViewer}from"./material-viewer-9240cc9b.js";import"./script-loader-3211e543.js";import"./query-params-helper-2def754b.js";import"./main-thread-to-worker-86a19736.js";import"./roomle-dependency-injection-914e3a85.js";import"./camera-behaviour-43b49b63.js";(new MaterialViewer).boot();
|
|
2
|
+
//# sourceMappingURL=material-viewer-main-6d3cedba.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"material-viewer-main-6d3cedba.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
System.register(["./material-viewer-
|
|
1
|
+
System.register(["./material-viewer-f68c2c25.nomodule.js","./script-loader-c2627bed.nomodule.js","./query-params-helper-fa98db72.nomodule.js","./main-thread-to-worker-48fd8dbb.nomodule.js","./roomle-dependency-injection-c6e1570f.nomodule.js","./camera-behaviour-2dd98c6c.nomodule.js"],(function(){var e;return{setters:[function(n){e=n.MaterialViewer},function(){},function(){},function(){},function(){},function(){}],execute:function(){(new e).boot()}}}));
|
|
2
2
|
//# sourceMappingURL=material-viewer-main.nomodule.js.map
|