@roomle/web-sdk 2.70.0-alpha.5 → 2.70.0-alpha.6
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-6d7a5443.nomodule.js → banana-for-scale-4c36890b.nomodule.js} +2 -2
- package/lib/{banana-for-scale-6d7a5443.nomodule.js.map → banana-for-scale-4c36890b.nomodule.js.map} +1 -1
- package/lib/{banana-for-scale-4457f983.js → banana-for-scale-583b4d7d.js} +2 -2
- package/lib/{banana-for-scale-4457f983.js.map → banana-for-scale-583b4d7d.js.map} +1 -1
- package/lib/{component-dimensioning-e3bae534.nomodule.js → component-dimensioning-a2b0310d.nomodule.js} +2 -2
- package/lib/component-dimensioning-a2b0310d.nomodule.js.map +1 -0
- package/lib/{component-dimensioning-e4963aba.js → component-dimensioning-e8d24650.js} +2 -2
- package/lib/component-dimensioning-e8d24650.js.map +1 -0
- package/lib/{component-raycast-helper-00504484.js → component-raycast-helper-5599f4dd.js} +2 -2
- package/lib/component-raycast-helper-5599f4dd.js.map +1 -0
- package/lib/{component-raycast-helper-2ceaa4b4.nomodule.js → component-raycast-helper-5efa35f5.nomodule.js} +2 -2
- package/lib/component-raycast-helper-5efa35f5.nomodule.js.map +1 -0
- package/lib/{configurator-d7c56b18.nomodule.js → configurator-9c3c6d78.nomodule.js} +2 -2
- package/lib/configurator-9c3c6d78.nomodule.js.map +1 -0
- package/lib/{configurator-1921c967.js → configurator-b9e7995d.js} +2 -2
- package/lib/configurator-b9e7995d.js.map +1 -0
- package/lib/configurator-main-3c848f6e.js +2 -0
- package/lib/configurator-main-3c848f6e.js.map +1 -0
- package/lib/configurator-main.nomodule.js +1 -1
- package/lib/{continuous-drawing-helper-6c321af1.js → continuous-drawing-helper-0886bba5.js} +2 -2
- package/lib/continuous-drawing-helper-0886bba5.js.map +1 -0
- package/lib/{continuous-drawing-helper-d1844075.nomodule.js → continuous-drawing-helper-ef3b1d91.nomodule.js} +2 -2
- package/lib/continuous-drawing-helper-ef3b1d91.nomodule.js.map +1 -0
- package/lib/{default-light-setting-62d39828.nomodule.js → default-light-setting-587bf98c.nomodule.js} +2 -2
- package/lib/default-light-setting-587bf98c.nomodule.js.map +1 -0
- package/lib/{default-light-setting-5bf13bae.js → default-light-setting-7a830fa4.js} +2 -2
- package/lib/default-light-setting-7a830fa4.js.map +1 -0
- package/lib/definitions/common-core/src/utils/shims.d.ts +4 -0
- package/lib/definitions/common-core/src/view-model/configurator-view-model.d.ts +1 -0
- package/lib/definitions/common-core/src/webgl/renderer/pass/ground-reflection-pass.d.ts +2 -1
- package/lib/definitions/common-core/src/webgl/renderer/scene-renderer.d.ts +1 -4
- package/lib/definitions/common-core/src/webgl/roomle-webgl-renderer.d.ts +14 -3
- package/lib/definitions/common-core/src/webgl/scene-manager.d.ts +2 -1
- package/lib/definitions/configurator-core/mock/configurator-mock-data.d.ts +12 -0
- package/lib/definitions/configurator-core/src/webgl/configurator-scene-manager.d.ts +2 -1
- package/lib/definitions/glb-viewer-core/src/webgl/glb-viewer-scene-manager.d.ts +1 -0
- package/lib/definitions/material-viewer/src/webgl/material-viewer-scene-manager.d.ts +1 -0
- package/lib/definitions/typings/kernel.d.ts +1 -0
- package/lib/{dimensioning-helper-65208c29.nomodule.js → dimensioning-helper-31a7887d.nomodule.js} +2 -2
- package/lib/{dimensioning-helper-65208c29.nomodule.js.map → dimensioning-helper-31a7887d.nomodule.js.map} +1 -1
- package/lib/{dimensioning-helper-b87618c4.js → dimensioning-helper-5e1f9463.js} +2 -2
- package/lib/{dimensioning-helper-b87618c4.js.map → dimensioning-helper-5e1f9463.js.map} +1 -1
- package/lib/glb-viewer-00e78ac1.js +2 -0
- package/lib/{glb-viewer-37f1f3f4.js.map → glb-viewer-00e78ac1.js.map} +1 -1
- package/lib/glb-viewer-7ae8505c.nomodule.js +2 -0
- package/lib/{glb-viewer-3214f030.nomodule.js.map → glb-viewer-7ae8505c.nomodule.js.map} +1 -1
- package/lib/glb-viewer-main-c5492f8b.js +2 -0
- package/lib/glb-viewer-main-c5492f8b.js.map +1 -0
- package/lib/glb-viewer-main.nomodule.js +1 -1
- package/lib/legacy/{banana-for-scale-ece6eda6.legacy.js → banana-for-scale-1f535995.legacy.js} +2 -2
- package/lib/legacy/{banana-for-scale-ece6eda6.legacy.js.map → banana-for-scale-1f535995.legacy.js.map} +1 -1
- package/lib/legacy/{component-dimensioning-2c21a5cb.legacy.js → component-dimensioning-1525a9b5.legacy.js} +2 -2
- package/lib/legacy/component-dimensioning-1525a9b5.legacy.js.map +1 -0
- package/lib/legacy/{component-raycast-helper-a1d580f8.legacy.js → component-raycast-helper-aba63455.legacy.js} +2 -2
- package/lib/legacy/component-raycast-helper-aba63455.legacy.js.map +1 -0
- package/lib/legacy/{configurator-8f63e979.legacy.js → configurator-5d03fa2c.legacy.js} +2 -2
- package/lib/legacy/configurator-5d03fa2c.legacy.js.map +1 -0
- package/lib/legacy/configurator-main.legacy.js +1 -1
- package/lib/legacy/{continuous-drawing-helper-e0e78182.legacy.js → continuous-drawing-helper-da30949c.legacy.js} +2 -2
- package/lib/legacy/continuous-drawing-helper-da30949c.legacy.js.map +1 -0
- package/lib/legacy/{default-light-setting-114bb1af.legacy.js → default-light-setting-2c2b6c7e.legacy.js} +2 -2
- package/lib/legacy/default-light-setting-2c2b6c7e.legacy.js.map +1 -0
- package/lib/legacy/{dimensioning-helper-3208e520.legacy.js → dimensioning-helper-114106c4.legacy.js} +2 -2
- package/lib/legacy/{dimensioning-helper-3208e520.legacy.js.map → dimensioning-helper-114106c4.legacy.js.map} +1 -1
- package/lib/legacy/glb-viewer-6ce530e9.legacy.js +2 -0
- package/lib/legacy/{glb-viewer-ef6643ca.legacy.js.map → glb-viewer-6ce530e9.legacy.js.map} +1 -1
- package/lib/legacy/glb-viewer-main.legacy.js +1 -1
- package/lib/legacy/material-viewer-5f7d6162.legacy.js +2 -0
- package/lib/legacy/material-viewer-5f7d6162.legacy.js.map +1 -0
- package/lib/legacy/material-viewer-main.legacy.js +1 -1
- package/lib/legacy/{planner-94d8e370.legacy.js → planner-9249d2c1.legacy.js} +2 -2
- package/lib/legacy/{planner-94d8e370.legacy.js.map → planner-9249d2c1.legacy.js.map} +1 -1
- package/lib/legacy/planner-main.legacy.js +1 -1
- package/lib/legacy/{roomle-configurator-e15923a2.legacy.js → roomle-configurator-95d426de.legacy.js} +2 -2
- package/lib/legacy/roomle-configurator-95d426de.legacy.js.map +1 -0
- package/lib/legacy/roomle-dependency-injection-03a50c73.legacy.js +9 -0
- package/lib/legacy/{roomle-dependency-injection-9802173b.legacy.js.map → roomle-dependency-injection-03a50c73.legacy.js.map} +1 -1
- package/lib/legacy/roomle-sdk.legacy.js +1 -1
- package/lib/legacy/{scene-manager-c84bef48.legacy.js → scene-manager-3cca07b8.legacy.js} +2 -2
- package/lib/legacy/{scene-manager-c84bef48.legacy.js.map → scene-manager-3cca07b8.legacy.js.map} +1 -1
- package/lib/legacy/{script-loader-260b805f.legacy.js → script-loader-2c3965bc.legacy.js} +2 -2
- package/lib/legacy/script-loader-2c3965bc.legacy.js.map +1 -0
- package/lib/legacy/{stats-helper-b732b062.legacy.js → stats-helper-8dab828c.legacy.js} +2 -2
- package/lib/legacy/stats-helper-8dab828c.legacy.js.map +1 -0
- package/lib/legacy/{tools-core-c74a30e9.legacy.js → tools-core-6d580c39.legacy.js} +2 -2
- package/lib/legacy/tools-core-6d580c39.legacy.js.map +1 -0
- package/lib/material-viewer-262b7209.nomodule.js +2 -0
- package/lib/material-viewer-262b7209.nomodule.js.map +1 -0
- package/lib/material-viewer-fe380185.js +2 -0
- package/lib/material-viewer-fe380185.js.map +1 -0
- package/lib/material-viewer-main-cdbd967e.js +2 -0
- package/lib/material-viewer-main-cdbd967e.js.map +1 -0
- package/lib/material-viewer-main.nomodule.js +1 -1
- package/lib/{planner-ac6272f1.nomodule.js → planner-165f5a58.nomodule.js} +2 -2
- package/lib/{planner-ac6272f1.nomodule.js.map → planner-165f5a58.nomodule.js.map} +1 -1
- package/lib/{planner-5766bf05.js → planner-5b3e11c7.js} +2 -2
- package/lib/{planner-5766bf05.js.map → planner-5b3e11c7.js.map} +1 -1
- package/lib/planner-main-2b52bcb6.js +2 -0
- package/lib/planner-main-2b52bcb6.js.map +1 -0
- package/lib/planner-main.nomodule.js +1 -1
- package/lib/{roomle-configurator-6d7d9bea.js → roomle-configurator-260fb49c.js} +2 -2
- package/lib/roomle-configurator-260fb49c.js.map +1 -0
- package/lib/{roomle-configurator-31a9bad3.nomodule.js → roomle-configurator-baf0271c.nomodule.js} +2 -2
- package/lib/roomle-configurator-baf0271c.nomodule.js.map +1 -0
- package/lib/roomle-dependency-injection-304aa012.js +9 -0
- package/lib/{roomle-dependency-injection-99510681.js.map → roomle-dependency-injection-304aa012.js.map} +1 -1
- package/lib/roomle-dependency-injection-fb16ce98.nomodule.js +9 -0
- package/lib/{roomle-dependency-injection-e9e5f98a.nomodule.js.map → roomle-dependency-injection-fb16ce98.nomodule.js.map} +1 -1
- package/lib/{roomle-sdk-b19f69c2.js → roomle-sdk-5dc57ed2.js} +2 -2
- package/lib/roomle-sdk-5dc57ed2.js.map +1 -0
- package/lib/roomle-sdk.nomodule.js +1 -1
- package/lib/{scene-manager-652820fc.nomodule.js → scene-manager-4dc0d8f4.nomodule.js} +2 -2
- package/lib/{scene-manager-652820fc.nomodule.js.map → scene-manager-4dc0d8f4.nomodule.js.map} +1 -1
- package/lib/{scene-manager-d2f46968.js → scene-manager-84f489a2.js} +2 -2
- package/lib/{scene-manager-d2f46968.js.map → scene-manager-84f489a2.js.map} +1 -1
- package/lib/{script-loader-f9bc9c29.js → script-loader-62b67b63.js} +2 -2
- package/lib/script-loader-62b67b63.js.map +1 -0
- package/lib/{script-loader-f57d2e96.nomodule.js → script-loader-7cbd1a19.nomodule.js} +2 -2
- package/lib/script-loader-7cbd1a19.nomodule.js.map +1 -0
- package/lib/{stats-helper-2be85e52.nomodule.js → stats-helper-5a363680.nomodule.js} +2 -2
- package/lib/stats-helper-5a363680.nomodule.js.map +1 -0
- package/lib/{stats-helper-e8ab1f07.js → stats-helper-82c206d4.js} +2 -2
- package/lib/stats-helper-82c206d4.js.map +1 -0
- package/lib/{tools-core-008eae52.nomodule.js → tools-core-be99699d.nomodule.js} +2 -2
- package/lib/tools-core-be99699d.nomodule.js.map +1 -0
- package/lib/{tools-core-d57de23c.js → tools-core-fbeb1457.js} +2 -2
- package/lib/tools-core-fbeb1457.js.map +1 -0
- package/package.json +2 -2
- package/lib/component-dimensioning-e3bae534.nomodule.js.map +0 -1
- package/lib/component-dimensioning-e4963aba.js.map +0 -1
- package/lib/component-raycast-helper-00504484.js.map +0 -1
- package/lib/component-raycast-helper-2ceaa4b4.nomodule.js.map +0 -1
- package/lib/configurator-1921c967.js.map +0 -1
- package/lib/configurator-d7c56b18.nomodule.js.map +0 -1
- package/lib/configurator-main-16c1a845.js +0 -2
- package/lib/configurator-main-16c1a845.js.map +0 -1
- package/lib/continuous-drawing-helper-6c321af1.js.map +0 -1
- package/lib/continuous-drawing-helper-d1844075.nomodule.js.map +0 -1
- package/lib/default-light-setting-5bf13bae.js.map +0 -1
- package/lib/default-light-setting-62d39828.nomodule.js.map +0 -1
- package/lib/glb-viewer-3214f030.nomodule.js +0 -2
- package/lib/glb-viewer-37f1f3f4.js +0 -2
- package/lib/glb-viewer-main-465e10ca.js +0 -2
- package/lib/glb-viewer-main-465e10ca.js.map +0 -1
- package/lib/legacy/component-dimensioning-2c21a5cb.legacy.js.map +0 -1
- package/lib/legacy/component-raycast-helper-a1d580f8.legacy.js.map +0 -1
- package/lib/legacy/configurator-8f63e979.legacy.js.map +0 -1
- package/lib/legacy/continuous-drawing-helper-e0e78182.legacy.js.map +0 -1
- package/lib/legacy/default-light-setting-114bb1af.legacy.js.map +0 -1
- package/lib/legacy/glb-viewer-ef6643ca.legacy.js +0 -2
- package/lib/legacy/material-viewer-d5e0174e.legacy.js +0 -2
- package/lib/legacy/material-viewer-d5e0174e.legacy.js.map +0 -1
- package/lib/legacy/roomle-configurator-e15923a2.legacy.js.map +0 -1
- package/lib/legacy/roomle-dependency-injection-9802173b.legacy.js +0 -9
- package/lib/legacy/script-loader-260b805f.legacy.js.map +0 -1
- package/lib/legacy/stats-helper-b732b062.legacy.js.map +0 -1
- package/lib/legacy/tools-core-c74a30e9.legacy.js.map +0 -1
- package/lib/material-viewer-76ebb38c.nomodule.js +0 -2
- package/lib/material-viewer-76ebb38c.nomodule.js.map +0 -1
- package/lib/material-viewer-ed2ae8a9.js +0 -2
- package/lib/material-viewer-ed2ae8a9.js.map +0 -1
- package/lib/material-viewer-main-b3317850.js +0 -2
- package/lib/material-viewer-main-b3317850.js.map +0 -1
- package/lib/planner-main-a2b01c28.js +0 -2
- package/lib/planner-main-a2b01c28.js.map +0 -1
- package/lib/roomle-configurator-31a9bad3.nomodule.js.map +0 -1
- package/lib/roomle-configurator-6d7d9bea.js.map +0 -1
- package/lib/roomle-dependency-injection-99510681.js +0 -9
- package/lib/roomle-dependency-injection-e9e5f98a.nomodule.js +0 -9
- package/lib/roomle-sdk-b19f69c2.js.map +0 -1
- package/lib/script-loader-f57d2e96.nomodule.js.map +0 -1
- package/lib/script-loader-f9bc9c29.js.map +0 -1
- package/lib/stats-helper-2be85e52.nomodule.js.map +0 -1
- package/lib/stats-helper-e8ab1f07.js.map +0 -1
- package/lib/tools-core-008eae52.nomodule.js.map +0 -1
- package/lib/tools-core-d57de23c.js.map +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
System.register(["./roomle-dependency-injection-
|
|
2
|
-
//# sourceMappingURL=banana-for-scale-
|
|
1
|
+
System.register(["./roomle-dependency-injection-fb16ce98.nomodule.js","./main-thread-to-worker-285afcc7.nomodule.js"],(function(e){var n,t,a,s,i;return{setters:[function(e){n=e.aD,t=e._,a=e.i},function(e){s=e.g,i=e.a}],execute:function(){class o extends n{setScene(e){this._scene=e,this._staticItemLoader.loadGLB(s()+"static/banana_div2-1351c98ec2986be1.glb").then(e=>{this._banana=e.scene,this.updateBounds(null)})}updateBounds(e){if(e&&(this._bounds=e),this._bounds){if(this._banana){const e=this._bounds.getSize(new i),n=this._bounds.getCenter(new i).clone();n.x-=e.x/2+.18,n.z+=e.z/2+.05,n.y=0;let t=.03;this._banana.scale.copy(new i(t,t,t)),this._banana.rotation.y=.6,this._banana.position.copy(n)}this._scene.children.includes(this._banana)||this.addToScene()}}clearScene(e,n){super.clearScene(e,n),this.removeFromScene()}addToScene(){this._scene&&this._banana&&this._scene.add(this._banana)}removeFromScene(){this._scene&&this._banana&&this._scene.remove(this._banana)}}e("default",o),t([a],o.prototype,"_staticItemLoader",void 0)}}}));
|
|
2
|
+
//# sourceMappingURL=banana-for-scale-4c36890b.nomodule.js.map
|
package/lib/{banana-for-scale-6d7a5443.nomodule.js.map → banana-for-scale-4c36890b.nomodule.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"banana-for-scale-
|
|
1
|
+
{"version":3,"file":"banana-for-scale-4c36890b.nomodule.js","sources":["../../packages/configurator-core/public/geometry/banana_div2.glb"],"sourcesContent":["export default \"static/banana_div2-1351c98ec2986be1.glb\""],"names":[],"mappings":"6TAAe"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{aD as ScenePluginDefaultImplementation,_ as __decorate,i as inject}from"./roomle-dependency-injection-
|
|
2
|
-
//# sourceMappingURL=banana-for-scale-
|
|
1
|
+
import{aD as ScenePluginDefaultImplementation,_ as __decorate,i as inject}from"./roomle-dependency-injection-304aa012.js";import{g as getAssetPath,a as Vector3}from"./main-thread-to-worker-052750d8.js";class BananaForScale extends ScenePluginDefaultImplementation{setScene(e){this._scene=e,this._staticItemLoader.loadGLB(getAssetPath()+"static/banana_div2-1351c98ec2986be1.glb").then(e=>{this._banana=e.scene,this.updateBounds(null)})}updateBounds(e){if(e&&(this._bounds=e),this._bounds){if(this._banana){const e=this._bounds.getSize(new Vector3),a=this._bounds.getCenter(new Vector3).clone();a.x-=e.x/2+.18,a.z+=e.z/2+.05,a.y=0;let n=.03;this._banana.scale.copy(new Vector3(n,n,n)),this._banana.rotation.y=.6,this._banana.position.copy(a)}this._scene.children.includes(this._banana)||this.addToScene()}}clearScene(e,a){super.clearScene(e,a),this.removeFromScene()}addToScene(){this._scene&&this._banana&&this._scene.add(this._banana)}removeFromScene(){this._scene&&this._banana&&this._scene.remove(this._banana)}}__decorate([inject],BananaForScale.prototype,"_staticItemLoader",void 0);export{BananaForScale as default};
|
|
2
|
+
//# sourceMappingURL=banana-for-scale-583b4d7d.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"banana-for-scale-
|
|
1
|
+
{"version":3,"file":"banana-for-scale-583b4d7d.js","sources":["../../packages/configurator-core/public/geometry/banana_div2.glb"],"sourcesContent":["export default \"static/banana_div2-1351c98ec2986be1.glb\""],"names":[],"mappings":"gVAAe"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
System.register(["./roomle-dependency-injection-
|
|
2
|
-
//# sourceMappingURL=component-dimensioning-
|
|
1
|
+
System.register(["./roomle-dependency-injection-fb16ce98.nomodule.js","./main-thread-to-worker-285afcc7.nomodule.js","./TextGeometry-22809d6e.nomodule.js"],(function(e){var i,t,n,s,o,a,h,d,_,l,r,g,m,c,w,p;return{setters:[function(e){i=e._,t=e.i},function(e){n=e.O,s=e.a,o=e.u,a=e.h,h=e.w,d=e.bo,_=e.B,l=e.G,r=e.z,g=e.b,m=e.Q,c=e.a_,w=e.b9},function(e){p=e.T}],execute:function(){const u="component_dimensioning_line_material",x="component_dimensioning_plane_material",y="component_dimensioning_text_material";class v extends n{constructor(e,i,t,n){super(),this._center=i.getCenter(new s),this._size=i.getSize(new s),this._origin=this._center.clone().sub(this._size.clone().multiplyScalar(.5)),this._dimensioning=e,this._level=this._dimensioning.maxLevel-this._dimensioning.level,this._font=t,this._cameraPosition=n,this._init()}_initMaterials(){this._cacheHolder.materialCache.has(u)?this._lineMaterial=this._cacheHolder.materialCache.get(u):(this._lineMaterial=new o({color:3618615}),this._cacheHolder.materialCache.set(u,this._lineMaterial)),this._cacheHolder.materialCache.has(x)?this._planeMaterial=this._cacheHolder.materialCache.get(x):(this._planeMaterial=new a({color:16777215,side:h,opacity:.8,transparent:!0}),this._cacheHolder.materialCache.set(x,this._planeMaterial)),this._cacheHolder.materialCache.has(y)?this._textMaterial=this._cacheHolder.materialCache.get(y):(this._textMaterial=new d({color:3618615}),this._cacheHolder.materialCache.set(y,this._textMaterial))}_init(){this._initMaterials();let e=new _;this._line=new l(e,this._lineMaterial),this._line.name="component dimension line "+this._dimensioning.type.value,this._text=new r(e,this._textMaterial),this._text.name="component dimension text "+this._dimensioning.type.value,this._plane=new r(e,this._planeMaterial),this._plane.name="component dimension plane "+this._dimensioning.type.value;let i,t=new _,n=Math.round(Math.max(this._size.y,this._size.x,this._size.z)),o=Math.abs(this._dimensioning.to-this._dimensioning.from),a=.025+(n<4?0:.005*n);o<.3&&(a*=.5+o);let h={font:this._font,size:a,height:.001,curveSegments:2,bevelEnabled:!0,bevelThickness:.001,bevelSize:.001},d=this._dimensioning.label?this._dimensioning.label:this._unitFormatter.formatMMValueToUnitString(1e3*o),c=new p(d,h);c.computeBoundingBox();let w=c.boundingBox.getSize(new s).y;0===this._dimensioning.type.value&&(i=this._getXEdge(w),this._addXEdgeSideLines(w)),1===this._dimensioning.type.value&&(i=this._getYEdge(w),this._addYEdgeSideLines(w)),2===this._dimensioning.type.value&&(i=this._getZEdge(w),this._addZEdgeSideLines(w));let u=[i.start.x,i.start.y,i.start.z,i.end.x,i.end.y,i.end.z];if(t.setAttribute("position",new g(new Float32Array(u),3)),this._line.geometry.dispose(),this._line.geometry=t,this.add(this._line),this._text.geometry=c,0===this._dimensioning.type.value&&this._addText(i,c,new m,new s(0,.04,0)),1===this._dimensioning.type.value){let e=new m,t=this._getXSign()>0?Math.PI/2:Math.PI/2*3;e.setFromAxisAngle(new s(0,0,1),t),this._addText(i,c,e,new s(.04,0,0))}if(2===this._dimensioning.type.value){let e=this._getXSign()>0?Math.PI/2:Math.PI/2*3,t=(new m).setFromAxisAngle(new s(-1,0,0),Math.PI/2),n=(new m).setFromAxisAngle(new s(0,0,1),e);this._addText(i,c,t.multiply(n),new s(.04,0,0))}}_getXEdge(e){let i=this._size.y+.05+(.06+e)*this._level;const t=new s(0,this._origin.y,this._origin.z);let n=t.clone().add(new s(this._dimensioning.from,i,0)),o=t.clone().add(new s(this._dimensioning.to,i,0));return new c(n,o)}_addXEdgeSideLines(e){let i=this._size.y+.05+(.06+e)*(this._level-.5),t=this._size.y+.05+(.06+e)*this._level;const n=new s(0,this._origin.y,this._origin.z);let o=n.clone().add(new s(this._dimensioning.from,i,0)),a=n.clone().add(new s(this._dimensioning.from,t,0)),h=n.clone().add(new s(this._dimensioning.to,i,0)),d=n.clone().add(new s(this._dimensioning.to,t,0));this._addLine(o,a),this._addLine(h,d)}_getZEdge(e){let i=(this._getXSign()>0?this._size.x:0)+.05+(.06+e)*this._level;i*=this._getXSign();const t=new s(this._origin.x,this._origin.y,0);let n=t.clone().add(new s(i,0,this._dimensioning.from)),o=t.clone().add(new s(i,0,this._dimensioning.to));return new c(n,o)}_addZEdgeSideLines(e){let i=this._getXSign()>0?this._size.x:0,t=i+.05+(.06+e)*(this._level-.5),n=i+.05+(.06+e)*this._level;t*=this._getXSign(),n*=this._getXSign();const o=new s(this._origin.x,this._origin.y,0);let a=o.clone().add(new s(t,0,this._dimensioning.from)),h=o.clone().add(new s(n,0,this._dimensioning.from)),d=o.clone().add(new s(t,0,this._dimensioning.to)),_=o.clone().add(new s(n,0,this._dimensioning.to));this._addLine(a,h),this._addLine(d,_)}_getYEdge(e){let i=(this._getXSign()>0?this._size.x:0)+.05+(.06+e)*this._level;i*=this._getXSign();const t=new s(this._origin.x,0,this._origin.z);let n=t.clone().add(new s(i,this._dimensioning.from,0)),o=t.clone().add(new s(i,this._dimensioning.to,0));return new c(n,o)}_addYEdgeSideLines(e){let i=this._getXSign()>0?this._size.x:0,t=i+.05+(.06+e)*(this._level-.5),n=i+.05+(.06+e)*this._level;t*=this._getXSign(),n*=this._getXSign();const o=new s(this._origin.x,0,this._origin.z);let a=o.clone().add(new s(t,this._dimensioning.from,0)),h=o.clone().add(new s(n,this._dimensioning.from,0)),d=o.clone().add(new s(t,this._dimensioning.to,0)),_=o.clone().add(new s(n,this._dimensioning.to,0));this._addLine(a,h),this._addLine(d,_)}_addLine(e,i){let t=new _,n=[e.x,e.y,e.z,i.x,i.y,i.z];t.setAttribute("position",new g(new Float32Array(n),3)),this.add(new l(t,this._lineMaterial))}_addText(e,i,t,n){let o=e.getCenter(new s);n.x*=this._getXSign(),o.add(n);let a=i.boundingBox.getSize(new s);i.center(),this._text.position.copy(o),this._text.quaternion.copy(t),this.add(this._text);let h=new w(a.x+.02,a.y+.02,32);h.center(),this._plane.geometry=h,this._plane.position.copy(o),this._plane.quaternion.copy(t),this.add(this._plane)}_getXSign(){return this._cameraPosition.x>=0?1:-1}}e("default",v),i([t],v.prototype,"_cacheHolder",void 0),i([t],v.prototype,"_unitFormatter",void 0)}}}));
|
|
2
|
+
//# sourceMappingURL=component-dimensioning-a2b0310d.nomodule.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component-dimensioning-a2b0310d.nomodule.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{_ as __decorate,i as inject}from"./roomle-dependency-injection-
|
|
2
|
-
//# sourceMappingURL=component-dimensioning-
|
|
1
|
+
import{_ as __decorate,i as inject}from"./roomle-dependency-injection-304aa012.js";import{O as Object3D,a as Vector3,u as LineBasicMaterial,h as MeshBasicMaterial,w as DoubleSide,bo as MeshPhongMaterial,B as BufferGeometry,G as Line,z as Mesh,b as BufferAttribute,Q as Quaternion,a_ as Line3,b9 as PlaneGeometry}from"./main-thread-to-worker-052750d8.js";import{T as TextGeometry}from"./TextGeometry-9c63883e.js";const LINE_MATERIAL="component_dimensioning_line_material",PLANE_MATERIAL="component_dimensioning_plane_material",TEXT_MATERIAL="component_dimensioning_text_material";class ComponentDimensioning extends Object3D{constructor(e,i,t,n){super(),this._center=i.getCenter(new Vector3),this._size=i.getSize(new Vector3),this._origin=this._center.clone().sub(this._size.clone().multiplyScalar(.5)),this._dimensioning=e,this._level=this._dimensioning.maxLevel-this._dimensioning.level,this._font=t,this._cameraPosition=n,this._init()}_initMaterials(){this._cacheHolder.materialCache.has(LINE_MATERIAL)?this._lineMaterial=this._cacheHolder.materialCache.get(LINE_MATERIAL):(this._lineMaterial=new LineBasicMaterial({color:3618615}),this._cacheHolder.materialCache.set(LINE_MATERIAL,this._lineMaterial)),this._cacheHolder.materialCache.has(PLANE_MATERIAL)?this._planeMaterial=this._cacheHolder.materialCache.get(PLANE_MATERIAL):(this._planeMaterial=new MeshBasicMaterial({color:16777215,side:DoubleSide,opacity:.8,transparent:!0}),this._cacheHolder.materialCache.set(PLANE_MATERIAL,this._planeMaterial)),this._cacheHolder.materialCache.has(TEXT_MATERIAL)?this._textMaterial=this._cacheHolder.materialCache.get(TEXT_MATERIAL):(this._textMaterial=new MeshPhongMaterial({color:3618615}),this._cacheHolder.materialCache.set(TEXT_MATERIAL,this._textMaterial))}_init(){this._initMaterials();let e=new BufferGeometry;this._line=new Line(e,this._lineMaterial),this._line.name="component dimension line "+this._dimensioning.type.value,this._text=new Mesh(e,this._textMaterial),this._text.name="component dimension text "+this._dimensioning.type.value,this._plane=new Mesh(e,this._planeMaterial),this._plane.name="component dimension plane "+this._dimensioning.type.value;let i,t=new BufferGeometry,n=Math.round(Math.max(this._size.y,this._size.x,this._size.z)),s=Math.abs(this._dimensioning.to-this._dimensioning.from),o=.025+(n<4?0:.005*n);s<.3&&(o*=.5+s);let a={font:this._font,size:o,height:.001,curveSegments:2,bevelEnabled:!0,bevelThickness:.001,bevelSize:.001},h=this._dimensioning.label?this._dimensioning.label:this._unitFormatter.formatMMValueToUnitString(1e3*s),r=new TextGeometry(h,a);r.computeBoundingBox();let _=r.boundingBox.getSize(new Vector3).y;0===this._dimensioning.type.value&&(i=this._getXEdge(_),this._addXEdgeSideLines(_)),1===this._dimensioning.type.value&&(i=this._getYEdge(_),this._addYEdgeSideLines(_)),2===this._dimensioning.type.value&&(i=this._getZEdge(_),this._addZEdgeSideLines(_));let d=[i.start.x,i.start.y,i.start.z,i.end.x,i.end.y,i.end.z];if(t.setAttribute("position",new BufferAttribute(new Float32Array(d),3)),this._line.geometry.dispose(),this._line.geometry=t,this.add(this._line),this._text.geometry=r,0===this._dimensioning.type.value&&this._addText(i,r,new Quaternion,new Vector3(0,.04,0)),1===this._dimensioning.type.value){let e=new Quaternion,t=this._getXSign()>0?Math.PI/2:Math.PI/2*3;e.setFromAxisAngle(new Vector3(0,0,1),t),this._addText(i,r,e,new Vector3(.04,0,0))}if(2===this._dimensioning.type.value){let e=this._getXSign()>0?Math.PI/2:Math.PI/2*3,t=(new Quaternion).setFromAxisAngle(new Vector3(-1,0,0),Math.PI/2),n=(new Quaternion).setFromAxisAngle(new Vector3(0,0,1),e);this._addText(i,r,t.multiply(n),new Vector3(.04,0,0))}}_getXEdge(e){let i=this._size.y+.05+(.06+e)*this._level;const t=new Vector3(0,this._origin.y,this._origin.z);let n=t.clone().add(new Vector3(this._dimensioning.from,i,0)),s=t.clone().add(new Vector3(this._dimensioning.to,i,0));return new Line3(n,s)}_addXEdgeSideLines(e){let i=this._size.y+.05+(.06+e)*(this._level-.5),t=this._size.y+.05+(.06+e)*this._level;const n=new Vector3(0,this._origin.y,this._origin.z);let s=n.clone().add(new Vector3(this._dimensioning.from,i,0)),o=n.clone().add(new Vector3(this._dimensioning.from,t,0)),a=n.clone().add(new Vector3(this._dimensioning.to,i,0)),h=n.clone().add(new Vector3(this._dimensioning.to,t,0));this._addLine(s,o),this._addLine(a,h)}_getZEdge(e){let i=(this._getXSign()>0?this._size.x:0)+.05+(.06+e)*this._level;i*=this._getXSign();const t=new Vector3(this._origin.x,this._origin.y,0);let n=t.clone().add(new Vector3(i,0,this._dimensioning.from)),s=t.clone().add(new Vector3(i,0,this._dimensioning.to));return new Line3(n,s)}_addZEdgeSideLines(e){let i=this._getXSign()>0?this._size.x:0,t=i+.05+(.06+e)*(this._level-.5),n=i+.05+(.06+e)*this._level;t*=this._getXSign(),n*=this._getXSign();const s=new Vector3(this._origin.x,this._origin.y,0);let o=s.clone().add(new Vector3(t,0,this._dimensioning.from)),a=s.clone().add(new Vector3(n,0,this._dimensioning.from)),h=s.clone().add(new Vector3(t,0,this._dimensioning.to)),r=s.clone().add(new Vector3(n,0,this._dimensioning.to));this._addLine(o,a),this._addLine(h,r)}_getYEdge(e){let i=(this._getXSign()>0?this._size.x:0)+.05+(.06+e)*this._level;i*=this._getXSign();const t=new Vector3(this._origin.x,0,this._origin.z);let n=t.clone().add(new Vector3(i,this._dimensioning.from,0)),s=t.clone().add(new Vector3(i,this._dimensioning.to,0));return new Line3(n,s)}_addYEdgeSideLines(e){let i=this._getXSign()>0?this._size.x:0,t=i+.05+(.06+e)*(this._level-.5),n=i+.05+(.06+e)*this._level;t*=this._getXSign(),n*=this._getXSign();const s=new Vector3(this._origin.x,0,this._origin.z);let o=s.clone().add(new Vector3(t,this._dimensioning.from,0)),a=s.clone().add(new Vector3(n,this._dimensioning.from,0)),h=s.clone().add(new Vector3(t,this._dimensioning.to,0)),r=s.clone().add(new Vector3(n,this._dimensioning.to,0));this._addLine(o,a),this._addLine(h,r)}_addLine(e,i){let t=new BufferGeometry,n=[e.x,e.y,e.z,i.x,i.y,i.z];t.setAttribute("position",new BufferAttribute(new Float32Array(n),3)),this.add(new Line(t,this._lineMaterial))}_addText(e,i,t,n){let s=e.getCenter(new Vector3);n.x*=this._getXSign(),s.add(n);let o=i.boundingBox.getSize(new Vector3);i.center(),this._text.position.copy(s),this._text.quaternion.copy(t),this.add(this._text);let a=new PlaneGeometry(o.x+.02,o.y+.02,32);a.center(),this._plane.geometry=a,this._plane.position.copy(s),this._plane.quaternion.copy(t),this.add(this._plane)}_getXSign(){return this._cameraPosition.x>=0?1:-1}}__decorate([inject],ComponentDimensioning.prototype,"_cacheHolder",void 0),__decorate([inject],ComponentDimensioning.prototype,"_unitFormatter",void 0);export{ComponentDimensioning as default};
|
|
2
|
+
//# sourceMappingURL=component-dimensioning-e8d24650.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component-dimensioning-e8d24650.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{bx as Raycaster,bM as throttle,z as Mesh,v as MeshStandardMaterial,ad as Box3,a as Vector3,bN as Frustum,k as Matrix4}from"./main-thread-to-worker-052750d8.js";import{$ as transitionTransparencyOfMaterial}from"./roomle-dependency-injection-
|
|
2
|
-
//# sourceMappingURL=component-raycast-helper-
|
|
1
|
+
import{bx as Raycaster,bM as throttle,z as Mesh,v as MeshStandardMaterial,ad as Box3,a as Vector3,bN as Frustum,k as Matrix4}from"./main-thread-to-worker-052750d8.js";import{$ as transitionTransparencyOfMaterial}from"./roomle-dependency-injection-304aa012.js";class ComponentRaycastHelper{constructor(){this._nonTransparentComponent=null,this._raycaster=new Raycaster,this._raycaster.near=.1,this._raycaster.layers.enable(3)}init(e,t){this._scene=e,this._camera=t,this.checkComponentVisibility=throttle(this.checkComponentVisibility,100).bind(this),this.checkPreviewVisibility=throttle(this.checkPreviewVisibility,100).bind(this)}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(a=>{const s=t&&e.id===t.id||i,n=!(a instanceof Mesh);this._changeMaterialsOnSelect(a,t,(!s||!n)&&s)}),t)e instanceof Mesh&&e.material instanceof MeshStandardMaterial&&!e.userData.oldMaterial&&(e.userData.oldMaterial=e.material,e.material=e.material.clone(),i||transitionTransparencyOfMaterial(e,{opacity:.2,transparent:!0}));else if(e.userData.oldMaterial&&e instanceof Mesh&&e.material instanceof MeshStandardMaterial){const{opacity:t,transparent:i}=e.userData.oldMaterial;transitionTransparencyOfMaterial(e,{opacity:t,transparent:i}),e.userData.oldMaterial=void 0}}isComponentVisible(e){const t=[];e.traverse(e=>t.push(e.uuid));const i=(new Box3).setFromObject(e).getCenter(new Vector3),a=(new Vector3).subVectors(i,this._camera.position).normalize();this._raycaster.set(this._camera.position,a),this._raycaster.far=this._camera.position.distanceTo(i);const s=[];return this._raycaster.intersectObjects(this._scene.children,!0).forEach(e=>{e.object.material.visible&&(t.includes(e.object.uuid)||e.object.userData.ignoreComponentRaycast||s.push(e))}),0===s.length}checkComponentAndPreviewVisibility(e,t){e.hasSelection()?this.checkComponentVisibility(e,t):t.hasPreviews()?this.checkPreviewVisibility(t):this.changeMaterialsOnSelect(this._scene,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._scene,null):this.changeMaterialsOnSelect(this._scene,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 Frustum,i=(new Matrix4).multiplyMatrices(this._camera.projectionMatrix,this._camera.matrixWorldInverse),a=new Box3;return t.setFromProjectionMatrix(i),e.map(e=>(e=>{const i=a.setFromObject(e).getCenter(new Vector3);return t.containsPoint(i)})(e)).reduce((e,t)=>e&&t)}checkPreviewVisibility(e){e.hasPreviewLines()||(this.areAllPreviewsVisible(e)?this.changeMaterialsOnSelect(this._scene,null):this.changeMaterialsOnSelect(this._scene,{id:-1}))}}export{ComponentRaycastHelper as default};
|
|
2
|
+
//# sourceMappingURL=component-raycast-helper-5599f4dd.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component-raycast-helper-5599f4dd.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
System.register(["./main-thread-to-worker-285afcc7.nomodule.js","./roomle-dependency-injection-
|
|
2
|
-
//# sourceMappingURL=component-raycast-helper-
|
|
1
|
+
System.register(["./main-thread-to-worker-285afcc7.nomodule.js","./roomle-dependency-injection-fb16ce98.nomodule.js"],(function(e){var t,i,n,s,a,r,c,o,l;return{setters:[function(e){t=e.bx,i=e.bM,n=e.z,s=e.v,a=e.ad,r=e.a,c=e.bN,o=e.k},function(e){l=e.$}],execute:function(){e("default",class{constructor(){this._nonTransparentComponent=null,this._raycaster=new t,this._raycaster.near=.1,this._raycaster.layers.enable(3)}init(e,t){this._scene=e,this._camera=t,this.checkComponentVisibility=i(this.checkComponentVisibility,100).bind(this),this.checkPreviewVisibility=i(this.checkPreviewVisibility,100).bind(this)}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(s=>{const a=t&&e.id===t.id||i,r=!(s instanceof n);this._changeMaterialsOnSelect(s,t,(!a||!r)&&a)}),t)e instanceof n&&e.material instanceof s&&!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 n&&e.material instanceof s){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 a).setFromObject(e).getCenter(new r),n=(new r).subVectors(i,this._camera.position).normalize();this._raycaster.set(this._camera.position,n),this._raycaster.far=this._camera.position.distanceTo(i);const s=[];return this._raycaster.intersectObjects(this._scene.children,!0).forEach(e=>{e.object.material.visible&&(t.includes(e.object.uuid)||e.object.userData.ignoreComponentRaycast||s.push(e))}),0===s.length}checkComponentAndPreviewVisibility(e,t){e.hasSelection()?this.checkComponentVisibility(e,t):t.hasPreviews()?this.checkPreviewVisibility(t):this.changeMaterialsOnSelect(this._scene,null)}checkComponentVisibility(e,t){if(!e.hasSelection())return;const i=t.getComponentsForIds(e.getSelectedRuntimeComponentIds());if(i.length>1)return;const n=i[0];this.isComponentVisible(n)?this.changeMaterialsOnSelect(this._scene,null):this.changeMaterialsOnSelect(this._scene,n)}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),n=new a;return t.setFromProjectionMatrix(i),e.map(e=>(e=>{const i=n.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._scene,null):this.changeMaterialsOnSelect(this._scene,{id:-1}))}})}}}));
|
|
2
|
+
//# sourceMappingURL=component-raycast-helper-5efa35f5.nomodule.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component-raycast-helper-5efa35f5.nomodule.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
System.register(["./script-loader-
|
|
2
|
-
//# sourceMappingURL=configurator-
|
|
1
|
+
System.register(["./script-loader-7cbd1a19.nomodule.js","./roomle-dependency-injection-fb16ce98.nomodule.js","./scene-manager-4dc0d8f4.nomodule.js","./component-raycast-helper-5efa35f5.nomodule.js","./roomle-configurator-baf0271c.nomodule.js","./query-params-helper-887400ad.nomodule.js","./main-thread-to-worker-285afcc7.nomodule.js","./default-light-setting-587bf98c.nomodule.js"],(function(e){var n,o,t,r,c,a,i,s,l,u,p,d,f,g;return{setters:[function(e){n=e.S,o=e.M},function(e){t=e.D,r=e.L,c=e.R,a=e.a,i=e.C,s=e.b,l=e.A},function(e){u=e.C,p=e.a},function(e){d=e.default},function(e){f=e.C,g=e.R},function(){},function(){},function(){}],execute:function(){const m=[new t("logger",r),new t("rapi-access",c),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",d,0)];e("Configurator",class extends o{setupDependencies(){s.setup(m),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 g(this._context),this._configurator.getMain=()=>this,window.RoomleConfigurator||(window.RoomleConfigurator=this._configurator)}getContextName(){return"configurator"}})}}}));
|
|
2
|
+
//# sourceMappingURL=configurator-9c3c6d78.nomodule.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"configurator-9c3c6d78.nomodule.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{S as ScriptLoader,M as Main}from"./script-loader-
|
|
2
|
-
//# sourceMappingURL=configurator-
|
|
1
|
+
import{S as ScriptLoader,M as Main}from"./script-loader-62b67b63.js";import{D as DependencyInjectionAssignment,L as Logger,R as RapiAccess,a as DataSyncer,C as ConfiguratorViewModel,b as RoomleDependencyInjection,A as AppContext}from"./roomle-dependency-injection-304aa012.js";import{C as CameraControl3D,a as CameraControl}from"./scene-manager-84f489a2.js";import ComponentRaycastHelper from"./component-raycast-helper-5599f4dd.js";import{C as ConfiguratorSceneManager,R as RoomleConfigurator}from"./roomle-configurator-260fb49c.js";import"./query-params-helper-32a044de.js";import"./main-thread-to-worker-052750d8.js";import"./default-light-setting-7a830fa4.js";const INJECTABLES=[new DependencyInjectionAssignment("logger",Logger),new DependencyInjectionAssignment("rapi-access",RapiAccess),new DependencyInjectionAssignment("script-loader",ScriptLoader),new DependencyInjectionAssignment("camera-control-3d",CameraControl3D),new DependencyInjectionAssignment("camera-control",CameraControl),new DependencyInjectionAssignment("data-syncer",DataSyncer),new DependencyInjectionAssignment("configurator-scene-manager",ConfiguratorSceneManager,1),new DependencyInjectionAssignment("configurator-view-model",ConfiguratorViewModel,1),new DependencyInjectionAssignment("component-raycast-helper",ComponentRaycastHelper,0)];class Configurator extends Main{setupDependencies(){RoomleDependencyInjection.setup(INJECTABLES),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||{};AppContext.init({kernelInstance:n,kernelContainer:o,planObjectId:t})}getApi(){return this._configurator}bootFinished(){this._configurator=new RoomleConfigurator(this._context),this._configurator.getMain=()=>this,window.RoomleConfigurator||(window.RoomleConfigurator=this._configurator)}getContextName(){return"configurator"}}export{Configurator};
|
|
2
|
+
//# sourceMappingURL=configurator-b9e7995d.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"configurator-b9e7995d.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{Configurator}from"./configurator-b9e7995d.js";import"./script-loader-62b67b63.js";import"./query-params-helper-32a044de.js";import"./main-thread-to-worker-052750d8.js";import"./roomle-dependency-injection-304aa012.js";import"./scene-manager-84f489a2.js";import"./component-raycast-helper-5599f4dd.js";import"./roomle-configurator-260fb49c.js";import"./default-light-setting-7a830fa4.js";(new Configurator).boot(),window.requestIdleCallback||(window.requestIdleCallback=e=>setTimeout(()=>{let o=Date.now();e({didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-o))})},1)),window.cancelIdleCallback||(window.cancelIdleCallback=window.cancelIdleCallback||function(e){clearTimeout(e)});
|
|
2
|
+
//# sourceMappingURL=configurator-main-3c848f6e.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"configurator-main-3c848f6e.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
System.register(["./configurator-
|
|
1
|
+
System.register(["./configurator-9c3c6d78.nomodule.js","./script-loader-7cbd1a19.nomodule.js","./query-params-helper-887400ad.nomodule.js","./main-thread-to-worker-285afcc7.nomodule.js","./roomle-dependency-injection-fb16ce98.nomodule.js","./scene-manager-4dc0d8f4.nomodule.js","./component-raycast-helper-5efa35f5.nomodule.js","./roomle-configurator-baf0271c.nomodule.js","./default-light-setting-587bf98c.nomodule.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.nomodule.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a6 as convertToTHREE}from"./roomle-dependency-injection-
|
|
2
|
-
//# sourceMappingURL=continuous-drawing-helper-
|
|
1
|
+
import{a6 as convertToTHREE}from"./roomle-dependency-injection-304aa012.js";import{b0 as RingGeometry,h as MeshBasicMaterial,w as DoubleSide,z as Mesh}from"./main-thread-to-worker-052750d8.js";class ContinuousDrawingHelper{constructor(){this._currentInnerRadius=0}init(e,i,r){this._drawingGroup=e,this._continuousDrawingManager=i,this._kernelZoomFactor=r,this.update()}update(){this._initCircle(),this._updateCircle()}_initCircle(){if(this._circleMesh)return;const e=70/this._kernelZoomFactor/1e3,i=new RingGeometry(e,e+e/50,32),r=new MeshBasicMaterial({color:10066329,side:DoubleSide});this._circleMesh=new Mesh(i,r),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 RingGeometry(e,i,32)}const i=convertToTHREE(this._continuousDrawingManager.getStartPoint());i.y=5,this._circleMesh.position.copy(i),this._circleMesh.visible=this._continuousDrawingManager.shouldShowCircle(),this._currentInnerRadius=e}setKernelZoomFactor(e){this._kernelZoomFactor=e}endDrawing(){this._drawingGroup.remove(this._circleMesh),this._circleMesh=null}}export{ContinuousDrawingHelper as default};
|
|
2
|
+
//# sourceMappingURL=continuous-drawing-helper-0886bba5.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"continuous-drawing-helper-0886bba5.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
System.register(["./roomle-dependency-injection-
|
|
2
|
-
//# sourceMappingURL=continuous-drawing-helper-
|
|
1
|
+
System.register(["./roomle-dependency-injection-fb16ce98.nomodule.js","./main-thread-to-worker-285afcc7.nomodule.js"],(function(e){var i,t,r,n,s;return{setters:[function(e){i=e.a6},function(e){t=e.b0,r=e.h,n=e.w,s=e.z}],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:n});this._circleMesh=new s(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-ef3b1d91.nomodule.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"continuous-drawing-helper-ef3b1d91.nomodule.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
System.register(["./scene-manager-
|
|
2
|
-
//# sourceMappingURL=default-light-setting-
|
|
1
|
+
System.register(["./scene-manager-4dc0d8f4.nomodule.js","./roomle-dependency-injection-fb16ce98.nomodule.js","./main-thread-to-worker-285afcc7.nomodule.js"],(function(i){var t,a,e,n,o,s,h;return{setters:[function(i){t=i.L},function(i){a=i.Q},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-587bf98c.nomodule.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"default-light-setting-587bf98c.nomodule.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{L as LightSetting}from"./scene-manager-
|
|
2
|
-
//# sourceMappingURL=default-light-setting-
|
|
1
|
+
import{L as LightSetting}from"./scene-manager-84f489a2.js";import{Q as getGUI}from"./roomle-dependency-injection-304aa012.js";import{D as DirectionalLight,C as Color,V as Vector2,a as Vector3,A as AmbientLight}from"./main-thread-to-worker-052750d8.js";class DefaultLightSetting extends LightSetting{constructor(i,t){super(i,t),this._params={ambientLight:{color:"#ffffff"},mainDirLight:{position:{x:-3,y:4,z:4},color:"#ffffff"},secondDirLight:{position:{x:3,y:4,z:3},color:"#ffffff"}},this._mainDirectionalLight=new DirectionalLight(new Color(this._params.mainDirLight.color),.8),this._mainDirectionalLight.position.set(this._params.mainDirLight.position.x,this._params.mainDirLight.position.y,this._params.mainDirLight.position.z),this._mainDirectionalLight.layers.set(1),this._mainDirectionalLight.castShadow=!0,this._mainDirectionalLight.shadow.camera.near=.1,this._mainDirectionalLight.shadow.camera.far=100,this._mainDirectionalLight.shadow.mapSize=new Vector2(1024,1024),this._mainDirectionalLight.visible=!0,this._mainDirectionalLight.lookAt(new Vector3(0,0,0)),this._secondDirectionalLight=new DirectionalLight(new Color(this._params.secondDirLight.color),.2),this._secondDirectionalLight.position.set(this._params.secondDirLight.position.x,this._params.secondDirLight.position.y,this._params.secondDirLight.position.z),this._secondDirectionalLight.layers.set(1),this._secondDirectionalLight.castShadow=!1,this._secondDirectionalLight.shadow.camera.near=.1,this._secondDirectionalLight.shadow.camera.far=100,this._secondDirectionalLight.shadow.mapSize=new Vector2(1024,1024),this._secondDirectionalLight.visible=!0,this._secondDirectionalLight.lookAt(new Vector3(0,0,0)),this._ambientLight=new AmbientLight(new Color(this._params.ambientLight.color),.5),this._ambientLight.layers.set(1),this.addToScene()}needsBounds(){return!0}updateBounds(i){const t=i.getSize(new Vector3),a=Math.max(Math.max(t.x,t.y),t.z)+1,o=a/2;this._mainDirectionalLight.shadow.camera.top=o,this._mainDirectionalLight.shadow.camera.bottom=-o,this._mainDirectionalLight.shadow.camera.left=-o,this._mainDirectionalLight.shadow.camera.right=o,this._mainDirectionalLight.shadow.camera.near=.01,this._mainDirectionalLight.shadow.camera.far=4*a,this._mainDirectionalLight.shadow.camera.updateProjectionMatrix(),this._secondDirectionalLight.shadow.camera.top=o,this._secondDirectionalLight.shadow.camera.bottom=-o,this._secondDirectionalLight.shadow.camera.left=-o,this._secondDirectionalLight.shadow.camera.right=o,this._secondDirectionalLight.shadow.camera.near=.01,this._secondDirectionalLight.shadow.camera.far=4*a,this._secondDirectionalLight.shadow.camera.updateProjectionMatrix()}addToScene(){this._scene.add(this._mainDirectionalLight),this._scene.add(this._secondDirectionalLight),this._scene.add(this._ambientLight)}removeFromScene(){this._scene.remove(this._mainDirectionalLight),this._scene.remove(this._secondDirectionalLight),this._scene.remove(this._ambientLight)}reload(){this.removeFromScene(),this.addToScene()}showGUI(){let i=getGUI();if(i){if(this._ambientLight){let t=i.addFolder("Ambient Light");t.add(this._ambientLight,"visible"),t.add(this._ambientLight,"intensity").min(0).max(5).step(.1),t.addColor(this._params.ambientLight,"color").onChange(i=>this._ambientLight.color=new Color(i))}if(this._mainDirectionalLight){let t=i.addFolder("Main Directional Light");t.add(this._mainDirectionalLight,"visible"),t.add(this._mainDirectionalLight,"intensity").min(0).max(10).step(.1),t.add(this._mainDirectionalLight,"castShadow"),t.addColor(this._params.mainDirLight,"color").onChange(i=>this._mainDirectionalLight.color=new Color(i)),t.add(this._mainDirectionalLight.position,"x").min(-10).max(10).step(.1).onChange(()=>this._mainDirectionalLight.lookAt(new Vector3(0,0,0))),t.add(this._mainDirectionalLight.position,"y").min(-10).max(50).step(.1).onChange(()=>this._mainDirectionalLight.lookAt(new Vector3(0,0,0))),t.add(this._mainDirectionalLight.position,"z").min(-10).max(10).step(.1).onChange(()=>this._mainDirectionalLight.lookAt(new Vector3(0,0,0)))}if(this._secondDirectionalLight){let t=i.addFolder("Second Directional Light");t.add(this._secondDirectionalLight,"visible"),t.add(this._secondDirectionalLight,"intensity").min(0).max(10).step(.1),t.add(this._secondDirectionalLight,"castShadow"),t.addColor(this._params.mainDirLight,"color").onChange(i=>this._mainDirectionalLight.color=new Color(i)),t.add(this._secondDirectionalLight.position,"x").min(-10).max(10).step(.1).onChange(()=>this._mainDirectionalLight.lookAt(new Vector3(0,0,0))),t.add(this._secondDirectionalLight.position,"y").min(-10).max(50).step(.1).onChange(()=>this._mainDirectionalLight.lookAt(new Vector3(0,0,0))),t.add(this._secondDirectionalLight.position,"z").min(-10).max(10).step(.1).onChange(()=>this._mainDirectionalLight.lookAt(new Vector3(0,0,0)))}}}}export{DefaultLightSetting as D};
|
|
2
|
+
//# sourceMappingURL=default-light-setting-7a830fa4.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"default-light-setting-7a830fa4.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -54,6 +54,10 @@ export interface GlobalInitDataDefinition {
|
|
|
54
54
|
export interface FeatureFlags {
|
|
55
55
|
pulsePreview?: boolean;
|
|
56
56
|
reDock?: boolean;
|
|
57
|
+
/**
|
|
58
|
+
* @description If set to true we will not hide other items while configuring in the planner
|
|
59
|
+
*/
|
|
60
|
+
configureInRoom?: boolean;
|
|
57
61
|
}
|
|
58
62
|
export type ColorsIn3dScene = Record<keyof typeof ROOMLE_COLORS, HexColorString | HexColorNumber>;
|
|
59
63
|
/**
|
|
@@ -91,6 +91,7 @@ export default class ConfiguratorViewModel implements ConfiguratorKernelCallback
|
|
|
91
91
|
sceneCleared(): void;
|
|
92
92
|
setListener(listener: ConfiguratorViewModelCallbackI): void;
|
|
93
93
|
getBoundingBox(): Box3;
|
|
94
|
+
getBoundingBoxOfGeometry(): Box3;
|
|
94
95
|
getBoundingBoxWithPreviews(): Box3;
|
|
95
96
|
hasPreviews(): boolean;
|
|
96
97
|
clearRootComponent(): void;
|
|
@@ -32,6 +32,7 @@ export interface GroundReflectionConstructorParameters {
|
|
|
32
32
|
export declare class GroundReflectionPass extends RenderPass {
|
|
33
33
|
private _width;
|
|
34
34
|
private _height;
|
|
35
|
+
private _samples;
|
|
35
36
|
parameters: GroundReflectionParameters;
|
|
36
37
|
reflectionFadeInScale: number;
|
|
37
38
|
private _reflectionRenderTarget?;
|
|
@@ -43,7 +44,7 @@ export declare class GroundReflectionPass extends RenderPass {
|
|
|
43
44
|
get reflectionRenderTarget(): WebGLRenderTarget;
|
|
44
45
|
get intensityRenderTarget(): WebGLRenderTarget;
|
|
45
46
|
get blurRenderTarget(): WebGLRenderTarget;
|
|
46
|
-
constructor(renderPassManager: RenderPassManager, width: number, height: number, parameters: GroundReflectionConstructorParameters);
|
|
47
|
+
constructor(renderPassManager: RenderPassManager, width: number, height: number, samples: number, parameters: GroundReflectionConstructorParameters);
|
|
47
48
|
private _newRenderTarget;
|
|
48
49
|
dispose(): void;
|
|
49
50
|
setSize(width: number, height: number): void;
|
|
@@ -20,7 +20,6 @@ import type { SceneRenderPass } from './pass/scene-render-pass';
|
|
|
20
20
|
import type { Enumify } from '../../types';
|
|
21
21
|
import type { Box3, Camera, Object3D, PerspectiveCamera, RectAreaLight, Scene, WebGLRenderer } from 'three';
|
|
22
22
|
import { Group } from 'three';
|
|
23
|
-
import { CAMERA_TYPE } from '../../cameracontrol/camera-type';
|
|
24
23
|
export { BakedGroundContactShadowParameters } from './pass/baked-ground-contact-shadow-pass';
|
|
25
24
|
export { OutlineParameters } from './outline-renderer';
|
|
26
25
|
export { ShadowParameters, ShadowAndAoPassParameters, } from './pass/shadow-and-ao-pass';
|
|
@@ -64,7 +63,7 @@ export declare class SceneRenderer {
|
|
|
64
63
|
outputColorSpace: string;
|
|
65
64
|
toneMapping: string;
|
|
66
65
|
environmentLights: boolean;
|
|
67
|
-
|
|
66
|
+
enableObjectSelection: boolean;
|
|
68
67
|
groundLevel: number;
|
|
69
68
|
uiInteractionMode: boolean;
|
|
70
69
|
renderer: WebGLRenderer;
|
|
@@ -82,7 +81,6 @@ export declare class SceneRenderer {
|
|
|
82
81
|
private _shadingType;
|
|
83
82
|
private _qualityLevel;
|
|
84
83
|
private _qualityMap;
|
|
85
|
-
private _cameraType;
|
|
86
84
|
private _customShadingParameters;
|
|
87
85
|
get sceneRenderPass(): SceneRenderPass;
|
|
88
86
|
get bakedGroundContactShadowPass(): BakedGroundContactShadowPass;
|
|
@@ -106,7 +104,6 @@ export declare class SceneRenderer {
|
|
|
106
104
|
forceShadowUpdates(updateBakedGroundShadow: boolean): void;
|
|
107
105
|
updateParameters(parameters: SceneRendererChangeParameters): void;
|
|
108
106
|
addRectAreaLight(rectAreaLight: RectAreaLight, parent: Object3D): void;
|
|
109
|
-
setCameraType(cameraType: Enumify<typeof CAMERA_TYPE>): void;
|
|
110
107
|
updateRectAreaLights(rectAreaLights: RectAreaLight[], parent: Object3D): void;
|
|
111
108
|
createShadowFromLightSources(parent: Object3D, lightSources: LightSource[]): void;
|
|
112
109
|
selectObjects(selectedObjects: Object3D[]): void;
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import type { BakedGroundContactShadowParameters, GroundReflectionParameters, OutlineParameters, QualityMap, ShadowAndAoPassParameters, QualityLevel } from './renderer/scene-renderer';
|
|
2
2
|
import { SceneRenderer } from './renderer/scene-renderer';
|
|
3
|
-
import type {
|
|
3
|
+
import type { Camera, Object3D, Scene, WebGLRenderer } from 'three';
|
|
4
|
+
import { Box3 } from 'three';
|
|
4
5
|
import { type ScreenSpaceShadowMapParameters } from './renderer/pass/screen-space-shadow-map-pass';
|
|
5
6
|
import type { CustomShadingParameters, SceneShadingType } from './renderer/shading-settings';
|
|
7
|
+
import { CAMERA_TYPE } from '../cameracontrol/camera-type';
|
|
8
|
+
import type { Enumify } from '../types';
|
|
6
9
|
export declare enum RenderMode {
|
|
7
10
|
Mode3D = 0,
|
|
8
11
|
Mode2D = 1
|
|
@@ -16,6 +19,13 @@ export declare class RoomleWebGLRenderer {
|
|
|
16
19
|
private SceneRendererGUI;
|
|
17
20
|
private configuratorMode;
|
|
18
21
|
private uiInteractionMode;
|
|
22
|
+
private _movingCamera;
|
|
23
|
+
private _cameraType;
|
|
24
|
+
private _boundingBox;
|
|
25
|
+
private _boundingBoxNeedsUpdate;
|
|
26
|
+
private _cacheNeedsUpdate;
|
|
27
|
+
private _shadowNeedsUpdate;
|
|
28
|
+
private _bakedGroundShadowNeedsUpdate;
|
|
19
29
|
private _fpsCounter;
|
|
20
30
|
get renderer(): WebGLRenderer;
|
|
21
31
|
get sceneRenderer(): SceneRenderer;
|
|
@@ -27,6 +37,7 @@ export declare class RoomleWebGLRenderer {
|
|
|
27
37
|
constructor(renderer: WebGLRenderer, width: number, height: number);
|
|
28
38
|
dispose(): void;
|
|
29
39
|
setSize(width: number, height: number): void;
|
|
40
|
+
setCameraType(cameraType: Enumify<typeof CAMERA_TYPE>): void;
|
|
30
41
|
setShadingType(shadingType: SceneShadingType): void;
|
|
31
42
|
setAutoQuality(autoQuality: boolean): void;
|
|
32
43
|
setQualityLevel(qualityLevel: QualityLevel): void;
|
|
@@ -40,12 +51,12 @@ export declare class RoomleWebGLRenderer {
|
|
|
40
51
|
forceShadowUpdates(updateBakedGroundShadow: boolean): void;
|
|
41
52
|
switchToConfigurator(): void;
|
|
42
53
|
switchToPlanner(renderMode: RenderMode): void;
|
|
43
|
-
updateBounds(
|
|
44
|
-
updateEnvironment(bounds?: Box3, _force?: boolean): void;
|
|
54
|
+
updateBounds(geometryBounds?: Box3): void;
|
|
45
55
|
movingCameraStarts(): void;
|
|
46
56
|
movingCameraStops(): void;
|
|
47
57
|
highlightObjects(selectedMeshes: Object3D[]): void;
|
|
48
58
|
render(scene: Scene, camera: Camera): void;
|
|
59
|
+
private _doUpdatesBeforeRender;
|
|
49
60
|
private createRenderCamera;
|
|
50
61
|
showGUI(updateCallback: () => void): void;
|
|
51
62
|
clear(): void;
|
|
@@ -57,6 +57,7 @@ export default abstract class SceneManager implements Context, LifeCycleCallback
|
|
|
57
57
|
protected abstract _getInputManager(): InputManager;
|
|
58
58
|
abstract sceneChanged(): void;
|
|
59
59
|
abstract getBounds(): Box3;
|
|
60
|
+
abstract getGeometryBounds(): Box3;
|
|
60
61
|
protected onBeforeRender(): void;
|
|
61
62
|
protected _onAfterRender: () => void;
|
|
62
63
|
protected constructor(creator: string, offset: CanvasOffset, canvasID: string, mode: Enumify<typeof CAMERA_TYPE>);
|
|
@@ -113,7 +114,7 @@ export default abstract class SceneManager implements Context, LifeCycleCallback
|
|
|
113
114
|
loadDynamicLightSetting(source: DynamicLightSettingSource): Promise<void>;
|
|
114
115
|
getScene(): Scene;
|
|
115
116
|
updateScene(): void;
|
|
116
|
-
protected _updateBounds(bounds: Box3, geometryChanged?: boolean): void;
|
|
117
|
+
protected _updateBounds(bounds: Box3, geometryBounds?: Box3, geometryChanged?: boolean): void;
|
|
117
118
|
setCameraOffset(offset: CanvasOffset): void;
|
|
118
119
|
getCameraOffset(): CanvasOffset;
|
|
119
120
|
getOrthographicOffsetCamera(): OrthographicOffsetCamera;
|
|
@@ -113,6 +113,18 @@ export declare const USM_PLAN_OBJECT: {
|
|
|
113
113
|
z: number;
|
|
114
114
|
};
|
|
115
115
|
};
|
|
116
|
+
boxOfGeometry: {
|
|
117
|
+
origin: {
|
|
118
|
+
x: number;
|
|
119
|
+
y: number;
|
|
120
|
+
z: number;
|
|
121
|
+
};
|
|
122
|
+
size: {
|
|
123
|
+
x: number;
|
|
124
|
+
y: number;
|
|
125
|
+
z: number;
|
|
126
|
+
};
|
|
127
|
+
};
|
|
116
128
|
rootPlanComponentId: number;
|
|
117
129
|
parameters: ({
|
|
118
130
|
key: string;
|
|
@@ -120,7 +120,7 @@ export default class ConfiguratorSceneManager extends SceneManager implements Co
|
|
|
120
120
|
addPreviewHandlers(previewComponent: PreviewComponent): void;
|
|
121
121
|
addPreviewLineHandlers(previewLineComponent: PreviewLineComponent): void;
|
|
122
122
|
private _updateComponentPosition;
|
|
123
|
-
protected _updateBounds(box: Box3, geometryChanged?: boolean): void;
|
|
123
|
+
protected _updateBounds(box: Box3, geometryBox?: Box3, geometryChanged?: boolean): void;
|
|
124
124
|
moveCamera(cameraParameter: CameraParameter): Promise<void>;
|
|
125
125
|
selectComponent(runtimeId: number): void;
|
|
126
126
|
highlightParts(ids: number[]): void;
|
|
@@ -129,6 +129,7 @@ export default class ConfiguratorSceneManager extends SceneManager implements Co
|
|
|
129
129
|
protected _getInputManager(): InputManager;
|
|
130
130
|
protected createCameraControl(_mode: Enumify<typeof CAMERA_TYPE>, offset: CanvasOffset): void;
|
|
131
131
|
getBounds(): Box3;
|
|
132
|
+
getGeometryBounds(): Box3;
|
|
132
133
|
sceneChanged(): void;
|
|
133
134
|
private _getCameraControl;
|
|
134
135
|
protected _onCameraIdle(): boolean;
|
|
@@ -33,6 +33,7 @@ export default class MaterialViewerSceneManager extends SceneManager {
|
|
|
33
33
|
protected _getInputManager(): InputManager;
|
|
34
34
|
sceneChanged(): void;
|
|
35
35
|
getBounds(): Box3;
|
|
36
|
+
getGeometryBounds(): Box3;
|
|
36
37
|
protected _guiLoaded(): void;
|
|
37
38
|
private _updateGUI;
|
|
38
39
|
private _shadingChanged;
|
package/lib/{dimensioning-helper-65208c29.nomodule.js → dimensioning-helper-31a7887d.nomodule.js}
RENAMED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
System.register(["./roomle-dependency-injection-
|
|
2
|
-
//# sourceMappingURL=dimensioning-helper-
|
|
1
|
+
System.register(["./roomle-dependency-injection-fb16ce98.nomodule.js","./main-thread-to-worker-285afcc7.nomodule.js","./TextGeometry-22809d6e.nomodule.js"],(function(t){var e,i,s,n,h,o,a,_,d,l,r,m,p,u,x,c,g,w,y,b;return{setters:[function(t){e=t.n,i=t._,s=t.i,n=t.af,h=t.aC},function(t){o=t.O,a=t.a,_=t.h,d=t.w,l=t.bo,r=t.B,m=t.z,p=t.Q,u=t.b9,x=t.u,c=t.G,g=t.b,w=t.a_,y=t.ad},function(t){b=t.T}],execute:function(){const B="component_dimensioning_plane_material",T="component_dimensioning_text_material";class z extends o{constructor(t){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=t,this._position=new a,this._initMaterials(),this._init(),this._update()}_initMaterials(){this._cacheHolder.materialCache.has(B)?this._planeMaterial=this._cacheHolder.materialCache.get(B):(this._planeMaterial=new _({color:16777215,side:d,opacity:.8,transparent:!0}),this._cacheHolder.materialCache.set(B,this._planeMaterial)),this._cacheHolder.materialCache.has(T)?this._textMaterial=this._cacheHolder.materialCache.get(T):(this._textMaterial=new l({color:3618615}),this._cacheHolder.materialCache.set(T,this._textMaterial))}_init(){let t=new r;this._text=new m(t,this._textMaterial),this._text.userData.ignoreComponentRaycast=!0,this._text.name="text with background text "+this._label,this._plane=new m(t,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(t,e,i,s){this._position.copy(t),this._dimensioningType=e,this._cameraPosition=s,this._label=i;const n=this._cameraPosition.distanceTo(this._text.position),h=Math.max(.01,n/100),o=Math.max(5e-4,n/5e3);this._parameters.bevelThickness=o,this._parameters.bevelSize=o,this._parameters.size=h,this._textGeometry=new b(this._label,this._parameters),this._textGeometry.computeBoundingBox(),this._text.geometry=this._textGeometry,this._update()}_update(){if(this.topDown){let t=new p;t.setFromAxisAngle(new a(-1,0,0),Math.PI/2),this._updateText(this._textGeometry,t,new a)}else if(this._updateText(this._textGeometry,new p,new a),this._cameraPosition){const t=Math.atan2(this._cameraPosition.x-this._position.x,this._cameraPosition.z-this._position.z);this._text.rotation.y=t,this._plane.rotation.y=t}}_updateText(t,e,i){let s=new a;s.copy(this._position),i.x*=this._getXSign(),s.add(i);let n=t.boundingBox.getSize(new a);t.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)}}i([s],z.prototype,"_cacheHolder",void 0);class L{constructor(t){this._cameraPosition=new a,this._textUpdated=!1,this._topDimensions=!1,this._initialized=new n,this._enabled=!1,this._dimensionsVisible=!1,this._creator_=t,this._lineMaterial=new x({color:3618615,linewidth:2});let e=new r;this._widthLine=new c(e,this._lineMaterial),this._widthLine.userData.ignoreComponentRaycast=!0,this._widthLine.name="dimension width line",this._heightLine=new c(e,this._lineMaterial),this._heightLine.userData.ignoreComponentRaycast=!0,this._heightLine.name="dimension height line",this._depthLine=new c(e,this._lineMaterial),this._depthLine.userData.ignoreComponentRaycast=!0,this._depthLine.name="dimension depth line",this._planeMaterial=new _({color:16777215,side:d,opacity:.8,transparent:!0}),h.loadFont("static/rubik_regular_sub-2dd2d5cca49018c5.json").then(t=>{this._font=t,this._loaded()})}_loaded(){this.update(!1),this.addToScene(this._scene,this._uiScene),this._initialized.resolve()}_performUpdate(t){this._enabled&&(this._lineBounds||t)&&this._font&&(this._updateHeight(),this._updateWidth(),this._updateDepth())}_updateWidth(){let t=new r,e=this._getWidthEdge(),i=[e.start.x,e.start.y,e.start.z,e.end.x,e.end.y,e.end.z];t.setAttribute("position",new g(new Float32Array(i),3)),this._widthLine.geometry.dispose(),this._widthLine.geometry=t;let s=e.getCenter(new a);this._widthText||(this._widthText=new z(this._font)),this._widthText.topDown=this._topDimensions;const n=this._unitFormatter.formatMMValueToUnitString(1e3*this._dimensions.x);this._widthText.update(s,0,n,this._cameraPosition)}_updateHeight(){let t=new r,e=this._getHeightEdge(),i=[e.start.x,e.start.y,e.start.z,e.end.x,e.end.y,e.end.z];t.setAttribute("position",new g(new Float32Array(i),3)),this._heightLine.geometry.dispose(),this._heightLine.geometry=t;let s=e.getCenter(new a);this._heightText||(this._heightText=new z(this._font)),this._heightText.topDown=this._topDimensions;const n=this._unitFormatter.formatMMValueToUnitString(1e3*this._dimensions.y);this._heightText.update(s,1,n,this._cameraPosition)}_updateDepth(){let t=new r,e=this._getDepthEdge(),i=[e.start.x,e.start.y,e.start.z,e.end.x,e.end.y,e.end.z];t.setAttribute("position",new g(new Float32Array(i),3)),this._depthLine.geometry.dispose(),this._depthLine.geometry=t;let s=e.getCenter(new a);this._depthText||(this._depthText=new z(this._font)),this._depthText.topDown=this._topDimensions;const n=this._unitFormatter.formatMMValueToUnitString(1e3*this._dimensions.z);this._depthText.update(s,2,n,this._cameraPosition)}updateBounds(t){if(!t)return;this._dimensions=t.getSize(new a),this._lineBounds=t.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(t=!1){this._enabled&&!this._dimensionsVisible&&(this._dimensionsVisible=!0,this._visibilityChangedCallback()),this._performUpdate(t)}addToScene(t,e){this._widthText&&this._widthLine&&this._heightText&&this._heightLine&&this._heightText&&this._heightLine&&(t.add(this._widthLine),e.add(this._widthText),t.add(this._heightLine),e.add(this._heightText),t.add(this._depthLine),e.add(this._depthText))}removeFromScene(t,e){t.remove(this._widthLine),e.remove(this._widthText),t.remove(this._heightLine),e.remove(this._heightText),t.remove(this._depthLine),e.remove(this._depthText)}_getWidthEdge(){return this._cameraPosition.z>=0?new w(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 w(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 w(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 w(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 w(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 w(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 w(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 w(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(t){this._onChange=t}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 t=new y;return t.expandByObject(this._widthLine),t.expandByObject(this._widthText),t.expandByObject(this._heightLine),t.expandByObject(this._heightText),t.expandByObject(this._depthLine),t.expandByObject(this._depthText),t}setVisibility(t){this._heightLine&&this._widthLine&&this._depthLine&&this._heightText&&this._widthText&&this._depthText&&(this._heightLine.visible=t,this._heightText.visible=t,this._widthLine.visible=t,this._widthText.visible=t,this._depthLine.visible=t,this._depthText.visible=t)}moveCameraStart(t){this.setVisibility(!1),this._cameraPosition=t,this.update()}moveCameraEnd(t){this.setVisibility(!0),this._cameraPosition=t,this.update()}clearScene(t){this._clear()}setScene(t){this._scene=t}setUiScene(t){this._uiScene=t}needsUiScene(){return!0}isInitialized(){return this._initialized.wait()}areDimensionsEnabled(){return this._enabled}}t("default",L),i([s],L.prototype,"_unitFormatter",void 0)}}}));
|
|
2
|
+
//# sourceMappingURL=dimensioning-helper-31a7887d.nomodule.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dimensioning-helper-
|
|
1
|
+
{"version":3,"file":"dimensioning-helper-31a7887d.nomodule.js","sources":["../../packages/configurator-core/public/fonts/rubik_regular_sub.json"],"sourcesContent":["export default \"static/rubik_regular_sub-2dd2d5cca49018c5.json\""],"names":[],"mappings":"6oHAAe"}
|