@roomle/web-sdk 2.50.0 → 2.51.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/{banana-for-scale-8762abff.nomodule.js → banana-for-scale-8d1c84ee.nomodule.js} +2 -2
- package/lib/{banana-for-scale-8762abff.nomodule.js.map → banana-for-scale-8d1c84ee.nomodule.js.map} +1 -1
- package/lib/{banana-for-scale-906183a7.js → banana-for-scale-c04acef4.js} +2 -2
- package/lib/{banana-for-scale-906183a7.js.map → banana-for-scale-c04acef4.js.map} +1 -1
- package/lib/{component-dimensioning-0340f231.js → component-dimensioning-65ede825.js} +2 -2
- package/lib/component-dimensioning-65ede825.js.map +1 -0
- package/lib/{component-dimensioning-1946b51e.nomodule.js → component-dimensioning-dd20ed84.nomodule.js} +2 -2
- package/lib/component-dimensioning-dd20ed84.nomodule.js.map +1 -0
- package/lib/{component-raycast-helper-251fe2d9.nomodule.js → component-raycast-helper-c9b31ec6.nomodule.js} +2 -2
- package/lib/component-raycast-helper-c9b31ec6.nomodule.js.map +1 -0
- package/lib/{component-raycast-helper-5f0fbbb0.js → component-raycast-helper-d27cb1ed.js} +2 -2
- package/lib/component-raycast-helper-d27cb1ed.js.map +1 -0
- package/lib/{configurator-4ed5288c.js → configurator-ebca27fa.js} +2 -2
- package/lib/configurator-ebca27fa.js.map +1 -0
- package/lib/{configurator-0140a863.nomodule.js → configurator-fa90fb7e.nomodule.js} +2 -2
- package/lib/configurator-fa90fb7e.nomodule.js.map +1 -0
- package/lib/configurator-main-65d4a776.js +2 -0
- package/lib/configurator-main-65d4a776.js.map +1 -0
- package/lib/configurator-main.nomodule.js +1 -1
- package/lib/{continuous-drawing-helper-0b9b0095.js → continuous-drawing-helper-0d90420a.js} +2 -2
- package/lib/continuous-drawing-helper-0d90420a.js.map +1 -0
- package/lib/{continuous-drawing-helper-35c264e8.nomodule.js → continuous-drawing-helper-b1151402.nomodule.js} +2 -2
- package/lib/continuous-drawing-helper-b1151402.nomodule.js.map +1 -0
- package/lib/{default-light-setting-12114274.js → default-light-setting-e906c1c4.js} +2 -2
- package/lib/default-light-setting-e906c1c4.js.map +1 -0
- package/lib/{default-light-setting-29e7089c.nomodule.js → default-light-setting-fc68e1b3.nomodule.js} +2 -2
- package/lib/default-light-setting-fc68e1b3.nomodule.js.map +1 -0
- package/lib/definitions/common-core/mock/kernel-instances.d.ts +1 -0
- package/lib/definitions/planner-core/mock/planner-kernel-access-mock.d.ts +2 -0
- package/lib/definitions/planner-core/src/roomle-planner-ui-callback.d.ts +4 -4
- package/lib/definitions/planner-core/src/roomle-planner.d.ts +1 -1
- package/lib/definitions/planner-core/src/utils/map-to-ui-plan-objects.d.ts +5 -0
- package/lib/definitions/planner-core/src/utils/planner-scene-manager.d.ts +3 -0
- package/lib/definitions/planner-core/src/view-model/wall-plan-element-view-model.d.ts +1 -0
- package/lib/definitions/planner-core/src/webgl/planner-scene-manager.d.ts +3 -3
- package/lib/definitions/typings/planner.d.ts +11 -0
- package/lib/{dimensioning-helper-f7d63867.js → dimensioning-helper-f3321c6e.js} +2 -2
- package/lib/{dimensioning-helper-f7d63867.js.map → dimensioning-helper-f3321c6e.js.map} +1 -1
- package/lib/{dimensioning-helper-af3b012c.nomodule.js → dimensioning-helper-ff26c9f8.nomodule.js} +2 -2
- package/lib/{dimensioning-helper-af3b012c.nomodule.js.map → dimensioning-helper-ff26c9f8.nomodule.js.map} +1 -1
- package/lib/{glb-viewer-678ecb12.nomodule.js → glb-viewer-8f06f75f.nomodule.js} +2 -2
- package/lib/{glb-viewer-678ecb12.nomodule.js.map → glb-viewer-8f06f75f.nomodule.js.map} +1 -1
- package/lib/{glb-viewer-2f644349.js → glb-viewer-a4e191ae.js} +2 -2
- package/lib/{glb-viewer-2f644349.js.map → glb-viewer-a4e191ae.js.map} +1 -1
- package/lib/glb-viewer-main-d483801c.js +2 -0
- package/lib/glb-viewer-main-d483801c.js.map +1 -0
- package/lib/glb-viewer-main.nomodule.js +1 -1
- package/lib/legacy/{banana-for-scale-2067ec09.legacy.js → banana-for-scale-fe600ab5.legacy.js} +2 -2
- package/lib/legacy/{banana-for-scale-2067ec09.legacy.js.map → banana-for-scale-fe600ab5.legacy.js.map} +1 -1
- package/lib/legacy/{component-dimensioning-9903fd39.legacy.js → component-dimensioning-69d212de.legacy.js} +2 -2
- package/lib/legacy/component-dimensioning-69d212de.legacy.js.map +1 -0
- package/lib/legacy/{component-raycast-helper-9ed4057c.legacy.js → component-raycast-helper-91507e93.legacy.js} +2 -2
- package/lib/legacy/component-raycast-helper-91507e93.legacy.js.map +1 -0
- package/lib/legacy/{configurator-da8021ee.legacy.js → configurator-bba597c5.legacy.js} +2 -2
- package/lib/legacy/configurator-bba597c5.legacy.js.map +1 -0
- package/lib/legacy/configurator-main.legacy.js +1 -1
- package/lib/legacy/{continuous-drawing-helper-56183a0e.legacy.js → continuous-drawing-helper-ed601dfb.legacy.js} +2 -2
- package/lib/legacy/continuous-drawing-helper-ed601dfb.legacy.js.map +1 -0
- package/lib/legacy/{default-light-setting-7ea9faff.legacy.js → default-light-setting-7e9e39e7.legacy.js} +2 -2
- package/lib/legacy/default-light-setting-7e9e39e7.legacy.js.map +1 -0
- package/lib/legacy/{dimensioning-helper-84c073f6.legacy.js → dimensioning-helper-2924ca39.legacy.js} +2 -2
- package/lib/legacy/{dimensioning-helper-84c073f6.legacy.js.map → dimensioning-helper-2924ca39.legacy.js.map} +1 -1
- package/lib/legacy/{glb-viewer-82056abc.legacy.js → glb-viewer-18edb3b0.legacy.js} +2 -2
- package/lib/legacy/{glb-viewer-82056abc.legacy.js.map → glb-viewer-18edb3b0.legacy.js.map} +1 -1
- package/lib/legacy/glb-viewer-main.legacy.js +1 -1
- package/lib/legacy/{material-viewer-c6a0d203.legacy.js → material-viewer-cf72ecd5.legacy.js} +2 -2
- package/lib/legacy/material-viewer-cf72ecd5.legacy.js.map +1 -0
- package/lib/legacy/material-viewer-main.legacy.js +1 -1
- package/lib/legacy/pixotron-f667df86.legacy.js +2 -0
- package/lib/legacy/{pixotron-abdc3f22.legacy.js.map → pixotron-f667df86.legacy.js.map} +1 -1
- package/lib/legacy/planner-000818d6.legacy.js +2 -0
- package/lib/legacy/{planner-bb5e14de.legacy.js.map → planner-000818d6.legacy.js.map} +1 -1
- package/lib/legacy/planner-main.legacy.js +1 -1
- package/lib/legacy/roomle-configurator-c8fa9467.legacy.js +2 -0
- package/lib/legacy/{roomle-configurator-18c0201d.legacy.js.map → roomle-configurator-c8fa9467.legacy.js.map} +1 -1
- package/lib/legacy/roomle-dependency-injection-8ac88696.legacy.js +16 -0
- package/lib/legacy/{roomle-dependency-injection-56f08b8a.legacy.js.map → roomle-dependency-injection-8ac88696.legacy.js.map} +1 -1
- package/lib/legacy/roomle-sdk.legacy.js +1 -1
- package/lib/legacy/{script-loader-95c78b02.legacy.js → script-loader-5fb47920.legacy.js} +2 -2
- package/lib/legacy/script-loader-5fb47920.legacy.js.map +1 -0
- package/lib/legacy/static/RoomleCore-3bb57c0c96569641.wasm +0 -0
- package/lib/legacy/static/{RoomleCore-64ac70a073518855.js → RoomleCore-60bcca72b24b08ef.js} +82 -82
- package/lib/legacy/static/RoomleCoreJs-10bd1e52c561fdd5.js +155 -0
- package/lib/legacy/static/RoomleCoreJs-b0a42d9ab8a5b41c.mem +0 -0
- package/lib/legacy/static/shaders-32c877bd71067eb5.json +1 -0
- package/lib/legacy/{stats-helper-c0e3e5ee.legacy.js → stats-helper-7151e52f.legacy.js} +2 -2
- package/lib/legacy/{stats-helper-c0e3e5ee.legacy.js.map → stats-helper-7151e52f.legacy.js.map} +1 -1
- package/lib/legacy/{tools-core-725f7974.legacy.js → tools-core-8b14d3ae.legacy.js} +2 -2
- package/lib/legacy/tools-core-8b14d3ae.legacy.js.map +1 -0
- package/lib/{material-viewer-a8ee097b.js → material-viewer-4d7e64b7.js} +2 -2
- package/lib/material-viewer-4d7e64b7.js.map +1 -0
- package/lib/{material-viewer-9587ac76.nomodule.js → material-viewer-699a4b70.nomodule.js} +2 -2
- package/lib/material-viewer-699a4b70.nomodule.js.map +1 -0
- package/lib/material-viewer-main-34272f0b.js +2 -0
- package/lib/material-viewer-main-34272f0b.js.map +1 -0
- package/lib/material-viewer-main.nomodule.js +1 -1
- package/lib/pixotron-1b69eb16.nomodule.js +2 -0
- package/lib/{pixotron-8ec21d8b.nomodule.js.map → pixotron-1b69eb16.nomodule.js.map} +1 -1
- package/lib/pixotron-1fafe31d.js +2 -0
- package/lib/{pixotron-6ada0f69.js.map → pixotron-1fafe31d.js.map} +1 -1
- package/lib/planner-f29f54e5.nomodule.js +2 -0
- package/lib/{planner-fc487865.nomodule.js.map → planner-f29f54e5.nomodule.js.map} +1 -1
- package/lib/planner-fbde2915.js +2 -0
- package/lib/{planner-752be23b.js.map → planner-fbde2915.js.map} +1 -1
- package/lib/planner-main-b734f584.js +2 -0
- package/lib/planner-main-b734f584.js.map +1 -0
- package/lib/planner-main.nomodule.js +1 -1
- package/lib/roomle-configurator-1229fbb1.js +2 -0
- package/lib/{roomle-configurator-6d971358.js.map → roomle-configurator-1229fbb1.js.map} +1 -1
- package/lib/roomle-configurator-a0e9aaa9.nomodule.js +2 -0
- package/lib/{roomle-configurator-73e4a023.nomodule.js.map → roomle-configurator-a0e9aaa9.nomodule.js.map} +1 -1
- package/lib/roomle-dependency-injection-6132b958.js +16 -0
- package/lib/{roomle-dependency-injection-916bf1bf.js.map → roomle-dependency-injection-6132b958.js.map} +1 -1
- package/lib/roomle-dependency-injection-9320bcec.nomodule.js +16 -0
- package/lib/{roomle-dependency-injection-9ca3cfcb.nomodule.js.map → roomle-dependency-injection-9320bcec.nomodule.js.map} +1 -1
- package/lib/{roomle-sdk-0c6890d6.js → roomle-sdk-c1d470c2.js} +2 -2
- package/lib/roomle-sdk-c1d470c2.js.map +1 -0
- package/lib/roomle-sdk.nomodule.js +1 -1
- package/lib/{script-loader-5339fd26.js → script-loader-4580ba4a.js} +2 -2
- package/lib/script-loader-4580ba4a.js.map +1 -0
- package/lib/{script-loader-0acc19c3.nomodule.js → script-loader-9eb1645a.nomodule.js} +2 -2
- package/lib/script-loader-9eb1645a.nomodule.js.map +1 -0
- package/lib/static/RoomleCore-3bb57c0c96569641.wasm +0 -0
- package/lib/static/RoomleCore-60bcca72b24b08ef.js +1 -0
- package/lib/static/RoomleCore-60bcca72b24b08ef.js.map +1 -0
- package/lib/static/RoomleCoreJs-10bd1e52c561fdd5.js +155 -0
- package/lib/static/RoomleCoreJs-b0a42d9ab8a5b41c.mem +0 -0
- package/lib/static/shaders-32c877bd71067eb5.json +1 -0
- package/lib/static/worker-to-main-thread-73234f7a.js +1 -0
- package/lib/static/worker-to-main-thread-73234f7a.js.map +1 -0
- package/lib/{stats-helper-e3582828.nomodule.js → stats-helper-11dc4a7c.nomodule.js} +2 -2
- package/lib/{stats-helper-e3582828.nomodule.js.map → stats-helper-11dc4a7c.nomodule.js.map} +1 -1
- package/lib/{stats-helper-8f677c0e.js → stats-helper-c25a4315.js} +2 -2
- package/lib/{stats-helper-8f677c0e.js.map → stats-helper-c25a4315.js.map} +1 -1
- package/lib/{tools-core-77ed272d.nomodule.js → tools-core-843453cd.nomodule.js} +2 -2
- package/lib/tools-core-843453cd.nomodule.js.map +1 -0
- package/lib/{tools-core-3a4454b0.js → tools-core-c0685dad.js} +2 -2
- package/lib/tools-core-c0685dad.js.map +1 -0
- package/package.json +2 -2
- package/lib/component-dimensioning-0340f231.js.map +0 -1
- package/lib/component-dimensioning-1946b51e.nomodule.js.map +0 -1
- package/lib/component-raycast-helper-251fe2d9.nomodule.js.map +0 -1
- package/lib/component-raycast-helper-5f0fbbb0.js.map +0 -1
- package/lib/configurator-0140a863.nomodule.js.map +0 -1
- package/lib/configurator-4ed5288c.js.map +0 -1
- package/lib/configurator-main-2a58c23b.js +0 -2
- package/lib/configurator-main-2a58c23b.js.map +0 -1
- package/lib/continuous-drawing-helper-0b9b0095.js.map +0 -1
- package/lib/continuous-drawing-helper-35c264e8.nomodule.js.map +0 -1
- package/lib/default-light-setting-12114274.js.map +0 -1
- package/lib/default-light-setting-29e7089c.nomodule.js.map +0 -1
- package/lib/glb-viewer-main-4725f58a.js +0 -2
- package/lib/glb-viewer-main-4725f58a.js.map +0 -1
- package/lib/legacy/component-dimensioning-9903fd39.legacy.js.map +0 -1
- package/lib/legacy/component-raycast-helper-9ed4057c.legacy.js.map +0 -1
- package/lib/legacy/configurator-da8021ee.legacy.js.map +0 -1
- package/lib/legacy/continuous-drawing-helper-56183a0e.legacy.js.map +0 -1
- package/lib/legacy/default-light-setting-7ea9faff.legacy.js.map +0 -1
- package/lib/legacy/material-viewer-c6a0d203.legacy.js.map +0 -1
- package/lib/legacy/pixotron-abdc3f22.legacy.js +0 -2
- package/lib/legacy/planner-bb5e14de.legacy.js +0 -2
- package/lib/legacy/roomle-configurator-18c0201d.legacy.js +0 -2
- package/lib/legacy/roomle-dependency-injection-56f08b8a.legacy.js +0 -16
- package/lib/legacy/script-loader-95c78b02.legacy.js.map +0 -1
- package/lib/legacy/static/RoomleCore-2400eecb3e782d94.wasm +0 -0
- package/lib/legacy/static/RoomleCoreJs-39fcd9a6810c64f8.js +0 -155
- package/lib/legacy/static/RoomleCoreJs-e0b936a4b9510d41.mem +0 -0
- package/lib/legacy/static/shaders-6105900ad52bf3a5.json +0 -1
- package/lib/legacy/tools-core-725f7974.legacy.js.map +0 -1
- package/lib/material-viewer-9587ac76.nomodule.js.map +0 -1
- package/lib/material-viewer-a8ee097b.js.map +0 -1
- package/lib/material-viewer-main-91ac5352.js +0 -2
- package/lib/material-viewer-main-91ac5352.js.map +0 -1
- package/lib/pixotron-6ada0f69.js +0 -2
- package/lib/pixotron-8ec21d8b.nomodule.js +0 -2
- package/lib/planner-752be23b.js +0 -2
- package/lib/planner-fc487865.nomodule.js +0 -2
- package/lib/planner-main-c548400a.js +0 -2
- package/lib/planner-main-c548400a.js.map +0 -1
- package/lib/roomle-configurator-6d971358.js +0 -2
- package/lib/roomle-configurator-73e4a023.nomodule.js +0 -2
- package/lib/roomle-dependency-injection-916bf1bf.js +0 -16
- package/lib/roomle-dependency-injection-9ca3cfcb.nomodule.js +0 -16
- package/lib/roomle-sdk-0c6890d6.js.map +0 -1
- package/lib/script-loader-0acc19c3.nomodule.js.map +0 -1
- package/lib/script-loader-5339fd26.js.map +0 -1
- package/lib/static/RoomleCore-2400eecb3e782d94.wasm +0 -0
- package/lib/static/RoomleCore-64ac70a073518855.js +0 -1
- package/lib/static/RoomleCore-64ac70a073518855.js.map +0 -1
- package/lib/static/RoomleCoreJs-39fcd9a6810c64f8.js +0 -155
- package/lib/static/RoomleCoreJs-e0b936a4b9510d41.mem +0 -0
- package/lib/static/shaders-6105900ad52bf3a5.json +0 -1
- package/lib/tools-core-3a4454b0.js.map +0 -1
- package/lib/tools-core-77ed272d.nomodule.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-9320bcec.nomodule.js","./main-thread-to-worker-1c4e6a69.nomodule.js"],(function(e){var n,t,a,s;return{setters:[function(e){n=e.ar,t=e._,a=e.i},function(e){s=e.g}],execute:function(){class i extends n{setScene(e){this._scene=e,this._staticItemLoader.loadGLB(s()+"static/banana_div2-1351c98ec2986be1.glb").then(e=>{this._banana=e,this.updateBounds(null)})}updateBounds(e){if(e&&(this._bounds=e),this._bounds){if(this._banana){const e=this._bounds.getSize(new THREE.Vector3),n=this._bounds.getCenter(new THREE.Vector3).clone();n.x-=e.x/2+.18,n.z+=e.z/2+.05,n.y=0;let t=.03;this._banana.scale.copy(new THREE.Vector3(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",i),t([a],i.prototype,"_staticItemLoader",void 0)}}}));
|
|
2
|
+
//# sourceMappingURL=banana-for-scale-8d1c84ee.nomodule.js.map
|
package/lib/{banana-for-scale-8762abff.nomodule.js.map → banana-for-scale-8d1c84ee.nomodule.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"banana-for-scale-
|
|
1
|
+
{"version":3,"file":"banana-for-scale-8d1c84ee.nomodule.js","sources":["../../packages/configurator-core/public/geometry/banana_div2.glb"],"sourcesContent":["export default \"static/banana_div2-1351c98ec2986be1.glb\""],"names":[],"mappings":"qTAAe"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{ar as ScenePluginDefaultImplementation,_ as __decorate,i as inject}from"./roomle-dependency-injection-
|
|
2
|
-
//# sourceMappingURL=banana-for-scale-
|
|
1
|
+
import{ar as ScenePluginDefaultImplementation,_ as __decorate,i as inject}from"./roomle-dependency-injection-6132b958.js";import{g as getAssetPath}from"./main-thread-to-worker-811523e8.js";class BananaForScale extends ScenePluginDefaultImplementation{setScene(e){this._scene=e,this._staticItemLoader.loadGLB(getAssetPath()+"static/banana_div2-1351c98ec2986be1.glb").then(e=>{this._banana=e,this.updateBounds(null)})}updateBounds(e){if(e&&(this._bounds=e),this._bounds){if(this._banana){const e=this._bounds.getSize(new THREE.Vector3),a=this._bounds.getCenter(new THREE.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 THREE.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 default BananaForScale;
|
|
2
|
+
//# sourceMappingURL=banana-for-scale-c04acef4.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"banana-for-scale-
|
|
1
|
+
{"version":3,"file":"banana-for-scale-c04acef4.js","sources":["../../packages/configurator-core/public/geometry/banana_div2.glb"],"sourcesContent":["export default \"static/banana_div2-1351c98ec2986be1.glb\""],"names":[],"mappings":"mUAAe"}
|
|
@@ -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-6132b958.js";import"./main-thread-to-worker-811523e8.js";const LINE_MATERIAL="component_dimensioning_line_material",PLANE_MATERIAL="component_dimensioning_plane_material",TEXT_MATERIAL="component_dimensioning_text_material";class ComponentDimensioning extends THREE.Object3D{constructor(e,i,t,n){super(),this._center=i.getCenter(new THREE.Vector3),this._size=i.getSize(new THREE.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 THREE.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 THREE.MeshBasicMaterial({color:16777215,side:THREE.DoubleSide,opacity:.8,transparent:!0}),this._cacheHolder.materialCache.set(PLANE_MATERIAL,this._planeMaterial)),this._cacheHolder.materialCache.has(TEXT_MATERIAL)?this._textMaterial=this._cacheHolder.materialCache.get(TEXT_MATERIAL):(this._textMaterial=new THREE.MeshPhongMaterial({color:3618615}),this._cacheHolder.materialCache.set(TEXT_MATERIAL,this._textMaterial))}_init(){this._initMaterials();let e=new THREE.Geometry;this._line=new THREE.Line(e,this._lineMaterial),this._line.name="component dimension line "+this._dimensioning.type.value,this._text=new THREE.Mesh(e,this._textMaterial),this._text.name="component dimension text "+this._dimensioning.type.value,this._plane=new THREE.Mesh(e,this._planeMaterial),this._plane.name="component dimension plane "+this._dimensioning.type.value;let i,t=new THREE.Geometry,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),_=new THREE.TextGeometry(h,a);_.computeBoundingBox();let d=_.boundingBox.getSize(new THREE.Vector3).y;if(0===this._dimensioning.type.value&&(i=this._getXEdge(d),this._addXEdgeSideLines(d)),1===this._dimensioning.type.value&&(i=this._getYEdge(d),this._addYEdgeSideLines(d)),2===this._dimensioning.type.value&&(i=this._getZEdge(d),this._addZEdgeSideLines(d)),t.vertices.push(i.start,i.end),this._line.geometry.dispose(),this._line.geometry=t,this.add(this._line),this._text.geometry=_,0===this._dimensioning.type.value&&this._addText(i,_,new THREE.Quaternion,new THREE.Vector3(0,.04,0)),1===this._dimensioning.type.value){let e=new THREE.Quaternion,t=this._getXSign()>0?Math.PI/2:Math.PI/2*3;e.setFromAxisAngle(new THREE.Vector3(0,0,1),t),this._addText(i,_,e,new THREE.Vector3(.04,0,0))}if(2===this._dimensioning.type.value){let e=this._getXSign()>0?Math.PI/2:Math.PI/2*3,t=(new THREE.Quaternion).setFromAxisAngle(new THREE.Vector3(-1,0,0),Math.PI/2),n=(new THREE.Quaternion).setFromAxisAngle(new THREE.Vector3(0,0,1),e);this._addText(i,_,t.multiply(n),new THREE.Vector3(.04,0,0))}}_getXEdge(e){let i=this._size.y+.05+(.06+e)*this._level;const t=new THREE.Vector3(0,this._origin.y,this._origin.z);let n=t.clone().add(new THREE.Vector3(this._dimensioning.from,i,0)),s=t.clone().add(new THREE.Vector3(this._dimensioning.to,i,0));return new THREE.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 THREE.Vector3(0,this._origin.y,this._origin.z);let s=n.clone().add(new THREE.Vector3(this._dimensioning.from,i,0)),o=n.clone().add(new THREE.Vector3(this._dimensioning.from,t,0)),a=n.clone().add(new THREE.Vector3(this._dimensioning.to,i,0)),h=n.clone().add(new THREE.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 THREE.Vector3(this._origin.x,this._origin.y,0);let n=t.clone().add(new THREE.Vector3(i,0,this._dimensioning.from)),s=t.clone().add(new THREE.Vector3(i,0,this._dimensioning.to));return new THREE.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 THREE.Vector3(this._origin.x,this._origin.y,0);let o=s.clone().add(new THREE.Vector3(t,0,this._dimensioning.from)),a=s.clone().add(new THREE.Vector3(n,0,this._dimensioning.from)),h=s.clone().add(new THREE.Vector3(t,0,this._dimensioning.to)),_=s.clone().add(new THREE.Vector3(n,0,this._dimensioning.to));this._addLine(o,a),this._addLine(h,_)}_getYEdge(e){let i=(this._getXSign()>0?this._size.x:0)+.05+(.06+e)*this._level;i*=this._getXSign();const t=new THREE.Vector3(this._origin.x,0,this._origin.z);let n=t.clone().add(new THREE.Vector3(i,this._dimensioning.from,0)),s=t.clone().add(new THREE.Vector3(i,this._dimensioning.to,0));return new THREE.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 THREE.Vector3(this._origin.x,0,this._origin.z);let o=s.clone().add(new THREE.Vector3(t,this._dimensioning.from,0)),a=s.clone().add(new THREE.Vector3(n,this._dimensioning.from,0)),h=s.clone().add(new THREE.Vector3(t,this._dimensioning.to,0)),_=s.clone().add(new THREE.Vector3(n,this._dimensioning.to,0));this._addLine(o,a),this._addLine(h,_)}_addLine(e,i){let t=new THREE.Geometry;t.vertices.push(e,i),this.add(new THREE.Line(t,this._lineMaterial))}_addText(e,i,t,n){let s=e.getCenter(new THREE.Vector3);n.x*=this._getXSign(),s.add(n);let o=i.boundingBox.getSize(new THREE.Vector3);i.center(),this._text.position.copy(s),this._text.quaternion.copy(t),this.add(this._text);let a=new THREE.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 default ComponentDimensioning;
|
|
2
|
+
//# sourceMappingURL=component-dimensioning-65ede825.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component-dimensioning-65ede825.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
System.register(["./roomle-dependency-injection-
|
|
2
|
-
//# sourceMappingURL=component-dimensioning-
|
|
1
|
+
System.register(["./roomle-dependency-injection-9320bcec.nomodule.js","./main-thread-to-worker-1c4e6a69.nomodule.js"],(function(e){var i,t;return{setters:[function(e){i=e._,t=e.i},function(){}],execute:function(){const n="component_dimensioning_line_material",s="component_dimensioning_plane_material",o="component_dimensioning_text_material";class h extends THREE.Object3D{constructor(e,i,t,n){super(),this._center=i.getCenter(new THREE.Vector3),this._size=i.getSize(new THREE.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(n)?this._lineMaterial=this._cacheHolder.materialCache.get(n):(this._lineMaterial=new THREE.LineBasicMaterial({color:3618615}),this._cacheHolder.materialCache.set(n,this._lineMaterial)),this._cacheHolder.materialCache.has(s)?this._planeMaterial=this._cacheHolder.materialCache.get(s):(this._planeMaterial=new THREE.MeshBasicMaterial({color:16777215,side:THREE.DoubleSide,opacity:.8,transparent:!0}),this._cacheHolder.materialCache.set(s,this._planeMaterial)),this._cacheHolder.materialCache.has(o)?this._textMaterial=this._cacheHolder.materialCache.get(o):(this._textMaterial=new THREE.MeshPhongMaterial({color:3618615}),this._cacheHolder.materialCache.set(o,this._textMaterial))}_init(){this._initMaterials();let e=new THREE.Geometry;this._line=new THREE.Line(e,this._lineMaterial),this._line.name="component dimension line "+this._dimensioning.type.value,this._text=new THREE.Mesh(e,this._textMaterial),this._text.name="component dimension text "+this._dimensioning.type.value,this._plane=new THREE.Mesh(e,this._planeMaterial),this._plane.name="component dimension plane "+this._dimensioning.type.value;let i,t=new THREE.Geometry,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 h={font:this._font,size:o,height:.001,curveSegments:2,bevelEnabled:!0,bevelThickness:.001,bevelSize:.001},a=this._dimensioning.label?this._dimensioning.label:this._unitFormatter.formatMMValueToUnitString(1e3*s),_=new THREE.TextGeometry(a,h);_.computeBoundingBox();let d=_.boundingBox.getSize(new THREE.Vector3).y;if(0===this._dimensioning.type.value&&(i=this._getXEdge(d),this._addXEdgeSideLines(d)),1===this._dimensioning.type.value&&(i=this._getYEdge(d),this._addYEdgeSideLines(d)),2===this._dimensioning.type.value&&(i=this._getZEdge(d),this._addZEdgeSideLines(d)),t.vertices.push(i.start,i.end),this._line.geometry.dispose(),this._line.geometry=t,this.add(this._line),this._text.geometry=_,0===this._dimensioning.type.value&&this._addText(i,_,new THREE.Quaternion,new THREE.Vector3(0,.04,0)),1===this._dimensioning.type.value){let e=new THREE.Quaternion,t=this._getXSign()>0?Math.PI/2:Math.PI/2*3;e.setFromAxisAngle(new THREE.Vector3(0,0,1),t),this._addText(i,_,e,new THREE.Vector3(.04,0,0))}if(2===this._dimensioning.type.value){let e=this._getXSign()>0?Math.PI/2:Math.PI/2*3,t=(new THREE.Quaternion).setFromAxisAngle(new THREE.Vector3(-1,0,0),Math.PI/2),n=(new THREE.Quaternion).setFromAxisAngle(new THREE.Vector3(0,0,1),e);this._addText(i,_,t.multiply(n),new THREE.Vector3(.04,0,0))}}_getXEdge(e){let i=this._size.y+.05+(.06+e)*this._level;const t=new THREE.Vector3(0,this._origin.y,this._origin.z);let n=t.clone().add(new THREE.Vector3(this._dimensioning.from,i,0)),s=t.clone().add(new THREE.Vector3(this._dimensioning.to,i,0));return new THREE.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 THREE.Vector3(0,this._origin.y,this._origin.z);let s=n.clone().add(new THREE.Vector3(this._dimensioning.from,i,0)),o=n.clone().add(new THREE.Vector3(this._dimensioning.from,t,0)),h=n.clone().add(new THREE.Vector3(this._dimensioning.to,i,0)),a=n.clone().add(new THREE.Vector3(this._dimensioning.to,t,0));this._addLine(s,o),this._addLine(h,a)}_getZEdge(e){let i=(this._getXSign()>0?this._size.x:0)+.05+(.06+e)*this._level;i*=this._getXSign();const t=new THREE.Vector3(this._origin.x,this._origin.y,0);let n=t.clone().add(new THREE.Vector3(i,0,this._dimensioning.from)),s=t.clone().add(new THREE.Vector3(i,0,this._dimensioning.to));return new THREE.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 THREE.Vector3(this._origin.x,this._origin.y,0);let o=s.clone().add(new THREE.Vector3(t,0,this._dimensioning.from)),h=s.clone().add(new THREE.Vector3(n,0,this._dimensioning.from)),a=s.clone().add(new THREE.Vector3(t,0,this._dimensioning.to)),_=s.clone().add(new THREE.Vector3(n,0,this._dimensioning.to));this._addLine(o,h),this._addLine(a,_)}_getYEdge(e){let i=(this._getXSign()>0?this._size.x:0)+.05+(.06+e)*this._level;i*=this._getXSign();const t=new THREE.Vector3(this._origin.x,0,this._origin.z);let n=t.clone().add(new THREE.Vector3(i,this._dimensioning.from,0)),s=t.clone().add(new THREE.Vector3(i,this._dimensioning.to,0));return new THREE.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 THREE.Vector3(this._origin.x,0,this._origin.z);let o=s.clone().add(new THREE.Vector3(t,this._dimensioning.from,0)),h=s.clone().add(new THREE.Vector3(n,this._dimensioning.from,0)),a=s.clone().add(new THREE.Vector3(t,this._dimensioning.to,0)),_=s.clone().add(new THREE.Vector3(n,this._dimensioning.to,0));this._addLine(o,h),this._addLine(a,_)}_addLine(e,i){let t=new THREE.Geometry;t.vertices.push(e,i),this.add(new THREE.Line(t,this._lineMaterial))}_addText(e,i,t,n){let s=e.getCenter(new THREE.Vector3);n.x*=this._getXSign(),s.add(n);let o=i.boundingBox.getSize(new THREE.Vector3);i.center(),this._text.position.copy(s),this._text.quaternion.copy(t),this.add(this._text);let h=new THREE.PlaneGeometry(o.x+.02,o.y+.02,32);h.center(),this._plane.geometry=h,this._plane.position.copy(s),this._plane.quaternion.copy(t),this.add(this._plane)}_getXSign(){return this._cameraPosition.x>=0?1:-1}}e("default",h),i([t],h.prototype,"_cacheHolder",void 0),i([t],h.prototype,"_unitFormatter",void 0)}}}));
|
|
2
|
+
//# sourceMappingURL=component-dimensioning-dd20ed84.nomodule.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component-dimensioning-dd20ed84.nomodule.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
System.register(["./roomle-dependency-injection-
|
|
2
|
-
//# sourceMappingURL=component-raycast-helper-
|
|
1
|
+
System.register(["./roomle-dependency-injection-9320bcec.nomodule.js","./main-thread-to-worker-1c4e6a69.nomodule.js"],(function(e){var t,i;return{setters:[function(e){t=e.a4},function(e){i=e.t}],execute:function(){e("default",class{constructor(){this._nonTransparentComponent=null,this._raycaster=new THREE.Raycaster,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,i,n=!1){if(e.children.length>0&&e.children.forEach(t=>{const s=i&&e.id===i.id||n,a=!(t instanceof THREE.Mesh);this._changeMaterialsOnSelect(t,i,(!s||!a)&&s)}),i)e instanceof THREE.Mesh&&e.material instanceof THREE.MeshStandardMaterial&&!e.userData.oldMaterial&&(e.userData.oldMaterial=e.material,e.material=e.material.clone(),n||t(e,{opacity:.2,transparent:!0}));else if(e.userData.oldMaterial&&e instanceof THREE.Mesh&&e.material instanceof THREE.MeshStandardMaterial){const{opacity:i,transparent:n}=e.userData.oldMaterial;t(e,{opacity:i,transparent:n}),e.userData.oldMaterial=void 0}}isComponentVisible(e){const t=[];e.traverse(e=>t.push(e.uuid));const i=(new THREE.Box3).setFromObject(e).getCenter(new THREE.Vector3),n=(new THREE.Vector3).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 THREE.Frustum,i=(new THREE.Matrix4).multiplyMatrices(this._camera.projectionMatrix,this._camera.matrixWorldInverse),n=new THREE.Box3;return t.setFromProjectionMatrix(i),e.map(e=>(e=>{const i=n.setFromObject(e).getCenter(new THREE.Vector3);return t.containsPoint(i)})(e)).reduce((e,t)=>e&&t)}checkPreviewVisibility(e){this.areAllPreviewsVisible(e)?this.changeMaterialsOnSelect(this._scene,null):this.changeMaterialsOnSelect(this._scene,{id:-1})}})}}}));
|
|
2
|
+
//# sourceMappingURL=component-raycast-helper-c9b31ec6.nomodule.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component-raycast-helper-c9b31ec6.nomodule.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
//# sourceMappingURL=component-raycast-helper-
|
|
1
|
+
import{a4 as transitionTransparencyOfMaterial}from"./roomle-dependency-injection-6132b958.js";import{t as throttle}from"./main-thread-to-worker-811523e8.js";export default class{constructor(){this._nonTransparentComponent=null,this._raycaster=new THREE.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(n=>{const a=t&&e.id===t.id||i,s=!(n instanceof THREE.Mesh);this._changeMaterialsOnSelect(n,t,(!a||!s)&&a)}),t)e instanceof THREE.Mesh&&e.material instanceof THREE.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 THREE.Mesh&&e.material instanceof THREE.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 THREE.Box3).setFromObject(e).getCenter(new THREE.Vector3),n=(new THREE.Vector3).subVectors(i,this._camera.position).normalize();this._raycaster.set(this._camera.position,n),this._raycaster.far=this._camera.position.distanceTo(i);const a=[];return this._raycaster.intersectObjects(this._scene.children,!0).forEach(e=>{e.object.material.visible&&(t.includes(e.object.uuid)||e.object.userData.ignoreComponentRaycast||a.push(e))}),0===a.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 THREE.Frustum,i=(new THREE.Matrix4).multiplyMatrices(this._camera.projectionMatrix,this._camera.matrixWorldInverse),n=new THREE.Box3;return t.setFromProjectionMatrix(i),e.map(e=>(e=>{const i=n.setFromObject(e).getCenter(new THREE.Vector3);return t.containsPoint(i)})(e)).reduce((e,t)=>e&&t)}checkPreviewVisibility(e){this.areAllPreviewsVisible(e)?this.changeMaterialsOnSelect(this._scene,null):this.changeMaterialsOnSelect(this._scene,{id:-1})}}
|
|
2
|
+
//# sourceMappingURL=component-raycast-helper-d27cb1ed.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component-raycast-helper-d27cb1ed.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"./query-params-helper-a271f9dc.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-
|
|
2
|
-
//# sourceMappingURL=configurator-
|
|
1
|
+
import"./query-params-helper-a271f9dc.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-6132b958.js";import"./main-thread-to-worker-811523e8.js";import{C as ConfiguratorSceneManager,R as RoomleConfigurator}from"./roomle-configurator-1229fbb1.js";import{C as CameraControl3D,a as CameraControl}from"./pixotron-1fafe31d.js";import{S as ScriptLoader,M as Main}from"./script-loader-4580ba4a.js";import ComponentRaycastHelper from"./component-raycast-helper-d27cb1ed.js";import"./default-light-setting-e906c1c4.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"),o=(this.lookup("dom-helper"),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-ebca27fa.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"configurator-ebca27fa.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
System.register(["./query-params-helper-c231e1b8.nomodule.js","./roomle-dependency-injection-
|
|
2
|
-
//# sourceMappingURL=configurator-
|
|
1
|
+
System.register(["./query-params-helper-c231e1b8.nomodule.js","./roomle-dependency-injection-9320bcec.nomodule.js","./main-thread-to-worker-1c4e6a69.nomodule.js","./roomle-configurator-a0e9aaa9.nomodule.js","./pixotron-1b69eb16.nomodule.js","./script-loader-9eb1645a.nomodule.js","./component-raycast-helper-c9b31ec6.nomodule.js","./default-light-setting-fc68e1b3.nomodule.js"],(function(e){var o,n,t,r,c,i,a,s,l,u,p,d,f,g;return{setters:[function(){},function(e){o=e.D,n=e.L,t=e.R,r=e.a,c=e.C,i=e.b,a=e.A},function(){},function(e){s=e.C,l=e.R},function(e){u=e.C,p=e.a},function(e){d=e.S,f=e.M},function(e){g=e.default},function(){}],execute:function(){const h=[new o("logger",n),new o("rapi-access",t),new o("script-loader",d),new o("camera-control-3d",u),new o("camera-control",p),new o("data-syncer",r),new o("configurator-scene-manager",s,1),new o("configurator-view-model",c,1),new o("component-raycast-helper",g,0)];e("Configurator",class extends f{setupDependencies(){i.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"),o=this.lookup("rapi-access"),n=(this.lookup("dom-helper"),this.lookup("configurator-scene-manager"));e&&e.cleanUp(),o&&o.cleanUp(),n&&n.cleanUp()}setupGlobals(e){const{kernelInstance:o,kernelContainer:n,planObjectId:t}=e||{};a.init({kernelInstance:o,kernelContainer:n,planObjectId:t})}getApi(){return this._configurator}bootFinished(){this._configurator=new l(this._context),this._configurator.getMain=()=>this,window.RoomleConfigurator||(window.RoomleConfigurator=this._configurator)}getContextName(){return"configurator"}})}}}));
|
|
2
|
+
//# sourceMappingURL=configurator-fa90fb7e.nomodule.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"configurator-fa90fb7e.nomodule.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import"./query-params-helper-a271f9dc.js";import"./roomle-dependency-injection-6132b958.js";import"./main-thread-to-worker-811523e8.js";import"./roomle-configurator-1229fbb1.js";import"./pixotron-1fafe31d.js";import"./script-loader-4580ba4a.js";import"./component-raycast-helper-d27cb1ed.js";import"./default-light-setting-e906c1c4.js";import{Configurator}from"./configurator-ebca27fa.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-65d4a776.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"configurator-main-65d4a776.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
System.register(["./query-params-helper-c231e1b8.nomodule.js","./roomle-dependency-injection-
|
|
1
|
+
System.register(["./query-params-helper-c231e1b8.nomodule.js","./roomle-dependency-injection-9320bcec.nomodule.js","./main-thread-to-worker-1c4e6a69.nomodule.js","./roomle-configurator-a0e9aaa9.nomodule.js","./pixotron-1b69eb16.nomodule.js","./script-loader-9eb1645a.nomodule.js","./component-raycast-helper-c9b31ec6.nomodule.js","./default-light-setting-fc68e1b3.nomodule.js","./configurator-fa90fb7e.nomodule.js"],(function(){var e;return{setters:[function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(o){e=o.Configurator}],execute:function(){(new e).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
2
|
//# sourceMappingURL=configurator-main.nomodule.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
//# sourceMappingURL=continuous-drawing-helper-
|
|
1
|
+
import{a6 as convertToTHREE}from"./roomle-dependency-injection-6132b958.js";import"./main-thread-to-worker-811523e8.js";export 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=e+e/50,t=new THREE.RingGeometry(e,i,32),r=new THREE.MeshBasicMaterial({color:10066329,side:THREE.DoubleSide});this._circleMesh=new THREE.Mesh(t,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 THREE.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}}
|
|
2
|
+
//# sourceMappingURL=continuous-drawing-helper-0d90420a.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"continuous-drawing-helper-0d90420a.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-9320bcec.nomodule.js","./main-thread-to-worker-1c4e6a69.nomodule.js"],(function(e){var i;return{setters:[function(e){i=e.a6},function(){}],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=e+e/50,t=new THREE.RingGeometry(e,i,32),r=new THREE.MeshBasicMaterial({color:10066329,side:THREE.DoubleSide});this._circleMesh=new THREE.Mesh(t,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 THREE.RingGeometry(e,i,32)}const t=i(this._continuousDrawingManager.getStartPoint());t.y=5,this._circleMesh.position.copy(t),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-b1151402.nomodule.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"continuous-drawing-helper-b1151402.nomodule.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
//# sourceMappingURL=default-light-setting-
|
|
1
|
+
import{j as getGUI}from"./roomle-dependency-injection-6132b958.js";import{L as LightSetting}from"./pixotron-1fafe31d.js";class DefaultLightSetting extends LightSetting{constructor(i,t){super(i,t),this._params={ambientLight:{color:"#ffffff"},mainDirLight:{position:{x:-3,y:4,z:4},color:"#ffffff"},secondDirLight:{position:{x:3,y:4,z:3},color:"#ffffff"}},this._mainDirectionalLight=new THREE.DirectionalLight(new THREE.Color(this._params.mainDirLight.color),.8),this._mainDirectionalLight.position.set(this._params.mainDirLight.position.x,this._params.mainDirLight.position.y,this._params.mainDirLight.position.z),this._mainDirectionalLight.layers.set(1),this._mainDirectionalLight.castShadow=!0,this._mainDirectionalLight.shadow.camera.near=.1,this._mainDirectionalLight.shadow.camera.far=100,this._mainDirectionalLight.shadow.mapSize=new THREE.Vector2(1024,1024),this._mainDirectionalLight.visible=!0,this._mainDirectionalLight.lookAt(new THREE.Vector3(0,0,0)),this._secondDirectionalLight=new THREE.DirectionalLight(new THREE.Color(this._params.secondDirLight.color),.2),this._secondDirectionalLight.position.set(this._params.secondDirLight.position.x,this._params.secondDirLight.position.y,this._params.secondDirLight.position.z),this._secondDirectionalLight.layers.set(1),this._secondDirectionalLight.castShadow=!1,this._secondDirectionalLight.shadow.camera.near=.1,this._secondDirectionalLight.shadow.camera.far=100,this._secondDirectionalLight.shadow.mapSize=new THREE.Vector2(1024,1024),this._secondDirectionalLight.visible=!0,this._secondDirectionalLight.lookAt(new THREE.Vector3(0,0,0)),this._ambientLight=new THREE.AmbientLight(new THREE.Color(this._params.ambientLight.color),.5),this._ambientLight.layers.set(1),this.addToScene()}needsBounds(){return!0}updateBounds(i){const t=i.getSize(new THREE.Vector3),a=Math.max(Math.max(t.x,t.y),t.z)+1,o=a/2;this._mainDirectionalLight.shadow.camera.top=o,this._mainDirectionalLight.shadow.camera.bottom=-o,this._mainDirectionalLight.shadow.camera.left=-o,this._mainDirectionalLight.shadow.camera.right=o,this._mainDirectionalLight.shadow.camera.near=.01,this._mainDirectionalLight.shadow.camera.far=4*a,this._mainDirectionalLight.shadow.camera.updateProjectionMatrix(),this._secondDirectionalLight.shadow.camera.top=o,this._secondDirectionalLight.shadow.camera.bottom=-o,this._secondDirectionalLight.shadow.camera.left=-o,this._secondDirectionalLight.shadow.camera.right=o,this._secondDirectionalLight.shadow.camera.near=.01,this._secondDirectionalLight.shadow.camera.far=4*a,this._secondDirectionalLight.shadow.camera.updateProjectionMatrix()}addToScene(){this._scene.add(this._mainDirectionalLight),this._scene.add(this._secondDirectionalLight),this._scene.add(this._ambientLight)}removeFromScene(){this._scene.remove(this._mainDirectionalLight),this._scene.remove(this._secondDirectionalLight),this._scene.remove(this._ambientLight)}reload(){this.removeFromScene(),this.addToScene()}showGUI(){let i=getGUI();if(i){if(this._ambientLight){let t=i.addFolder("Ambient Light");t.add(this._ambientLight,"visible"),t.add(this._ambientLight,"intensity").min(0).max(5).step(.1),t.addColor(this._params.ambientLight,"color").onChange(i=>this._ambientLight.color=new THREE.Color(i))}if(this._mainDirectionalLight){let t=i.addFolder("Main Directional Light");t.add(this._mainDirectionalLight,"visible"),t.add(this._mainDirectionalLight,"intensity").min(0).max(10).step(.1),t.add(this._mainDirectionalLight,"castShadow"),t.addColor(this._params.mainDirLight,"color").onChange(i=>this._mainDirectionalLight.color=new THREE.Color(i)),t.add(this._mainDirectionalLight.position,"x").min(-10).max(10).step(.1).onChange(()=>this._mainDirectionalLight.lookAt(new THREE.Vector3(0,0,0))),t.add(this._mainDirectionalLight.position,"y").min(-10).max(50).step(.1).onChange(()=>this._mainDirectionalLight.lookAt(new THREE.Vector3(0,0,0))),t.add(this._mainDirectionalLight.position,"z").min(-10).max(10).step(.1).onChange(()=>this._mainDirectionalLight.lookAt(new THREE.Vector3(0,0,0)))}if(this._secondDirectionalLight){let t=i.addFolder("Second Directional Light");t.add(this._secondDirectionalLight,"visible"),t.add(this._secondDirectionalLight,"intensity").min(0).max(10).step(.1),t.add(this._secondDirectionalLight,"castShadow"),t.addColor(this._params.mainDirLight,"color").onChange(i=>this._mainDirectionalLight.color=new THREE.Color(i)),t.add(this._secondDirectionalLight.position,"x").min(-10).max(10).step(.1).onChange(()=>this._mainDirectionalLight.lookAt(new THREE.Vector3(0,0,0))),t.add(this._secondDirectionalLight.position,"y").min(-10).max(50).step(.1).onChange(()=>this._mainDirectionalLight.lookAt(new THREE.Vector3(0,0,0))),t.add(this._secondDirectionalLight.position,"z").min(-10).max(10).step(.1).onChange(()=>this._mainDirectionalLight.lookAt(new THREE.Vector3(0,0,0)))}}}}export{DefaultLightSetting as D};
|
|
2
|
+
//# sourceMappingURL=default-light-setting-e906c1c4.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"default-light-setting-e906c1c4.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
System.register(["./roomle-dependency-injection-
|
|
2
|
-
//# sourceMappingURL=default-light-setting-
|
|
1
|
+
System.register(["./roomle-dependency-injection-9320bcec.nomodule.js","./pixotron-1b69eb16.nomodule.js"],(function(i){var t,a;return{setters:[function(i){t=i.j},function(i){a=i.L}],execute:function(){i("D",class extends a{constructor(i,t){super(i,t),this._params={ambientLight:{color:"#ffffff"},mainDirLight:{position:{x:-3,y:4,z:4},color:"#ffffff"},secondDirLight:{position:{x:3,y:4,z:3},color:"#ffffff"}},this._mainDirectionalLight=new THREE.DirectionalLight(new THREE.Color(this._params.mainDirLight.color),.8),this._mainDirectionalLight.position.set(this._params.mainDirLight.position.x,this._params.mainDirLight.position.y,this._params.mainDirLight.position.z),this._mainDirectionalLight.layers.set(1),this._mainDirectionalLight.castShadow=!0,this._mainDirectionalLight.shadow.camera.near=.1,this._mainDirectionalLight.shadow.camera.far=100,this._mainDirectionalLight.shadow.mapSize=new THREE.Vector2(1024,1024),this._mainDirectionalLight.visible=!0,this._mainDirectionalLight.lookAt(new THREE.Vector3(0,0,0)),this._secondDirectionalLight=new THREE.DirectionalLight(new THREE.Color(this._params.secondDirLight.color),.2),this._secondDirectionalLight.position.set(this._params.secondDirLight.position.x,this._params.secondDirLight.position.y,this._params.secondDirLight.position.z),this._secondDirectionalLight.layers.set(1),this._secondDirectionalLight.castShadow=!1,this._secondDirectionalLight.shadow.camera.near=.1,this._secondDirectionalLight.shadow.camera.far=100,this._secondDirectionalLight.shadow.mapSize=new THREE.Vector2(1024,1024),this._secondDirectionalLight.visible=!0,this._secondDirectionalLight.lookAt(new THREE.Vector3(0,0,0)),this._ambientLight=new THREE.AmbientLight(new THREE.Color(this._params.ambientLight.color),.5),this._ambientLight.layers.set(1),this.addToScene()}needsBounds(){return!0}updateBounds(i){const t=i.getSize(new THREE.Vector3),a=Math.max(Math.max(t.x,t.y),t.z)+1,o=a/2;this._mainDirectionalLight.shadow.camera.top=o,this._mainDirectionalLight.shadow.camera.bottom=-o,this._mainDirectionalLight.shadow.camera.left=-o,this._mainDirectionalLight.shadow.camera.right=o,this._mainDirectionalLight.shadow.camera.near=.01,this._mainDirectionalLight.shadow.camera.far=4*a,this._mainDirectionalLight.shadow.camera.updateProjectionMatrix(),this._secondDirectionalLight.shadow.camera.top=o,this._secondDirectionalLight.shadow.camera.bottom=-o,this._secondDirectionalLight.shadow.camera.left=-o,this._secondDirectionalLight.shadow.camera.right=o,this._secondDirectionalLight.shadow.camera.near=.01,this._secondDirectionalLight.shadow.camera.far=4*a,this._secondDirectionalLight.shadow.camera.updateProjectionMatrix()}addToScene(){this._scene.add(this._mainDirectionalLight),this._scene.add(this._secondDirectionalLight),this._scene.add(this._ambientLight)}removeFromScene(){this._scene.remove(this._mainDirectionalLight),this._scene.remove(this._secondDirectionalLight),this._scene.remove(this._ambientLight)}reload(){this.removeFromScene(),this.addToScene()}showGUI(){let i=t();if(i){if(this._ambientLight){let t=i.addFolder("Ambient Light");t.add(this._ambientLight,"visible"),t.add(this._ambientLight,"intensity").min(0).max(5).step(.1),t.addColor(this._params.ambientLight,"color").onChange(i=>this._ambientLight.color=new THREE.Color(i))}if(this._mainDirectionalLight){let t=i.addFolder("Main Directional Light");t.add(this._mainDirectionalLight,"visible"),t.add(this._mainDirectionalLight,"intensity").min(0).max(10).step(.1),t.add(this._mainDirectionalLight,"castShadow"),t.addColor(this._params.mainDirLight,"color").onChange(i=>this._mainDirectionalLight.color=new THREE.Color(i)),t.add(this._mainDirectionalLight.position,"x").min(-10).max(10).step(.1).onChange(()=>this._mainDirectionalLight.lookAt(new THREE.Vector3(0,0,0))),t.add(this._mainDirectionalLight.position,"y").min(-10).max(50).step(.1).onChange(()=>this._mainDirectionalLight.lookAt(new THREE.Vector3(0,0,0))),t.add(this._mainDirectionalLight.position,"z").min(-10).max(10).step(.1).onChange(()=>this._mainDirectionalLight.lookAt(new THREE.Vector3(0,0,0)))}if(this._secondDirectionalLight){let t=i.addFolder("Second Directional Light");t.add(this._secondDirectionalLight,"visible"),t.add(this._secondDirectionalLight,"intensity").min(0).max(10).step(.1),t.add(this._secondDirectionalLight,"castShadow"),t.addColor(this._params.mainDirLight,"color").onChange(i=>this._mainDirectionalLight.color=new THREE.Color(i)),t.add(this._secondDirectionalLight.position,"x").min(-10).max(10).step(.1).onChange(()=>this._mainDirectionalLight.lookAt(new THREE.Vector3(0,0,0))),t.add(this._secondDirectionalLight.position,"y").min(-10).max(50).step(.1).onChange(()=>this._mainDirectionalLight.lookAt(new THREE.Vector3(0,0,0))),t.add(this._secondDirectionalLight.position,"z").min(-10).max(10).step(.1).onChange(()=>this._mainDirectionalLight.lookAt(new THREE.Vector3(0,0,0)))}}}})}}}));
|
|
2
|
+
//# sourceMappingURL=default-light-setting-fc68e1b3.nomodule.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"default-light-setting-fc68e1b3.nomodule.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { UiCallback } from '../../common-core/src/utils/ui-callback';
|
|
2
2
|
import { PlanInteractionHandler, PlanObjectPosition } from '../../typings/planner';
|
|
3
|
-
import { ConfiguratorKernelClass } from '../../typings/kernel';
|
|
3
|
+
import { ConfiguratorKernelClass, UiPlanObject } from '../../typings/kernel';
|
|
4
4
|
import { PlannerKernelContainer } from '../../typings/planner-kernel-container';
|
|
5
5
|
import { CAMERA_TYPE } from '../../common-core/src/cameracontrol/camera-type';
|
|
6
6
|
import { SELECTION_MODE } from './utils/planner-selection-handler';
|
|
@@ -8,6 +8,7 @@ import { RapiComponent, RapiConfiguration, RapiItem } from '../../typings/rapi-t
|
|
|
8
8
|
import { WallDimension, WallDimensionTransferable } from './view-model/wall-plan-element-view-model';
|
|
9
9
|
import PlanElementViewModel from '../../common-core/src/view-model/plan-element-view-model';
|
|
10
10
|
import { Enumify } from '../../common-core/src/types';
|
|
11
|
+
import { CallbackObjectType } from './utils/planner-scene-manager';
|
|
11
12
|
export interface SelectionPayload {
|
|
12
13
|
item?: RapiItem;
|
|
13
14
|
configuration?: RapiConfiguration;
|
|
@@ -21,7 +22,6 @@ export declare const PLAN_ELEMENT_CHANGE_TYPES: {
|
|
|
21
22
|
readonly ADDED: "added";
|
|
22
23
|
readonly CHANGED: "changed";
|
|
23
24
|
readonly REMOVED: "removed";
|
|
24
|
-
readonly UPDATED: "updated";
|
|
25
25
|
};
|
|
26
26
|
export default class RoomlePlannerUiCallback extends UiCallback {
|
|
27
27
|
constructor(creator: string);
|
|
@@ -49,7 +49,7 @@ export default class RoomlePlannerUiCallback extends UiCallback {
|
|
|
49
49
|
* @param payloadPromise this promise resolves when the data of an object is fetched
|
|
50
50
|
* @param planElementViewModel the plan element view model used internally, WARNING: this is a reference, use with caution
|
|
51
51
|
*/
|
|
52
|
-
onSelectionChange: (selectionMode: SELECTION_MODE, objectType:
|
|
52
|
+
onSelectionChange: (selectionMode: SELECTION_MODE, objectType: CallbackObjectType, payload: SelectionPayload, payloadPromise: Promise<SelectionPayload>, planElementViewModel: PlanElementViewModel) => void;
|
|
53
53
|
/**
|
|
54
54
|
* When an item selection has been canceled
|
|
55
55
|
*/
|
|
@@ -61,7 +61,7 @@ export default class RoomlePlannerUiCallback extends UiCallback {
|
|
|
61
61
|
/**
|
|
62
62
|
* When an element in the plan has been added, removed or changed
|
|
63
63
|
*/
|
|
64
|
-
onPlanElementChanged: (changeType: Enumify<typeof PLAN_ELEMENT_CHANGE_TYPES
|
|
64
|
+
onPlanElementChanged: (changeType: Enumify<typeof PLAN_ELEMENT_CHANGE_TYPES>, changedObject: UiPlanObject) => void;
|
|
65
65
|
/**
|
|
66
66
|
* When the plan has been completely loaded
|
|
67
67
|
*/
|
|
@@ -213,7 +213,7 @@ export default class RoomlePlanner implements KernelAccessCallbackI, RoomlePlann
|
|
|
213
213
|
* this can be used to create a room on the fly
|
|
214
214
|
*/
|
|
215
215
|
drawWalls(wallDefinitions: WallDefinition[], interactionOptions?: InteractionOptions): KernelWall[];
|
|
216
|
-
removeElements(kernelPlanElements: KernelObject[], interactionOptions?: InteractionOptions): void
|
|
216
|
+
removeElements(kernelPlanElements: KernelObject[], interactionOptions?: InteractionOptions): Promise<void>;
|
|
217
217
|
hasWalls(): boolean;
|
|
218
218
|
enableWallDrawing(): void;
|
|
219
219
|
disableWallDrawing(): void;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { UiPlanObject } from '../../../typings/kernel';
|
|
2
|
+
import PlannerKernelAccess from '../services/planner-kernel-access';
|
|
3
|
+
import RapiAccess from '../../../common-core/src/rapi-access';
|
|
4
|
+
export declare const getPlanObjectFromPlanOverview: (plannerKernelAccess: PlannerKernelAccess, runtimeId: number) => any;
|
|
5
|
+
export declare const mapToUiPlanObjects: (planObjects: any, plannerKernelAccess: PlannerKernelAccess, rapiAccess: RapiAccess) => Promise<UiPlanObject[]>;
|
|
@@ -1,3 +1,6 @@
|
|
|
1
1
|
import PlanObjectViewModel from '../../../common-core/src/view-model/plan-object-view-model';
|
|
2
2
|
import { PlanObjectPosition } from '../../../typings/planner';
|
|
3
|
+
import PlanElementViewModel from '../../../common-core/src/view-model/plan-element-view-model';
|
|
3
4
|
export declare const createTransferableObjectPosition: (planViewModel: PlanObjectViewModel, camera: THREE.Camera, clientWidth: number, clientHeight: number) => PlanObjectPosition;
|
|
5
|
+
export type CallbackObjectType = 'static' | 'configuration' | 'wall' | 'door' | 'floor' | 'window' | 'unknown';
|
|
6
|
+
export declare const getCallbackObjectType: (planElementViewModel: PlanElementViewModel) => CallbackObjectType;
|
|
@@ -31,6 +31,7 @@ export declare const wallDimensionToTransferable: (wallDimension: WallDimension)
|
|
|
31
31
|
export default class WallPlanElementViewModel extends PlanElementViewModel {
|
|
32
32
|
private _topView;
|
|
33
33
|
constructor(planObject: PlanObject);
|
|
34
|
+
get isSelected(): boolean;
|
|
34
35
|
getWallDimension(padding?: number): WallDimension;
|
|
35
36
|
addMesh(mesh: THREE.Mesh): void;
|
|
36
37
|
show(): void;
|
|
@@ -64,9 +64,9 @@ export default class PlannerSceneManager extends ConfiguratorSceneManager implem
|
|
|
64
64
|
beginPlanConstruction(_plan: Plan): void;
|
|
65
65
|
addPlanMesh(_plan: Plan, _material: any, _vertices: Int32Array, _indices: Int32Array, _uvCoords: Float32Array, _normals: Float32Array, _type: KernelEnum): void;
|
|
66
66
|
endPlanConstruction(_plan: Plan): void;
|
|
67
|
-
addPlanObjectToScene(planViewModel: PlanObjectViewModel): void
|
|
67
|
+
addPlanObjectToScene(planViewModel: PlanObjectViewModel): Promise<void>;
|
|
68
68
|
removePlanObjectFromScene(planViewModel: PlanElementViewModel): void;
|
|
69
|
-
planElementChanged(_plan: Plan, _planViewModel: PlanElementViewModel): void
|
|
69
|
+
planElementChanged(_plan: Plan, _planViewModel: PlanElementViewModel): Promise<void>;
|
|
70
70
|
exportGLB(exportObjects?: THREE.Object3D[], id?: string): void;
|
|
71
71
|
importGLB(url: string): void;
|
|
72
72
|
clearScene(): void;
|
|
@@ -97,7 +97,7 @@ export default class PlannerSceneManager extends ConfiguratorSceneManager implem
|
|
|
97
97
|
updateCameraOnDrawWalls(): void;
|
|
98
98
|
getBounds(): THREE.Box3;
|
|
99
99
|
cancelPlanElementSelection(): void;
|
|
100
|
-
deletePlanElementSelection(): void
|
|
100
|
+
deletePlanElementSelection(): Promise<void>;
|
|
101
101
|
rotatePlanElementSelection(rotateBy: number): void;
|
|
102
102
|
planBoundsChanged(): void;
|
|
103
103
|
planElementRemoved(_element: PlanElement): void;
|
|
@@ -124,6 +124,7 @@ export interface PlanInteractionHandler {
|
|
|
124
124
|
setDefaultParapetHeight(parapetHeight: number, applyToAll: boolean): void;
|
|
125
125
|
setWallLeftMaterial(wall: KernelWall, material: KernelWallMaterial): void;
|
|
126
126
|
setWallRightMaterial(wall: KernelWall, material: KernelWallMaterial): void;
|
|
127
|
+
setFloorMaterial(floor: KernelFloor, material: KernelFloorMaterial): void;
|
|
127
128
|
getContinuousDrawingManager(): ContinuousDrawingManager;
|
|
128
129
|
setSnapFeedbackWhileDrawing(enabled: boolean): void;
|
|
129
130
|
unit: string;
|
|
@@ -148,6 +149,12 @@ export interface KernelWallMaterial extends KernelObject {
|
|
|
148
149
|
materialId: string;
|
|
149
150
|
rgbValue: number;
|
|
150
151
|
}
|
|
152
|
+
export interface KernelFloorMaterial extends KernelObject {
|
|
153
|
+
catalogItemId: string;
|
|
154
|
+
materialId: string;
|
|
155
|
+
rgbValue: number;
|
|
156
|
+
rotation: number;
|
|
157
|
+
}
|
|
151
158
|
export declare const enum KernelWallType {
|
|
152
159
|
StandAloneWall = 0,
|
|
153
160
|
OuterWallLeft = 1,
|
|
@@ -163,6 +170,10 @@ export interface KernelWall extends KernelObject {
|
|
|
163
170
|
readonly leftNormal: KernelVector3;
|
|
164
171
|
readonly rightNormal: KernelVector3;
|
|
165
172
|
}
|
|
173
|
+
export interface KernelFloor extends KernelObject {
|
|
174
|
+
area: number;
|
|
175
|
+
material: KernelFloorMaterial;
|
|
176
|
+
}
|
|
166
177
|
export interface PlanObjectPosition {
|
|
167
178
|
runtimeId: RuntimeId;
|
|
168
179
|
position2d: Position2;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{u as dispose,_ as __decorate,i as inject,V as AsyncGuard,aq as AsyncDependencyLoader}from"./roomle-dependency-injection-916bf1bf.js";import"./main-thread-to-worker-811523e8.js";const PLANE_MATERIAL="component_dimensioning_plane_material",TEXT_MATERIAL="component_dimensioning_text_material";class TextWithBackground extends THREE.Object3D{constructor(e){super(),this._label="",this._parameters={font:null,size:.1,height:.001,curveSegments:2,bevelEnabled:!0,bevelThickness:.001,bevelSize:.001},this.topDown=!1,this._parameters.font=e,this._position=new THREE.Vector3,this._initMaterials(),this._init(),this._update()}_initMaterials(){this._cacheHolder.materialCache.has(PLANE_MATERIAL)?this._planeMaterial=this._cacheHolder.materialCache.get(PLANE_MATERIAL):(this._planeMaterial=new THREE.MeshBasicMaterial({color:16777215,side:THREE.DoubleSide,opacity:.8,transparent:!0}),this._cacheHolder.materialCache.set(PLANE_MATERIAL,this._planeMaterial)),this._cacheHolder.materialCache.has(TEXT_MATERIAL)?this._textMaterial=this._cacheHolder.materialCache.get(TEXT_MATERIAL):(this._textMaterial=new THREE.MeshPhongMaterial({color:3618615}),this._cacheHolder.materialCache.set(TEXT_MATERIAL,this._textMaterial))}_init(){let e=new THREE.Geometry;this._text=new THREE.Mesh(e,this._textMaterial),this._text.name="text with background text "+this._label,this._plane=new THREE.Mesh(e,this._planeMaterial),this._plane.name="text with background plane "+this._label,this._textGeometry=new THREE.TextGeometry(this._label,this._parameters),this._textGeometry.computeBoundingBox(),this._text.geometry=this._textGeometry,this.add(this._text),this.add(this._plane)}update(e,i,t,s){this._position.copy(e),this._dimensioningType=i,this._cameraPosition=s,this._label=t;const n=this._cameraPosition.distanceTo(this._text.position),h=Math.max(.01,n/100),o=Math.max(5e-4,n/5e3);this._parameters.bevelThickness=o,this._parameters.bevelSize=o,this._parameters.size=h,this._textGeometry=new THREE.TextGeometry(this._label,this._parameters),this._textGeometry.computeBoundingBox(),this._text.geometry=this._textGeometry,this._update()}_update(){if(this.topDown){let e=new THREE.Quaternion;e.setFromAxisAngle(new THREE.Vector3(-1,0,0),Math.PI/2),this._updateText(this._textGeometry,e,new THREE.Vector3)}else if(this._updateText(this._textGeometry,new THREE.Quaternion,new THREE.Vector3),this._cameraPosition){const e=Math.atan2(this._cameraPosition.x-this._position.x,this._cameraPosition.z-this._position.z);this._text.rotation.y=e,this._plane.rotation.y=e}}_updateText(e,i,t){let s=new THREE.Vector3;s.copy(this._position),t.x*=this._getXSign(),s.add(t);let n=e.boundingBox.getSize(new THREE.Vector3);e.center(),this._text.position.copy(s),this._text.quaternion.copy(i);let h=new THREE.PlaneGeometry(n.x+.02,n.y+.02,32);h.center(),this._plane.geometry=h,this._plane.position.copy(s),this._plane.quaternion.copy(i)}_getXSign(){return!this._cameraPosition||this._cameraPosition.x>=0?1:-1}dispose(){dispose(this)}}__decorate([inject],TextWithBackground.prototype,"_cacheHolder",void 0);class DimensioningHelper{constructor(e){this._cameraPosition=new THREE.Vector3,this._textUpdated=!1,this._topDimensions=!1,this._initialized=new AsyncGuard,this._enabled=!1,this._dimensionsVisible=!1,this._creator_=e,this._lineMaterial=new THREE.LineBasicMaterial({color:3618615,linewidth:2});let i=new THREE.Geometry;this._widthLine=new THREE.Line(i,this._lineMaterial),this._widthLine.name="dimension width line",this._heightLine=new THREE.Line(i,this._lineMaterial),this._heightLine.name="dimension height line",this._depthLine=new THREE.Line(i,this._lineMaterial),this._depthLine.name="dimension depth line",this._planeMaterial=new THREE.MeshBasicMaterial({color:16777215,side:THREE.DoubleSide,opacity:.8,transparent:!0}),AsyncDependencyLoader.loadFont("static/rubik_regular_sub-2dd2d5cca49018c5.json").then(e=>{this._font=e,this._loaded()})}_loaded(){this.update(!1),this.addToScene(this._scene,this._uiScene),this._initialized.resolve()}_performUpdate(e){this._enabled&&(this._lineBounds||e)&&this._font&&(this._updateHeight(),this._updateWidth(),this._updateDepth())}_updateWidth(){let e=new THREE.Geometry,i=this._getWidthEdge();e.vertices.push(i.start,i.end),this._widthLine.geometry.dispose(),this._widthLine.geometry=e;let t=i.getCenter(new THREE.Vector3);this._widthText||(this._widthText=new TextWithBackground(this._font)),this._widthText.topDown=this._topDimensions;const s=this._unitFormatter.formatMMValueToUnitString(1e3*this._dimensions.x);this._widthText.update(t,0,s,this._cameraPosition)}_updateHeight(){let e=new THREE.Geometry,i=this._getHeightEdge();e.vertices.push(i.start,i.end),this._heightLine.geometry.dispose(),this._heightLine.geometry=e;let t=i.getCenter(new THREE.Vector3);this._heightText||(this._heightText=new TextWithBackground(this._font)),this._heightText.topDown=this._topDimensions;const s=this._unitFormatter.formatMMValueToUnitString(1e3*this._dimensions.y);this._heightText.update(t,1,s,this._cameraPosition)}_updateDepth(){let e=new THREE.Geometry,i=this._getDepthEdge();e.vertices.push(i.start,i.end),this._depthLine.geometry.dispose(),this._depthLine.geometry=e;let t=i.getCenter(new THREE.Vector3);this._depthText||(this._depthText=new TextWithBackground(this._font)),this._depthText.topDown=this._topDimensions;const s=this._unitFormatter.formatMMValueToUnitString(1e3*this._dimensions.z);this._depthText.update(t,2,s,this._cameraPosition)}updateBounds(e){if(!e)return;this._dimensions=e.getSize(new THREE.Vector3),this._lineBounds=e.clone();let i=this._lineBounds.min.y<0?this._lineBounds.min.y:0;i-=.01,this._lineBounds.expandByVector(new THREE.Vector3(.05,i,.05)),this._textUpdated=!1,this.update()}update(e=!1){this._enabled&&!this._dimensionsVisible&&(this._dimensionsVisible=!0,this._visibilityChangedCallback()),this._performUpdate(e)}addToScene(e,i){this._widthText&&this._widthLine&&this._heightText&&this._heightLine&&this._heightText&&this._heightLine&&(e.add(this._widthLine),i.add(this._widthText),e.add(this._heightLine),i.add(this._heightText),e.add(this._depthLine),i.add(this._depthText))}removeFromScene(e,i){e.remove(this._widthLine),i.remove(this._widthText),e.remove(this._heightLine),i.remove(this._heightText),e.remove(this._depthLine),i.remove(this._depthText)}_getWidthEdge(){return this._cameraPosition.z>=0?new THREE.Line3(new THREE.Vector3(this._lineBounds.min.x,this._lineBounds.min.y,this._lineBounds.max.z),new THREE.Vector3(this._lineBounds.max.x,this._lineBounds.min.y,this._lineBounds.max.z)):new THREE.Line3(new THREE.Vector3(this._lineBounds.min.x,this._lineBounds.min.y,this._lineBounds.min.z),new THREE.Vector3(this._lineBounds.max.x,this._lineBounds.min.y,this._lineBounds.min.z))}_getDepthEdge(){return this._cameraPosition.x>=0?new THREE.Line3(new THREE.Vector3(this._lineBounds.max.x,this._lineBounds.min.y,this._lineBounds.min.z),new THREE.Vector3(this._lineBounds.max.x,this._lineBounds.min.y,this._lineBounds.max.z)):new THREE.Line3(new THREE.Vector3(this._lineBounds.min.x,this._lineBounds.min.y,this._lineBounds.min.z),new THREE.Vector3(this._lineBounds.min.x,this._lineBounds.min.y,this._lineBounds.max.z))}_getHeightEdge(){return this._cameraPosition.x>=0&&this._cameraPosition.z>=0?new THREE.Line3(new THREE.Vector3(this._lineBounds.max.x,this._lineBounds.min.y,this._lineBounds.max.z),new THREE.Vector3(this._lineBounds.max.x,this._lineBounds.max.y,this._lineBounds.max.z)):this._cameraPosition.x<0&&this._cameraPosition.z>=0?new THREE.Line3(new THREE.Vector3(this._lineBounds.min.x,this._lineBounds.min.y,this._lineBounds.max.z),new THREE.Vector3(this._lineBounds.min.x,this._lineBounds.max.y,this._lineBounds.max.z)):this._cameraPosition.x>=0&&this._cameraPosition.z<0?new THREE.Line3(new THREE.Vector3(this._lineBounds.max.x,this._lineBounds.min.y,this._lineBounds.min.z),new THREE.Vector3(this._lineBounds.max.x,this._lineBounds.max.y,this._lineBounds.min.z)):new THREE.Line3(new THREE.Vector3(this._lineBounds.min.x,this._lineBounds.min.y,this._lineBounds.min.z),new THREE.Vector3(this._lineBounds.min.x,this._lineBounds.max.y,this._lineBounds.min.z))}onDimensionsVisibilityChanged(e){this._onChange=e}enableTopDimensions(){this.enableDimensions(),this._topDimensions=!0,this._heightLine.visible=!1,this._heightText.visible=!1,this.update(!0)}disableTopDimensions(){this._topDimensions=!1,this._heightLine.visible=!0,this._heightText.visible=!0,this.disableDimensions()}enableDimensions(){this._enabled=!0,this.update(!0),this.addToScene(this._scene,this._uiScene)}disableDimensions(){this._enabled=!1,this._dimensionsVisible&&(this._dimensionsVisible=!1,this._visibilityChangedCallback()),this.removeFromScene(this._scene,this._uiScene)}_visibilityChangedCallback(){this._onChange&&this._onChange(this._dimensionsVisible)}_clear(){this._lineMaterial.dispose(),this._planeMaterial.dispose(),this._widthLine.geometry.dispose(),this._heightLine.geometry.dispose(),this._depthLine.geometry.dispose(),this._heightText.dispose(),this._heightText.dispose(),this._depthText.dispose()}getBoundingBox(){const e=new THREE.Box3;return e.expandByObject(this._widthLine),e.expandByObject(this._widthText),e.expandByObject(this._heightLine),e.expandByObject(this._heightText),e.expandByObject(this._depthLine),e.expandByObject(this._depthText),e}setVisibility(e){this._heightLine&&this._widthLine&&this._depthLine&&this._heightText&&this._widthText&&this._depthText&&(this._heightLine.visible=e,this._heightText.visible=e,this._widthLine.visible=e,this._widthText.visible=e,this._depthLine.visible=e,this._depthText.visible=e)}moveCameraStart(e){this.setVisibility(!1),this._cameraPosition=e,this.update()}moveCameraEnd(e){this.setVisibility(!0),this._cameraPosition=e,this.update()}clearScene(e){this._clear()}setScene(e){this._scene=e}setUiScene(e){this._uiScene=e}needsUiScene(){return!0}isInitialized(){return this._initialized.wait()}areDimensionsEnabled(){return this._enabled}}__decorate([inject],DimensioningHelper.prototype,"_unitFormatter",void 0);export default DimensioningHelper;
|
|
2
|
-
//# sourceMappingURL=dimensioning-helper-
|
|
1
|
+
import{s as dispose,_ as __decorate,i as inject,U as AsyncGuard,aq as AsyncDependencyLoader}from"./roomle-dependency-injection-6132b958.js";import"./main-thread-to-worker-811523e8.js";const PLANE_MATERIAL="component_dimensioning_plane_material",TEXT_MATERIAL="component_dimensioning_text_material";class TextWithBackground extends THREE.Object3D{constructor(e){super(),this._label="",this._parameters={font:null,size:.1,height:.001,curveSegments:2,bevelEnabled:!0,bevelThickness:.001,bevelSize:.001},this.topDown=!1,this._parameters.font=e,this._position=new THREE.Vector3,this._initMaterials(),this._init(),this._update()}_initMaterials(){this._cacheHolder.materialCache.has(PLANE_MATERIAL)?this._planeMaterial=this._cacheHolder.materialCache.get(PLANE_MATERIAL):(this._planeMaterial=new THREE.MeshBasicMaterial({color:16777215,side:THREE.DoubleSide,opacity:.8,transparent:!0}),this._cacheHolder.materialCache.set(PLANE_MATERIAL,this._planeMaterial)),this._cacheHolder.materialCache.has(TEXT_MATERIAL)?this._textMaterial=this._cacheHolder.materialCache.get(TEXT_MATERIAL):(this._textMaterial=new THREE.MeshPhongMaterial({color:3618615}),this._cacheHolder.materialCache.set(TEXT_MATERIAL,this._textMaterial))}_init(){let e=new THREE.Geometry;this._text=new THREE.Mesh(e,this._textMaterial),this._text.name="text with background text "+this._label,this._plane=new THREE.Mesh(e,this._planeMaterial),this._plane.name="text with background plane "+this._label,this._textGeometry=new THREE.TextGeometry(this._label,this._parameters),this._textGeometry.computeBoundingBox(),this._text.geometry=this._textGeometry,this.add(this._text),this.add(this._plane)}update(e,i,t,s){this._position.copy(e),this._dimensioningType=i,this._cameraPosition=s,this._label=t;const n=this._cameraPosition.distanceTo(this._text.position),h=Math.max(.01,n/100),o=Math.max(5e-4,n/5e3);this._parameters.bevelThickness=o,this._parameters.bevelSize=o,this._parameters.size=h,this._textGeometry=new THREE.TextGeometry(this._label,this._parameters),this._textGeometry.computeBoundingBox(),this._text.geometry=this._textGeometry,this._update()}_update(){if(this.topDown){let e=new THREE.Quaternion;e.setFromAxisAngle(new THREE.Vector3(-1,0,0),Math.PI/2),this._updateText(this._textGeometry,e,new THREE.Vector3)}else if(this._updateText(this._textGeometry,new THREE.Quaternion,new THREE.Vector3),this._cameraPosition){const e=Math.atan2(this._cameraPosition.x-this._position.x,this._cameraPosition.z-this._position.z);this._text.rotation.y=e,this._plane.rotation.y=e}}_updateText(e,i,t){let s=new THREE.Vector3;s.copy(this._position),t.x*=this._getXSign(),s.add(t);let n=e.boundingBox.getSize(new THREE.Vector3);e.center(),this._text.position.copy(s),this._text.quaternion.copy(i);let h=new THREE.PlaneGeometry(n.x+.02,n.y+.02,32);h.center(),this._plane.geometry=h,this._plane.position.copy(s),this._plane.quaternion.copy(i)}_getXSign(){return!this._cameraPosition||this._cameraPosition.x>=0?1:-1}dispose(){dispose(this)}}__decorate([inject],TextWithBackground.prototype,"_cacheHolder",void 0);class DimensioningHelper{constructor(e){this._cameraPosition=new THREE.Vector3,this._textUpdated=!1,this._topDimensions=!1,this._initialized=new AsyncGuard,this._enabled=!1,this._dimensionsVisible=!1,this._creator_=e,this._lineMaterial=new THREE.LineBasicMaterial({color:3618615,linewidth:2});let i=new THREE.Geometry;this._widthLine=new THREE.Line(i,this._lineMaterial),this._widthLine.name="dimension width line",this._heightLine=new THREE.Line(i,this._lineMaterial),this._heightLine.name="dimension height line",this._depthLine=new THREE.Line(i,this._lineMaterial),this._depthLine.name="dimension depth line",this._planeMaterial=new THREE.MeshBasicMaterial({color:16777215,side:THREE.DoubleSide,opacity:.8,transparent:!0}),AsyncDependencyLoader.loadFont("static/rubik_regular_sub-2dd2d5cca49018c5.json").then(e=>{this._font=e,this._loaded()})}_loaded(){this.update(!1),this.addToScene(this._scene,this._uiScene),this._initialized.resolve()}_performUpdate(e){this._enabled&&(this._lineBounds||e)&&this._font&&(this._updateHeight(),this._updateWidth(),this._updateDepth())}_updateWidth(){let e=new THREE.Geometry,i=this._getWidthEdge();e.vertices.push(i.start,i.end),this._widthLine.geometry.dispose(),this._widthLine.geometry=e;let t=i.getCenter(new THREE.Vector3);this._widthText||(this._widthText=new TextWithBackground(this._font)),this._widthText.topDown=this._topDimensions;const s=this._unitFormatter.formatMMValueToUnitString(1e3*this._dimensions.x);this._widthText.update(t,0,s,this._cameraPosition)}_updateHeight(){let e=new THREE.Geometry,i=this._getHeightEdge();e.vertices.push(i.start,i.end),this._heightLine.geometry.dispose(),this._heightLine.geometry=e;let t=i.getCenter(new THREE.Vector3);this._heightText||(this._heightText=new TextWithBackground(this._font)),this._heightText.topDown=this._topDimensions;const s=this._unitFormatter.formatMMValueToUnitString(1e3*this._dimensions.y);this._heightText.update(t,1,s,this._cameraPosition)}_updateDepth(){let e=new THREE.Geometry,i=this._getDepthEdge();e.vertices.push(i.start,i.end),this._depthLine.geometry.dispose(),this._depthLine.geometry=e;let t=i.getCenter(new THREE.Vector3);this._depthText||(this._depthText=new TextWithBackground(this._font)),this._depthText.topDown=this._topDimensions;const s=this._unitFormatter.formatMMValueToUnitString(1e3*this._dimensions.z);this._depthText.update(t,2,s,this._cameraPosition)}updateBounds(e){if(!e)return;this._dimensions=e.getSize(new THREE.Vector3),this._lineBounds=e.clone();let i=this._lineBounds.min.y<0?this._lineBounds.min.y:0;i-=.01,this._lineBounds.expandByVector(new THREE.Vector3(.05,i,.05)),this._textUpdated=!1,this.update()}update(e=!1){this._enabled&&!this._dimensionsVisible&&(this._dimensionsVisible=!0,this._visibilityChangedCallback()),this._performUpdate(e)}addToScene(e,i){this._widthText&&this._widthLine&&this._heightText&&this._heightLine&&this._heightText&&this._heightLine&&(e.add(this._widthLine),i.add(this._widthText),e.add(this._heightLine),i.add(this._heightText),e.add(this._depthLine),i.add(this._depthText))}removeFromScene(e,i){e.remove(this._widthLine),i.remove(this._widthText),e.remove(this._heightLine),i.remove(this._heightText),e.remove(this._depthLine),i.remove(this._depthText)}_getWidthEdge(){return this._cameraPosition.z>=0?new THREE.Line3(new THREE.Vector3(this._lineBounds.min.x,this._lineBounds.min.y,this._lineBounds.max.z),new THREE.Vector3(this._lineBounds.max.x,this._lineBounds.min.y,this._lineBounds.max.z)):new THREE.Line3(new THREE.Vector3(this._lineBounds.min.x,this._lineBounds.min.y,this._lineBounds.min.z),new THREE.Vector3(this._lineBounds.max.x,this._lineBounds.min.y,this._lineBounds.min.z))}_getDepthEdge(){return this._cameraPosition.x>=0?new THREE.Line3(new THREE.Vector3(this._lineBounds.max.x,this._lineBounds.min.y,this._lineBounds.min.z),new THREE.Vector3(this._lineBounds.max.x,this._lineBounds.min.y,this._lineBounds.max.z)):new THREE.Line3(new THREE.Vector3(this._lineBounds.min.x,this._lineBounds.min.y,this._lineBounds.min.z),new THREE.Vector3(this._lineBounds.min.x,this._lineBounds.min.y,this._lineBounds.max.z))}_getHeightEdge(){return this._cameraPosition.x>=0&&this._cameraPosition.z>=0?new THREE.Line3(new THREE.Vector3(this._lineBounds.max.x,this._lineBounds.min.y,this._lineBounds.max.z),new THREE.Vector3(this._lineBounds.max.x,this._lineBounds.max.y,this._lineBounds.max.z)):this._cameraPosition.x<0&&this._cameraPosition.z>=0?new THREE.Line3(new THREE.Vector3(this._lineBounds.min.x,this._lineBounds.min.y,this._lineBounds.max.z),new THREE.Vector3(this._lineBounds.min.x,this._lineBounds.max.y,this._lineBounds.max.z)):this._cameraPosition.x>=0&&this._cameraPosition.z<0?new THREE.Line3(new THREE.Vector3(this._lineBounds.max.x,this._lineBounds.min.y,this._lineBounds.min.z),new THREE.Vector3(this._lineBounds.max.x,this._lineBounds.max.y,this._lineBounds.min.z)):new THREE.Line3(new THREE.Vector3(this._lineBounds.min.x,this._lineBounds.min.y,this._lineBounds.min.z),new THREE.Vector3(this._lineBounds.min.x,this._lineBounds.max.y,this._lineBounds.min.z))}onDimensionsVisibilityChanged(e){this._onChange=e}enableTopDimensions(){this.enableDimensions(),this._topDimensions=!0,this._heightLine.visible=!1,this._heightText.visible=!1,this.update(!0)}disableTopDimensions(){this._topDimensions=!1,this._heightLine.visible=!0,this._heightText.visible=!0,this.disableDimensions()}enableDimensions(){this._enabled=!0,this.update(!0),this.addToScene(this._scene,this._uiScene)}disableDimensions(){this._enabled=!1,this._dimensionsVisible&&(this._dimensionsVisible=!1,this._visibilityChangedCallback()),this.removeFromScene(this._scene,this._uiScene)}_visibilityChangedCallback(){this._onChange&&this._onChange(this._dimensionsVisible)}_clear(){this._lineMaterial.dispose(),this._planeMaterial.dispose(),this._widthLine.geometry.dispose(),this._heightLine.geometry.dispose(),this._depthLine.geometry.dispose(),this._heightText.dispose(),this._heightText.dispose(),this._depthText.dispose()}getBoundingBox(){const e=new THREE.Box3;return e.expandByObject(this._widthLine),e.expandByObject(this._widthText),e.expandByObject(this._heightLine),e.expandByObject(this._heightText),e.expandByObject(this._depthLine),e.expandByObject(this._depthText),e}setVisibility(e){this._heightLine&&this._widthLine&&this._depthLine&&this._heightText&&this._widthText&&this._depthText&&(this._heightLine.visible=e,this._heightText.visible=e,this._widthLine.visible=e,this._widthText.visible=e,this._depthLine.visible=e,this._depthText.visible=e)}moveCameraStart(e){this.setVisibility(!1),this._cameraPosition=e,this.update()}moveCameraEnd(e){this.setVisibility(!0),this._cameraPosition=e,this.update()}clearScene(e){this._clear()}setScene(e){this._scene=e}setUiScene(e){this._uiScene=e}needsUiScene(){return!0}isInitialized(){return this._initialized.wait()}areDimensionsEnabled(){return this._enabled}}__decorate([inject],DimensioningHelper.prototype,"_unitFormatter",void 0);export default DimensioningHelper;
|
|
2
|
+
//# sourceMappingURL=dimensioning-helper-f3321c6e.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dimensioning-helper-
|
|
1
|
+
{"version":3,"file":"dimensioning-helper-f3321c6e.js","sources":["../../packages/configurator-core/public/fonts/rubik_regular_sub.json"],"sourcesContent":["export default \"static/rubik_regular_sub-2dd2d5cca49018c5.json\""],"names":[],"mappings":"wuHAAe"}
|
package/lib/{dimensioning-helper-af3b012c.nomodule.js → dimensioning-helper-ff26c9f8.nomodule.js}
RENAMED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
System.register(["./roomle-dependency-injection-
|
|
2
|
-
//# sourceMappingURL=dimensioning-helper-
|
|
1
|
+
System.register(["./roomle-dependency-injection-9320bcec.nomodule.js","./main-thread-to-worker-1c4e6a69.nomodule.js"],(function(e){var i,t,s,n,h;return{setters:[function(e){i=e.s,t=e._,s=e.i,n=e.U,h=e.aq},function(){}],execute:function(){const o="component_dimensioning_plane_material",a="component_dimensioning_text_material";class _ extends THREE.Object3D{constructor(e){super(),this._label="",this._parameters={font:null,size:.1,height:.001,curveSegments:2,bevelEnabled:!0,bevelThickness:.001,bevelSize:.001},this.topDown=!1,this._parameters.font=e,this._position=new THREE.Vector3,this._initMaterials(),this._init(),this._update()}_initMaterials(){this._cacheHolder.materialCache.has(o)?this._planeMaterial=this._cacheHolder.materialCache.get(o):(this._planeMaterial=new THREE.MeshBasicMaterial({color:16777215,side:THREE.DoubleSide,opacity:.8,transparent:!0}),this._cacheHolder.materialCache.set(o,this._planeMaterial)),this._cacheHolder.materialCache.has(a)?this._textMaterial=this._cacheHolder.materialCache.get(a):(this._textMaterial=new THREE.MeshPhongMaterial({color:3618615}),this._cacheHolder.materialCache.set(a,this._textMaterial))}_init(){let e=new THREE.Geometry;this._text=new THREE.Mesh(e,this._textMaterial),this._text.name="text with background text "+this._label,this._plane=new THREE.Mesh(e,this._planeMaterial),this._plane.name="text with background plane "+this._label,this._textGeometry=new THREE.TextGeometry(this._label,this._parameters),this._textGeometry.computeBoundingBox(),this._text.geometry=this._textGeometry,this.add(this._text),this.add(this._plane)}update(e,i,t,s){this._position.copy(e),this._dimensioningType=i,this._cameraPosition=s,this._label=t;const n=this._cameraPosition.distanceTo(this._text.position),h=Math.max(.01,n/100),o=Math.max(5e-4,n/5e3);this._parameters.bevelThickness=o,this._parameters.bevelSize=o,this._parameters.size=h,this._textGeometry=new THREE.TextGeometry(this._label,this._parameters),this._textGeometry.computeBoundingBox(),this._text.geometry=this._textGeometry,this._update()}_update(){if(this.topDown){let e=new THREE.Quaternion;e.setFromAxisAngle(new THREE.Vector3(-1,0,0),Math.PI/2),this._updateText(this._textGeometry,e,new THREE.Vector3)}else if(this._updateText(this._textGeometry,new THREE.Quaternion,new THREE.Vector3),this._cameraPosition){const e=Math.atan2(this._cameraPosition.x-this._position.x,this._cameraPosition.z-this._position.z);this._text.rotation.y=e,this._plane.rotation.y=e}}_updateText(e,i,t){let s=new THREE.Vector3;s.copy(this._position),t.x*=this._getXSign(),s.add(t);let n=e.boundingBox.getSize(new THREE.Vector3);e.center(),this._text.position.copy(s),this._text.quaternion.copy(i);let h=new THREE.PlaneGeometry(n.x+.02,n.y+.02,32);h.center(),this._plane.geometry=h,this._plane.position.copy(s),this._plane.quaternion.copy(i)}_getXSign(){return!this._cameraPosition||this._cameraPosition.x>=0?1:-1}dispose(){i(this)}}t([s],_.prototype,"_cacheHolder",void 0);class d{constructor(e){this._cameraPosition=new THREE.Vector3,this._textUpdated=!1,this._topDimensions=!1,this._initialized=new n,this._enabled=!1,this._dimensionsVisible=!1,this._creator_=e,this._lineMaterial=new THREE.LineBasicMaterial({color:3618615,linewidth:2});let i=new THREE.Geometry;this._widthLine=new THREE.Line(i,this._lineMaterial),this._widthLine.name="dimension width line",this._heightLine=new THREE.Line(i,this._lineMaterial),this._heightLine.name="dimension height line",this._depthLine=new THREE.Line(i,this._lineMaterial),this._depthLine.name="dimension depth line",this._planeMaterial=new THREE.MeshBasicMaterial({color:16777215,side:THREE.DoubleSide,opacity:.8,transparent:!0}),h.loadFont("static/rubik_regular_sub-2dd2d5cca49018c5.json").then(e=>{this._font=e,this._loaded()})}_loaded(){this.update(!1),this.addToScene(this._scene,this._uiScene),this._initialized.resolve()}_performUpdate(e){this._enabled&&(this._lineBounds||e)&&this._font&&(this._updateHeight(),this._updateWidth(),this._updateDepth())}_updateWidth(){let e=new THREE.Geometry,i=this._getWidthEdge();e.vertices.push(i.start,i.end),this._widthLine.geometry.dispose(),this._widthLine.geometry=e;let t=i.getCenter(new THREE.Vector3);this._widthText||(this._widthText=new _(this._font)),this._widthText.topDown=this._topDimensions;const s=this._unitFormatter.formatMMValueToUnitString(1e3*this._dimensions.x);this._widthText.update(t,0,s,this._cameraPosition)}_updateHeight(){let e=new THREE.Geometry,i=this._getHeightEdge();e.vertices.push(i.start,i.end),this._heightLine.geometry.dispose(),this._heightLine.geometry=e;let t=i.getCenter(new THREE.Vector3);this._heightText||(this._heightText=new _(this._font)),this._heightText.topDown=this._topDimensions;const s=this._unitFormatter.formatMMValueToUnitString(1e3*this._dimensions.y);this._heightText.update(t,1,s,this._cameraPosition)}_updateDepth(){let e=new THREE.Geometry,i=this._getDepthEdge();e.vertices.push(i.start,i.end),this._depthLine.geometry.dispose(),this._depthLine.geometry=e;let t=i.getCenter(new THREE.Vector3);this._depthText||(this._depthText=new _(this._font)),this._depthText.topDown=this._topDimensions;const s=this._unitFormatter.formatMMValueToUnitString(1e3*this._dimensions.z);this._depthText.update(t,2,s,this._cameraPosition)}updateBounds(e){if(!e)return;this._dimensions=e.getSize(new THREE.Vector3),this._lineBounds=e.clone();let i=this._lineBounds.min.y<0?this._lineBounds.min.y:0;i-=.01,this._lineBounds.expandByVector(new THREE.Vector3(.05,i,.05)),this._textUpdated=!1,this.update()}update(e=!1){this._enabled&&!this._dimensionsVisible&&(this._dimensionsVisible=!0,this._visibilityChangedCallback()),this._performUpdate(e)}addToScene(e,i){this._widthText&&this._widthLine&&this._heightText&&this._heightLine&&this._heightText&&this._heightLine&&(e.add(this._widthLine),i.add(this._widthText),e.add(this._heightLine),i.add(this._heightText),e.add(this._depthLine),i.add(this._depthText))}removeFromScene(e,i){e.remove(this._widthLine),i.remove(this._widthText),e.remove(this._heightLine),i.remove(this._heightText),e.remove(this._depthLine),i.remove(this._depthText)}_getWidthEdge(){return this._cameraPosition.z>=0?new THREE.Line3(new THREE.Vector3(this._lineBounds.min.x,this._lineBounds.min.y,this._lineBounds.max.z),new THREE.Vector3(this._lineBounds.max.x,this._lineBounds.min.y,this._lineBounds.max.z)):new THREE.Line3(new THREE.Vector3(this._lineBounds.min.x,this._lineBounds.min.y,this._lineBounds.min.z),new THREE.Vector3(this._lineBounds.max.x,this._lineBounds.min.y,this._lineBounds.min.z))}_getDepthEdge(){return this._cameraPosition.x>=0?new THREE.Line3(new THREE.Vector3(this._lineBounds.max.x,this._lineBounds.min.y,this._lineBounds.min.z),new THREE.Vector3(this._lineBounds.max.x,this._lineBounds.min.y,this._lineBounds.max.z)):new THREE.Line3(new THREE.Vector3(this._lineBounds.min.x,this._lineBounds.min.y,this._lineBounds.min.z),new THREE.Vector3(this._lineBounds.min.x,this._lineBounds.min.y,this._lineBounds.max.z))}_getHeightEdge(){return this._cameraPosition.x>=0&&this._cameraPosition.z>=0?new THREE.Line3(new THREE.Vector3(this._lineBounds.max.x,this._lineBounds.min.y,this._lineBounds.max.z),new THREE.Vector3(this._lineBounds.max.x,this._lineBounds.max.y,this._lineBounds.max.z)):this._cameraPosition.x<0&&this._cameraPosition.z>=0?new THREE.Line3(new THREE.Vector3(this._lineBounds.min.x,this._lineBounds.min.y,this._lineBounds.max.z),new THREE.Vector3(this._lineBounds.min.x,this._lineBounds.max.y,this._lineBounds.max.z)):this._cameraPosition.x>=0&&this._cameraPosition.z<0?new THREE.Line3(new THREE.Vector3(this._lineBounds.max.x,this._lineBounds.min.y,this._lineBounds.min.z),new THREE.Vector3(this._lineBounds.max.x,this._lineBounds.max.y,this._lineBounds.min.z)):new THREE.Line3(new THREE.Vector3(this._lineBounds.min.x,this._lineBounds.min.y,this._lineBounds.min.z),new THREE.Vector3(this._lineBounds.min.x,this._lineBounds.max.y,this._lineBounds.min.z))}onDimensionsVisibilityChanged(e){this._onChange=e}enableTopDimensions(){this.enableDimensions(),this._topDimensions=!0,this._heightLine.visible=!1,this._heightText.visible=!1,this.update(!0)}disableTopDimensions(){this._topDimensions=!1,this._heightLine.visible=!0,this._heightText.visible=!0,this.disableDimensions()}enableDimensions(){this._enabled=!0,this.update(!0),this.addToScene(this._scene,this._uiScene)}disableDimensions(){this._enabled=!1,this._dimensionsVisible&&(this._dimensionsVisible=!1,this._visibilityChangedCallback()),this.removeFromScene(this._scene,this._uiScene)}_visibilityChangedCallback(){this._onChange&&this._onChange(this._dimensionsVisible)}_clear(){this._lineMaterial.dispose(),this._planeMaterial.dispose(),this._widthLine.geometry.dispose(),this._heightLine.geometry.dispose(),this._depthLine.geometry.dispose(),this._heightText.dispose(),this._heightText.dispose(),this._depthText.dispose()}getBoundingBox(){const e=new THREE.Box3;return e.expandByObject(this._widthLine),e.expandByObject(this._widthText),e.expandByObject(this._heightLine),e.expandByObject(this._heightText),e.expandByObject(this._depthLine),e.expandByObject(this._depthText),e}setVisibility(e){this._heightLine&&this._widthLine&&this._depthLine&&this._heightText&&this._widthText&&this._depthText&&(this._heightLine.visible=e,this._heightText.visible=e,this._widthLine.visible=e,this._widthText.visible=e,this._depthLine.visible=e,this._depthText.visible=e)}moveCameraStart(e){this.setVisibility(!1),this._cameraPosition=e,this.update()}moveCameraEnd(e){this.setVisibility(!0),this._cameraPosition=e,this.update()}clearScene(e){this._clear()}setScene(e){this._scene=e}setUiScene(e){this._uiScene=e}needsUiScene(){return!0}isInitialized(){return this._initialized.wait()}areDimensionsEnabled(){return this._enabled}}e("default",d),t([s],d.prototype,"_unitFormatter",void 0)}}}));
|
|
2
|
+
//# sourceMappingURL=dimensioning-helper-ff26c9f8.nomodule.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dimensioning-helper-
|
|
1
|
+
{"version":3,"file":"dimensioning-helper-ff26c9f8.nomodule.js","sources":["../../packages/configurator-core/public/fonts/rubik_regular_sub.json"],"sourcesContent":["export default \"static/rubik_regular_sub-2dd2d5cca49018c5.json\""],"names":[],"mappings":"slHAAe"}
|