@roomle/web-sdk 2.44.0-alpha.2 → 2.44.0-alpha.3
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-58aa07e7.nomodule.js → banana-for-scale-97a65f2f.nomodule.js} +2 -2
- package/lib/{banana-for-scale-58aa07e7.nomodule.js.map → banana-for-scale-97a65f2f.nomodule.js.map} +1 -1
- package/lib/{banana-for-scale-b0cad920.js → banana-for-scale-e8876cf0.js} +2 -2
- package/lib/{banana-for-scale-b0cad920.js.map → banana-for-scale-e8876cf0.js.map} +1 -1
- package/lib/{component-dimensioning-c2294a31.js → component-dimensioning-c495efe5.js} +2 -2
- package/lib/component-dimensioning-c495efe5.js.map +1 -0
- package/lib/{component-dimensioning-3e2b21b8.nomodule.js → component-dimensioning-c9877d28.nomodule.js} +2 -2
- package/lib/component-dimensioning-c9877d28.nomodule.js.map +1 -0
- package/lib/{component-raycast-helper-96be30dc.js → component-raycast-helper-23393bb6.js} +2 -2
- package/lib/component-raycast-helper-23393bb6.js.map +1 -0
- package/lib/{component-raycast-helper-0b429141.nomodule.js → component-raycast-helper-3ec360cf.nomodule.js} +2 -2
- package/lib/component-raycast-helper-3ec360cf.nomodule.js.map +1 -0
- package/lib/{configurator-ad930002.nomodule.js → configurator-6e17bbb4.nomodule.js} +2 -2
- package/lib/configurator-6e17bbb4.nomodule.js.map +1 -0
- package/lib/{configurator-1a9502eb.js → configurator-a0113de7.js} +2 -2
- package/lib/configurator-a0113de7.js.map +1 -0
- package/lib/configurator-main-10fa7f9b.js +2 -0
- package/lib/configurator-main-10fa7f9b.js.map +1 -0
- package/lib/configurator-main.nomodule.js +1 -1
- package/lib/{default-light-setting-17aeb133.js → default-light-setting-408ac1bd.js} +2 -2
- package/lib/default-light-setting-408ac1bd.js.map +1 -0
- package/lib/{default-light-setting-917cc079.nomodule.js → default-light-setting-f72c0eb6.nomodule.js} +2 -2
- package/lib/default-light-setting-f72c0eb6.nomodule.js.map +1 -0
- package/lib/definitions/common-core/src/main.d.ts +3 -4
- package/lib/definitions/common-core/src/utils/shims.d.ts +2 -2
- package/lib/definitions/configurator-core/src/roomle-configurator.d.ts +13 -13
- package/lib/definitions/configurator-core/src/services/configurator-ui-callback.d.ts +5 -5
- package/lib/definitions/glb-viewer-core/src/roomle-glb-viewer.d.ts +2 -2
- package/lib/definitions/material-viewer/src/roomle-material-viewer.d.ts +2 -2
- package/lib/{dimensioning-helper-b166264a.js → dimensioning-helper-be971abb.js} +2 -2
- package/lib/{dimensioning-helper-b166264a.js.map → dimensioning-helper-be971abb.js.map} +1 -1
- package/lib/{dimensioning-helper-0995e4b8.nomodule.js → dimensioning-helper-d1ca3c93.nomodule.js} +2 -2
- package/lib/{dimensioning-helper-0995e4b8.nomodule.js.map → dimensioning-helper-d1ca3c93.nomodule.js.map} +1 -1
- package/lib/{glb-viewer-45e04caa.js → glb-viewer-1c3b5760.js} +2 -2
- package/lib/{glb-viewer-45e04caa.js.map → glb-viewer-1c3b5760.js.map} +1 -1
- package/lib/{glb-viewer-f5f9a050.nomodule.js → glb-viewer-21871044.nomodule.js} +2 -2
- package/lib/{glb-viewer-f5f9a050.nomodule.js.map → glb-viewer-21871044.nomodule.js.map} +1 -1
- package/lib/glb-viewer-main-76258bd6.js +2 -0
- package/lib/glb-viewer-main-76258bd6.js.map +1 -0
- package/lib/glb-viewer-main.nomodule.js +1 -1
- package/lib/legacy/{banana-for-scale-2021b8ce.legacy.js → banana-for-scale-5bbe2474.legacy.js} +2 -2
- package/lib/legacy/{banana-for-scale-2021b8ce.legacy.js.map → banana-for-scale-5bbe2474.legacy.js.map} +1 -1
- package/lib/legacy/{component-dimensioning-f4289533.legacy.js → component-dimensioning-19219632.legacy.js} +2 -2
- package/lib/legacy/component-dimensioning-19219632.legacy.js.map +1 -0
- package/lib/legacy/{component-raycast-helper-afb624ed.legacy.js → component-raycast-helper-8f7251fb.legacy.js} +2 -2
- package/lib/legacy/component-raycast-helper-8f7251fb.legacy.js.map +1 -0
- package/lib/legacy/{configurator-431855b5.legacy.js → configurator-25fd6957.legacy.js} +2 -2
- package/lib/legacy/configurator-25fd6957.legacy.js.map +1 -0
- package/lib/legacy/configurator-main.legacy.js +1 -1
- package/lib/legacy/{default-light-setting-29282b63.legacy.js → default-light-setting-fc14e161.legacy.js} +2 -2
- package/lib/legacy/default-light-setting-fc14e161.legacy.js.map +1 -0
- package/lib/legacy/{dimensioning-helper-b5001288.legacy.js → dimensioning-helper-3703ce6f.legacy.js} +2 -2
- package/lib/legacy/{dimensioning-helper-b5001288.legacy.js.map → dimensioning-helper-3703ce6f.legacy.js.map} +1 -1
- package/lib/legacy/{glb-viewer-0020898e.legacy.js → glb-viewer-750198d1.legacy.js} +2 -2
- package/lib/legacy/{glb-viewer-0020898e.legacy.js.map → glb-viewer-750198d1.legacy.js.map} +1 -1
- package/lib/legacy/glb-viewer-main.legacy.js +1 -1
- package/lib/legacy/{material-viewer-51065b97.legacy.js → material-viewer-85314524.legacy.js} +2 -2
- package/lib/legacy/material-viewer-85314524.legacy.js.map +1 -0
- package/lib/legacy/material-viewer-main.legacy.js +1 -1
- package/lib/legacy/{pixotron-e0f1cf47.legacy.js → pixotron-fe363849.legacy.js} +2 -2
- package/lib/legacy/{pixotron-e0f1cf47.legacy.js.map → pixotron-fe363849.legacy.js.map} +1 -1
- package/lib/legacy/{planner-1af4bef2.legacy.js → planner-a422d4e7.legacy.js} +2 -2
- package/lib/legacy/{planner-1af4bef2.legacy.js.map → planner-a422d4e7.legacy.js.map} +1 -1
- package/lib/legacy/planner-main.legacy.js +1 -1
- package/lib/legacy/{roomle-configurator-40f860e2.legacy.js → roomle-configurator-4ac0dbee.legacy.js} +2 -2
- package/lib/legacy/{roomle-configurator-40f860e2.legacy.js.map → roomle-configurator-4ac0dbee.legacy.js.map} +1 -1
- package/lib/legacy/roomle-dependency-injection-c859bb7b.legacy.js +16 -0
- package/lib/legacy/{roomle-dependency-injection-c465c69e.legacy.js.map → roomle-dependency-injection-c859bb7b.legacy.js.map} +1 -1
- package/lib/legacy/roomle-sdk.legacy.js +1 -1
- package/lib/legacy/{script-loader-f53b8215.legacy.js → script-loader-e0a57fb9.legacy.js} +2 -2
- package/lib/legacy/script-loader-e0a57fb9.legacy.js.map +1 -0
- package/lib/{static/shaders-88030e4fbae39928.json → legacy/static/shaders-219b62c099a8555a.json} +1 -1
- package/lib/legacy/{stats-helper-951a6039.legacy.js → stats-helper-301dc461.legacy.js} +2 -2
- package/lib/legacy/{stats-helper-951a6039.legacy.js.map → stats-helper-301dc461.legacy.js.map} +1 -1
- package/lib/legacy/{tools-core-8e9fd5dd.legacy.js → tools-core-762555af.legacy.js} +2 -2
- package/lib/legacy/tools-core-762555af.legacy.js.map +1 -0
- package/lib/{material-viewer-ca21925a.js → material-viewer-4c7564b3.js} +2 -2
- package/lib/material-viewer-4c7564b3.js.map +1 -0
- package/lib/{material-viewer-2df0572f.nomodule.js → material-viewer-5591d60a.nomodule.js} +2 -2
- package/lib/material-viewer-5591d60a.nomodule.js.map +1 -0
- package/lib/material-viewer-main-16e395e9.js +2 -0
- package/lib/material-viewer-main-16e395e9.js.map +1 -0
- package/lib/material-viewer-main.nomodule.js +1 -1
- package/lib/{pixotron-32c4e05d.js → pixotron-5905d47b.js} +2 -2
- package/lib/{pixotron-32c4e05d.js.map → pixotron-5905d47b.js.map} +1 -1
- package/lib/{pixotron-3be821e5.nomodule.js → pixotron-9fe87cf0.nomodule.js} +2 -2
- package/lib/{pixotron-3be821e5.nomodule.js.map → pixotron-9fe87cf0.nomodule.js.map} +1 -1
- package/lib/{planner-21a6fccd.nomodule.js → planner-85bd03e6.nomodule.js} +2 -2
- package/lib/{planner-21a6fccd.nomodule.js.map → planner-85bd03e6.nomodule.js.map} +1 -1
- package/lib/{planner-07dfff6d.js → planner-e72d2ec5.js} +2 -2
- package/lib/{planner-07dfff6d.js.map → planner-e72d2ec5.js.map} +1 -1
- package/lib/planner-main-0d79120f.js +2 -0
- package/lib/planner-main-0d79120f.js.map +1 -0
- package/lib/planner-main.nomodule.js +1 -1
- package/lib/{roomle-configurator-21e1c87c.js → roomle-configurator-43aab7fd.js} +2 -2
- package/lib/{roomle-configurator-21e1c87c.js.map → roomle-configurator-43aab7fd.js.map} +1 -1
- package/lib/{roomle-configurator-072f6af1.nomodule.js → roomle-configurator-e72d373d.nomodule.js} +2 -2
- package/lib/{roomle-configurator-072f6af1.nomodule.js.map → roomle-configurator-e72d373d.nomodule.js.map} +1 -1
- package/lib/roomle-dependency-injection-0464676f.js +16 -0
- package/lib/{roomle-dependency-injection-8d66ecac.js.map → roomle-dependency-injection-0464676f.js.map} +1 -1
- package/lib/roomle-dependency-injection-07615f35.nomodule.js +16 -0
- package/lib/{roomle-dependency-injection-f0b933f6.nomodule.js.map → roomle-dependency-injection-07615f35.nomodule.js.map} +1 -1
- package/lib/{roomle-sdk-038a1704.js → roomle-sdk-dd5cc592.js} +2 -2
- package/lib/roomle-sdk-dd5cc592.js.map +1 -0
- package/lib/roomle-sdk.nomodule.js +1 -1
- package/lib/{script-loader-a1d7afdd.js → script-loader-394f7657.js} +2 -2
- package/lib/script-loader-394f7657.js.map +1 -0
- package/lib/{script-loader-c56ceed8.nomodule.js → script-loader-8efb6055.nomodule.js} +2 -2
- package/lib/script-loader-8efb6055.nomodule.js.map +1 -0
- package/lib/{legacy/static/shaders-88030e4fbae39928.json → static/shaders-219b62c099a8555a.json} +1 -1
- package/lib/{stats-helper-a75dc3da.nomodule.js → stats-helper-13e6116f.nomodule.js} +2 -2
- package/lib/{stats-helper-a75dc3da.nomodule.js.map → stats-helper-13e6116f.nomodule.js.map} +1 -1
- package/lib/{stats-helper-53909b17.js → stats-helper-ab16facc.js} +2 -2
- package/lib/{stats-helper-53909b17.js.map → stats-helper-ab16facc.js.map} +1 -1
- package/lib/{tools-core-4e24e712.js → tools-core-bef60f9d.js} +2 -2
- package/lib/tools-core-bef60f9d.js.map +1 -0
- package/lib/{tools-core-865f89df.nomodule.js → tools-core-c6126068.nomodule.js} +2 -2
- package/lib/tools-core-c6126068.nomodule.js.map +1 -0
- package/package.json +2 -2
- package/lib/component-dimensioning-3e2b21b8.nomodule.js.map +0 -1
- package/lib/component-dimensioning-c2294a31.js.map +0 -1
- package/lib/component-raycast-helper-0b429141.nomodule.js.map +0 -1
- package/lib/component-raycast-helper-96be30dc.js.map +0 -1
- package/lib/configurator-1a9502eb.js.map +0 -1
- package/lib/configurator-ad930002.nomodule.js.map +0 -1
- package/lib/configurator-main-d4d311c0.js +0 -2
- package/lib/configurator-main-d4d311c0.js.map +0 -1
- package/lib/default-light-setting-17aeb133.js.map +0 -1
- package/lib/default-light-setting-917cc079.nomodule.js.map +0 -1
- package/lib/glb-viewer-main-be603c6d.js +0 -2
- package/lib/glb-viewer-main-be603c6d.js.map +0 -1
- package/lib/legacy/component-dimensioning-f4289533.legacy.js.map +0 -1
- package/lib/legacy/component-raycast-helper-afb624ed.legacy.js.map +0 -1
- package/lib/legacy/configurator-431855b5.legacy.js.map +0 -1
- package/lib/legacy/default-light-setting-29282b63.legacy.js.map +0 -1
- package/lib/legacy/material-viewer-51065b97.legacy.js.map +0 -1
- package/lib/legacy/roomle-dependency-injection-c465c69e.legacy.js +0 -16
- package/lib/legacy/script-loader-f53b8215.legacy.js.map +0 -1
- package/lib/legacy/tools-core-8e9fd5dd.legacy.js.map +0 -1
- package/lib/material-viewer-2df0572f.nomodule.js.map +0 -1
- package/lib/material-viewer-ca21925a.js.map +0 -1
- package/lib/material-viewer-main-5b2d8fb1.js +0 -2
- package/lib/material-viewer-main-5b2d8fb1.js.map +0 -1
- package/lib/planner-main-8a56d68d.js +0 -2
- package/lib/planner-main-8a56d68d.js.map +0 -1
- package/lib/roomle-dependency-injection-8d66ecac.js +0 -16
- package/lib/roomle-dependency-injection-f0b933f6.nomodule.js +0 -16
- package/lib/roomle-sdk-038a1704.js.map +0 -1
- package/lib/script-loader-a1d7afdd.js.map +0 -1
- package/lib/script-loader-c56ceed8.nomodule.js.map +0 -1
- package/lib/tools-core-4e24e712.js.map +0 -1
- package/lib/tools-core-865f89df.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-07615f35.nomodule.js","./main-thread-to-worker-6a4eb1ee.nomodule.js"],(function(e){var n,t,a,s;return{setters:[function(e){n=e.aj,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-97a65f2f.nomodule.js.map
|
package/lib/{banana-for-scale-58aa07e7.nomodule.js.map → banana-for-scale-97a65f2f.nomodule.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"banana-for-scale-
|
|
1
|
+
{"version":3,"file":"banana-for-scale-97a65f2f.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{aj as ScenePluginDefaultImplementation,_ as __decorate,i as inject}from"./roomle-dependency-injection-
|
|
2
|
-
//# sourceMappingURL=banana-for-scale-
|
|
1
|
+
import{aj as ScenePluginDefaultImplementation,_ as __decorate,i as inject}from"./roomle-dependency-injection-0464676f.js";import{g as getAssetPath}from"./main-thread-to-worker-88f74244.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-e8876cf0.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"banana-for-scale-
|
|
1
|
+
{"version":3,"file":"banana-for-scale-e8876cf0.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-0464676f.js";import"./main-thread-to-worker-88f74244.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-c495efe5.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component-dimensioning-c495efe5.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-07615f35.nomodule.js","./main-thread-to-worker-6a4eb1ee.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-c9877d28.nomodule.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component-dimensioning-c9877d28.nomodule.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a0 as transitionTransparencyOfMaterial}from"./roomle-dependency-injection-
|
|
2
|
-
//# sourceMappingURL=component-raycast-helper-
|
|
1
|
+
import{a0 as transitionTransparencyOfMaterial}from"./roomle-dependency-injection-0464676f.js";import{t as throttle}from"./main-thread-to-worker-88f74244.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(a=>{const s=t&&e.id===t.id||i,n=!(a instanceof THREE.Mesh);this._changeMaterialsOnSelect(a,t,(!s||!n)&&s)}),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),a=(new THREE.Vector3).subVectors(i,this._camera.position).normalize();this._raycaster.set(this._camera.position,a),this._raycaster.far=this._camera.position.distanceTo(i);const s=[];return this._raycaster.intersectObjects(this._scene.children,!0).forEach(e=>{e.object.material.visible&&(t.includes(e.object.uuid)||e.object.userData.ignoreComponentRaycast||s.push(e))}),0===s.length}checkComponentAndPreviewVisibility(e,t){e.hasSelection()?this.checkComponentVisibility(e,t):t.hasPreviews()?this.checkPreviewVisibility(t):this.changeMaterialsOnSelect(this._scene,null)}checkComponentVisibility(e,t){if(!e.hasSelection())return;const i=t.getComponentsForIds(e.getSelectedRuntimeComponentIds());if(i.length>1)return;const a=i[0];this.isComponentVisible(a)?this.changeMaterialsOnSelect(this._scene,null):this.changeMaterialsOnSelect(this._scene,a)}areAllPreviewsVisible(e){if(!e.hasPreviews())return!0;const t=e.getPreviews();return 0===t.length||t.map(e=>this.isComponentVisible(e)).reduce((e,t)=>e&&t)}checkPreviewVisibility(e){this.areAllPreviewsVisible(e)?this.changeMaterialsOnSelect(this._scene,null):this.changeMaterialsOnSelect(this._scene,{id:-1})}}
|
|
2
|
+
//# sourceMappingURL=component-raycast-helper-23393bb6.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component-raycast-helper-23393bb6.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-07615f35.nomodule.js","./main-thread-to-worker-6a4eb1ee.nomodule.js"],(function(e){var t,i;return{setters:[function(e){t=e.a0},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)}checkPreviewVisibility(e){this.areAllPreviewsVisible(e)?this.changeMaterialsOnSelect(this._scene,null):this.changeMaterialsOnSelect(this._scene,{id:-1})}})}}}));
|
|
2
|
+
//# sourceMappingURL=component-raycast-helper-3ec360cf.nomodule.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component-raycast-helper-3ec360cf.nomodule.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-07615f35.nomodule.js","./main-thread-to-worker-6a4eb1ee.nomodule.js","./roomle-configurator-e72d373d.nomodule.js","./pixotron-9fe87cf0.nomodule.js","./script-loader-8efb6055.nomodule.js","./component-raycast-helper-3ec360cf.nomodule.js","./default-light-setting-f72c0eb6.nomodule.js"],(function(e){var o,n,t,r,i,c,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,i=e.C,c=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",i,1),new o("component-raycast-helper",g,0)];e("Configurator",class extends f{setupDependencies(){c.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-6e17bbb4.nomodule.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"configurator-6e17bbb4.nomodule.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-0464676f.js";import"./main-thread-to-worker-88f74244.js";import{C as ConfiguratorSceneManager,R as RoomleConfigurator}from"./roomle-configurator-43aab7fd.js";import{C as CameraControl3D,a as CameraControl}from"./pixotron-5905d47b.js";import{S as ScriptLoader,M as Main}from"./script-loader-394f7657.js";import ComponentRaycastHelper from"./component-raycast-helper-23393bb6.js";import"./default-light-setting-408ac1bd.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-a0113de7.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"configurator-a0113de7.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import"./query-params-helper-a271f9dc.js";import"./roomle-dependency-injection-0464676f.js";import"./main-thread-to-worker-88f74244.js";import"./roomle-configurator-43aab7fd.js";import"./pixotron-5905d47b.js";import"./script-loader-394f7657.js";import"./component-raycast-helper-23393bb6.js";import"./default-light-setting-408ac1bd.js";import{Configurator}from"./configurator-a0113de7.js";(new Configurator).boot(),window.requestIdleCallback||(window.requestIdleCallback=o=>setTimeout(()=>{let e=Date.now();o({didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-e))})},1)),window.cancelIdleCallback||(window.cancelIdleCallback=window.cancelIdleCallback||function(o){clearTimeout(o)});
|
|
2
|
+
//# sourceMappingURL=configurator-main-10fa7f9b.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"configurator-main-10fa7f9b.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-07615f35.nomodule.js","./main-thread-to-worker-6a4eb1ee.nomodule.js","./roomle-configurator-e72d373d.nomodule.js","./pixotron-9fe87cf0.nomodule.js","./script-loader-8efb6055.nomodule.js","./component-raycast-helper-3ec360cf.nomodule.js","./default-light-setting-f72c0eb6.nomodule.js","./configurator-6e17bbb4.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{h as getGUI}from"./roomle-dependency-injection-
|
|
2
|
-
//# sourceMappingURL=default-light-setting-
|
|
1
|
+
import{h as getGUI}from"./roomle-dependency-injection-0464676f.js";import{L as LightSetting}from"./pixotron-5905d47b.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-408ac1bd.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"default-light-setting-408ac1bd.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-07615f35.nomodule.js","./pixotron-9fe87cf0.nomodule.js"],(function(i){var t,a;return{setters:[function(i){t=i.h},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-f72c0eb6.nomodule.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"default-light-setting-f72c0eb6.nomodule.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -19,14 +19,13 @@ export interface GlobalAPI {
|
|
|
19
19
|
* Sets the available screen space for our item
|
|
20
20
|
* Example 1: right 0.9 means 10% padding on the right side
|
|
21
21
|
* Example 2: bottom 0.2 means 20% padding on the bottom side
|
|
22
|
-
* default:
|
|
23
|
-
* @param offset
|
|
22
|
+
* default: 'left: 0, top: 1, right: 1, bottom: 0'
|
|
23
|
+
* @param offset
|
|
24
24
|
*/
|
|
25
25
|
setCameraOffset(offset: CanvasOffset): void;
|
|
26
26
|
/**
|
|
27
27
|
* Gets the available screen space for our item
|
|
28
|
-
* default:
|
|
29
|
-
* Returns {@link CanvasOffset}
|
|
28
|
+
* default: 'left: 0, top: 1, right: 1, bottom: 0'
|
|
30
29
|
*/
|
|
31
30
|
getCameraOffset(): CanvasOffset;
|
|
32
31
|
getUnitFormatter(): UnitFormatter;
|
|
@@ -188,13 +188,13 @@ export interface ConfiguratorInitData {
|
|
|
188
188
|
offlineSync?: string;
|
|
189
189
|
/**
|
|
190
190
|
* Set the floor material which is used when loading the configurator
|
|
191
|
-
* For different options see {@link EnvironmentSetting}
|
|
191
|
+
* For different options see {@link @roomle/web-sdk/common-core/src/environment/dynamic-environment-setting-loader#EnvironmentSetting}
|
|
192
192
|
*/
|
|
193
193
|
initialFloorMaterial?: string;
|
|
194
194
|
/**
|
|
195
195
|
* @internal
|
|
196
196
|
* Load a light setting using an URL.
|
|
197
|
-
* Check lights in {@link SceneSettings} for an example.
|
|
197
|
+
* Check lights in {@link @roomle/web-sdk/common-core/src/scene-settings-loader#SceneSettings} for an example.
|
|
198
198
|
*/
|
|
199
199
|
dls?: string;
|
|
200
200
|
ls?: string;
|
|
@@ -113,7 +113,7 @@ export default class RoomleConfigurator implements GlobalAPI, Context, KernelUti
|
|
|
113
113
|
*/
|
|
114
114
|
disableHDGeometry(): Promise<void | ConfigurationLoadedResponse>;
|
|
115
115
|
/**
|
|
116
|
-
* Change the camera offset
|
|
116
|
+
* Change the camera offset
|
|
117
117
|
* @param offset
|
|
118
118
|
*/
|
|
119
119
|
changeOffset(offset: CanvasOffset): void;
|
|
@@ -219,7 +219,7 @@ export default class RoomleConfigurator implements GlobalAPI, Context, KernelUti
|
|
|
219
219
|
/**
|
|
220
220
|
* Sets the parameter of the selected component. If nothing is selected the parameters of the
|
|
221
221
|
* parameters of the plan object are set
|
|
222
|
-
* @param parameter an instance of the kernel parameter we want to set, use
|
|
222
|
+
* @param parameter an instance of the kernel parameter we want to set, use 'key: "your-key"' if
|
|
223
223
|
* you do not have a kernel instance and do not need validation of the input
|
|
224
224
|
* @param value the value we want to set on the parameter as string
|
|
225
225
|
* @param isRaw turn this to true if you dont want the kernel to parse the value string, e.g. convert 100cm to 1000
|
|
@@ -227,7 +227,7 @@ export default class RoomleConfigurator implements GlobalAPI, Context, KernelUti
|
|
|
227
227
|
setParameter(parameter: KernelParameter, value: string, isRaw?: boolean): Promise<void>;
|
|
228
228
|
/**
|
|
229
229
|
* Method to set a parameter on the plan object. This is used by embedding as well
|
|
230
|
-
* @param parameter an instance of the kernel parameter we want to set, use
|
|
230
|
+
* @param parameter an instance of the kernel parameter we want to set, use 'key: "your-key"' if
|
|
231
231
|
* you do not have a kernel instance and do not need validation of the input
|
|
232
232
|
* @param value the value we want to set on the parameter as string
|
|
233
233
|
*/
|
|
@@ -238,7 +238,7 @@ export default class RoomleConfigurator implements GlobalAPI, Context, KernelUti
|
|
|
238
238
|
getParametersOfPlanObject(): Promise<KernelParameter[]>;
|
|
239
239
|
/**
|
|
240
240
|
* Method to set a parameter on the root component. This is used by embedding as well
|
|
241
|
-
* @param parameter an instance of the kernel parameter we want to set, use
|
|
241
|
+
* @param parameter an instance of the kernel parameter we want to set, use 'key: "your-key"' if
|
|
242
242
|
* you do not have a kernel instance and do not need validation of the input
|
|
243
243
|
* @param value the value we want to set on the parameter as string
|
|
244
244
|
*/
|
|
@@ -294,7 +294,7 @@ export default class RoomleConfigurator implements GlobalAPI, Context, KernelUti
|
|
|
294
294
|
*/
|
|
295
295
|
requestAsset(url: string): AssetUrl;
|
|
296
296
|
/**
|
|
297
|
-
* Sets the material of the floor to the given
|
|
297
|
+
* Sets the material of the floor to the given RapiMaterial.
|
|
298
298
|
* If the current environment is not floor environment it will be changed
|
|
299
299
|
*
|
|
300
300
|
* @param material
|
|
@@ -347,7 +347,7 @@ export default class RoomleConfigurator implements GlobalAPI, Context, KernelUti
|
|
|
347
347
|
*/
|
|
348
348
|
changeTypeChangeTag(rapiId: RapiId): void;
|
|
349
349
|
/**
|
|
350
|
-
*
|
|
350
|
+
* After calling this method the UiCallback removeTypeChangeTag is triggered (see: {@link @roomle/web-sdk/configurator-core/src/services/configurator-ui-callback#ConfiguratorUiCallbacks.onRemoveTypeChangeTag})
|
|
351
351
|
* @param rapiId
|
|
352
352
|
*/
|
|
353
353
|
removeTypeChangeTag(rapiId: RapiId): void;
|
|
@@ -365,14 +365,14 @@ export default class RoomleConfigurator implements GlobalAPI, Context, KernelUti
|
|
|
365
365
|
/**
|
|
366
366
|
* Show dimensions (width, height, depth) of object
|
|
367
367
|
*
|
|
368
|
-
* See {@link onDimensionsVisibilityChange} to get notified when dimension visibility changes
|
|
368
|
+
* See {@link @roomle/web-sdk/configurator-core/src/services/configurator-ui-callback#ConfiguratorUiCallbacks.onDimensionsVisibilityChange} to get notified when dimension visibility changes
|
|
369
369
|
*/
|
|
370
370
|
showDimensions(): void;
|
|
371
371
|
/**
|
|
372
372
|
* Hides dimensions when they are shown (see {@link showDimensions}).
|
|
373
373
|
* Calling hideDimensions does not force dimensions to be always hidden.
|
|
374
374
|
*
|
|
375
|
-
* See {@link onDimensionsVisibilityChange} to get notified when dimension visibility changes
|
|
375
|
+
* See {@link @roomle/web-sdk/configurator-core/src/services/configurator-ui-callback#ConfiguratorUiCallbacks.onDimensionsVisibilityChange} to get notified when dimension visibility changes
|
|
376
376
|
*/
|
|
377
377
|
hideDimensions(): void;
|
|
378
378
|
/**
|
|
@@ -392,7 +392,7 @@ export default class RoomleConfigurator implements GlobalAPI, Context, KernelUti
|
|
|
392
392
|
syncTypeChangeTag(tagId: RapiId): Promise<void>;
|
|
393
393
|
/**
|
|
394
394
|
* Loads a dynamic light settings into the scene. The dynamic light setting source can be an
|
|
395
|
-
* object (js), json, or an url (url to json). See {@link SceneSettings} how to define it.
|
|
395
|
+
* object (js), json, or an url (url to json). See {@link @roomle/web-sdk/common-core/src/scene-settings-loader#SceneSettings} how to define it.
|
|
396
396
|
*
|
|
397
397
|
* Exampe:
|
|
398
398
|
* ```
|
|
@@ -474,7 +474,7 @@ export default class RoomleConfigurator implements GlobalAPI, Context, KernelUti
|
|
|
474
474
|
setBakedShadow(hex: string, url: string): void;
|
|
475
475
|
/**
|
|
476
476
|
* Loads a SceneSettings object, currently it can can contain a light setting definition
|
|
477
|
-
* (see {@link loadDynamicLightSetting}) and an environment definition (see {@link EnvironmentSetting}).
|
|
477
|
+
* (see {@link @roomle/web-sdk/configurator-core/src/roomle-configurator#RoomleConfigurator.loadDynamicLightSetting}) and an environment definition (see {@link @roomle/web-sdk/common-core/src/environment/dynamic-environment-setting-loader#EnvironmentSetting}).
|
|
478
478
|
* @param sceneSettings
|
|
479
479
|
*/
|
|
480
480
|
loadSceneSetting(sceneSettings: SceneSettings): Promise<void>;
|
|
@@ -530,12 +530,12 @@ export default class RoomleConfigurator implements GlobalAPI, Context, KernelUti
|
|
|
530
530
|
*/
|
|
531
531
|
zoomOut(value?: number): void;
|
|
532
532
|
/**
|
|
533
|
-
*
|
|
533
|
+
* Use this callbacks to hook in your functionality
|
|
534
534
|
*/
|
|
535
535
|
get callbacks(): ConfiguratorUiCallbacks;
|
|
536
536
|
/**
|
|
537
537
|
* @internal
|
|
538
|
-
*
|
|
538
|
+
* Use this callbacks to hook in your functionality
|
|
539
539
|
*/
|
|
540
540
|
get globalCallbacks(): GlobalCallback;
|
|
541
541
|
/**
|
|
@@ -580,7 +580,7 @@ export default class RoomleConfigurator implements GlobalAPI, Context, KernelUti
|
|
|
580
580
|
* Sets the parameter of the component by it's runtime id
|
|
581
581
|
* parameters of the plan object are set
|
|
582
582
|
* @param runtimeId number, the runtime id of the component. You can retrieve this ID from partlist etc
|
|
583
|
-
* @param parameter an instance of the kernel parameter we want to set, use
|
|
583
|
+
* @param parameter an instance of the kernel parameter we want to set, use 'key: "your-key"' if
|
|
584
584
|
* you do not have a kernel instance and do not need validation of the input
|
|
585
585
|
* @param value the value we want to set on the parameter as string
|
|
586
586
|
*/
|
|
@@ -89,7 +89,7 @@ export default class ConfiguratorUiCallbacks extends UiCallback {
|
|
|
89
89
|
*/
|
|
90
90
|
onConfigurationReady: (partList: KernelPartList, hash: ConfigurationHash, rootComponentLabel: string) => void;
|
|
91
91
|
/**
|
|
92
|
-
* When UI should show the overlay based on the selected tag. Gets triggered when {@link CommonInitData.startTag} is set
|
|
92
|
+
* When UI should show the overlay based on the selected tag. Gets triggered when {@link @roomle/web-sdk/common-core/src/utils/shims#CommonInitData.startTag} is set
|
|
93
93
|
* @param tag
|
|
94
94
|
*/
|
|
95
95
|
onOpenTag: (tag: RapiTagForUi) => void;
|
|
@@ -102,11 +102,11 @@ export default class ConfiguratorUiCallbacks extends UiCallback {
|
|
|
102
102
|
*/
|
|
103
103
|
onClickOutside: () => void;
|
|
104
104
|
/**
|
|
105
|
-
*
|
|
105
|
+
* Is triggered when {@link @roomle/web-sdk/configurator-core/src/roomle-configurator#RoomleConfigurator.previewDockings} has no available dockings
|
|
106
106
|
*/
|
|
107
107
|
onNoDockingsAvailable: () => void;
|
|
108
108
|
/**
|
|
109
|
-
* When the configuration overlaps the UI (defined by {@link CanvasOffset})
|
|
109
|
+
* When the configuration overlaps the UI (defined by {@link @roomle/web-sdk/common-core/src/common-interfaces#CanvasOffset})
|
|
110
110
|
* @param intersections
|
|
111
111
|
*/
|
|
112
112
|
onUiIntersectionChange: (intersections: UIIntersection[]) => void;
|
|
@@ -211,12 +211,12 @@ export default class ConfiguratorUiCallbacks extends UiCallback {
|
|
|
211
211
|
*/
|
|
212
212
|
onConfigurationLoadError: () => void;
|
|
213
213
|
/**
|
|
214
|
-
* When {@link changeTypeChangeTag} as been called and the sync has been started
|
|
214
|
+
* When {@link @roomle/web-sdk/configurator-core/src/roomle-configurator#RoomleConfigurator.changeTypeChangeTag} as been called and the sync has been started
|
|
215
215
|
* @param rapiId
|
|
216
216
|
*/
|
|
217
217
|
onChangeTypeChangeTag: (rapiId: RapiId) => void;
|
|
218
218
|
/**
|
|
219
|
-
* When {@link removeTypeChangeTag} as been called
|
|
219
|
+
* When {@link @roomle/web-sdk/configurator-core/src/roomle-configurator#RoomleConfigurator.removeTypeChangeTag} as been called
|
|
220
220
|
* @param rapiId
|
|
221
221
|
*/
|
|
222
222
|
onRemoveTypeChangeTag: (rapiId: RapiId) => void;
|
|
@@ -57,12 +57,12 @@ export default class RoomleGLBViewer implements GlobalAPI, Context, ExternalEmbe
|
|
|
57
57
|
getCurrentId(): string;
|
|
58
58
|
/**
|
|
59
59
|
* Loads a SceneSettings object, currently it can can contain a light setting definition
|
|
60
|
-
* (see {@link loadDynamicLightSetting}) and an environment definition (see {@link EnvironmentSetting}).
|
|
60
|
+
* (see {@link @roomle/web-sdk/configurator-core/src/roomle-configurator#RoomleConfigurator.loadDynamicLightSetting}) and an environment definition (see {@link @roomle/web-sdk/common-core/src/environment/dynamic-environment-setting-loader#EnvironmentSetting}).
|
|
61
61
|
* @param sceneSettings
|
|
62
62
|
*/
|
|
63
63
|
loadSceneSetting(sceneSettings: SceneSettings): Promise<void>;
|
|
64
64
|
/**
|
|
65
|
-
* Loads a QualitySetting object (see {@link QualitySetting}).
|
|
65
|
+
* Loads a QualitySetting object (see {@link @roomle/web-sdk/common-core/src/dynamic-quality-setting-loader#QualitySetting}).
|
|
66
66
|
* @param qualitySetting
|
|
67
67
|
*/
|
|
68
68
|
loadQualitySetting(qualitySetting: QualitySetting): void;
|
|
@@ -37,12 +37,12 @@ export default class RoomleMaterialViewer implements GlobalAPI, Context, Externa
|
|
|
37
37
|
getMaterialShading(): RapiMaterialShading;
|
|
38
38
|
/**
|
|
39
39
|
* Loads a SceneSettings object, currently it can can contain a light setting definition
|
|
40
|
-
* (see {@link loadDynamicLightSetting}) and an environment definition (see {@link EnvironmentSetting}).
|
|
40
|
+
* (see {@link @roomle/web-sdk/configurator-core/src/roomle-configurator#RoomleConfigurator.loadDynamicLightSetting}) and an environment definition (see {@link @roomle/web-sdk/common-core/src/environment/dynamic-environment-setting-loader#EnvironmentSetting}).
|
|
41
41
|
* @param sceneSettings
|
|
42
42
|
*/
|
|
43
43
|
loadSceneSetting(sceneSettings: SceneSettings): Promise<void>;
|
|
44
44
|
/**
|
|
45
|
-
* Loads a QualitySetting object
|
|
45
|
+
* Loads a QualitySetting object.
|
|
46
46
|
* @param qualitySetting
|
|
47
47
|
*/
|
|
48
48
|
loadQualitySetting(qualitySetting: QualitySetting): void;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{p as dispose,_ as __decorate,i as inject,O as AsyncGuard,ai as AsyncDependencyLoader}from"./roomle-dependency-injection-8d66ecac.js";import"./main-thread-to-worker-88f74244.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){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{p as dispose,_ as __decorate,i as inject,O as AsyncGuard,ai as AsyncDependencyLoader}from"./roomle-dependency-injection-0464676f.js";import"./main-thread-to-worker-88f74244.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){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-be971abb.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dimensioning-helper-
|
|
1
|
+
{"version":3,"file":"dimensioning-helper-be971abb.js","sources":["../../packages/configurator-core/public/fonts/rubik_regular_sub.json"],"sourcesContent":["export default \"static/rubik_regular_sub-2dd2d5cca49018c5.json\""],"names":[],"mappings":"wuHAAe"}
|