@roomle/web-sdk 2.97.0-alpha.21 → 2.97.0-alpha.23
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-de844268.nomodule.js → banana-for-scale-684b6789.nomodule.js} +2 -2
- package/lib/{banana-for-scale-de844268.nomodule.js.map → banana-for-scale-684b6789.nomodule.js.map} +1 -1
- package/lib/{banana-for-scale-f8ad19cf.js → banana-for-scale-c8a28d6c.js} +2 -2
- package/lib/{banana-for-scale-f8ad19cf.js.map → banana-for-scale-c8a28d6c.js.map} +1 -1
- package/lib/{camera-behaviour-afcc8537.nomodule.js → camera-behaviour-a30a8262.nomodule.js} +2 -2
- package/lib/{camera-behaviour-afcc8537.nomodule.js.map → camera-behaviour-a30a8262.nomodule.js.map} +1 -1
- package/lib/{camera-behaviour-4a40c7df.js → camera-behaviour-ccddce8a.js} +2 -2
- package/lib/{camera-behaviour-4a40c7df.js.map → camera-behaviour-ccddce8a.js.map} +1 -1
- package/lib/{component-dimensioning-cc6bb031.js → component-dimensioning-357eee13.js} +2 -2
- package/lib/component-dimensioning-357eee13.js.map +1 -0
- package/lib/{component-dimensioning-4598e9c7.nomodule.js → component-dimensioning-d5f84e5f.nomodule.js} +2 -2
- package/lib/component-dimensioning-d5f84e5f.nomodule.js.map +1 -0
- package/lib/{component-raycast-helper-a641b5dd.js → component-raycast-helper-51a3075b.js} +2 -2
- package/lib/component-raycast-helper-51a3075b.js.map +1 -0
- package/lib/{component-raycast-helper-32cb7557.nomodule.js → component-raycast-helper-991bed69.nomodule.js} +2 -2
- package/lib/component-raycast-helper-991bed69.nomodule.js.map +1 -0
- package/lib/{configurator-9683c357.nomodule.js → configurator-2aec14e8.nomodule.js} +2 -2
- package/lib/configurator-2aec14e8.nomodule.js.map +1 -0
- package/lib/{configurator-1a3b83b9.js → configurator-aa11f700.js} +2 -2
- package/lib/configurator-aa11f700.js.map +1 -0
- package/lib/configurator-main-bc599c58.js +2 -0
- package/lib/configurator-main-bc599c58.js.map +1 -0
- package/lib/configurator-main.nomodule.js +1 -1
- package/lib/{continuous-drawing-helper-056484a0.js → continuous-drawing-helper-d5fec9d8.js} +2 -2
- package/lib/continuous-drawing-helper-d5fec9d8.js.map +1 -0
- package/lib/{continuous-drawing-helper-f4b2fd4d.nomodule.js → continuous-drawing-helper-d97f5d67.nomodule.js} +2 -2
- package/lib/continuous-drawing-helper-d97f5d67.nomodule.js.map +1 -0
- package/lib/{default-light-setting-6395eb29.nomodule.js → default-light-setting-27889c7a.nomodule.js} +2 -2
- package/lib/default-light-setting-27889c7a.nomodule.js.map +1 -0
- package/lib/{default-light-setting-03f6bb33.js → default-light-setting-4dd1b6b2.js} +2 -2
- package/lib/default-light-setting-4dd1b6b2.js.map +1 -0
- package/lib/definitions/packages/planner-core/src/utils/dimensions-helper.d.ts +2 -1
- package/lib/definitions/planner-core/src/utils/dimensions-helper.d.ts +2 -1
- package/lib/{dimensioning-helper-cb02f78e.js → dimensioning-helper-5beeb5d0.js} +2 -2
- package/lib/{dimensioning-helper-cb02f78e.js.map → dimensioning-helper-5beeb5d0.js.map} +1 -1
- package/lib/{dimensioning-helper-0a5705bf.nomodule.js → dimensioning-helper-ff6e4a33.nomodule.js} +2 -2
- package/lib/{dimensioning-helper-0a5705bf.nomodule.js.map → dimensioning-helper-ff6e4a33.nomodule.js.map} +1 -1
- package/lib/{glb-viewer-31d2d035.nomodule.js → glb-viewer-29c7628f.nomodule.js} +2 -2
- package/lib/{glb-viewer-31d2d035.nomodule.js.map → glb-viewer-29c7628f.nomodule.js.map} +1 -1
- package/lib/{glb-viewer-camera-behaviour-82d7d02c.js → glb-viewer-camera-behaviour-410a454e.js} +2 -2
- package/lib/glb-viewer-camera-behaviour-410a454e.js.map +1 -0
- package/lib/{glb-viewer-camera-behaviour-976e3a56.nomodule.js → glb-viewer-camera-behaviour-961c91c4.nomodule.js} +2 -2
- package/lib/glb-viewer-camera-behaviour-961c91c4.nomodule.js.map +1 -0
- package/lib/{glb-viewer-0c57b5bd.js → glb-viewer-f02ff394.js} +2 -2
- package/lib/{glb-viewer-0c57b5bd.js.map → glb-viewer-f02ff394.js.map} +1 -1
- package/lib/glb-viewer-main-69dd22f7.js +2 -0
- package/lib/glb-viewer-main-69dd22f7.js.map +1 -0
- package/lib/glb-viewer-main.nomodule.js +1 -1
- package/lib/{imos-ix-poc-export-helper-4e024987.js → imos-ix-poc-export-helper-38acfb3d.js} +2 -2
- package/lib/imos-ix-poc-export-helper-38acfb3d.js.map +1 -0
- package/lib/{imos-ix-poc-export-helper-25ea348e.nomodule.js → imos-ix-poc-export-helper-bf3fa2a6.nomodule.js} +2 -2
- package/lib/imos-ix-poc-export-helper-bf3fa2a6.nomodule.js.map +1 -0
- package/lib/legacy/{banana-for-scale-846d2527.legacy.js → banana-for-scale-c1436f0f.legacy.js} +2 -2
- package/lib/legacy/{banana-for-scale-846d2527.legacy.js.map → banana-for-scale-c1436f0f.legacy.js.map} +1 -1
- package/lib/legacy/{camera-behaviour-183dc9f3.legacy.js → camera-behaviour-e2dd0902.legacy.js} +2 -2
- package/lib/legacy/{camera-behaviour-183dc9f3.legacy.js.map → camera-behaviour-e2dd0902.legacy.js.map} +1 -1
- package/lib/legacy/{component-dimensioning-f2047e1a.legacy.js → component-dimensioning-95616070.legacy.js} +2 -2
- package/lib/legacy/component-dimensioning-95616070.legacy.js.map +1 -0
- package/lib/legacy/{component-raycast-helper-68e3cbf1.legacy.js → component-raycast-helper-d4964850.legacy.js} +2 -2
- package/lib/legacy/component-raycast-helper-d4964850.legacy.js.map +1 -0
- package/lib/legacy/{configurator-614e7c10.legacy.js → configurator-1c112bd0.legacy.js} +2 -2
- package/lib/legacy/configurator-1c112bd0.legacy.js.map +1 -0
- package/lib/legacy/configurator-main.legacy.js +1 -1
- package/lib/legacy/{continuous-drawing-helper-cd940248.legacy.js → continuous-drawing-helper-3e2c4ffe.legacy.js} +2 -2
- package/lib/legacy/continuous-drawing-helper-3e2c4ffe.legacy.js.map +1 -0
- package/lib/legacy/{default-light-setting-7a8d293d.legacy.js → default-light-setting-97ea85c2.legacy.js} +2 -2
- package/lib/legacy/default-light-setting-97ea85c2.legacy.js.map +1 -0
- package/lib/legacy/{dimensioning-helper-06d69c43.legacy.js → dimensioning-helper-0d7fb53a.legacy.js} +2 -2
- package/lib/legacy/{dimensioning-helper-06d69c43.legacy.js.map → dimensioning-helper-0d7fb53a.legacy.js.map} +1 -1
- package/lib/legacy/{glb-viewer-04860ffc.legacy.js → glb-viewer-a89a2530.legacy.js} +2 -2
- package/lib/legacy/{glb-viewer-04860ffc.legacy.js.map → glb-viewer-a89a2530.legacy.js.map} +1 -1
- package/lib/legacy/{glb-viewer-camera-behaviour-3faaab17.legacy.js → glb-viewer-camera-behaviour-83a86455.legacy.js} +2 -2
- package/lib/legacy/glb-viewer-camera-behaviour-83a86455.legacy.js.map +1 -0
- package/lib/legacy/glb-viewer-main.legacy.js +1 -1
- package/lib/legacy/{imos-ix-poc-export-helper-65318507.legacy.js → imos-ix-poc-export-helper-47adc182.legacy.js} +2 -2
- package/lib/legacy/imos-ix-poc-export-helper-47adc182.legacy.js.map +1 -0
- package/lib/legacy/{material-viewer-d3b6c609.legacy.js → material-viewer-bb3d6e2f.legacy.js} +2 -2
- package/lib/legacy/material-viewer-bb3d6e2f.legacy.js.map +1 -0
- package/lib/legacy/material-viewer-main.legacy.js +1 -1
- package/lib/legacy/{planner-44289639.legacy.js → planner-bba69886.legacy.js} +2 -2
- package/lib/legacy/{planner-44289639.legacy.js.map → planner-bba69886.legacy.js.map} +1 -1
- package/lib/legacy/planner-main.legacy.js +1 -1
- package/lib/legacy/{roomle-configurator-60cf879c.legacy.js → roomle-configurator-e52328ae.legacy.js} +2 -2
- package/lib/legacy/roomle-configurator-e52328ae.legacy.js.map +1 -0
- package/lib/legacy/{roomle-dependency-injection-6ba85faf.legacy.js → roomle-dependency-injection-7eec410b.legacy.js} +2 -2
- package/lib/legacy/{roomle-dependency-injection-6ba85faf.legacy.js.map → roomle-dependency-injection-7eec410b.legacy.js.map} +1 -1
- package/lib/legacy/roomle-sdk.legacy.js +1 -1
- package/lib/legacy/{script-loader-5561932b.legacy.js → script-loader-34682b5d.legacy.js} +2 -2
- package/lib/legacy/script-loader-34682b5d.legacy.js.map +1 -0
- package/lib/legacy/static/ConfiguratorKernel-a532a98bc38f5fcd.wasm +0 -0
- package/lib/legacy/static/RoomleCore-6cb90a7aa953052e.wasm +0 -0
- package/lib/legacy/static/RoomleToolsCore-ccb8329d803ea277.wasm +0 -0
- package/lib/legacy/{stats-helper-886c0b07.legacy.js → stats-helper-a90a2020.legacy.js} +2 -2
- package/lib/legacy/stats-helper-a90a2020.legacy.js.map +1 -0
- package/lib/legacy/{tools-core-247fc04f.legacy.js → tools-core-13c80c4f.legacy.js} +2 -2
- package/lib/legacy/tools-core-13c80c4f.legacy.js.map +1 -0
- package/lib/{material-viewer-58bf20d8.js → material-viewer-2e82a588.js} +2 -2
- package/lib/material-viewer-2e82a588.js.map +1 -0
- package/lib/{material-viewer-6f3d8f49.nomodule.js → material-viewer-eb3eb26a.nomodule.js} +2 -2
- package/lib/material-viewer-eb3eb26a.nomodule.js.map +1 -0
- package/lib/material-viewer-main-9450d34d.js +2 -0
- package/lib/material-viewer-main-9450d34d.js.map +1 -0
- package/lib/material-viewer-main.nomodule.js +1 -1
- package/lib/{planner-8376721f.nomodule.js → planner-0887bfda.nomodule.js} +2 -2
- package/lib/{planner-8376721f.nomodule.js.map → planner-0887bfda.nomodule.js.map} +1 -1
- package/lib/{planner-a6dc0b26.js → planner-48484190.js} +2 -2
- package/lib/{planner-a6dc0b26.js.map → planner-48484190.js.map} +1 -1
- package/lib/planner-main-1aec409d.js +2 -0
- package/lib/planner-main-1aec409d.js.map +1 -0
- package/lib/planner-main.nomodule.js +1 -1
- package/lib/{roomle-configurator-5d426ebd.nomodule.js → roomle-configurator-771af32e.nomodule.js} +2 -2
- package/lib/roomle-configurator-771af32e.nomodule.js.map +1 -0
- package/lib/{roomle-configurator-493f62a9.js → roomle-configurator-c98c76e0.js} +2 -2
- package/lib/roomle-configurator-c98c76e0.js.map +1 -0
- package/lib/{roomle-dependency-injection-dc1fb1ed.js → roomle-dependency-injection-65974091.js} +2 -2
- package/lib/{roomle-dependency-injection-dc1fb1ed.js.map → roomle-dependency-injection-65974091.js.map} +1 -1
- package/lib/{roomle-dependency-injection-0913d37a.nomodule.js → roomle-dependency-injection-b4151aea.nomodule.js} +2 -2
- package/lib/{roomle-dependency-injection-0913d37a.nomodule.js.map → roomle-dependency-injection-b4151aea.nomodule.js.map} +1 -1
- package/lib/{roomle-sdk-749d0839.js → roomle-sdk-afe3b5b1.js} +2 -2
- package/lib/roomle-sdk-afe3b5b1.js.map +1 -0
- package/lib/roomle-sdk.nomodule.js +1 -1
- package/lib/{script-loader-619b55b6.nomodule.js → script-loader-e037e14a.nomodule.js} +2 -2
- package/lib/script-loader-e037e14a.nomodule.js.map +1 -0
- package/lib/{script-loader-aa3f028c.js → script-loader-e2c4ec91.js} +2 -2
- package/lib/script-loader-e2c4ec91.js.map +1 -0
- package/lib/static/ConfiguratorKernel-a532a98bc38f5fcd.wasm +0 -0
- package/lib/static/RoomleCore-6cb90a7aa953052e.wasm +0 -0
- package/lib/static/RoomleToolsCore-ccb8329d803ea277.wasm +0 -0
- package/lib/{stats-helper-f2d95b91.nomodule.js → stats-helper-a10855fb.nomodule.js} +2 -2
- package/lib/stats-helper-a10855fb.nomodule.js.map +1 -0
- package/lib/{stats-helper-9eb062fc.js → stats-helper-fbeaf2f1.js} +2 -2
- package/lib/stats-helper-fbeaf2f1.js.map +1 -0
- package/lib/{tools-core-c42a74a1.js → tools-core-522262fb.js} +2 -2
- package/lib/tools-core-522262fb.js.map +1 -0
- package/lib/{tools-core-411d3164.nomodule.js → tools-core-d9c646de.nomodule.js} +2 -2
- package/lib/tools-core-d9c646de.nomodule.js.map +1 -0
- package/package.json +2 -2
- package/lib/component-dimensioning-4598e9c7.nomodule.js.map +0 -1
- package/lib/component-dimensioning-cc6bb031.js.map +0 -1
- package/lib/component-raycast-helper-32cb7557.nomodule.js.map +0 -1
- package/lib/component-raycast-helper-a641b5dd.js.map +0 -1
- package/lib/configurator-1a3b83b9.js.map +0 -1
- package/lib/configurator-9683c357.nomodule.js.map +0 -1
- package/lib/configurator-main-23e7fdcf.js +0 -2
- package/lib/configurator-main-23e7fdcf.js.map +0 -1
- package/lib/continuous-drawing-helper-056484a0.js.map +0 -1
- package/lib/continuous-drawing-helper-f4b2fd4d.nomodule.js.map +0 -1
- package/lib/default-light-setting-03f6bb33.js.map +0 -1
- package/lib/default-light-setting-6395eb29.nomodule.js.map +0 -1
- package/lib/glb-viewer-camera-behaviour-82d7d02c.js.map +0 -1
- package/lib/glb-viewer-camera-behaviour-976e3a56.nomodule.js.map +0 -1
- package/lib/glb-viewer-main-5bfa5049.js +0 -2
- package/lib/glb-viewer-main-5bfa5049.js.map +0 -1
- package/lib/imos-ix-poc-export-helper-25ea348e.nomodule.js.map +0 -1
- package/lib/imos-ix-poc-export-helper-4e024987.js.map +0 -1
- package/lib/legacy/component-dimensioning-f2047e1a.legacy.js.map +0 -1
- package/lib/legacy/component-raycast-helper-68e3cbf1.legacy.js.map +0 -1
- package/lib/legacy/configurator-614e7c10.legacy.js.map +0 -1
- package/lib/legacy/continuous-drawing-helper-cd940248.legacy.js.map +0 -1
- package/lib/legacy/default-light-setting-7a8d293d.legacy.js.map +0 -1
- package/lib/legacy/glb-viewer-camera-behaviour-3faaab17.legacy.js.map +0 -1
- package/lib/legacy/imos-ix-poc-export-helper-65318507.legacy.js.map +0 -1
- package/lib/legacy/material-viewer-d3b6c609.legacy.js.map +0 -1
- package/lib/legacy/roomle-configurator-60cf879c.legacy.js.map +0 -1
- package/lib/legacy/script-loader-5561932b.legacy.js.map +0 -1
- package/lib/legacy/static/ConfiguratorKernel-0f4d468ae72001a5.wasm +0 -0
- package/lib/legacy/static/RoomleCore-ad0832dd54706e0d.wasm +0 -0
- package/lib/legacy/static/RoomleToolsCore-b148ccf30ed3581d.wasm +0 -0
- package/lib/legacy/stats-helper-886c0b07.legacy.js.map +0 -1
- package/lib/legacy/tools-core-247fc04f.legacy.js.map +0 -1
- package/lib/material-viewer-58bf20d8.js.map +0 -1
- package/lib/material-viewer-6f3d8f49.nomodule.js.map +0 -1
- package/lib/material-viewer-main-25f2cb6f.js +0 -2
- package/lib/material-viewer-main-25f2cb6f.js.map +0 -1
- package/lib/planner-main-993b5e58.js +0 -2
- package/lib/planner-main-993b5e58.js.map +0 -1
- package/lib/roomle-configurator-493f62a9.js.map +0 -1
- package/lib/roomle-configurator-5d426ebd.nomodule.js.map +0 -1
- package/lib/roomle-sdk-749d0839.js.map +0 -1
- package/lib/script-loader-619b55b6.nomodule.js.map +0 -1
- package/lib/script-loader-aa3f028c.js.map +0 -1
- package/lib/static/ConfiguratorKernel-0f4d468ae72001a5.wasm +0 -0
- package/lib/static/RoomleCore-ad0832dd54706e0d.wasm +0 -0
- package/lib/static/RoomleToolsCore-b148ccf30ed3581d.wasm +0 -0
- package/lib/stats-helper-9eb062fc.js.map +0 -1
- package/lib/stats-helper-f2d95b91.nomodule.js.map +0 -1
- package/lib/tools-core-411d3164.nomodule.js.map +0 -1
- package/lib/tools-core-c42a74a1.js.map +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
System.register(["./roomle-dependency-injection-
|
|
1
|
+
System.register(["./roomle-dependency-injection-7eec410b.legacy.js","./external-objects-2fd4ef1a.legacy.js","./main-thread-to-worker-da6ad96a.legacy.js"],(function(e,t){var a,r,o,n,i,s;return{setters:[function(e){a=e.b,r=e.D,o=e.R,n=e.aW,i=e.aX,s=e.aY},function(t){e({createExtObj:t.b,createExtObjId:t.c,isExtObjId:t.i,isExternalObject:t.a,removeExtObjIdPrefix:t.r})},function(){}],execute:function(){e("default",class{static getConfigurator(e,r){return r=this._setupDI("configurator",e,r),a.lookup("global-init-data").configuratorId?new Promise((e,a)=>t.import("./configurator-1c112bd0.legacy.js").then(({Configurator:t})=>e(new t(r)),a)):Promise.reject("configuratorId is not set")}static getPlanner(e,t){return this._getPlanner(e,t)}static getPlannerWithPlugins(e,t,a){return this._getPlanner(e,t,a)}static async getGlbViewer(e,r){return r=this._setupDI("glb-viewer",e,r),a.lookup("global-init-data").configuratorId?new Promise((e,a)=>t.import("./glb-viewer-a89a2530.legacy.js").then(({GlbViewer:t})=>e(new t(r)),a)):Promise.reject("configuratorId is not set")}static getMaterialViewer(e,r){return r=this._setupDI("configurator",e,r),a.lookup("global-init-data").configuratorId?new Promise((e,a)=>t.import("./material-viewer-bb3d6e2f.legacy.js").then(({MaterialViewer:t})=>e(new t(r)),a)):Promise.reject("configuratorId is not set")}static getCoreTools(e,a){return a=this._setupDI("tools-core",e,a),new Promise((e,r)=>t.import("./tools-core-13c80c4f.legacy.js").then(({ToolsCore:t})=>{const r=new t(a);r.boot(),e(r)},r))}static getRapiAccess(){return a.addToContainer([new r("rapi-access",o,0),new r("global-callback",n,0)]),Promise.resolve(a.lookup("rapi-access"))}static get callbacks(){return a.addToContainer([new r("global-callback",n,0)]),Promise.resolve(a.lookup("global-callback"))}static async setGlobalInitData(e){e&&(a.addToContainer([new r("global-init-data",i,0)]),a.lookup("global-init-data").setOverrides(e),(await this.getRapiAccess()).setConfiguratorSettings())}static getContext(e){return a.getContext(e)}static _getPlanner(e,r,o){return r=this._setupDI("planner",e,r),a.lookup("global-init-data").configuratorId?new Promise((e,a)=>t.import("./planner-bba69886.legacy.js").then(({Planner:t})=>{e(o?new t(r,o):new t(r))},a)):Promise.reject("configuratorId is not set")}static _setupDI(e,t,o){return t&&(a.addToContainer([new r("init-data",s,1)]),o||(o=a.getContext(e)),a.lookup("init-data",o).setOverrides(t)),o}})}}}));
|
|
2
2
|
//# sourceMappingURL=roomle-sdk.legacy.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
System.register(["./query-params-helper-e3e05119.legacy.js","./roomle-dependency-injection-
|
|
2
|
-
//# sourceMappingURL=script-loader-
|
|
1
|
+
System.register(["./query-params-helper-e3e05119.legacy.js","./roomle-dependency-injection-7eec410b.legacy.js","./main-thread-to-worker-da6ad96a.legacy.js"],(function(e){var t,o,n,i,_,s,r;return{setters:[function(e){t=e.g},function(e){o=e.b,n=e.B,i=e.I,_=e._,s=e.i},function(e){r=e.g}],execute:function(){e("M",class{constructor(e){this._context=e||o.getContext(this.getContextName()),n.start("loadingTime")}_setupCommonGlobals(){window.__RML__DEBUG__||(window.__RML__DEBUG__={}),window.__RML__ENV__||(window.__RML__ENV__={},window.__RML__ENV__.assetPath||(window.__RML__ENV__.assetPath=""))}_setupCommonDependencies(){o.setup(i);const e=t();this.lookup("global-init-data").setOverrides(e),this.lookup("init-data",this._context).setOverrides(e)}_cleanUpCommonGlobals(){window.__RML__DEBUG__&&(window.__RML__DEBUG__.Kernel&&window.__RML__DEBUG__.Kernel.clearAll&&window.__RML__DEBUG__.Kernel.clearAll(),delete window.__RML__DEBUG__),delete window.__RML__ENV__;for(const e in window.THREE)if(window.hasOwnProperty(e))try{delete window.THREE[e]}catch(e){console.error(e)}window.THREE=void 0}_cleanUpCommonDependencies(){}boot(e){this._setupCommonGlobals(),this._setupCommonDependencies(),this.setupGlobals(e),this.setupDependencies(),this.bootFinished()}lookup(e,t){return window.__RML__DI__.lookup(e,t)}teardown(){this.cleanUpDependencies(),this._cleanUpCommonDependencies(),this.cleanUpGlobals(),this._cleanUpCommonGlobals(),window.__RML__DI__&&delete window.__RML__DI__}pause(){this.lookup("life-cycle-manager",this._context).pause(),window.TWEEN&&TWEEN.removeAll()}resume(e){e&&this.lookup("dom-helper",this._context).setDomElement(e),this.lookup("life-cycle-manager",this._context).resume()}destroy(){this.pause(),this.lookup("life-cycle-manager",this._context).destroy(),o.cleanUp(this._context)}getRapiAccess(){return this.lookup("rapi-access",this._context)}});let l={},c={};class a{constructor(e){this._creator_=e}fetch(e,t){return this._singlePromiseFactory.create(5,e,(o,i)=>{!function(e,t,o,i){if(-1===e.indexOf("http")&&(e=r()+e),l[e])return o();if(t.id&&c[t.id])return i(new Error('There is already a script with ID "'+t.id+'"'));n.start("load_"+t.id.replace(/-/g,"_"));const _=document.createElement("script");_.async=!1,_.src=e,_.id=t.id,_.onload=()=>{l[e]=!0,c[t.id]=!0,Object.defineProperty(o,"name",{value:"resolve-"+t.id}),o()},_.onerror=e=>{i(e)},document.body.appendChild(_)}(e,t,o,i)})}loadScripts(e){const t=[];return e.forEach(e=>{let o=this.fetch(e.name,{id:e.id});t.push(o)}),Promise.all(t)}cleanUp(){for(let e in c)if(c.hasOwnProperty(e)){const t=document.getElementById(e);t&&t.parentElement.removeChild(t)}l={},c={}}}e("S",a),_([s],a.prototype,"_singlePromiseFactory",void 0)}}}));
|
|
2
|
+
//# sourceMappingURL=script-loader-34682b5d.legacy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"script-loader-34682b5d.legacy.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
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-7eec410b.legacy.js","./main-thread-to-worker-da6ad96a.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-a90a2020.legacy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stats-helper-a90a2020.legacy.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
System.register(["./script-loader-
|
|
2
|
-
//# sourceMappingURL=tools-core-
|
|
1
|
+
System.register(["./script-loader-34682b5d.legacy.js","./roomle-dependency-injection-7eec410b.legacy.js","./query-params-helper-e3e05119.legacy.js","./main-thread-to-worker-da6ad96a.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-13c80c4f.legacy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tools-core-13c80c4f.legacy.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{S as ScriptLoader,M as Main}from"./script-loader-aa3f028c.js";import{_ as __decorate,i as inject,w as CANVAS_ID,y as DynamicLightSettingLoader,z as PREDEFINED_LIGHTSETTING,a8 as MaterialCreator,aR as setMaterial,aS as getMaterialShading,ah as getGUI,aT as addExistingTexture,ag as addTexture,aU as UiCallback,D as DependencyInjectionAssignment,L as Logger,aP as InputManager,aV as ConfiguratorMeshGenerator,R as RapiAccess,b as RoomleDependencyInjection}from"./roomle-dependency-injection-dc1fb1ed.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-4a40c7df.js";import{aE as CAMERA_TYPE,aP as BoxGeometry,z as Mesh,C as Color,ad as Box3,w as DoubleSide,a7 as FrontSide,aS as SphereGeometry,b9 as PlaneGeometry,a9 as Texture}from"./main-thread-to-worker-4e303a39.js";import"./query-params-helper-7890ce69.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()})}resetMaterial(){this._initScene()}_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(),null),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)}resetMaterial(){this._sceneManager.resetMaterial()}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)}get globalCallbacks(){return this._globalCallback}}__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,"_globalCallback",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-e2c4ec91.js";import{_ as __decorate,i as inject,w as CANVAS_ID,y as DynamicLightSettingLoader,z as PREDEFINED_LIGHTSETTING,a8 as MaterialCreator,aR as setMaterial,aS as getMaterialShading,ah as getGUI,aT as addExistingTexture,ag as addTexture,aU as UiCallback,D as DependencyInjectionAssignment,L as Logger,aP as InputManager,aV as ConfiguratorMeshGenerator,R as RapiAccess,b as RoomleDependencyInjection}from"./roomle-dependency-injection-65974091.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-ccddce8a.js";import{aE as CAMERA_TYPE,aP as BoxGeometry,z as Mesh,C as Color,ad as Box3,w as DoubleSide,a7 as FrontSide,aS as SphereGeometry,b9 as PlaneGeometry,a9 as Texture}from"./main-thread-to-worker-4e303a39.js";import"./query-params-helper-7890ce69.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()})}resetMaterial(){this._initScene()}_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(),null),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)}resetMaterial(){this._sceneManager.resetMaterial()}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)}get globalCallbacks(){return this._globalCallback}}__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,"_globalCallback",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-2e82a588.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"material-viewer-2e82a588.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
System.register(["./script-loader-
|
|
2
|
-
//# sourceMappingURL=material-viewer-
|
|
1
|
+
System.register(["./script-loader-e037e14a.nomodule.js","./roomle-dependency-injection-b4151aea.nomodule.js","./camera-behaviour-a30a8262.nomodule.js","./main-thread-to-worker-ff3b0e7b.nomodule.js","./query-params-helper-8731c6a6.nomodule.js"],(function(e){var t,a,i,r,s,n,o,l,h,_,m,c,d,g,u,p,M,w,C,y,f,v,b,S,P,x,F,G,I,U,R,T,k,A,B,D;return{setters:[function(e){t=e.S,a=e.M},function(e){i=e._,r=e.i,s=e.w,n=e.y,o=e.z,l=e.a8,h=e.aR,_=e.aS,m=e.ah,c=e.aT,d=e.ag,g=e.aU,u=e.D,p=e.L,M=e.aP,w=e.aV,C=e.R,y=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,T=e.w,k=e.a7,A=e.aS,B=e.b9,D=e.a9},function(){}],execute:function(){class V extends f{get cameraControl(){return this._cameraControl}}class E 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=l.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(h(this._material,a)),this._mesh.material=this._material,this._updateGUI(),this._requestRender(),t()})}resetMaterial(){this._initScene()}_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===T,this._materialParams.metallic=1===e.metalness?1:e.reflectivity}getMaterialShading(e=1){return _(this._material,e)}createCameraControl(e,t){this._changeCameraBehaviour(new V(new S(this._creator_,this._getInputManager(),null),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=m();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?T:k,this._shadingChanged()})),this._addGUIListener(e))}_shadingChanged(){this._roomleMaterialViewerUiCallback.onMaterialShadingChanged(_(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 A(.5,100,100)),"plane_horizontal"===this._sceneParams.type&&(e=new B(1,1),e.rotateX(-Math.PI/2)),"plane_vertical"===this._sceneParams.type&&(e=new B(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 D;s.image=r,r.onload=function(){s.needsUpdate=!0},c(s,e,this._material,this._maxAnisotropy,a,i,this._renderer.capabilities.maxTextures)}else await d(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],E.prototype,"_inputManager",void 0),i([r],E.prototype,"_configuratorMeshGenerator",void 0),i([r],E.prototype,"_roomleMaterialViewerUiCallback",void 0),i([r],E.prototype,"_rapiAccess",void 0);class j{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 E(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)}resetMaterial(){this._sceneManager.resetMaterial()}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)}get globalCallbacks(){return this._globalCallback}}i([r],j.prototype,"_domHelper",void 0),i([r],j.prototype,"_scriptLoader",void 0),i([r],j.prototype,"_lifeCycleManager",void 0),i([r],j.prototype,"_roomleMaterialViewerUiCallback",void 0),i([r],j.prototype,"_initData",void 0),i([r],j.prototype,"_globalCallback",void 0),i([r],j.prototype,"_rapiAccess",void 0),i([r],j.prototype,"_unitFormatter",void 0),i([r],j.prototype,"_idbManager",void 0);const O=[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",C),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(){y.setup(O),this.lookup("logger",this._context)}cleanUpGlobals(){throw new Error("Method not implemented.")}cleanUpDependencies(){throw new Error("Method not implemented.")}bootFinished(){this._viewer=new j(this._context),window.RoomleMaterialViewer||(window.RoomleMaterialViewer=this._viewer)}getApi(){return this._viewer}getContextName(){return"material-viewer"}})}}}));
|
|
2
|
+
//# sourceMappingURL=material-viewer-eb3eb26a.nomodule.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"material-viewer-eb3eb26a.nomodule.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{MaterialViewer}from"./material-viewer-2e82a588.js";import"./script-loader-e2c4ec91.js";import"./query-params-helper-7890ce69.js";import"./main-thread-to-worker-4e303a39.js";import"./roomle-dependency-injection-65974091.js";import"./camera-behaviour-ccddce8a.js";(new MaterialViewer).boot();
|
|
2
|
+
//# sourceMappingURL=material-viewer-main-9450d34d.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"material-viewer-main-9450d34d.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
System.register(["./material-viewer-
|
|
1
|
+
System.register(["./material-viewer-eb3eb26a.nomodule.js","./script-loader-e037e14a.nomodule.js","./query-params-helper-8731c6a6.nomodule.js","./main-thread-to-worker-ff3b0e7b.nomodule.js","./roomle-dependency-injection-b4151aea.nomodule.js","./camera-behaviour-a30a8262.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
|