@roomle/web-sdk 2.72.0-alpha.4 → 2.72.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-cd1df43b.js → banana-for-scale-5ee9ece9.js} +2 -2
- package/lib/{banana-for-scale-cd1df43b.js.map → banana-for-scale-5ee9ece9.js.map} +1 -1
- package/lib/{banana-for-scale-afcf7b07.nomodule.js → banana-for-scale-f46eed10.nomodule.js} +2 -2
- package/lib/{banana-for-scale-afcf7b07.nomodule.js.map → banana-for-scale-f46eed10.nomodule.js.map} +1 -1
- package/lib/camera-behaviour-3b3f28d1.js +2 -0
- package/lib/{camera-behaviour-5b627b1b.js.map → camera-behaviour-3b3f28d1.js.map} +1 -1
- package/lib/camera-behaviour-b76992b1.nomodule.js +2 -0
- package/lib/{camera-behaviour-16066c98.nomodule.js.map → camera-behaviour-b76992b1.nomodule.js.map} +1 -1
- package/lib/{component-dimensioning-f635944d.js → component-dimensioning-583819af.js} +2 -2
- package/lib/component-dimensioning-583819af.js.map +1 -0
- package/lib/{component-dimensioning-cc5c54d9.nomodule.js → component-dimensioning-8a279b2e.nomodule.js} +2 -2
- package/lib/component-dimensioning-8a279b2e.nomodule.js.map +1 -0
- package/lib/component-raycast-helper-8d07a11b.js +2 -0
- package/lib/component-raycast-helper-8d07a11b.js.map +1 -0
- package/lib/component-raycast-helper-a58974e8.nomodule.js +2 -0
- package/lib/component-raycast-helper-a58974e8.nomodule.js.map +1 -0
- package/lib/{configurator-a49e14c4.js → configurator-2c630a1e.js} +2 -2
- package/lib/configurator-2c630a1e.js.map +1 -0
- package/lib/{configurator-1b0b3944.nomodule.js → configurator-da909394.nomodule.js} +2 -2
- package/lib/configurator-da909394.nomodule.js.map +1 -0
- package/lib/configurator-main-127139d7.js +2 -0
- package/lib/configurator-main-127139d7.js.map +1 -0
- package/lib/configurator-main.nomodule.js +1 -1
- package/lib/{continuous-drawing-helper-796758cf.js → continuous-drawing-helper-16474b6f.js} +2 -2
- package/lib/continuous-drawing-helper-16474b6f.js.map +1 -0
- package/lib/{continuous-drawing-helper-8b265f63.nomodule.js → continuous-drawing-helper-7804d871.nomodule.js} +2 -2
- package/lib/continuous-drawing-helper-7804d871.nomodule.js.map +1 -0
- package/lib/default-light-setting-d236273d.js +2 -0
- package/lib/default-light-setting-d236273d.js.map +1 -0
- package/lib/default-light-setting-fcb36164.nomodule.js +2 -0
- package/lib/default-light-setting-fcb36164.nomodule.js.map +1 -0
- package/lib/definitions/configurator-core/src/utils/raycast-helper.d.ts +3 -0
- package/lib/definitions/configurator-core/src/webgl/configurator-scene-manager.d.ts +2 -0
- package/lib/definitions/planner-core/src/view-model/construction-plan-object-view-model.d.ts +5 -0
- package/lib/{dimensioning-helper-a9ed4dd7.nomodule.js → dimensioning-helper-27d4733e.nomodule.js} +2 -2
- package/lib/{dimensioning-helper-a9ed4dd7.nomodule.js.map → dimensioning-helper-27d4733e.nomodule.js.map} +1 -1
- package/lib/{dimensioning-helper-c48e2d70.js → dimensioning-helper-4acaec8d.js} +2 -2
- package/lib/{dimensioning-helper-c48e2d70.js.map → dimensioning-helper-4acaec8d.js.map} +1 -1
- package/lib/glb-viewer-03926273.nomodule.js +2 -0
- package/lib/{glb-viewer-88a78a03.nomodule.js.map → glb-viewer-03926273.nomodule.js.map} +1 -1
- package/lib/glb-viewer-af735909.js +2 -0
- package/lib/{glb-viewer-d86b3a1a.js.map → glb-viewer-af735909.js.map} +1 -1
- package/lib/{glb-viewer-camera-behaviour-e0fa1f0b.js → glb-viewer-camera-behaviour-7ffded59.js} +2 -2
- package/lib/glb-viewer-camera-behaviour-7ffded59.js.map +1 -0
- package/lib/{glb-viewer-camera-behaviour-c50913cf.nomodule.js → glb-viewer-camera-behaviour-fbe197cd.nomodule.js} +2 -2
- package/lib/glb-viewer-camera-behaviour-fbe197cd.nomodule.js.map +1 -0
- package/lib/glb-viewer-main-e0bd2c68.js +2 -0
- package/lib/glb-viewer-main-e0bd2c68.js.map +1 -0
- package/lib/glb-viewer-main.nomodule.js +1 -1
- package/lib/legacy/{banana-for-scale-e2dd9f30.legacy.js → banana-for-scale-c69dcd46.legacy.js} +2 -2
- package/lib/legacy/{banana-for-scale-e2dd9f30.legacy.js.map → banana-for-scale-c69dcd46.legacy.js.map} +1 -1
- package/lib/legacy/camera-behaviour-e8845b08.legacy.js +2 -0
- package/lib/legacy/{camera-behaviour-b19f8b80.legacy.js.map → camera-behaviour-e8845b08.legacy.js.map} +1 -1
- package/lib/legacy/{component-dimensioning-f76241e5.legacy.js → component-dimensioning-8c6285fe.legacy.js} +2 -2
- package/lib/legacy/component-dimensioning-8c6285fe.legacy.js.map +1 -0
- package/lib/legacy/component-raycast-helper-0360bfd5.legacy.js +2 -0
- package/lib/legacy/component-raycast-helper-0360bfd5.legacy.js.map +1 -0
- package/lib/legacy/{configurator-63a86772.legacy.js → configurator-2f71d570.legacy.js} +2 -2
- package/lib/legacy/configurator-2f71d570.legacy.js.map +1 -0
- package/lib/legacy/configurator-main.legacy.js +1 -1
- package/lib/legacy/{continuous-drawing-helper-2713822a.legacy.js → continuous-drawing-helper-d0731fb4.legacy.js} +2 -2
- package/lib/legacy/continuous-drawing-helper-d0731fb4.legacy.js.map +1 -0
- package/lib/legacy/default-light-setting-8599c938.legacy.js +2 -0
- package/lib/legacy/default-light-setting-8599c938.legacy.js.map +1 -0
- package/lib/legacy/{dimensioning-helper-474fb664.legacy.js → dimensioning-helper-290c6617.legacy.js} +2 -2
- package/lib/legacy/{dimensioning-helper-474fb664.legacy.js.map → dimensioning-helper-290c6617.legacy.js.map} +1 -1
- package/lib/legacy/{glb-viewer-camera-behaviour-f2bae827.legacy.js → glb-viewer-camera-behaviour-d4233924.legacy.js} +2 -2
- package/lib/legacy/glb-viewer-camera-behaviour-d4233924.legacy.js.map +1 -0
- package/lib/legacy/glb-viewer-ce57d70c.legacy.js +2 -0
- package/lib/legacy/{glb-viewer-2e505d60.legacy.js.map → glb-viewer-ce57d70c.legacy.js.map} +1 -1
- package/lib/legacy/glb-viewer-main.legacy.js +1 -1
- package/lib/legacy/material-viewer-70fb38d9.legacy.js +2 -0
- package/lib/legacy/material-viewer-70fb38d9.legacy.js.map +1 -0
- package/lib/legacy/material-viewer-main.legacy.js +1 -1
- package/lib/legacy/planner-abc2bad6.legacy.js +2 -0
- package/lib/legacy/{planner-0a8fa185.legacy.js.map → planner-abc2bad6.legacy.js.map} +1 -1
- package/lib/legacy/planner-main.legacy.js +1 -1
- package/lib/legacy/roomle-configurator-d2696dec.legacy.js +2 -0
- package/lib/legacy/roomle-configurator-d2696dec.legacy.js.map +1 -0
- package/lib/legacy/roomle-dependency-injection-1a70c393.legacy.js +9 -0
- package/lib/legacy/{roomle-dependency-injection-b972956e.legacy.js.map → roomle-dependency-injection-1a70c393.legacy.js.map} +1 -1
- package/lib/legacy/roomle-sdk.legacy.js +1 -1
- package/lib/legacy/{script-loader-8805df81.legacy.js → script-loader-012e9890.legacy.js} +2 -2
- package/lib/legacy/script-loader-012e9890.legacy.js.map +1 -0
- package/lib/legacy/{stats-helper-f5242dbc.legacy.js → stats-helper-5e28ccba.legacy.js} +2 -2
- package/lib/legacy/stats-helper-5e28ccba.legacy.js.map +1 -0
- package/lib/legacy/{tools-core-cede80b5.legacy.js → tools-core-5825e303.legacy.js} +2 -2
- package/lib/legacy/tools-core-5825e303.legacy.js.map +1 -0
- package/lib/material-viewer-8540303c.js +2 -0
- package/lib/material-viewer-8540303c.js.map +1 -0
- package/lib/material-viewer-d782d952.nomodule.js +2 -0
- package/lib/material-viewer-d782d952.nomodule.js.map +1 -0
- package/lib/material-viewer-main-66a1a258.js +2 -0
- package/lib/material-viewer-main-66a1a258.js.map +1 -0
- package/lib/material-viewer-main.nomodule.js +1 -1
- package/lib/planner-36da0821.js +2 -0
- package/lib/{planner-3c19d19d.js.map → planner-36da0821.js.map} +1 -1
- package/lib/planner-dcc85dd9.nomodule.js +2 -0
- package/lib/{planner-0b88d160.nomodule.js.map → planner-dcc85dd9.nomodule.js.map} +1 -1
- package/lib/planner-main-01da7b22.js +2 -0
- package/lib/planner-main-01da7b22.js.map +1 -0
- package/lib/planner-main.nomodule.js +1 -1
- package/lib/roomle-configurator-425fb830.js +2 -0
- package/lib/roomle-configurator-425fb830.js.map +1 -0
- package/lib/roomle-configurator-b25ffa35.nomodule.js +2 -0
- package/lib/roomle-configurator-b25ffa35.nomodule.js.map +1 -0
- package/lib/roomle-dependency-injection-0be3ffed.nomodule.js +9 -0
- package/lib/{roomle-dependency-injection-e22e5f79.nomodule.js.map → roomle-dependency-injection-0be3ffed.nomodule.js.map} +1 -1
- package/lib/{roomle-dependency-injection-02ad81f3.js → roomle-dependency-injection-5182fc0c.js} +3 -3
- package/lib/{roomle-dependency-injection-02ad81f3.js.map → roomle-dependency-injection-5182fc0c.js.map} +1 -1
- package/lib/{roomle-sdk-a0cc91c9.js → roomle-sdk-d5d4c5c6.js} +2 -2
- package/lib/roomle-sdk-d5d4c5c6.js.map +1 -0
- package/lib/roomle-sdk.nomodule.js +1 -1
- package/lib/{script-loader-0a98ebd5.js → script-loader-31b35ef2.js} +2 -2
- package/lib/script-loader-31b35ef2.js.map +1 -0
- package/lib/{script-loader-bd4691f2.nomodule.js → script-loader-a6a40918.nomodule.js} +2 -2
- package/lib/script-loader-a6a40918.nomodule.js.map +1 -0
- package/lib/{stats-helper-63cc32cd.js → stats-helper-4583b27b.js} +2 -2
- package/lib/stats-helper-4583b27b.js.map +1 -0
- package/lib/{stats-helper-150a7abd.nomodule.js → stats-helper-46ab619f.nomodule.js} +2 -2
- package/lib/stats-helper-46ab619f.nomodule.js.map +1 -0
- package/lib/{tools-core-4f842eae.js → tools-core-411b5026.js} +2 -2
- package/lib/tools-core-411b5026.js.map +1 -0
- package/lib/{tools-core-ce1a7ddd.nomodule.js → tools-core-69e04991.nomodule.js} +2 -2
- package/lib/tools-core-69e04991.nomodule.js.map +1 -0
- package/package.json +2 -2
- package/lib/camera-behaviour-16066c98.nomodule.js +0 -2
- package/lib/camera-behaviour-5b627b1b.js +0 -2
- package/lib/component-dimensioning-cc5c54d9.nomodule.js.map +0 -1
- package/lib/component-dimensioning-f635944d.js.map +0 -1
- package/lib/component-raycast-helper-52d9021f.js +0 -2
- package/lib/component-raycast-helper-52d9021f.js.map +0 -1
- package/lib/component-raycast-helper-8e7d9b76.nomodule.js +0 -2
- package/lib/component-raycast-helper-8e7d9b76.nomodule.js.map +0 -1
- package/lib/configurator-1b0b3944.nomodule.js.map +0 -1
- package/lib/configurator-a49e14c4.js.map +0 -1
- package/lib/configurator-main-b6030569.js +0 -2
- package/lib/configurator-main-b6030569.js.map +0 -1
- package/lib/continuous-drawing-helper-796758cf.js.map +0 -1
- package/lib/continuous-drawing-helper-8b265f63.nomodule.js.map +0 -1
- package/lib/default-light-setting-b5de48e8.js +0 -2
- package/lib/default-light-setting-b5de48e8.js.map +0 -1
- package/lib/default-light-setting-f111af8c.nomodule.js +0 -2
- package/lib/default-light-setting-f111af8c.nomodule.js.map +0 -1
- package/lib/glb-viewer-88a78a03.nomodule.js +0 -2
- package/lib/glb-viewer-camera-behaviour-c50913cf.nomodule.js.map +0 -1
- package/lib/glb-viewer-camera-behaviour-e0fa1f0b.js.map +0 -1
- package/lib/glb-viewer-d86b3a1a.js +0 -2
- package/lib/glb-viewer-main-9aced5f8.js +0 -2
- package/lib/glb-viewer-main-9aced5f8.js.map +0 -1
- package/lib/legacy/camera-behaviour-b19f8b80.legacy.js +0 -2
- package/lib/legacy/component-dimensioning-f76241e5.legacy.js.map +0 -1
- package/lib/legacy/component-raycast-helper-0c0f80da.legacy.js +0 -2
- package/lib/legacy/component-raycast-helper-0c0f80da.legacy.js.map +0 -1
- package/lib/legacy/configurator-63a86772.legacy.js.map +0 -1
- package/lib/legacy/continuous-drawing-helper-2713822a.legacy.js.map +0 -1
- package/lib/legacy/default-light-setting-fafbc430.legacy.js +0 -2
- package/lib/legacy/default-light-setting-fafbc430.legacy.js.map +0 -1
- package/lib/legacy/glb-viewer-2e505d60.legacy.js +0 -2
- package/lib/legacy/glb-viewer-camera-behaviour-f2bae827.legacy.js.map +0 -1
- package/lib/legacy/material-viewer-19a9709e.legacy.js +0 -2
- package/lib/legacy/material-viewer-19a9709e.legacy.js.map +0 -1
- package/lib/legacy/planner-0a8fa185.legacy.js +0 -2
- package/lib/legacy/roomle-configurator-e7af83da.legacy.js +0 -2
- package/lib/legacy/roomle-configurator-e7af83da.legacy.js.map +0 -1
- package/lib/legacy/roomle-dependency-injection-b972956e.legacy.js +0 -9
- package/lib/legacy/script-loader-8805df81.legacy.js.map +0 -1
- package/lib/legacy/stats-helper-f5242dbc.legacy.js.map +0 -1
- package/lib/legacy/tools-core-cede80b5.legacy.js.map +0 -1
- package/lib/material-viewer-cbb217a0.nomodule.js +0 -2
- package/lib/material-viewer-cbb217a0.nomodule.js.map +0 -1
- package/lib/material-viewer-dcd9a3fd.js +0 -2
- package/lib/material-viewer-dcd9a3fd.js.map +0 -1
- package/lib/material-viewer-main-9c59b737.js +0 -2
- package/lib/material-viewer-main-9c59b737.js.map +0 -1
- package/lib/planner-0b88d160.nomodule.js +0 -2
- package/lib/planner-3c19d19d.js +0 -2
- package/lib/planner-main-c2ca5cbd.js +0 -2
- package/lib/planner-main-c2ca5cbd.js.map +0 -1
- package/lib/roomle-configurator-2998ba37.nomodule.js +0 -2
- package/lib/roomle-configurator-2998ba37.nomodule.js.map +0 -1
- package/lib/roomle-configurator-e8e7bf7a.js +0 -2
- package/lib/roomle-configurator-e8e7bf7a.js.map +0 -1
- package/lib/roomle-dependency-injection-e22e5f79.nomodule.js +0 -9
- package/lib/roomle-sdk-a0cc91c9.js.map +0 -1
- package/lib/script-loader-0a98ebd5.js.map +0 -1
- package/lib/script-loader-bd4691f2.nomodule.js.map +0 -1
- package/lib/stats-helper-150a7abd.nomodule.js.map +0 -1
- package/lib/stats-helper-63cc32cd.js.map +0 -1
- package/lib/tools-core-4f842eae.js.map +0 -1
- package/lib/tools-core-ce1a7ddd.nomodule.js.map +0 -1
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
System.register(["./main-thread-to-worker-01ce78f4.legacy.js","./roomle-dependency-injection-1a70c393.legacy.js"],(function(e){var t,i,a,n,s,r,c,o,l;return{setters:[function(e){t=e.bI,i=e.bX,a=e.J,n=e.z,s=e.ak,r=e.a,c=e.av,o=e.o},function(e){l=e.aa}],execute:function(){e("default",class{constructor(){this._nonTransparentComponent=null,this._raycaster=new t,this._raycaster.near=.1,this._raycaster.layers.enable(3),this._raycaster.layers.enable(4),this._raycaster.layers.enable(5),this._raycaster.layers.enable(6)}init(e,t){this._object=e,this._camera=t,this.checkComponentVisibility=i(this.checkComponentVisibility,100).bind(this),this.checkPreviewVisibility=i(this.checkPreviewVisibility,100).bind(this)}setCamera(e){this._camera=e}setObject(e){this._object=e}changeMaterialsOnSelect(e,t,i=!1){t!==this._nonTransparentComponent&&(this._nonTransparentComponent=t,this._changeMaterialsOnSelect(e,t,i))}_changeMaterialsOnSelect(e,t,i=!1){if(e.children.length>0&&e.children.forEach(n=>{const s=t&&e.id===t.id||i,r=!(n instanceof a);this._changeMaterialsOnSelect(n,t,(!s||!r)&&s)}),t)e instanceof a&&e.material instanceof n&&!e.userData.oldMaterial&&(e.userData.oldMaterial=e.material,e.material=e.material.clone(),i||l(e,{opacity:.2,transparent:!0}));else if(e.userData.oldMaterial&&e instanceof a&&e.material instanceof n){const{opacity:t,transparent:i}=e.userData.oldMaterial;l(e,{opacity:t,transparent:i}),e.userData.oldMaterial=void 0}}isComponentVisible(e){const t=[];e.traverse(e=>t.push(e.uuid));const i=(new s).setFromObject(e).getCenter(new r),a=(new r).subVectors(i,this._camera.position).normalize();this._raycaster.set(this._camera.position,a),this._raycaster.far=this._camera.position.distanceTo(i);const n=[];return this._raycaster.intersectObjects(this._object.children,!0).forEach(e=>{e.object.material.visible&&(t.includes(e.object.uuid)||e.object.userData.ignoreComponentRaycast||n.push(e))}),0===n.length}checkComponentAndPreviewVisibility(e,t){e.hasSelection()?this.checkComponentVisibility(e,t):t.hasPreviews()?this.checkPreviewVisibility(t):this.changeMaterialsOnSelect(this._object,null)}checkComponentVisibility(e,t){if(!e.hasSelection())return;const i=t.getComponentsForIds(e.getSelectedRuntimeComponentIds());if(i.length>1)return;const a=i[0];this.isComponentVisible(a)?this.changeMaterialsOnSelect(this._object,null):this.changeMaterialsOnSelect(this._object,a)}areAllPreviewsVisible(e){if(!e.hasPreviews())return!0;const t=e.getPreviews();return 0===t.length||t.map(e=>this.isComponentVisible(e)).reduce((e,t)=>e&&t)}areAllComponentsInFrustum(e){if(0===e.length)return!0;const t=new c,i=(new o).multiplyMatrices(this._camera.projectionMatrix,this._camera.matrixWorldInverse),a=new s;return t.setFromProjectionMatrix(i),e.map(e=>(e=>{const i=a.setFromObject(e).getCenter(new r);return t.containsPoint(i)})(e)).reduce((e,t)=>e&&t)}checkPreviewVisibility(e){e.hasPreviewLines()||(this.areAllPreviewsVisible(e)?this.changeMaterialsOnSelect(this._object,null):this.changeMaterialsOnSelect(this._object,{id:-1}))}})}}}));
|
|
2
|
+
//# sourceMappingURL=component-raycast-helper-0360bfd5.legacy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component-raycast-helper-0360bfd5.legacy.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
System.register(["./script-loader-
|
|
2
|
-
//# sourceMappingURL=configurator-
|
|
1
|
+
System.register(["./script-loader-012e9890.legacy.js","./roomle-dependency-injection-1a70c393.legacy.js","./camera-behaviour-e8845b08.legacy.js","./component-raycast-helper-0360bfd5.legacy.js","./roomle-configurator-d2696dec.legacy.js","./query-params-helper-713ea034.legacy.js","./main-thread-to-worker-01ce78f4.legacy.js","./default-light-setting-8599c938.legacy.js"],(function(e){var n,o,t,c,r,a,i,s,l,u,p,g,f,d;return{setters:[function(e){n=e.S,o=e.M},function(e){t=e.D,c=e.L,r=e.R,a=e.a,i=e.C,s=e.b,l=e.A},function(e){u=e.C,p=e.a},function(e){g=e.default},function(e){f=e.C,d=e.R},function(){},function(){},function(){}],execute:function(){const h=[new t("logger",c),new t("rapi-access",r),new t("script-loader",n),new t("camera-control-3d",u),new t("camera-control",p),new t("data-syncer",a),new t("configurator-scene-manager",f,1),new t("configurator-view-model",i,1),new t("component-raycast-helper",g,0)];e("Configurator",class extends o{setupDependencies(){s.setup(h),this.lookup("planner-kernel-access",this._context).init(1),this.lookup("rapi-access",this._context),this.lookup("script-loader",this._context),this.lookup("logger",this._context)}cleanUpGlobals(){delete window.RoomleConfigurator}cleanUpDependencies(){const e=this.lookup("script-loader"),n=this.lookup("rapi-access");this.lookup("dom-helper");const o=this.lookup("configurator-scene-manager");e&&e.cleanUp(),n&&n.cleanUp(),o&&o.cleanUp()}setupGlobals(e){const{kernelInstance:n,kernelContainer:o,planObjectId:t}=e||{};l.init({kernelInstance:n,kernelContainer:o,planObjectId:t})}getApi(){return this._configurator}bootFinished(){this._configurator=new d(this._context),this._configurator.getMain=()=>this,window.RoomleConfigurator||(window.RoomleConfigurator=this._configurator)}getContextName(){return"configurator"}})}}}));
|
|
2
|
+
//# sourceMappingURL=configurator-2f71d570.legacy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"configurator-2f71d570.legacy.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
System.register(["./configurator-
|
|
1
|
+
System.register(["./configurator-2f71d570.legacy.js","./script-loader-012e9890.legacy.js","./query-params-helper-713ea034.legacy.js","./main-thread-to-worker-01ce78f4.legacy.js","./roomle-dependency-injection-1a70c393.legacy.js","./camera-behaviour-e8845b08.legacy.js","./component-raycast-helper-0360bfd5.legacy.js","./roomle-configurator-d2696dec.legacy.js","./default-light-setting-8599c938.legacy.js"],(function(){var e;return{setters:[function(n){e=n.Configurator},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){}],execute:function(){(new e).boot(),window.requestIdleCallback||(window.requestIdleCallback=e=>setTimeout(()=>{let n=Date.now();e({didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-n))})},1)),window.cancelIdleCallback||(window.cancelIdleCallback=window.cancelIdleCallback||function(e){clearTimeout(e)})}}}));
|
|
2
2
|
//# sourceMappingURL=configurator-main.legacy.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
System.register(["./roomle-dependency-injection-
|
|
2
|
-
//# sourceMappingURL=continuous-drawing-helper-
|
|
1
|
+
System.register(["./roomle-dependency-injection-1a70c393.legacy.js","./main-thread-to-worker-01ce78f4.legacy.js"],(function(e){var i,t,r,s,n;return{setters:[function(e){i=e.ad},function(e){t=e.ba,r=e.k,s=e.E,n=e.J}],execute:function(){e("default",class{constructor(){this._currentInnerRadius=0}init(e,i,t){this._drawingGroup=e,this._continuousDrawingManager=i,this._kernelZoomFactor=t,this.update()}update(){this._initCircle(),this._updateCircle()}_initCircle(){if(this._circleMesh)return;const e=70/this._kernelZoomFactor/1e3,i=new t(e,e+e/50,32),c=new r({color:10066329,side:s});this._circleMesh=new n(i,c),this._circleMesh.name="Circle",this._circleMesh.rotation.set(Math.PI/2,0,0),this._circleMesh.visible=this._continuousDrawingManager.shouldShowCircle(),this._drawingGroup.add(this._circleMesh)}_updateCircle(){if(!this._circleMesh)return;const e=70/this._kernelZoomFactor/1e3;if(e!==this._currentInnerRadius){const i=e+e/50;this._circleMesh.geometry=new t(e,i,32)}const r=i(this._continuousDrawingManager.getStartPoint());r.y=5,this._circleMesh.position.copy(r),this._circleMesh.visible=this._continuousDrawingManager.shouldShowCircle(),this._currentInnerRadius=e}setKernelZoomFactor(e){this._kernelZoomFactor=e}endDrawing(){this._drawingGroup.remove(this._circleMesh),this._circleMesh=null}})}}}));
|
|
2
|
+
//# sourceMappingURL=continuous-drawing-helper-d0731fb4.legacy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"continuous-drawing-helper-d0731fb4.legacy.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
System.register(["./camera-behaviour-e8845b08.legacy.js","./roomle-dependency-injection-1a70c393.legacy.js","./main-thread-to-worker-01ce78f4.legacy.js"],(function(i){var t,a,e,n,o,s,h;return{setters:[function(i){t=i.L},function(i){a=i.a1},function(i){e=i.D,n=i.C,o=i.V,s=i.a,h=i.A}],execute:function(){i("D",class extends t{constructor(i,t){super(i,t),this._params={ambientLight:{color:"#ffffff"},mainDirLight:{position:{x:-3,y:4,z:4},color:"#ffffff"},secondDirLight:{position:{x:3,y:4,z:3},color:"#ffffff"}},this._mainDirectionalLight=new e(new n(this._params.mainDirLight.color),.8),this._mainDirectionalLight.position.set(this._params.mainDirLight.position.x,this._params.mainDirLight.position.y,this._params.mainDirLight.position.z),this._mainDirectionalLight.layers.set(1),this._mainDirectionalLight.castShadow=!0,this._mainDirectionalLight.shadow.camera.near=.1,this._mainDirectionalLight.shadow.camera.far=100,this._mainDirectionalLight.shadow.mapSize=new o(1024,1024),this._mainDirectionalLight.visible=!0,this._mainDirectionalLight.lookAt(new s(0,0,0)),this._secondDirectionalLight=new e(new n(this._params.secondDirLight.color),.2),this._secondDirectionalLight.position.set(this._params.secondDirLight.position.x,this._params.secondDirLight.position.y,this._params.secondDirLight.position.z),this._secondDirectionalLight.layers.set(1),this._secondDirectionalLight.castShadow=!1,this._secondDirectionalLight.shadow.camera.near=.1,this._secondDirectionalLight.shadow.camera.far=100,this._secondDirectionalLight.shadow.mapSize=new o(1024,1024),this._secondDirectionalLight.visible=!0,this._secondDirectionalLight.lookAt(new s(0,0,0)),this._ambientLight=new h(new n(this._params.ambientLight.color),.5),this._ambientLight.layers.set(1),this.addToScene()}needsBounds(){return!0}updateBounds(i){const t=i.getSize(new s),a=Math.max(Math.max(t.x,t.y),t.z)+1,e=a/2;this._mainDirectionalLight.shadow.camera.top=e,this._mainDirectionalLight.shadow.camera.bottom=-e,this._mainDirectionalLight.shadow.camera.left=-e,this._mainDirectionalLight.shadow.camera.right=e,this._mainDirectionalLight.shadow.camera.near=.01,this._mainDirectionalLight.shadow.camera.far=4*a,this._mainDirectionalLight.shadow.camera.updateProjectionMatrix(),this._secondDirectionalLight.shadow.camera.top=e,this._secondDirectionalLight.shadow.camera.bottom=-e,this._secondDirectionalLight.shadow.camera.left=-e,this._secondDirectionalLight.shadow.camera.right=e,this._secondDirectionalLight.shadow.camera.near=.01,this._secondDirectionalLight.shadow.camera.far=4*a,this._secondDirectionalLight.shadow.camera.updateProjectionMatrix()}addToScene(){this._scene.add(this._mainDirectionalLight),this._scene.add(this._secondDirectionalLight),this._scene.add(this._ambientLight)}removeFromScene(){this._scene.remove(this._mainDirectionalLight),this._scene.remove(this._secondDirectionalLight),this._scene.remove(this._ambientLight)}reload(){this.removeFromScene(),this.addToScene()}showGUI(){let i=a();if(i){if(this._ambientLight){let t=i.addFolder("Ambient Light");t.add(this._ambientLight,"visible"),t.add(this._ambientLight,"intensity").min(0).max(5).step(.1),t.addColor(this._params.ambientLight,"color").onChange(i=>this._ambientLight.color=new n(i))}if(this._mainDirectionalLight){let t=i.addFolder("Main Directional Light");t.add(this._mainDirectionalLight,"visible"),t.add(this._mainDirectionalLight,"intensity").min(0).max(10).step(.1),t.add(this._mainDirectionalLight,"castShadow"),t.addColor(this._params.mainDirLight,"color").onChange(i=>this._mainDirectionalLight.color=new n(i)),t.add(this._mainDirectionalLight.position,"x").min(-10).max(10).step(.1).onChange(()=>this._mainDirectionalLight.lookAt(new s(0,0,0))),t.add(this._mainDirectionalLight.position,"y").min(-10).max(50).step(.1).onChange(()=>this._mainDirectionalLight.lookAt(new s(0,0,0))),t.add(this._mainDirectionalLight.position,"z").min(-10).max(10).step(.1).onChange(()=>this._mainDirectionalLight.lookAt(new s(0,0,0)))}if(this._secondDirectionalLight){let t=i.addFolder("Second Directional Light");t.add(this._secondDirectionalLight,"visible"),t.add(this._secondDirectionalLight,"intensity").min(0).max(10).step(.1),t.add(this._secondDirectionalLight,"castShadow"),t.addColor(this._params.mainDirLight,"color").onChange(i=>this._mainDirectionalLight.color=new n(i)),t.add(this._secondDirectionalLight.position,"x").min(-10).max(10).step(.1).onChange(()=>this._mainDirectionalLight.lookAt(new s(0,0,0))),t.add(this._secondDirectionalLight.position,"y").min(-10).max(50).step(.1).onChange(()=>this._mainDirectionalLight.lookAt(new s(0,0,0))),t.add(this._secondDirectionalLight.position,"z").min(-10).max(10).step(.1).onChange(()=>this._mainDirectionalLight.lookAt(new s(0,0,0)))}}}})}}}));
|
|
2
|
+
//# sourceMappingURL=default-light-setting-8599c938.legacy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"default-light-setting-8599c938.legacy.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/lib/legacy/{dimensioning-helper-474fb664.legacy.js → dimensioning-helper-290c6617.legacy.js}
RENAMED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
System.register(["./roomle-dependency-injection-
|
|
2
|
-
//# sourceMappingURL=dimensioning-helper-
|
|
1
|
+
System.register(["./roomle-dependency-injection-1a70c393.legacy.js","./main-thread-to-worker-01ce78f4.legacy.js","./TextGeometry-2bd3e2ac.legacy.js"],(function(i){var e,t,s,n,h,o,a,_,d,r,l,m,p,u,x,c,g,w,y,B,b;return{setters:[function(i){e=i.u,t=i._,s=i.i,n=i.ah,h=i.aF},function(i){o=i.O,a=i.a,_=i.k,d=i.E,r=i.bv,l=i.B,m=i.J,p=i.Q,u=i.bk,x=i.X,c=i.y,g=i.N,w=i.b,y=i.b8,B=i.ak},function(i){b=i.T}],execute:function(){const T="component_dimensioning_plane_material",z="component_dimensioning_text_material";class L extends o{constructor(i){super(),this._label="",this._parameters={font:null,size:.1,height:.001,curveSegments:2,bevelEnabled:!0,bevelThickness:.001,bevelSize:.001},this.topDown=!1,this._parameters.font=i,this._position=new a,this._initMaterials(),this._init(),this._update()}_initMaterials(){this._cacheHolder.materialCache.has(T)?this._planeMaterial=this._cacheHolder.materialCache.get(T):(this._planeMaterial=new _({color:16777215,side:d,opacity:.8,transparent:!0}),this._cacheHolder.materialCache.set(T,this._planeMaterial)),this._cacheHolder.materialCache.has(z)?this._textMaterial=this._cacheHolder.materialCache.get(z):(this._textMaterial=new r({color:3618615}),this._cacheHolder.materialCache.set(z,this._textMaterial))}_init(){let i=new l;this._text=new m(i,this._textMaterial),this._text.userData.ignoreComponentRaycast=!0,this._text.name="text with background text "+this._label,this._plane=new m(i,this._planeMaterial),this._plane.userData.ignoreComponentRaycast=!0,this._plane.name="text with background plane "+this._label,this._textGeometry=new b(this._label,this._parameters),this._textGeometry.computeBoundingBox(),this._text.geometry=this._textGeometry,this.add(this._text),this.add(this._plane)}update(i,e,t,s){this._position.copy(i),this._dimensioningType=e,this._cameraPosition=s,this._label=t;const n=this._cameraPosition.distanceTo(this._text.position),h=Math.max(.01,n/100),o=Math.max(5e-4,n/5e3);this._parameters.bevelThickness=o,this._parameters.bevelSize=o,this._parameters.size=h,this._textGeometry=new b(this._label,this._parameters),this._textGeometry.computeBoundingBox(),this._text.geometry=this._textGeometry,this._update()}_update(){if(this.topDown){let i=new p;i.setFromAxisAngle(new a(-1,0,0),Math.PI/2),this._updateText(this._textGeometry,i,new a)}else if(this._updateText(this._textGeometry,new p,new a),this._cameraPosition){const i=Math.atan2(this._cameraPosition.x-this._position.x,this._cameraPosition.z-this._position.z);this._text.rotation.y=i,this._plane.rotation.y=i}}_updateText(i,e,t){let s=new a;s.copy(this._position),t.x*=this._getXSign(),s.add(t);let n=i.boundingBox.getSize(new a);i.center(),this._text.position.copy(s),this._text.quaternion.copy(e);let h=new u(n.x+.02,n.y+.02,32);h.center(),this._plane.geometry=h,this._plane.position.copy(s),this._plane.quaternion.copy(e)}_getXSign(){return!this._cameraPosition||this._cameraPosition.x>=0?1:-1}dispose(){e(this)}}t([s],L.prototype,"_cacheHolder",void 0);class D{constructor(i){this._cameraPosition=new a,this._textUpdated=!1,this._topDimensions=!1,this._initialized=new n,this._enabled=!1,this._dimensionsVisible=!1,this._dimensionLineGroup=new x,this._dimensionTextGroup=new x,this._creator_=i,this._lineMaterial=new c({color:3618615,linewidth:2});let e=new l;this._widthLine=new g(e,this._lineMaterial),this._widthLine.userData.ignoreComponentRaycast=!0,this._widthLine.name="dimension width line",this._dimensionLineGroup.add(this._widthLine),this._heightLine=new g(e,this._lineMaterial),this._heightLine.userData.ignoreComponentRaycast=!0,this._heightLine.name="dimension height line",this._dimensionLineGroup.add(this._heightLine),this._depthLine=new g(e,this._lineMaterial),this._depthLine.userData.ignoreComponentRaycast=!0,this._depthLine.name="dimension depth line",this._dimensionLineGroup.add(this._depthLine),this._planeMaterial=new _({color:16777215,side:d,opacity:.8,transparent:!0}),h.loadFont("static/rubik_regular_sub-2dd2d5cca49018c5.json").then(i=>{this._font=i,this._loaded()})}_loaded(){this.update(!1),this.addToScene(this._scene,this._uiScene),this._initialized.resolve()}_performUpdate(i){this._enabled&&(this._lineBounds||i)&&this._font&&(this._updateHeight(),this._updateWidth(),this._updateDepth())}_updateWidth(){let i=new l,e=this._getWidthEdge(),t=[e.start.x,e.start.y,e.start.z,e.end.x,e.end.y,e.end.z];i.setAttribute("position",new w(new Float32Array(t),3)),this._widthLine.geometry.dispose(),this._widthLine.geometry=i;let s=e.getCenter(new a);this._widthText||(this._widthText=new L(this._font),this._dimensionTextGroup.add(this._widthText)),this._widthText.topDown=this._topDimensions;const n=this._unitFormatter.formatMMValueToUnitString(1e3*this._dimensions.x);this._widthText.update(s,0,n,this._cameraPosition)}_updateHeight(){let i=new l,e=this._getHeightEdge(),t=[e.start.x,e.start.y,e.start.z,e.end.x,e.end.y,e.end.z];i.setAttribute("position",new w(new Float32Array(t),3)),this._heightLine.geometry.dispose(),this._heightLine.geometry=i;let s=e.getCenter(new a);this._heightText||(this._heightText=new L(this._font),this._dimensionTextGroup.add(this._heightText)),this._heightText.topDown=this._topDimensions;const n=this._unitFormatter.formatMMValueToUnitString(1e3*this._dimensions.y);this._heightText.update(s,1,n,this._cameraPosition)}_updateDepth(){let i=new l,e=this._getDepthEdge(),t=[e.start.x,e.start.y,e.start.z,e.end.x,e.end.y,e.end.z];i.setAttribute("position",new w(new Float32Array(t),3)),this._depthLine.geometry.dispose(),this._depthLine.geometry=i;let s=e.getCenter(new a);this._depthText||(this._depthText=new L(this._font),this._dimensionTextGroup.add(this._depthText)),this._depthText.topDown=this._topDimensions;const n=this._unitFormatter.formatMMValueToUnitString(1e3*this._dimensions.z);this._depthText.update(s,2,n,this._cameraPosition)}updateBounds(i){if(!i)return;this._dimensions=i.getSize(new a),this._lineBounds=i.clone();let e=this._lineBounds.min.y<0?this._lineBounds.min.y:0;e-=.01,this._lineBounds.expandByVector(new a(.05,e,.05)),this._textUpdated=!1,this.update()}update(i=!1){this._enabled&&!this._dimensionsVisible&&(this._dimensionsVisible=!0,this._visibilityChangedCallback()),this._performUpdate(i)}addToScene(i,e){this._widthText&&this._widthLine&&this._heightText&&this._heightLine&&this._heightText&&this._heightLine&&(i.add(this._dimensionLineGroup),e.add(this._dimensionTextGroup))}removeFromScene(i,e){i.remove(this._dimensionLineGroup),e.remove(this._dimensionTextGroup)}_getWidthEdge(){return this._cameraPosition.z>=0?new y(new a(this._lineBounds.min.x,this._lineBounds.min.y,this._lineBounds.max.z),new a(this._lineBounds.max.x,this._lineBounds.min.y,this._lineBounds.max.z)):new y(new a(this._lineBounds.min.x,this._lineBounds.min.y,this._lineBounds.min.z),new a(this._lineBounds.max.x,this._lineBounds.min.y,this._lineBounds.min.z))}_getDepthEdge(){return this._cameraPosition.x>=0?new y(new a(this._lineBounds.max.x,this._lineBounds.min.y,this._lineBounds.min.z),new a(this._lineBounds.max.x,this._lineBounds.min.y,this._lineBounds.max.z)):new y(new a(this._lineBounds.min.x,this._lineBounds.min.y,this._lineBounds.min.z),new a(this._lineBounds.min.x,this._lineBounds.min.y,this._lineBounds.max.z))}_getHeightEdge(){return this._cameraPosition.x>=0&&this._cameraPosition.z>=0?new y(new a(this._lineBounds.max.x,this._lineBounds.min.y,this._lineBounds.max.z),new a(this._lineBounds.max.x,this._lineBounds.max.y,this._lineBounds.max.z)):this._cameraPosition.x<0&&this._cameraPosition.z>=0?new y(new a(this._lineBounds.min.x,this._lineBounds.min.y,this._lineBounds.max.z),new a(this._lineBounds.min.x,this._lineBounds.max.y,this._lineBounds.max.z)):this._cameraPosition.x>=0&&this._cameraPosition.z<0?new y(new a(this._lineBounds.max.x,this._lineBounds.min.y,this._lineBounds.min.z),new a(this._lineBounds.max.x,this._lineBounds.max.y,this._lineBounds.min.z)):new y(new a(this._lineBounds.min.x,this._lineBounds.min.y,this._lineBounds.min.z),new a(this._lineBounds.min.x,this._lineBounds.max.y,this._lineBounds.min.z))}onDimensionsVisibilityChanged(i){this._onChange=i}enableTopDimensions(){this.enableDimensions(),this._topDimensions=!0,this._heightLine.visible=!1,this._heightText.visible=!1,this.update(!0)}disableTopDimensions(){this._topDimensions=!1,this._heightLine.visible=!0,this._heightText.visible=!0,this.disableDimensions()}enableDimensions(){this._enabled=!0,this.update(!0),this.addToScene(this._scene,this._uiScene)}disableDimensions(){this._enabled=!1,this._dimensionsVisible&&(this._dimensionsVisible=!1,this._visibilityChangedCallback()),this.removeFromScene(this._scene,this._uiScene)}_visibilityChangedCallback(){this._onChange&&this._onChange(this._dimensionsVisible)}_clear(){this._lineMaterial.dispose(),this._planeMaterial.dispose(),this._widthLine.geometry.dispose(),this._heightLine.geometry.dispose(),this._depthLine.geometry.dispose(),this._heightText.dispose(),this._heightText.dispose(),this._depthText.dispose()}getBoundingBox(){const i=new B;return i.expandByObject(this._widthLine),i.expandByObject(this._widthText),i.expandByObject(this._heightLine),i.expandByObject(this._heightText),i.expandByObject(this._depthLine),i.expandByObject(this._depthText),i}setVisibility(i){this._dimensionLineGroup&&this._dimensionTextGroup&&(this._dimensionLineGroup.visible=i,this._dimensionTextGroup.visible=i)}moveCameraStart(i){this.setVisibility(!1),this._cameraPosition=i,this.update()}moveCameraEnd(i){this.setVisibility(!0),this._cameraPosition=i,this.update()}clearScene(i){this._clear()}setScene(i){this._scene=i}setUiScene(i){this._uiScene=i}needsUiScene(){return!0}isInitialized(){return this._initialized.wait()}areDimensionsEnabled(){return this._enabled}}i("default",D),t([s],D.prototype,"_unitFormatter",void 0)}}}));
|
|
2
|
+
//# sourceMappingURL=dimensioning-helper-290c6617.legacy.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dimensioning-helper-
|
|
1
|
+
{"version":3,"file":"dimensioning-helper-290c6617.legacy.js","sources":["../../../packages/configurator-core/public/fonts/rubik_regular_sub.json"],"sourcesContent":["export default \"static/rubik_regular_sub-2dd2d5cca49018c5.json\""],"names":[],"mappings":"w1HAAe"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
System.register(["./camera-behaviour-
|
|
2
|
-
//# sourceMappingURL=glb-viewer-camera-behaviour-
|
|
1
|
+
System.register(["./camera-behaviour-e8845b08.legacy.js"],(function(e){var t;return{setters:[function(e){t=e.b}],execute:function(){e("G",class extends t{get cameraControl(){return this._cameraControl}updateCameraOnItemLoaded(e){this.cameraControl.updateAndReset(e,!1)}})}}}));
|
|
2
|
+
//# sourceMappingURL=glb-viewer-camera-behaviour-d4233924.legacy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"glb-viewer-camera-behaviour-d4233924.legacy.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
System.register(["./script-loader-012e9890.legacy.js","./roomle-dependency-injection-1a70c393.legacy.js","./camera-behaviour-e8845b08.legacy.js","./main-thread-to-worker-01ce78f4.legacy.js","./default-light-setting-8599c938.legacy.js","./glb-viewer-camera-behaviour-d4233924.legacy.js","./query-params-helper-713ea034.legacy.js"],(function(e){var t,r,i,n,s,a,o,h,c,l,d,_,u,m,g,p,w,v,b,f,S,C,L,y,M,B,I,x,G,j,E,O,F;return{setters:[function(e){t=e.S,r=e.M},function(e){i=e.av,n=e.D,s=e.L,a=e.R,o=e.a1,h=e._,c=e.i,l=e.l,d=e.p,_=e.q,u=e.u,m=e.b},function(e){g=e.C,p=e.L,w=e.S,v=e.T},function(e){b=e.a,f=e.ak,S=e.ap,C=e.Q,L=e.A,y=e.C,M=e.aO,B=e.aZ,I=e.bH,x=e.l,G=e.bx,j=e.Y,E=e.bV},function(e){O=e.D},function(e){F=e.G},function(){}],execute:function(){const D=[new n("script-loader",t),new n("glb-input-manager",class extends i{},1),new n("logger",s),new n("rapi-access",a)];class P extends g{constructor(){super(...arguments),this.shouldIgnoreStandardBehavior=!1}adjust(e,t,r,i,n){let s=new b(-e.x/2,0,-e.z/2),a=new b(e.x/2,e.y,e.z/2);this._boundingBox=new f(s,a);let o=new S(-Math.PI/2+i,r,0,"ZYX"),h=(new C).setFromEuler(o);this._camera.updateProjectionMatrix(),this._camera.quaternion.copy(h),this._camera.position.copy(t)}_update(e){this.shouldIgnoreStandardBehavior?this._saveYawAndPitch():super._update(e)}animateCamera(e){return!!this.shouldIgnoreStandardBehavior||super.animateCamera(e)}}class z extends p{constructor(e,t){super(e,t),this._params={ambientLight:{color:"#ffffff"}},this._ambientLight=new L(new y(this._params.ambientLight.color),.5),this.addToScene()}addToScene(){this._scene.add(this._ambientLight)}removeFromScene(){this._scene.remove(this._ambientLight)}reload(){this.removeFromScene(),this.addToScene()}showGUI(){let e=o();if(e&&this._ambientLight){let t=e.addFolder("Ambient Light");t.add(this._ambientLight,"visible"),t.add(this._ambientLight,"intensity").min(0).max(5).step(.1),t.addColor(this._params.ambientLight,"color").onChange(e=>{this._ambientLight.color=new y(e)})}}}class A extends w{constructor(e,t){super(e,t,l.GLB,M.CAMERA_3D),this._itemsCount=0,this._standardSceneBackgroundColor=this._scene.background,this._initData.legacyLight&&(this._renderer.capabilities.maxTextures>8?this.loadDynamicLightSetting(d.createDynamicLightSettingSource(null,_.CAMERA)):(console.warn("this device has a maximum of 8 texture units thus we are using a simpler light setting"),this._lightSetting=new z(this._scene)))}createCameraControl(e,t){this._changeCameraBehaviour(new F(new P(this._creator_,this._getInputManager(),new b(-1,1,1)),this._cameraBehaviourState))}_getInputManager(){return this._glbInputManager}async loadStaticItem(e,t){const r=await this._rapiAccess.getItem(e);if(r.configuration)return Promise.reject();const i=B(r);return i?this.loadGLB(i,!0,void 0,t):Promise.reject(new Error("GLB Url not detected"))}loadGLB(e,t=!0,r=new b(1,1,1),i){return this.clearScene(),new Promise((n,s)=>{this._loadGLB(e,new b(0,0,0),0,void 0,r,void 0,void 0,i).then(e=>{this._currentGLB=e,this._scene.add(this._currentGLB);let r=(new f).setFromObject(this._currentGLB);t&&this.cameraBehaviour.cameraControl instanceof P&&this.glbViewerCameraBehaviour.updateCameraOnItemLoaded(r),this._updateBounds(r,null,!0),n()},s)})}preparePerspectiveImage(e,t,r){return new Promise(i=>{var n,s;t||(t=1e3),r||(r=1e3),e||((e=new I({antialias:!0})).setSize(t,r),e.outputColorSpace=x,e.autoClear=!1,e.shadowMap.enabled=!0,e.shadowMap.type=G);let a=this.cameraBehaviour.cameraControl.getCamera().clone();a instanceof j&&(a.aspect=t/r,a.updateProjectionMatrix()),null===(n=this._lightSetting)||void 0===n||n.removeFromScene();let o=new O(this._scene);e.render(this._scene,a);let h=e.domElement.toDataURL();e.domElement.toBlob(e=>{i({image:h,width:t,height:r,blob:e})},"image/png"),o.removeFromScene(),null===(s=this._lightSetting)||void 0===s||s.addToScene()})}adjustCamera(e,t,r,i){if(this.cameraBehaviour.cameraControl instanceof P){let n=(new f).setFromObject(this._scene).getSize(new b);this.cameraBehaviour.cameraControl.adjust(n,e,t,r,i),this._requestRender()}}onStart(e){this._itemsCount=e,this._scene.background=null,this.cameraBehaviour.cameraControl instanceof P&&(this.cameraBehaviour.cameraControl.shouldIgnoreStandardBehavior=!0)}onElementFinished(e){this._itemsCount,Math.round(100/this._itemsCount*e)}onFinished(e){this._scene.background=this._standardSceneBackgroundColor,this.cameraBehaviour.cameraControl instanceof P&&(this.cameraBehaviour.cameraControl.shouldIgnoreStandardBehavior=!1)}clearScene(){this._currentGLB&&(this._scene.remove(this._currentGLB),u(this._currentGLB),this._currentGLB=null),super.clearScene()}enableHD(){super.enableHD()}sceneChanged(){}getBounds(){return this._currentGLB?(new f).setFromObject(this._currentGLB):null}get glbViewerCameraBehaviour(){return this.cameraBehaviour}getGeometryBounds(){return null}}h([c],A.prototype,"_glbInputManager",void 0),h([c],A.prototype,"_rapiAccess",void 0);class U{constructor(e,t,r){this._prefix="https://furniture.roomle.com/3d/glb/",this._listeners=new Set,this._finishedItems=0,this._sceneManager=e,this._renderer=new I({antialias:!0,alpha:!0}),this._width=t,this._height=r,this._renderer.setSize(t,r),this._renderer.setClearColor(16777215,0),this._renderer.outputColorSpace=x}addListener(e){this._listeners.add(e)}removeListener(e){this._listeners.delete(e)}start(e){return this._entries=[],e.forEach(e=>{this._entries.push(this._transform(e))}),this._finishedItems=0,this._listeners.forEach(e=>e.onStart(this._entries.length)),this._zip=new window.JSZip,this._doNextEntry(),new Promise(e=>{this._resolve=e})}_transform(e){return{name:e.path.replace(".glb",".png"),url:this._prefix+e.path,position:new b(e.camera.position.x,e.camera.position.z,-e.camera.position.y),fov:2*e.camera.fieldOfView,yaw:e.camera.rotation.z,pitch:e.camera.rotation.x}}_doNextEntry(){0===this._entries.length?(this._listeners.forEach(e=>e.onFinished(this._zip)),this._resolve(this._zip)):this._processEntry(this._entries[0])}_processEntry(e){this._sceneManager.loadGLB(e.url,!1,void 0).then(()=>{this._sceneManager.adjustCamera(e.position,e.yaw,e.pitch,e.fov),this._sceneManager.preparePerspectiveImage(this._renderer,this._width,this._height).then(t=>{this._entryFinished(e,t)})})}_entryFinished(e,t){let r=this._entries.indexOf(e);r>-1&&this._entries.splice(r,1),this._finishedItems++,this._listeners.forEach(e=>e.onElementFinished(this._finishedItems)),this._zip.file(e.name,t.blob),this._doNextEntry()}}class k{constructor(e){this._currentIdOrUrl=null,this._creator_=e}setCameraOffset(e){this._sceneManager.setCameraOffset(e)}getCameraOffset(){return this._sceneManager.getCameraOffset()}init(e,t){return this.setOverrides(t),this._domHelper.setDomElement(e),this._sceneManager?(this._lifeCycleManager.resume(),Promise.resolve()):new Promise(this._initPromiseCallback.bind(this))}_initPromiseCallback(e,t){Promise.all([this._scriptLoader.fetch(v,{id:"tween-js"})]).then(()=>{this._sceneManager=new A(this._creator_,{left:0,top:1,right:1,bottom:0}),this._sceneManager.enableHD(),e()})}clearScene(){this._sceneManager.clearScene()}loadGLB(e,t=1,r){return this._currentIdOrUrl=e,this._rapiAccess.trackView(e),this._sceneManager.loadGLB(e,!0,new b(t,t,t),r)}loadStaticItem(e,t){return this._currentIdOrUrl=e,this._rapiAccess.trackView(e),this._sceneManager.loadStaticItem(e,t)}getCurrentId(){return this._currentIdOrUrl}loadSceneSetting(e){return this._sceneManager.loadSceneSettings(e)}preparePerspectiveImage(){return this._sceneManager.preparePerspectiveImage()}processRenderList(e,t=320,r=320){let i=JSON.parse(e);this._scriptLoader.fetch("static/jszip.min-c96375d50e72b199.js",{id:"jszip-js"}).then(()=>{let e=new U(this._sceneManager,t,r);e.addListener(this._sceneManager),e.start(i.items).then(t=>{t.generateAsync({type:"blob"}).then(t=>{E("content.zip",URL.createObjectURL(t)),e.removeListener(this._sceneManager)})})})}setOverrides(e){e&&(this._initData.setOverrides(e),this._globalInitData.setOverrides(e))}updateSize(){this._sceneManager.updateCamera()}getMain(){}resumeTest(e){this._domHelper.setDomElement(e),this._lifeCycleManager.resume()}pauseTest(){this._lifeCycleManager.pause()}showGUI(){this._sceneManager.showGUI()}get callbacks(){return{}}getScene(){return this._sceneManager.getScene()}updateScene(){this._sceneManager.updateScene()}getUnitFormatter(){return this._unitFormatter}getStorage(){return this._idbManager}setEnvironmentMap(e){const{url:t,intensity:r,rotation:i,maxLightSources:n}=e;this._sceneManager.setEnvironmentMap(t,r,i,n)}}h([c],k.prototype,"_rapiAccess",void 0),h([c],k.prototype,"_domHelper",void 0),h([c],k.prototype,"_scriptLoader",void 0),h([c],k.prototype,"_lifeCycleManager",void 0),h([c],k.prototype,"_initData",void 0),h([c],k.prototype,"_globalInitData",void 0),h([c],k.prototype,"_unitFormatter",void 0),h([c],k.prototype,"_idbManager",void 0),e("GlbViewer",class extends r{setupGlobals(){}setupDependencies(){m.setup(D),this.lookup("logger",this._context)}cleanUpGlobals(){throw new Error("Method not implemented.")}cleanUpDependencies(){throw new Error("Method not implemented.")}bootFinished(){this._viewer=new k(this._context),window.RoomleGLBViewer||(window.RoomleGLBViewer=this._viewer)}getApi(){return this._viewer}getContextName(){return"glb-viewer"}})}}}));
|
|
2
|
+
//# sourceMappingURL=glb-viewer-ce57d70c.legacy.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"glb-viewer-
|
|
1
|
+
{"version":3,"file":"glb-viewer-ce57d70c.legacy.js","sources":["../../../node_modules/jszip/dist/jszip.min.js"],"sourcesContent":["export default \"static/jszip.min-c96375d50e72b199.js\""],"names":[],"mappings":"m7OAAe"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
System.register(["./glb-viewer-
|
|
1
|
+
System.register(["./glb-viewer-ce57d70c.legacy.js","./script-loader-012e9890.legacy.js","./query-params-helper-713ea034.legacy.js","./main-thread-to-worker-01ce78f4.legacy.js","./roomle-dependency-injection-1a70c393.legacy.js","./camera-behaviour-e8845b08.legacy.js","./default-light-setting-8599c938.legacy.js","./glb-viewer-camera-behaviour-d4233924.legacy.js"],(function(){var e;return{setters:[function(c){e=c.GlbViewer},function(){},function(){},function(){},function(){},function(){},function(){},function(){}],execute:function(){(new e).boot()}}}));
|
|
2
2
|
//# sourceMappingURL=glb-viewer-main.legacy.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
System.register(["./script-loader-012e9890.legacy.js","./roomle-dependency-injection-1a70c393.legacy.js","./camera-behaviour-e8845b08.legacy.js","./main-thread-to-worker-01ce78f4.legacy.js","./query-params-helper-713ea034.legacy.js"],(function(e){var t,a,i,r,s,n,h,o,l,_,m,c,d,g,p,u,M,y,w,C,f,v,b,S,x,P,F,G,I,U,R,A,T,k,B,D,E,O;return{setters:[function(e){t=e.S,a=e.M},function(e){i=e._,r=e.i,s=e.l,n=e.p,h=e.q,o=e.Z,l=e.ax,_=e.ay,m=e.a1,c=e.az,d=e.a0,g=e.aA,p=e.D,u=e.L,M=e.av,y=e.aB,w=e.R,C=e.b},function(e){f=e.b,v=e.S,b=e.B,S=e.C,x=e.F,P=e.T},function(e){F=e.aO,G=e.aY,I=e.b3,U=e.J,R=e.C,A=e.ak,T=e.E,k=e.a,B=e.ac,D=e.b9,E=e.bk,O=e.ag},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,h.CAMERA)),this._initScene()}_initScene(){const e=new G(1,1,1,100,100,100),t=o.createMeshPhysicalMaterial({color:I(this._initData.colors.PRIMARY)});this._setMaterial(t),this._mesh=new U(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 R(16777215)),this.cameraBehaviour.cameraControl instanceof S){const e=new A;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===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(),new k(-1,1,1)),this._cameraBehaviourState))}_getInputManager(){return this._inputManager}sceneChanged(){}getBounds(){return this._mesh?(new A).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 R(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:B,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 D(.5,100,100)),"plane_horizontal"===this._sceneParams.type&&(e=new E(1,1),e.rotateX(-Math.PI/2)),"plane_vertical"===this._sceneParams.type&&(e=new E(1,1)),this._mesh.geometry=e,this._renderEverything()}async changeFloorMaterialById(e){const t=await this._rapiAccess.getMaterial(e);return this._environment&&this._environment instanceof x||(this._environment=new x(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 O;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],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 q{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(P,{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],q.prototype,"_domHelper",void 0),i([r],q.prototype,"_scriptLoader",void 0),i([r],q.prototype,"_lifeCycleManager",void 0),i([r],q.prototype,"_roomleMaterialViewerUiCallback",void 0),i([r],q.prototype,"_initData",void 0),i([r],q.prototype,"_rapiAccess",void 0),i([r],q.prototype,"_unitFormatter",void 0),i([r],q.prototype,"_idbManager",void 0);const H=[new p("script-loader",t),new p("logger",u),new p("input-manager",M,1),new p("configurator-mesh-generator",y),new p("rapi-access",w),new p("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(H),this.lookup("logger",this._context)}cleanUpGlobals(){throw new Error("Method not implemented.")}cleanUpDependencies(){throw new Error("Method not implemented.")}bootFinished(){this._viewer=new q(this._context),window.RoomleMaterialViewer||(window.RoomleMaterialViewer=this._viewer)}getApi(){return this._viewer}getContextName(){return"material-viewer"}})}}}));
|
|
2
|
+
//# sourceMappingURL=material-viewer-70fb38d9.legacy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"material-viewer-70fb38d9.legacy.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
System.register(["./material-viewer-
|
|
1
|
+
System.register(["./material-viewer-70fb38d9.legacy.js","./script-loader-012e9890.legacy.js","./query-params-helper-713ea034.legacy.js","./main-thread-to-worker-01ce78f4.legacy.js","./roomle-dependency-injection-1a70c393.legacy.js","./camera-behaviour-e8845b08.legacy.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.legacy.js.map
|