@roomle/web-sdk 2.107.0 → 2.108.0-alpha.1

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.
Files changed (137) hide show
  1. package/lib/ConfiguratorKernel.wasm +0 -0
  2. package/lib/{PointLightHelper-BkdQaOKc.js → PointLightHelper-B8VP_55Z.js} +2 -2
  3. package/lib/{PointLightHelper-BkdQaOKc.js.map → PointLightHelper-B8VP_55Z.js.map} +1 -1
  4. package/lib/{PointLightHelper-qhWtXw8x.mjs → PointLightHelper-DtoZq5ME.mjs} +2 -2
  5. package/lib/{PointLightHelper-qhWtXw8x.mjs.map → PointLightHelper-DtoZq5ME.mjs.map} +1 -1
  6. package/lib/RoomleCore.js +6 -6
  7. package/lib/RoomleCore.wasm +0 -0
  8. package/lib/RoomleToolsCore.wasm +0 -0
  9. package/lib/{banana-for-scale-XjIfe69B.js → banana-for-scale-BVlDK4jg.js} +2 -2
  10. package/lib/{banana-for-scale-XjIfe69B.js.map → banana-for-scale-BVlDK4jg.js.map} +1 -1
  11. package/lib/{banana-for-scale-CDGM3hdN.mjs → banana-for-scale-CKSlc9Tc.mjs} +2 -2
  12. package/lib/{banana-for-scale-CDGM3hdN.mjs.map → banana-for-scale-CKSlc9Tc.mjs.map} +1 -1
  13. package/lib/camera-behaviour-CzgZxW1D.js +50 -0
  14. package/lib/camera-behaviour-CzgZxW1D.js.map +1 -0
  15. package/lib/{camera-behaviour-BLMduSEn.mjs → camera-behaviour-DWkBHxkk.mjs} +79 -75
  16. package/lib/camera-behaviour-DWkBHxkk.mjs.map +1 -0
  17. package/lib/{component-dimensioning-Do75G-kI.js → component-dimensioning-CUoDDxfk.js} +2 -2
  18. package/lib/{component-dimensioning-Do75G-kI.js.map → component-dimensioning-CUoDDxfk.js.map} +1 -1
  19. package/lib/{component-dimensioning-DvCO0pEp.mjs → component-dimensioning-CgVIP7Nu.mjs} +2 -2
  20. package/lib/{component-dimensioning-DvCO0pEp.mjs.map → component-dimensioning-CgVIP7Nu.mjs.map} +1 -1
  21. package/lib/{component-raycast-helper-Dl-pzfg_.js → component-raycast-helper-DvNtWlR5.js} +2 -2
  22. package/lib/{component-raycast-helper-Dl-pzfg_.js.map → component-raycast-helper-DvNtWlR5.js.map} +1 -1
  23. package/lib/{component-raycast-helper-CuZdUtrH.mjs → component-raycast-helper-zAwc-AuF.mjs} +2 -2
  24. package/lib/{component-raycast-helper-CuZdUtrH.mjs.map → component-raycast-helper-zAwc-AuF.mjs.map} +1 -1
  25. package/lib/{configurator-CT_ghGbX.mjs → configurator-DDhzCgxy.mjs} +6 -6
  26. package/lib/{configurator-CT_ghGbX.mjs.map → configurator-DDhzCgxy.mjs.map} +1 -1
  27. package/lib/{configurator-B01iJTNa.js → configurator-DJnpG8CG.js} +2 -2
  28. package/lib/{configurator-B01iJTNa.js.map → configurator-DJnpG8CG.js.map} +1 -1
  29. package/lib/configurator-scene-manager-Bxdyg2zz.js +2 -0
  30. package/lib/configurator-scene-manager-Bxdyg2zz.js.map +1 -0
  31. package/lib/{configurator-scene-manager-DbsYS4rm.mjs → configurator-scene-manager-DnZvFw0N.mjs} +150 -162
  32. package/lib/configurator-scene-manager-DnZvFw0N.mjs.map +1 -0
  33. package/lib/configurator.js +1 -1
  34. package/lib/configurator.nomodule.js +1 -1
  35. package/lib/{continuous-drawing-helper-DdnnCOqZ.js → continuous-drawing-helper-C6qDGAxa.js} +2 -2
  36. package/lib/{continuous-drawing-helper-DdnnCOqZ.js.map → continuous-drawing-helper-C6qDGAxa.js.map} +1 -1
  37. package/lib/{continuous-drawing-helper-DrpQFppG.mjs → continuous-drawing-helper-DbTM7uCv.mjs} +2 -2
  38. package/lib/{continuous-drawing-helper-DrpQFppG.mjs.map → continuous-drawing-helper-DbTM7uCv.mjs.map} +1 -1
  39. package/lib/{default-light-setting-D0Ie_AEw.mjs → default-light-setting-BdD0jDeP.mjs} +3 -3
  40. package/lib/{default-light-setting-D0Ie_AEw.mjs.map → default-light-setting-BdD0jDeP.mjs.map} +1 -1
  41. package/lib/{default-light-setting-DQxt3v5x.js → default-light-setting-CYiFuxeI.js} +2 -2
  42. package/lib/{default-light-setting-DQxt3v5x.js.map → default-light-setting-CYiFuxeI.js.map} +1 -1
  43. package/lib/definitions/common-core/src/light/light-source.d.ts +2 -0
  44. package/lib/definitions/common-core/src/utils/threejs-utils.d.ts +2 -1
  45. package/lib/definitions/common-core/src/webgl/roomle-component-factory.d.ts +1 -0
  46. package/lib/definitions/common-core/src/webgl/scene-manager.d.ts +1 -1
  47. package/lib/definitions/planner-core/src/lights/ceiling-light.d.ts +1 -1
  48. package/lib/definitions/planner-core/src/lights/light-group.d.ts +1 -2
  49. package/lib/definitions/planner-core/src/roomle-planner.d.ts +12 -6
  50. package/lib/definitions/planner-core/src/services/planner-kernel-access.d.ts +1 -1
  51. package/lib/definitions/planner-core/src/view-model/plan-view-model.d.ts +1 -4
  52. package/lib/definitions/planner-core/src/webgl/planner-scene-manager.d.ts +5 -1
  53. package/lib/{glb-viewer-BEWU9zxC.mjs → glb-viewer-BoZgMSrk.mjs} +6 -6
  54. package/lib/{glb-viewer-BEWU9zxC.mjs.map → glb-viewer-BoZgMSrk.mjs.map} +1 -1
  55. package/lib/{glb-viewer-camera-behaviour-Cl2bS83k.js → glb-viewer-camera-behaviour-AEWNZ6mR.js} +2 -2
  56. package/lib/{glb-viewer-camera-behaviour-Cl2bS83k.js.map → glb-viewer-camera-behaviour-AEWNZ6mR.js.map} +1 -1
  57. package/lib/{glb-viewer-camera-behaviour-DQ2sVbku.mjs → glb-viewer-camera-behaviour-CRnnMrL2.mjs} +2 -2
  58. package/lib/{glb-viewer-camera-behaviour-DQ2sVbku.mjs.map → glb-viewer-camera-behaviour-CRnnMrL2.mjs.map} +1 -1
  59. package/lib/{glb-viewer-6_OVDzVH.js → glb-viewer-vvpjnYPw.js} +2 -2
  60. package/lib/{glb-viewer-6_OVDzVH.js.map → glb-viewer-vvpjnYPw.js.map} +1 -1
  61. package/lib/glb-viewer.js +1 -1
  62. package/lib/glb-viewer.nomodule.js +1 -1
  63. package/lib/{imos-ix-poc-export-helper-r0pv9sOT.js → imos-ix-poc-export-helper-7AWayvID.js} +2 -2
  64. package/lib/{imos-ix-poc-export-helper-r0pv9sOT.js.map → imos-ix-poc-export-helper-7AWayvID.js.map} +1 -1
  65. package/lib/{imos-ix-poc-export-helper-BrpY0OHi.mjs → imos-ix-poc-export-helper-gQb0lbdn.mjs} +2 -2
  66. package/lib/{imos-ix-poc-export-helper-BrpY0OHi.mjs.map → imos-ix-poc-export-helper-gQb0lbdn.mjs.map} +1 -1
  67. package/lib/{main-05wLxbDZ.js → main-DVWEbQdM.js} +340 -149
  68. package/lib/{main-05wLxbDZ.js.map → main-DVWEbQdM.js.map} +1 -1
  69. package/lib/{main-CMu7hOEO.mjs → main-RpgY_kch.mjs} +2202 -1999
  70. package/lib/{main-CMu7hOEO.mjs.map → main-RpgY_kch.mjs.map} +1 -1
  71. package/lib/{material-viewer-B0MevA_r.mjs → material-viewer-DQjAOrWL.mjs} +4 -4
  72. package/lib/{material-viewer-B0MevA_r.mjs.map → material-viewer-DQjAOrWL.mjs.map} +1 -1
  73. package/lib/{material-viewer-CLqZXFrn.js → material-viewer-_9Sb1UCw.js} +2 -2
  74. package/lib/{material-viewer-CLqZXFrn.js.map → material-viewer-_9Sb1UCw.js.map} +1 -1
  75. package/lib/material-viewer.js +1 -1
  76. package/lib/material-viewer.nomodule.js +1 -1
  77. package/lib/planner-BcHlq0n3.js +155 -0
  78. package/lib/planner-BcHlq0n3.js.map +1 -0
  79. package/lib/{planner-B3Bt-cWy.mjs → planner-BilNNFJ0.mjs} +143 -125
  80. package/lib/planner-BilNNFJ0.mjs.map +1 -0
  81. package/lib/planner.js +1 -1
  82. package/lib/planner.nomodule.js +1 -1
  83. package/lib/roomle-sdk.js +7 -7
  84. package/lib/roomle-sdk.nomodule.js +1 -1
  85. package/lib/{script-loader-CZjzwkk2.js → script-loader-BZOMZ1AI.js} +2 -2
  86. package/lib/{script-loader-CZjzwkk2.js.map → script-loader-BZOMZ1AI.js.map} +1 -1
  87. package/lib/{script-loader-BzwDLtbS.mjs → script-loader-CHolkWhE.mjs} +2 -2
  88. package/lib/{script-loader-BzwDLtbS.mjs.map → script-loader-CHolkWhE.mjs.map} +1 -1
  89. package/lib/static/roomle-core-hsc/ConfiguratorKernel.wasm +0 -0
  90. package/lib/static/roomle-core-hsc/RoomleCore.js +6 -6
  91. package/lib/static/roomle-core-hsc/RoomleCore.wasm +0 -0
  92. package/lib/static/roomle-core-hsc/RoomleServiceCore.js +6 -6
  93. package/lib/static/roomle-core-hsc/RoomleServiceCore.wasm +0 -0
  94. package/lib/static/roomle-core-hsc/RoomleToolsCore.wasm +0 -0
  95. package/lib/static/roomle-core-hsc/configuratorCoreInterface.d.ts +2 -0
  96. package/lib/static/roomle-core-hsc/embind/configuratorCoreInterface.d.ts +2 -0
  97. package/lib/static/roomle-core-hsc/embind/plannerCoreCallback.d.ts +2 -2
  98. package/lib/static/roomle-core-hsc/embind/plannerCoreCallback.js +1 -1
  99. package/lib/static/roomle-core-hsc/embind/plannerCoreCallback.js.map +1 -1
  100. package/lib/static/roomle-core-hsc/embind/plannerCoreInterface.d.ts +17 -2
  101. package/lib/static/roomle-core-hsc/embind/plannerCoreInterface.js.map +1 -1
  102. package/lib/static/roomle-core-hsc/package.json +1 -1
  103. package/lib/static/roomle-core-hsc/plannerCoreCallback.d.ts +2 -2
  104. package/lib/static/roomle-core-hsc/plannerCoreCallback.js +1 -1
  105. package/lib/static/roomle-core-hsc/plannerCoreCallback.js.map +1 -1
  106. package/lib/static/roomle-core-hsc/plannerCoreInterface.d.ts +17 -2
  107. package/lib/static/roomle-core-hsc/plannerCoreInterface.js.map +1 -1
  108. package/lib/static/roomle-core-hsc/src/embind/configuratorCoreInterface.d.ts +2 -0
  109. package/lib/static/roomle-core-hsc/src/embind/plannerCoreCallback.d.ts +2 -2
  110. package/lib/static/roomle-core-hsc/src/embind/plannerCoreCallback.js +1 -1
  111. package/lib/static/roomle-core-hsc/src/embind/plannerCoreCallback.js.map +1 -1
  112. package/lib/static/roomle-core-hsc/src/embind/plannerCoreInterface.d.ts +17 -2
  113. package/lib/static/roomle-core-hsc/src/embind/plannerCoreInterface.js.map +1 -1
  114. package/lib/static/roomle-core-hsc/wasm_modern/ConfiguratorKernel.wasm +0 -0
  115. package/lib/static/roomle-core-hsc/wasm_modern/RoomleCore.js +6 -6
  116. package/lib/static/roomle-core-hsc/wasm_modern/RoomleCore.wasm +0 -0
  117. package/lib/static/roomle-core-hsc/wasm_modern/RoomleServiceCore.js +6 -6
  118. package/lib/static/roomle-core-hsc/wasm_modern/RoomleServiceCore.wasm +0 -0
  119. package/lib/static/roomle-core-hsc/wasm_modern/RoomleToolsCore.wasm +0 -0
  120. package/lib/{stats-helper-BaTpWjzi.mjs → stats-helper-BFpxduid.mjs} +2 -2
  121. package/lib/{stats-helper-BaTpWjzi.mjs.map → stats-helper-BFpxduid.mjs.map} +1 -1
  122. package/lib/{stats-helper-DylhlHS_.js → stats-helper-D4z7zVEi.js} +2 -2
  123. package/lib/{stats-helper-DylhlHS_.js.map → stats-helper-D4z7zVEi.js.map} +1 -1
  124. package/lib/{tools-core-BF9kMznR.js → tools-core-BJbLUz5-.js} +2 -2
  125. package/lib/{tools-core-BF9kMznR.js.map → tools-core-BJbLUz5-.js.map} +1 -1
  126. package/lib/{tools-core-BbL-KMAf.mjs → tools-core-COGP-hBi.mjs} +3 -3
  127. package/lib/{tools-core-BbL-KMAf.mjs.map → tools-core-COGP-hBi.mjs.map} +1 -1
  128. package/package.json +1 -1
  129. package/lib/camera-behaviour-BLMduSEn.mjs.map +0 -1
  130. package/lib/camera-behaviour-DgLVg_pP.js +0 -50
  131. package/lib/camera-behaviour-DgLVg_pP.js.map +0 -1
  132. package/lib/configurator-scene-manager-CRSHxOfd.js +0 -2
  133. package/lib/configurator-scene-manager-CRSHxOfd.js.map +0 -1
  134. package/lib/configurator-scene-manager-DbsYS4rm.mjs.map +0 -1
  135. package/lib/planner-B3Bt-cWy.mjs.map +0 -1
  136. package/lib/planner-D7lLZxgW.js +0 -155
  137. package/lib/planner-D7lLZxgW.js.map +0 -1
@@ -1,4 +1,4 @@
1
- import { Configurator as l } from "./configurator-CT_ghGbX.mjs";
1
+ import { Configurator as l } from "./configurator-DDhzCgxy.mjs";
2
2
  const t = new l();
3
3
  t.boot();
4
4
  window.requestIdleCallback || (window.requestIdleCallback = (e) => setTimeout(() => {
@@ -1,2 +1,2 @@
1
- System.register(["./configurator-B01iJTNa.js"],function(a,r){"use strict";var t;return{setters:[n=>{t=n.Configurator}],execute:function(){new t().boot(),window.requestIdleCallback||(window.requestIdleCallback=e=>setTimeout(()=>{let o=Date.now();e({didTimeout:!1,timeRemaining(){return Math.max(0,50-(Date.now()-o))}})},1)),window.cancelIdleCallback||(window.cancelIdleCallback=window.cancelIdleCallback||function(e){clearTimeout(e)})}}});
1
+ System.register(["./configurator-DJnpG8CG.js"],function(a,r){"use strict";var t;return{setters:[n=>{t=n.Configurator}],execute:function(){new t().boot(),window.requestIdleCallback||(window.requestIdleCallback=e=>setTimeout(()=>{let o=Date.now();e({didTimeout:!1,timeRemaining(){return Math.max(0,50-(Date.now()-o))}})},1)),window.cancelIdleCallback||(window.cancelIdleCallback=window.cancelIdleCallback||function(e){clearTimeout(e)})}}});
2
2
  //# sourceMappingURL=configurator.nomodule.js.map
@@ -1,2 +1,2 @@
1
- System.register(["./main-05wLxbDZ.js"],function(h,l){"use strict";var s,n,c,o,a;return{setters:[e=>{s=e.aa,n=e.M,c=e.m,o=e.q,a=e.v}],execute:function(){class e{constructor(){this._currentInnerRadius=0}init(i,t,r){this._drawingGroup=i,this._continuousDrawingManager=t,this._kernelZoomFactor=r,this.update()}update(){this._initCircle(),this._updateCircle()}_initCircle(){if(this._circleMesh)return;const i=70/this._kernelZoomFactor/1e3,t=i+i/50,r=new s(i,t,32),u=new n({color:10066329,side:c});this._circleMesh=new o(r,u),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 i=70/this._kernelZoomFactor/1e3;if(i!==this._currentInnerRadius){const r=i+i/50;this._circleMesh.geometry=new s(i,r,32)}const t=a(this._continuousDrawingManager.getStartPoint());t.y=5,this._circleMesh.position.copy(t),this._circleMesh.visible=this._continuousDrawingManager.shouldShowCircle(),this._currentInnerRadius=i}setKernelZoomFactor(i){this._kernelZoomFactor=i}endDrawing(){this._drawingGroup.remove(this._circleMesh),this._circleMesh=null}}h("default",e)}}});
2
- //# sourceMappingURL=continuous-drawing-helper-DdnnCOqZ.js.map
1
+ System.register(["./main-DVWEbQdM.js"],function(h,l){"use strict";var s,n,c,o,a;return{setters:[e=>{s=e.aa,n=e.M,c=e.m,o=e.q,a=e.v}],execute:function(){class e{constructor(){this._currentInnerRadius=0}init(i,t,r){this._drawingGroup=i,this._continuousDrawingManager=t,this._kernelZoomFactor=r,this.update()}update(){this._initCircle(),this._updateCircle()}_initCircle(){if(this._circleMesh)return;const i=70/this._kernelZoomFactor/1e3,t=i+i/50,r=new s(i,t,32),u=new n({color:10066329,side:c});this._circleMesh=new o(r,u),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 i=70/this._kernelZoomFactor/1e3;if(i!==this._currentInnerRadius){const r=i+i/50;this._circleMesh.geometry=new s(i,r,32)}const t=a(this._continuousDrawingManager.getStartPoint());t.y=5,this._circleMesh.position.copy(t),this._circleMesh.visible=this._continuousDrawingManager.shouldShowCircle(),this._currentInnerRadius=i}setKernelZoomFactor(i){this._kernelZoomFactor=i}endDrawing(){this._drawingGroup.remove(this._circleMesh),this._circleMesh=null}}h("default",e)}}});
2
+ //# sourceMappingURL=continuous-drawing-helper-C6qDGAxa.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"continuous-drawing-helper-DdnnCOqZ.js","sources":["../../packages/planner-core/src/webgl/continuous-drawing-helper.ts"],"sourcesContent":["import type { ContinuousDrawingManager } from '../../../typings/planner';\nimport { convertToTHREE } from '../../../common-core/src/utils/kernel-utils';\nimport type { Group } from 'three';\nimport { DoubleSide, Mesh, MeshBasicMaterial, RingGeometry } from 'three';\n\nexport default class ContinuousDrawingHelper {\n private _drawingGroup: Group;\n private _continuousDrawingManager: ContinuousDrawingManager;\n\n private _circleMesh: Mesh;\n\n private _kernelZoomFactor: number;\n\n private _currentInnerRadius: number = 0;\n\n init(\n drawingGroup: Group,\n continuousDrawingManager: ContinuousDrawingManager,\n kernelZoomFactor: number\n ) {\n this._drawingGroup = drawingGroup;\n this._continuousDrawingManager = continuousDrawingManager;\n this._kernelZoomFactor = kernelZoomFactor;\n this.update();\n }\n\n public update() {\n this._initCircle();\n this._updateCircle();\n }\n\n private _initCircle() {\n if (this._circleMesh) {\n return;\n }\n\n const innerRadius = 70 / this._kernelZoomFactor / 1000;\n const outerRadius = innerRadius + innerRadius / 50;\n\n const innerRingGeometry = new RingGeometry(innerRadius, outerRadius, 32);\n const innerRingMaterial = new MeshBasicMaterial({\n color: 0x999999,\n side: DoubleSide,\n });\n this._circleMesh = new Mesh(innerRingGeometry, innerRingMaterial);\n this._circleMesh.name = 'Circle';\n this._circleMesh.rotation.set(Math.PI / 2, 0, 0);\n this._circleMesh.visible =\n this._continuousDrawingManager.shouldShowCircle();\n\n this._drawingGroup.add(this._circleMesh);\n }\n\n private _updateCircle() {\n if (!this._circleMesh) {\n return;\n }\n\n const innerRadius = 70 / this._kernelZoomFactor / 1000;\n if (innerRadius !== this._currentInnerRadius) {\n const outerRadius = innerRadius + innerRadius / 50;\n\n this._circleMesh.geometry = new RingGeometry(\n innerRadius,\n outerRadius,\n 32\n );\n }\n\n const position = convertToTHREE(\n this._continuousDrawingManager.getStartPoint()\n );\n position.y = 5;\n\n this._circleMesh.position.copy(position);\n this._circleMesh.visible =\n this._continuousDrawingManager.shouldShowCircle();\n\n this._currentInnerRadius = innerRadius;\n }\n\n public setKernelZoomFactor(kernelZoomFactor: number) {\n this._kernelZoomFactor = kernelZoomFactor;\n }\n\n public endDrawing() {\n this._drawingGroup.remove(this._circleMesh);\n this._circleMesh = null;\n }\n}\n"],"names":["ContinuousDrawingHelper","drawingGroup","continuousDrawingManager","kernelZoomFactor","innerRadius","outerRadius","innerRingGeometry","RingGeometry","innerRingMaterial","MeshBasicMaterial","DoubleSide","Mesh","position","convertToTHREE","exports"],"mappings":"wJAKA,MAAqBA,CAAwB,CAA7C,aAAA,CAQE,KAAQ,oBAA8B,CAAA,CAEtC,KACEC,EACAC,EACAC,EACA,CACA,KAAK,cAAgBF,EACrB,KAAK,0BAA4BC,EACjC,KAAK,kBAAoBC,EACzB,KAAK,OAAA,CACP,CAEO,QAAS,CACd,KAAK,YAAA,EACL,KAAK,cAAA,CACP,CAEQ,aAAc,CACpB,GAAI,KAAK,YACP,OAGF,MAAMC,EAAc,GAAK,KAAK,kBAAoB,IAC5CC,EAAcD,EAAcA,EAAc,GAE1CE,EAAoB,IAAIC,EAAaH,EAAaC,EAAa,EAAE,EACjEG,EAAoB,IAAIC,EAAkB,CAC9C,MAAO,SACP,KAAMC,CAAA,CACP,EACD,KAAK,YAAc,IAAIC,EAAKL,EAAmBE,CAAiB,EAChE,KAAK,YAAY,KAAO,SACxB,KAAK,YAAY,SAAS,IAAI,KAAK,GAAK,EAAG,EAAG,CAAC,EAC/C,KAAK,YAAY,QACf,KAAK,0BAA0B,iBAAA,EAEjC,KAAK,cAAc,IAAI,KAAK,WAAW,CACzC,CAEQ,eAAgB,CACtB,GAAI,CAAC,KAAK,YACR,OAGF,MAAMJ,EAAc,GAAK,KAAK,kBAAoB,IAClD,GAAIA,IAAgB,KAAK,oBAAqB,CAC5C,MAAMC,EAAcD,EAAcA,EAAc,GAEhD,KAAK,YAAY,SAAW,IAAIG,EAC9BH,EACAC,EACA,EAAA,CAEJ,CAEA,MAAMO,EAAWC,EACf,KAAK,0BAA0B,cAAA,CAAc,EAE/CD,EAAS,EAAI,EAEb,KAAK,YAAY,SAAS,KAAKA,CAAQ,EACvC,KAAK,YAAY,QACf,KAAK,0BAA0B,iBAAA,EAEjC,KAAK,oBAAsBR,CAC7B,CAEO,oBAAoBD,EAA0B,CACnD,KAAK,kBAAoBA,CAC3B,CAEO,YAAa,CAClB,KAAK,cAAc,OAAO,KAAK,WAAW,EAC1C,KAAK,YAAc,IACrB,CACF,CAAAW,EAAA,UAAAd,CAAA"}
1
+ {"version":3,"file":"continuous-drawing-helper-C6qDGAxa.js","sources":["../../packages/planner-core/src/webgl/continuous-drawing-helper.ts"],"sourcesContent":["import type { ContinuousDrawingManager } from '../../../typings/planner';\nimport { convertToTHREE } from '../../../common-core/src/utils/kernel-utils';\nimport type { Group } from 'three';\nimport { DoubleSide, Mesh, MeshBasicMaterial, RingGeometry } from 'three';\n\nexport default class ContinuousDrawingHelper {\n private _drawingGroup: Group;\n private _continuousDrawingManager: ContinuousDrawingManager;\n\n private _circleMesh: Mesh;\n\n private _kernelZoomFactor: number;\n\n private _currentInnerRadius: number = 0;\n\n init(\n drawingGroup: Group,\n continuousDrawingManager: ContinuousDrawingManager,\n kernelZoomFactor: number\n ) {\n this._drawingGroup = drawingGroup;\n this._continuousDrawingManager = continuousDrawingManager;\n this._kernelZoomFactor = kernelZoomFactor;\n this.update();\n }\n\n public update() {\n this._initCircle();\n this._updateCircle();\n }\n\n private _initCircle() {\n if (this._circleMesh) {\n return;\n }\n\n const innerRadius = 70 / this._kernelZoomFactor / 1000;\n const outerRadius = innerRadius + innerRadius / 50;\n\n const innerRingGeometry = new RingGeometry(innerRadius, outerRadius, 32);\n const innerRingMaterial = new MeshBasicMaterial({\n color: 0x999999,\n side: DoubleSide,\n });\n this._circleMesh = new Mesh(innerRingGeometry, innerRingMaterial);\n this._circleMesh.name = 'Circle';\n this._circleMesh.rotation.set(Math.PI / 2, 0, 0);\n this._circleMesh.visible =\n this._continuousDrawingManager.shouldShowCircle();\n\n this._drawingGroup.add(this._circleMesh);\n }\n\n private _updateCircle() {\n if (!this._circleMesh) {\n return;\n }\n\n const innerRadius = 70 / this._kernelZoomFactor / 1000;\n if (innerRadius !== this._currentInnerRadius) {\n const outerRadius = innerRadius + innerRadius / 50;\n\n this._circleMesh.geometry = new RingGeometry(\n innerRadius,\n outerRadius,\n 32\n );\n }\n\n const position = convertToTHREE(\n this._continuousDrawingManager.getStartPoint()\n );\n position.y = 5;\n\n this._circleMesh.position.copy(position);\n this._circleMesh.visible =\n this._continuousDrawingManager.shouldShowCircle();\n\n this._currentInnerRadius = innerRadius;\n }\n\n public setKernelZoomFactor(kernelZoomFactor: number) {\n this._kernelZoomFactor = kernelZoomFactor;\n }\n\n public endDrawing() {\n this._drawingGroup.remove(this._circleMesh);\n this._circleMesh = null;\n }\n}\n"],"names":["ContinuousDrawingHelper","drawingGroup","continuousDrawingManager","kernelZoomFactor","innerRadius","outerRadius","innerRingGeometry","RingGeometry","innerRingMaterial","MeshBasicMaterial","DoubleSide","Mesh","position","convertToTHREE","exports"],"mappings":"wJAKA,MAAqBA,CAAwB,CAA7C,aAAA,CAQE,KAAQ,oBAA8B,CAAA,CAEtC,KACEC,EACAC,EACAC,EACA,CACA,KAAK,cAAgBF,EACrB,KAAK,0BAA4BC,EACjC,KAAK,kBAAoBC,EACzB,KAAK,OAAA,CACP,CAEO,QAAS,CACd,KAAK,YAAA,EACL,KAAK,cAAA,CACP,CAEQ,aAAc,CACpB,GAAI,KAAK,YACP,OAGF,MAAMC,EAAc,GAAK,KAAK,kBAAoB,IAC5CC,EAAcD,EAAcA,EAAc,GAE1CE,EAAoB,IAAIC,EAAaH,EAAaC,EAAa,EAAE,EACjEG,EAAoB,IAAIC,EAAkB,CAC9C,MAAO,SACP,KAAMC,CAAA,CACP,EACD,KAAK,YAAc,IAAIC,EAAKL,EAAmBE,CAAiB,EAChE,KAAK,YAAY,KAAO,SACxB,KAAK,YAAY,SAAS,IAAI,KAAK,GAAK,EAAG,EAAG,CAAC,EAC/C,KAAK,YAAY,QACf,KAAK,0BAA0B,iBAAA,EAEjC,KAAK,cAAc,IAAI,KAAK,WAAW,CACzC,CAEQ,eAAgB,CACtB,GAAI,CAAC,KAAK,YACR,OAGF,MAAMJ,EAAc,GAAK,KAAK,kBAAoB,IAClD,GAAIA,IAAgB,KAAK,oBAAqB,CAC5C,MAAMC,EAAcD,EAAcA,EAAc,GAEhD,KAAK,YAAY,SAAW,IAAIG,EAC9BH,EACAC,EACA,EAAA,CAEJ,CAEA,MAAMO,EAAWC,EACf,KAAK,0BAA0B,cAAA,CAAc,EAE/CD,EAAS,EAAI,EAEb,KAAK,YAAY,SAAS,KAAKA,CAAQ,EACvC,KAAK,YAAY,QACf,KAAK,0BAA0B,iBAAA,EAEjC,KAAK,oBAAsBR,CAC7B,CAEO,oBAAoBD,EAA0B,CACnD,KAAK,kBAAoBA,CAC3B,CAEO,YAAa,CAClB,KAAK,cAAc,OAAO,KAAK,WAAW,EAC1C,KAAK,YAAc,IACrB,CACF,CAAAW,EAAA,UAAAd,CAAA"}
@@ -1,4 +1,4 @@
1
- import { aa as s, M as n, m as o, q as c, v as a } from "./main-CMu7hOEO.mjs";
1
+ import { aa as s, M as n, m as o, q as c, v as a } from "./main-RpgY_kch.mjs";
2
2
  class u {
3
3
  constructor() {
4
4
  this._currentInnerRadius = 0;
@@ -45,4 +45,4 @@ class u {
45
45
  export {
46
46
  u as default
47
47
  };
48
- //# sourceMappingURL=continuous-drawing-helper-DrpQFppG.mjs.map
48
+ //# sourceMappingURL=continuous-drawing-helper-DbTM7uCv.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"continuous-drawing-helper-DrpQFppG.mjs","sources":["../../packages/planner-core/src/webgl/continuous-drawing-helper.ts"],"sourcesContent":["import type { ContinuousDrawingManager } from '../../../typings/planner';\nimport { convertToTHREE } from '../../../common-core/src/utils/kernel-utils';\nimport type { Group } from 'three';\nimport { DoubleSide, Mesh, MeshBasicMaterial, RingGeometry } from 'three';\n\nexport default class ContinuousDrawingHelper {\n private _drawingGroup: Group;\n private _continuousDrawingManager: ContinuousDrawingManager;\n\n private _circleMesh: Mesh;\n\n private _kernelZoomFactor: number;\n\n private _currentInnerRadius: number = 0;\n\n init(\n drawingGroup: Group,\n continuousDrawingManager: ContinuousDrawingManager,\n kernelZoomFactor: number\n ) {\n this._drawingGroup = drawingGroup;\n this._continuousDrawingManager = continuousDrawingManager;\n this._kernelZoomFactor = kernelZoomFactor;\n this.update();\n }\n\n public update() {\n this._initCircle();\n this._updateCircle();\n }\n\n private _initCircle() {\n if (this._circleMesh) {\n return;\n }\n\n const innerRadius = 70 / this._kernelZoomFactor / 1000;\n const outerRadius = innerRadius + innerRadius / 50;\n\n const innerRingGeometry = new RingGeometry(innerRadius, outerRadius, 32);\n const innerRingMaterial = new MeshBasicMaterial({\n color: 0x999999,\n side: DoubleSide,\n });\n this._circleMesh = new Mesh(innerRingGeometry, innerRingMaterial);\n this._circleMesh.name = 'Circle';\n this._circleMesh.rotation.set(Math.PI / 2, 0, 0);\n this._circleMesh.visible =\n this._continuousDrawingManager.shouldShowCircle();\n\n this._drawingGroup.add(this._circleMesh);\n }\n\n private _updateCircle() {\n if (!this._circleMesh) {\n return;\n }\n\n const innerRadius = 70 / this._kernelZoomFactor / 1000;\n if (innerRadius !== this._currentInnerRadius) {\n const outerRadius = innerRadius + innerRadius / 50;\n\n this._circleMesh.geometry = new RingGeometry(\n innerRadius,\n outerRadius,\n 32\n );\n }\n\n const position = convertToTHREE(\n this._continuousDrawingManager.getStartPoint()\n );\n position.y = 5;\n\n this._circleMesh.position.copy(position);\n this._circleMesh.visible =\n this._continuousDrawingManager.shouldShowCircle();\n\n this._currentInnerRadius = innerRadius;\n }\n\n public setKernelZoomFactor(kernelZoomFactor: number) {\n this._kernelZoomFactor = kernelZoomFactor;\n }\n\n public endDrawing() {\n this._drawingGroup.remove(this._circleMesh);\n this._circleMesh = null;\n }\n}\n"],"names":["ContinuousDrawingHelper","drawingGroup","continuousDrawingManager","kernelZoomFactor","innerRadius","outerRadius","innerRingGeometry","RingGeometry","innerRingMaterial","MeshBasicMaterial","DoubleSide","Mesh","position","convertToTHREE"],"mappings":";AAKA,MAAqBA,EAAwB;AAAA,EAA7C,cAAA;AAQE,SAAQ,sBAA8B;AAAA,EAAA;AAAA,EAEtC,KACEC,GACAC,GACAC,GACA;AACA,SAAK,gBAAgBF,GACrB,KAAK,4BAA4BC,GACjC,KAAK,oBAAoBC,GACzB,KAAK,OAAA;AAAA,EACP;AAAA,EAEO,SAAS;AACd,SAAK,YAAA,GACL,KAAK,cAAA;AAAA,EACP;AAAA,EAEQ,cAAc;AACpB,QAAI,KAAK;AACP;AAGF,UAAMC,IAAc,KAAK,KAAK,oBAAoB,KAC5CC,IAAcD,IAAcA,IAAc,IAE1CE,IAAoB,IAAIC,EAAaH,GAAaC,GAAa,EAAE,GACjEG,IAAoB,IAAIC,EAAkB;AAAA,MAC9C,OAAO;AAAA,MACP,MAAMC;AAAA,IAAA,CACP;AACD,SAAK,cAAc,IAAIC,EAAKL,GAAmBE,CAAiB,GAChE,KAAK,YAAY,OAAO,UACxB,KAAK,YAAY,SAAS,IAAI,KAAK,KAAK,GAAG,GAAG,CAAC,GAC/C,KAAK,YAAY,UACf,KAAK,0BAA0B,iBAAA,GAEjC,KAAK,cAAc,IAAI,KAAK,WAAW;AAAA,EACzC;AAAA,EAEQ,gBAAgB;AACtB,QAAI,CAAC,KAAK;AACR;AAGF,UAAMJ,IAAc,KAAK,KAAK,oBAAoB;AAClD,QAAIA,MAAgB,KAAK,qBAAqB;AAC5C,YAAMC,IAAcD,IAAcA,IAAc;AAEhD,WAAK,YAAY,WAAW,IAAIG;AAAA,QAC9BH;AAAA,QACAC;AAAA,QACA;AAAA,MAAA;AAAA,IAEJ;AAEA,UAAMO,IAAWC;AAAA,MACf,KAAK,0BAA0B,cAAA;AAAA,IAAc;AAE/C,IAAAD,EAAS,IAAI,GAEb,KAAK,YAAY,SAAS,KAAKA,CAAQ,GACvC,KAAK,YAAY,UACf,KAAK,0BAA0B,iBAAA,GAEjC,KAAK,sBAAsBR;AAAA,EAC7B;AAAA,EAEO,oBAAoBD,GAA0B;AACnD,SAAK,oBAAoBA;AAAA,EAC3B;AAAA,EAEO,aAAa;AAClB,SAAK,cAAc,OAAO,KAAK,WAAW,GAC1C,KAAK,cAAc;AAAA,EACrB;AACF;"}
1
+ {"version":3,"file":"continuous-drawing-helper-DbTM7uCv.mjs","sources":["../../packages/planner-core/src/webgl/continuous-drawing-helper.ts"],"sourcesContent":["import type { ContinuousDrawingManager } from '../../../typings/planner';\nimport { convertToTHREE } from '../../../common-core/src/utils/kernel-utils';\nimport type { Group } from 'three';\nimport { DoubleSide, Mesh, MeshBasicMaterial, RingGeometry } from 'three';\n\nexport default class ContinuousDrawingHelper {\n private _drawingGroup: Group;\n private _continuousDrawingManager: ContinuousDrawingManager;\n\n private _circleMesh: Mesh;\n\n private _kernelZoomFactor: number;\n\n private _currentInnerRadius: number = 0;\n\n init(\n drawingGroup: Group,\n continuousDrawingManager: ContinuousDrawingManager,\n kernelZoomFactor: number\n ) {\n this._drawingGroup = drawingGroup;\n this._continuousDrawingManager = continuousDrawingManager;\n this._kernelZoomFactor = kernelZoomFactor;\n this.update();\n }\n\n public update() {\n this._initCircle();\n this._updateCircle();\n }\n\n private _initCircle() {\n if (this._circleMesh) {\n return;\n }\n\n const innerRadius = 70 / this._kernelZoomFactor / 1000;\n const outerRadius = innerRadius + innerRadius / 50;\n\n const innerRingGeometry = new RingGeometry(innerRadius, outerRadius, 32);\n const innerRingMaterial = new MeshBasicMaterial({\n color: 0x999999,\n side: DoubleSide,\n });\n this._circleMesh = new Mesh(innerRingGeometry, innerRingMaterial);\n this._circleMesh.name = 'Circle';\n this._circleMesh.rotation.set(Math.PI / 2, 0, 0);\n this._circleMesh.visible =\n this._continuousDrawingManager.shouldShowCircle();\n\n this._drawingGroup.add(this._circleMesh);\n }\n\n private _updateCircle() {\n if (!this._circleMesh) {\n return;\n }\n\n const innerRadius = 70 / this._kernelZoomFactor / 1000;\n if (innerRadius !== this._currentInnerRadius) {\n const outerRadius = innerRadius + innerRadius / 50;\n\n this._circleMesh.geometry = new RingGeometry(\n innerRadius,\n outerRadius,\n 32\n );\n }\n\n const position = convertToTHREE(\n this._continuousDrawingManager.getStartPoint()\n );\n position.y = 5;\n\n this._circleMesh.position.copy(position);\n this._circleMesh.visible =\n this._continuousDrawingManager.shouldShowCircle();\n\n this._currentInnerRadius = innerRadius;\n }\n\n public setKernelZoomFactor(kernelZoomFactor: number) {\n this._kernelZoomFactor = kernelZoomFactor;\n }\n\n public endDrawing() {\n this._drawingGroup.remove(this._circleMesh);\n this._circleMesh = null;\n }\n}\n"],"names":["ContinuousDrawingHelper","drawingGroup","continuousDrawingManager","kernelZoomFactor","innerRadius","outerRadius","innerRingGeometry","RingGeometry","innerRingMaterial","MeshBasicMaterial","DoubleSide","Mesh","position","convertToTHREE"],"mappings":";AAKA,MAAqBA,EAAwB;AAAA,EAA7C,cAAA;AAQE,SAAQ,sBAA8B;AAAA,EAAA;AAAA,EAEtC,KACEC,GACAC,GACAC,GACA;AACA,SAAK,gBAAgBF,GACrB,KAAK,4BAA4BC,GACjC,KAAK,oBAAoBC,GACzB,KAAK,OAAA;AAAA,EACP;AAAA,EAEO,SAAS;AACd,SAAK,YAAA,GACL,KAAK,cAAA;AAAA,EACP;AAAA,EAEQ,cAAc;AACpB,QAAI,KAAK;AACP;AAGF,UAAMC,IAAc,KAAK,KAAK,oBAAoB,KAC5CC,IAAcD,IAAcA,IAAc,IAE1CE,IAAoB,IAAIC,EAAaH,GAAaC,GAAa,EAAE,GACjEG,IAAoB,IAAIC,EAAkB;AAAA,MAC9C,OAAO;AAAA,MACP,MAAMC;AAAA,IAAA,CACP;AACD,SAAK,cAAc,IAAIC,EAAKL,GAAmBE,CAAiB,GAChE,KAAK,YAAY,OAAO,UACxB,KAAK,YAAY,SAAS,IAAI,KAAK,KAAK,GAAG,GAAG,CAAC,GAC/C,KAAK,YAAY,UACf,KAAK,0BAA0B,iBAAA,GAEjC,KAAK,cAAc,IAAI,KAAK,WAAW;AAAA,EACzC;AAAA,EAEQ,gBAAgB;AACtB,QAAI,CAAC,KAAK;AACR;AAGF,UAAMJ,IAAc,KAAK,KAAK,oBAAoB;AAClD,QAAIA,MAAgB,KAAK,qBAAqB;AAC5C,YAAMC,IAAcD,IAAcA,IAAc;AAEhD,WAAK,YAAY,WAAW,IAAIG;AAAA,QAC9BH;AAAA,QACAC;AAAA,QACA;AAAA,MAAA;AAAA,IAEJ;AAEA,UAAMO,IAAWC;AAAA,MACf,KAAK,0BAA0B,cAAA;AAAA,IAAc;AAE/C,IAAAD,EAAS,IAAI,GAEb,KAAK,YAAY,SAAS,KAAKA,CAAQ,GACvC,KAAK,YAAY,UACf,KAAK,0BAA0B,iBAAA,GAEjC,KAAK,sBAAsBR;AAAA,EAC7B;AAAA,EAEO,oBAAoBD,GAA0B;AACnD,SAAK,oBAAoBA;AAAA,EAC3B;AAAA,EAEO,aAAa;AAClB,SAAK,cAAc,OAAO,KAAK,WAAW,GAC1C,KAAK,cAAc;AAAA,EACrB;AACF;"}
@@ -1,5 +1,5 @@
1
- import { L as c } from "./camera-behaviour-BLMduSEn.mjs";
2
- import { an as h, $ as o, H as s, ao as r, V as a, _ as m, a0 as d } from "./main-CMu7hOEO.mjs";
1
+ import { L as c } from "./camera-behaviour-DWkBHxkk.mjs";
2
+ import { an as h, $ as o, H as s, ao as r, V as a, _ as m, a0 as d } from "./main-RpgY_kch.mjs";
3
3
  class _ extends c {
4
4
  constructor(e, i) {
5
5
  super(e, i), this._params = {
@@ -99,4 +99,4 @@ class _ extends c {
99
99
  export {
100
100
  _ as D
101
101
  };
102
- //# sourceMappingURL=default-light-setting-D0Ie_AEw.mjs.map
102
+ //# sourceMappingURL=default-light-setting-BdD0jDeP.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"default-light-setting-D0Ie_AEw.mjs","sources":["../../packages/configurator-core/src/webgl/lightsetting/default-light-setting.ts"],"sourcesContent":["import LightSetting from '../../../../common-core/src/lightsetting/light-setting';\nimport { LAYER } from '../../../../common-core/src/webgl/layer';\nimport { getGUI } from '../../../../common-core/src/utils/threejs-utils';\nimport type { Box3, ColorRepresentation, Scene } from 'three';\nimport { AmbientLight, Color, DirectionalLight, Vector2, Vector3 } from 'three';\n\nexport default class DefaultLightSetting extends LightSetting {\n private _ambientLight: AmbientLight;\n private _mainDirectionalLight: DirectionalLight;\n private _secondDirectionalLight: DirectionalLight;\n\n private _params = {\n ambientLight: {\n color: '#ffffff',\n },\n mainDirLight: {\n position: {\n x: -3,\n y: 4,\n z: 4,\n },\n color: '#ffffff',\n },\n secondDirLight: {\n position: {\n x: 3,\n y: 4,\n z: 3,\n },\n color: '#ffffff',\n },\n };\n\n constructor(scene: Scene, oldLightSetting?: LightSetting) {\n super(scene, oldLightSetting);\n\n this._mainDirectionalLight = new DirectionalLight(\n new Color(this._params.mainDirLight.color as ColorRepresentation),\n 0.8\n );\n this._mainDirectionalLight.position.set(\n this._params.mainDirLight.position.x,\n this._params.mainDirLight.position.y,\n this._params.mainDirLight.position.z\n );\n this._mainDirectionalLight.layers.set(LAYER.LIGHTING);\n this._mainDirectionalLight.castShadow = true;\n this._mainDirectionalLight.shadow.camera.near = 0.1;\n this._mainDirectionalLight.shadow.camera.far = 100;\n this._mainDirectionalLight.shadow.mapSize = new Vector2(1024, 1024);\n this._mainDirectionalLight.visible = true;\n this._mainDirectionalLight.lookAt(new Vector3(0, 0, 0));\n this._secondDirectionalLight = new DirectionalLight(\n new Color(this._params.secondDirLight.color as ColorRepresentation),\n\n 0.2\n );\n this._secondDirectionalLight.position.set(\n this._params.secondDirLight.position.x,\n this._params.secondDirLight.position.y,\n this._params.secondDirLight.position.z\n );\n this._secondDirectionalLight.layers.set(LAYER.LIGHTING);\n this._secondDirectionalLight.castShadow = false;\n this._secondDirectionalLight.shadow.camera.near = 0.1;\n this._secondDirectionalLight.shadow.camera.far = 100;\n this._secondDirectionalLight.shadow.mapSize = new Vector2(1024, 1024);\n this._secondDirectionalLight.visible = true;\n this._secondDirectionalLight.lookAt(new Vector3(0, 0, 0));\n this._ambientLight = new AmbientLight(\n new Color(this._params.ambientLight.color as ColorRepresentation),\n 0.5\n );\n this._ambientLight.layers.set(LAYER.LIGHTING);\n\n this.addToScene();\n }\n\n public needsBounds(): boolean {\n return true;\n }\n\n public updateBounds(bounds: Box3) {\n const size = bounds.getSize(new Vector3());\n const maxSize = Math.max(Math.max(size.x, size.y), size.z) + 1;\n const halfSize = maxSize / 2;\n this._mainDirectionalLight.shadow.camera.top = halfSize;\n this._mainDirectionalLight.shadow.camera.bottom = -halfSize;\n this._mainDirectionalLight.shadow.camera.left = -halfSize;\n this._mainDirectionalLight.shadow.camera.right = halfSize;\n this._mainDirectionalLight.shadow.camera.near = 0.01;\n this._mainDirectionalLight.shadow.camera.far = 4 * maxSize;\n this._mainDirectionalLight.shadow.camera.updateProjectionMatrix();\n\n this._secondDirectionalLight.shadow.camera.top = halfSize;\n this._secondDirectionalLight.shadow.camera.bottom = -halfSize;\n this._secondDirectionalLight.shadow.camera.left = -halfSize;\n this._secondDirectionalLight.shadow.camera.right = halfSize;\n this._secondDirectionalLight.shadow.camera.near = 0.01;\n this._secondDirectionalLight.shadow.camera.far = 4 * maxSize;\n this._secondDirectionalLight.shadow.camera.updateProjectionMatrix();\n }\n\n public addToScene(): void {\n this._scene.add(this._mainDirectionalLight);\n this._scene.add(this._secondDirectionalLight);\n this._scene.add(this._ambientLight);\n }\n\n public removeFromScene(): void {\n this._scene.remove(this._mainDirectionalLight);\n this._scene.remove(this._secondDirectionalLight);\n this._scene.remove(this._ambientLight);\n }\n\n public reload(): void {\n this.removeFromScene();\n this.addToScene();\n }\n\n public showGUI(): void {\n let gui = getGUI();\n if (!gui) {\n return;\n }\n if (this._ambientLight) {\n let ambiLight = gui.addFolder('Ambient Light');\n ambiLight.add<any>(this._ambientLight, 'visible');\n ambiLight\n .add<any>(this._ambientLight, 'intensity')\n .min(0)\n .max(5)\n .step(0.1);\n ambiLight\n .addColor(this._params.ambientLight, 'color')\n .onChange(\n (color: ColorRepresentation) =>\n (this._ambientLight.color = new Color(color))\n );\n }\n if (this._mainDirectionalLight) {\n let mainDirectionalLight = gui.addFolder('Main Directional Light');\n mainDirectionalLight.add<any>(this._mainDirectionalLight, 'visible');\n mainDirectionalLight\n .add<any>(this._mainDirectionalLight, 'intensity')\n .min(0)\n .max(10)\n .step(0.1);\n mainDirectionalLight.add<any>(this._mainDirectionalLight, 'castShadow');\n mainDirectionalLight\n .addColor(this._params.mainDirLight, 'color')\n .onChange(\n (color: ColorRepresentation) =>\n (this._mainDirectionalLight.color = new Color(color))\n );\n mainDirectionalLight\n .add<any>(this._mainDirectionalLight.position, 'x')\n .min(-10)\n .max(10)\n .step(0.1)\n .onChange(() =>\n this._mainDirectionalLight.lookAt(new Vector3(0, 0, 0))\n );\n mainDirectionalLight\n .add<any>(this._mainDirectionalLight.position, 'y')\n .min(-10)\n .max(50)\n .step(0.1)\n .onChange(() =>\n this._mainDirectionalLight.lookAt(new Vector3(0, 0, 0))\n );\n mainDirectionalLight\n .add<any>(this._mainDirectionalLight.position, 'z')\n .min(-10)\n .max(10)\n .step(0.1)\n .onChange(() =>\n this._mainDirectionalLight.lookAt(new Vector3(0, 0, 0))\n );\n }\n if (this._secondDirectionalLight) {\n let secondDirectionalLight = gui.addFolder('Second Directional Light');\n secondDirectionalLight.add<any>(this._secondDirectionalLight, 'visible');\n secondDirectionalLight\n .add<any>(this._secondDirectionalLight, 'intensity')\n .min(0)\n .max(10)\n .step(0.1);\n secondDirectionalLight.add<any>(\n this._secondDirectionalLight,\n 'castShadow'\n );\n secondDirectionalLight\n .addColor(this._params.mainDirLight, 'color')\n .onChange(\n (color: ColorRepresentation) =>\n (this._mainDirectionalLight.color = new Color(color))\n );\n secondDirectionalLight\n .add<any>(this._secondDirectionalLight.position, 'x')\n .min(-10)\n .max(10)\n .step(0.1)\n .onChange(() =>\n this._mainDirectionalLight.lookAt(new Vector3(0, 0, 0))\n );\n secondDirectionalLight\n .add<any>(this._secondDirectionalLight.position, 'y')\n .min(-10)\n .max(50)\n .step(0.1)\n .onChange(() =>\n this._mainDirectionalLight.lookAt(new Vector3(0, 0, 0))\n );\n secondDirectionalLight\n .add<any>(this._secondDirectionalLight.position, 'z')\n .min(-10)\n .max(10)\n .step(0.1)\n .onChange(() =>\n this._mainDirectionalLight.lookAt(new Vector3(0, 0, 0))\n );\n }\n }\n}\n"],"names":["DefaultLightSetting","LightSetting","scene","oldLightSetting","DirectionalLight","Color","LAYER","Vector2","Vector3","AmbientLight","bounds","size","maxSize","halfSize","gui","getGUI","ambiLight","color","mainDirectionalLight","secondDirectionalLight"],"mappings":";;AAMA,MAAqBA,UAA4BC,EAAa;AAAA,EA2B5D,YAAYC,GAAcC,GAAgC;AACxD,UAAMD,GAAOC,CAAe,GAvB9B,KAAQ,UAAU;AAAA,MAChB,cAAc;AAAA,QACZ,OAAO;AAAA,MAAA;AAAA,MAET,cAAc;AAAA,QACZ,UAAU;AAAA,UACR,GAAG;AAAA,UACH,GAAG;AAAA,UACH,GAAG;AAAA,QAAA;AAAA,QAEL,OAAO;AAAA,MAAA;AAAA,MAET,gBAAgB;AAAA,QACd,UAAU;AAAA,UACR,GAAG;AAAA,UACH,GAAG;AAAA,UACH,GAAG;AAAA,QAAA;AAAA,QAEL,OAAO;AAAA,MAAA;AAAA,IACT,GAMA,KAAK,wBAAwB,IAAIC;AAAA,MAC/B,IAAIC,EAAM,KAAK,QAAQ,aAAa,KAA4B;AAAA,MAChE;AAAA,IAAA,GAEF,KAAK,sBAAsB,SAAS;AAAA,MAClC,KAAK,QAAQ,aAAa,SAAS;AAAA,MACnC,KAAK,QAAQ,aAAa,SAAS;AAAA,MACnC,KAAK,QAAQ,aAAa,S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AAyB,SAAS,GACvEA,EACG,IAAS,KAAK,yBAAyB,WAAW,EAClD,IAAI,CAAC,EACL,IAAI,EAAE,EACN,KAAK,GAAG,GACXA,EAAuB;AAAA,UACrB,KAAK;AAAA,UACL;AAAA,QAAA,GAEFA,EACG,SAAS,KAAK,QAAQ,cAAc,OAAO,EAC3C;AAAA,UACC,CAACF,MACE,KAAK,sBAAsB,QAAQ,IAAIZ,EAAMY,CAAK;AAAA,QAAA,GAEzDE,EACG,IAAS,KAAK,wBAAwB,UAAU,GAAG,EACnD,IAAI,GAAG,EACP,IAAI,EAAE,EACN,KAAK,GAAG,EACR;AAAA,UAAS,MACR,KAAK,sBAAsB,OAAO,IAAIX,EAAQ,GAAG,GAAG,CAAC,CAAC;AAAA,QAAA,GAE1DW,EACG,IAAS,KAAK,wBAAwB,UAAU,GAAG,EACnD,IAAI,GAAG,EACP,IAAI,EAAE,EACN,KAAK,GAAG,EACR;AAAA,UAAS,MACR,KAAK,sBAAsB,OAAO,IAAIX,EAAQ,GAAG,GAAG,CAAC,CAAC;AAAA,QAAA,GAE1DW,EACG,IAAS,KAAK,wBAAwB,UAAU,GAAG,EACnD,IAAI,GAAG,EACP,IAAI,EAAE,EACN,KAAK,GAAG,EACR;AAAA,UAAS,MACR,KAAK,sBAAsB,OAAO,IAAIX,EAAQ,GAAG,GAAG,CAAC,CAAC;AAAA,QAAA;AAAA,MAE5D;AAAA;AAAA,EACF;AACF;"}
1
+ {"version":3,"file":"default-light-setting-BdD0jDeP.mjs","sources":["../../packages/configurator-core/src/webgl/lightsetting/default-light-setting.ts"],"sourcesContent":["import LightSetting from '../../../../common-core/src/lightsetting/light-setting';\nimport { LAYER } from '../../../../common-core/src/webgl/layer';\nimport { getGUI } from '../../../../common-core/src/utils/threejs-utils';\nimport type { Box3, ColorRepresentation, Scene } from 'three';\nimport { AmbientLight, Color, DirectionalLight, Vector2, Vector3 } from 'three';\n\nexport default class DefaultLightSetting extends LightSetting {\n private _ambientLight: AmbientLight;\n private _mainDirectionalLight: DirectionalLight;\n private _secondDirectionalLight: DirectionalLight;\n\n private _params = {\n ambientLight: {\n color: '#ffffff',\n },\n mainDirLight: {\n position: {\n x: -3,\n y: 4,\n z: 4,\n },\n color: '#ffffff',\n },\n secondDirLight: {\n position: {\n x: 3,\n y: 4,\n z: 3,\n },\n color: '#ffffff',\n },\n };\n\n constructor(scene: Scene, oldLightSetting?: LightSetting) {\n super(scene, oldLightSetting);\n\n this._mainDirectionalLight = new DirectionalLight(\n new Color(this._params.mainDirLight.color as ColorRepresentation),\n 0.8\n );\n this._mainDirectionalLight.position.set(\n this._params.mainDirLight.position.x,\n this._params.mainDirLight.position.y,\n this._params.mainDirLight.position.z\n );\n this._mainDirectionalLight.layers.set(LAYER.LIGHTING);\n this._mainDirectionalLight.castShadow = true;\n this._mainDirectionalLight.shadow.camera.near = 0.1;\n this._mainDirectionalLight.shadow.camera.far = 100;\n this._mainDirectionalLight.shadow.mapSize = new Vector2(1024, 1024);\n this._mainDirectionalLight.visible = true;\n this._mainDirectionalLight.lookAt(new Vector3(0, 0, 0));\n this._secondDirectionalLight = new DirectionalLight(\n new Color(this._params.secondDirLight.color as ColorRepresentation),\n\n 0.2\n );\n this._secondDirectionalLight.position.set(\n this._params.secondDirLight.position.x,\n this._params.secondDirLight.position.y,\n this._params.secondDirLight.position.z\n );\n this._secondDirectionalLight.layers.set(LAYER.LIGHTING);\n this._secondDirectionalLight.castShadow = false;\n this._secondDirectionalLight.shadow.camera.near = 0.1;\n this._secondDirectionalLight.shadow.camera.far = 100;\n this._secondDirectionalLight.shadow.mapSize = new Vector2(1024, 1024);\n this._secondDirectionalLight.visible = true;\n this._secondDirectionalLight.lookAt(new Vector3(0, 0, 0));\n this._ambientLight = new AmbientLight(\n new Color(this._params.ambientLight.color as ColorRepresentation),\n 0.5\n );\n this._ambientLight.layers.set(LAYER.LIGHTING);\n\n this.addToScene();\n }\n\n public needsBounds(): boolean {\n return true;\n }\n\n public updateBounds(bounds: Box3) {\n const size = bounds.getSize(new Vector3());\n const maxSize = Math.max(Math.max(size.x, size.y), size.z) + 1;\n const halfSize = maxSize / 2;\n this._mainDirectionalLight.shadow.camera.top = halfSize;\n this._mainDirectionalLight.shadow.camera.bottom = -halfSize;\n this._mainDirectionalLight.shadow.camera.left = -halfSize;\n this._mainDirectionalLight.shadow.camera.right = halfSize;\n this._mainDirectionalLight.shadow.camera.near = 0.01;\n this._mainDirectionalLight.shadow.camera.far = 4 * maxSize;\n this._mainDirectionalLight.shadow.camera.updateProjectionMatrix();\n\n this._secondDirectionalLight.shadow.camera.top = halfSize;\n this._secondDirectionalLight.shadow.camera.bottom = -halfSize;\n this._secondDirectionalLight.shadow.camera.left = -halfSize;\n this._secondDirectionalLight.shadow.camera.right = halfSize;\n this._secondDirectionalLight.shadow.camera.near = 0.01;\n this._secondDirectionalLight.shadow.camera.far = 4 * maxSize;\n this._secondDirectionalLight.shadow.camera.updateProjectionMatrix();\n }\n\n public addToScene(): void {\n this._scene.add(this._mainDirectionalLight);\n this._scene.add(this._secondDirectionalLight);\n this._scene.add(this._ambientLight);\n }\n\n public removeFromScene(): void {\n this._scene.remove(this._mainDirectionalLight);\n this._scene.remove(this._secondDirectionalLight);\n this._scene.remove(this._ambientLight);\n }\n\n public reload(): void {\n this.removeFromScene();\n this.addToScene();\n }\n\n public showGUI(): void {\n let gui = getGUI();\n if (!gui) {\n return;\n }\n if (this._ambientLight) {\n let ambiLight = gui.addFolder('Ambient Light');\n ambiLight.add<any>(this._ambientLight, 'visible');\n ambiLight\n .add<any>(this._ambientLight, 'intensity')\n .min(0)\n .max(5)\n .step(0.1);\n ambiLight\n .addColor(this._params.ambientLight, 'color')\n .onChange(\n (color: ColorRepresentation) =>\n (this._ambientLight.color = new Color(color))\n );\n }\n if (this._mainDirectionalLight) {\n let mainDirectionalLight = gui.addFolder('Main Directional Light');\n mainDirectionalLight.add<any>(this._mainDirectionalLight, 'visible');\n mainDirectionalLight\n .add<any>(this._mainDirectionalLight, 'intensity')\n .min(0)\n .max(10)\n .step(0.1);\n mainDirectionalLight.add<any>(this._mainDirectionalLight, 'castShadow');\n mainDirectionalLight\n .addColor(this._params.mainDirLight, 'color')\n .onChange(\n (color: ColorRepresentation) =>\n (this._mainDirectionalLight.color = new Color(color))\n );\n mainDirectionalLight\n .add<any>(this._mainDirectionalLight.position, 'x')\n .min(-10)\n .max(10)\n .step(0.1)\n .onChange(() =>\n this._mainDirectionalLight.lookAt(new Vector3(0, 0, 0))\n );\n mainDirectionalLight\n .add<any>(this._mainDirectionalLight.position, 'y')\n .min(-10)\n .max(50)\n .step(0.1)\n .onChange(() =>\n this._mainDirectionalLight.lookAt(new Vector3(0, 0, 0))\n );\n mainDirectionalLight\n .add<any>(this._mainDirectionalLight.position, 'z')\n .min(-10)\n .max(10)\n .step(0.1)\n .onChange(() =>\n this._mainDirectionalLight.lookAt(new Vector3(0, 0, 0))\n );\n }\n if (this._secondDirectionalLight) {\n let secondDirectionalLight = gui.addFolder('Second Directional Light');\n secondDirectionalLight.add<any>(this._secondDirectionalLight, 'visible');\n secondDirectionalLight\n .add<any>(this._secondDirectionalLight, 'intensity')\n .min(0)\n .max(10)\n .step(0.1);\n secondDirectionalLight.add<any>(\n this._secondDirectionalLight,\n 'castShadow'\n );\n secondDirectionalLight\n .addColor(this._params.mainDirLight, 'color')\n .onChange(\n (color: ColorRepresentation) =>\n (this._mainDirectionalLight.color = new Color(color))\n );\n secondDirectionalLight\n .add<any>(this._secondDirectionalLight.position, 'x')\n .min(-10)\n .max(10)\n .step(0.1)\n .onChange(() =>\n this._mainDirectionalLight.lookAt(new Vector3(0, 0, 0))\n );\n secondDirectionalLight\n .add<any>(this._secondDirectionalLight.position, 'y')\n .min(-10)\n .max(50)\n .step(0.1)\n .onChange(() =>\n this._mainDirectionalLight.lookAt(new Vector3(0, 0, 0))\n );\n secondDirectionalLight\n .add<any>(this._secondDirectionalLight.position, 'z')\n .min(-10)\n .max(10)\n .step(0.1)\n .onChange(() =>\n this._mainDirectionalLight.lookAt(new Vector3(0, 0, 0))\n );\n }\n }\n}\n"],"names":["DefaultLightSetting","LightSetting","scene","oldLightSetting","DirectionalLight","Color","LAYER","Vector2","Vector3","AmbientLight","bounds","size","maxSize","halfSize","gui","getGUI","ambiLight","color","mainDirectionalLight","secondDirectionalLight"],"mappings":";;AAMA,MAAqBA,UAA4BC,EAAa;AAAA,EA2B5D,YAAYC,GAAcC,GAAgC;AACxD,UAAMD,GAAOC,CAAe,GAvB9B,KAAQ,UAAU;AAAA,MAChB,cAAc;AAAA,QACZ,OAAO;AAAA,MAAA;AAAA,MAET,cAAc;AAAA,QACZ,UAAU;AAAA,UACR,GAAG;AAAA,UACH,GAAG;AAAA,UACH,GAAG;AAAA,QAAA;AAAA,QAEL,OAAO;AAAA,MAAA;AAAA,MAET,gBAAgB;AAAA,QACd,UAAU;AAAA,UACR,GAAG;AAAA,UACH,GAAG;AAAA,UACH,GAAG;AAAA,QAAA;AAAA,QAEL,OAAO;AAAA,MAAA;AAAA,IACT,GAMA,KAAK,wBAAwB,IAAIC;AAAA,MAC/B,IAAIC,EAAM,KAAK,QAAQ,aAAa,KAA4B;AAAA,MAChE;AAAA,IAAA,GAEF,KAAK,sBAAsB,SAAS;AAAA,MAClC,KAAK,QAAQ,aAAa,SAAS;AAAA,MACnC,KAAK,QAAQ,aAAa,SAAS;AAAA,MACnC,KAAK,QAAQ,aAAa,SAAS;AAAA,IAAA,GAErC,KAAK,sBAAsB,OAAO,IAAIC,EAAM,QAAQ,GACpD,KAAK,sBAAsB,aAAa,IACxC,KAAK,sBAAsB,OAAO,OAAO,OAAO,KAChD,KAAK,sBAAsB,OAAO,OAAO,MAAM,KAC/C,KAAK,sBAAsB,OAAO,UAAU,IAAIC,EAAQ,MAAM,IAAI,GAClE,KAAK,sBAAsB,UAAU,IACrC,KAAK,sBAAsB,OAAO,IAAIC,EAAQ,GAAG,GAAG,CAAC,CAAC,GACtD,KAAK,0BAA0B,IAAIJ;AAAA,MACjC,IAAIC,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N,KAAK,GAAG,EACR;AAAA,UAAS,MACR,KAAK,sBAAsB,OAAO,IAAIX,EAAQ,GAAG,GAAG,CAAC,CAAC;AAAA,QAAA,GAE1DW,EACG,IAAS,KAAK,wBAAwB,UAAU,GAAG,EACnD,IAAI,GAAG,EACP,IAAI,EAAE,EACN,KAAK,GAAG,EACR;AAAA,UAAS,MACR,KAAK,sBAAsB,OAAO,IAAIX,EAAQ,GAAG,GAAG,CAAC,CAAC;AAAA,QAAA,GAE1DW,EACG,IAAS,KAAK,wBAAwB,UAAU,GAAG,EACnD,IAAI,GAAG,EACP,IAAI,EAAE,EACN,KAAK,GAAG,EACR;AAAA,UAAS,MACR,KAAK,sBAAsB,OAAO,IAAIX,EAAQ,GAAG,GAAG,CAAC,CAAC;AAAA,QAAA;AAAA,MAE5D;AAAA;AAAA,EACF;AACF;"}
@@ -1,2 +1,2 @@
1
- System.register(["./camera-behaviour-DgLVg_pP.js","./main-05wLxbDZ.js"],function(l,L){"use strict";var m,r,s,h,c,a,d,g;return{setters:[t=>{m=t.L},t=>{r=t.an,s=t.$,h=t.H,c=t.ao,a=t.V,d=t._,g=t.a0}],execute:function(){class t extends m{constructor(n,i){super(n,i),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 r(new s(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(h.LIGHTING),this._mainDirectionalLight.castShadow=!0,this._mainDirectionalLight.shadow.camera.near=.1,this._mainDirectionalLight.shadow.camera.far=100,this._mainDirectionalLight.shadow.mapSize=new c(1024,1024),this._mainDirectionalLight.visible=!0,this._mainDirectionalLight.lookAt(new a(0,0,0)),this._secondDirectionalLight=new r(new s(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(h.LIGHTING),this._secondDirectionalLight.castShadow=!1,this._secondDirectionalLight.shadow.camera.near=.1,this._secondDirectionalLight.shadow.camera.far=100,this._secondDirectionalLight.shadow.mapSize=new c(1024,1024),this._secondDirectionalLight.visible=!0,this._secondDirectionalLight.lookAt(new a(0,0,0)),this._ambientLight=new d(new s(this._params.ambientLight.color),.5),this._ambientLight.layers.set(h.LIGHTING),this.addToScene()}needsBounds(){return!0}updateBounds(n){const i=n.getSize(new a),e=Math.max(Math.max(i.x,i.y),i.z)+1,o=e/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*e,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*e,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 n=g();if(n){if(this._ambientLight){let i=n.addFolder("Ambient Light");i.add(this._ambientLight,"visible"),i.add(this._ambientLight,"intensity").min(0).max(5).step(.1),i.addColor(this._params.ambientLight,"color").onChange(e=>this._ambientLight.color=new s(e))}if(this._mainDirectionalLight){let i=n.addFolder("Main Directional Light");i.add(this._mainDirectionalLight,"visible"),i.add(this._mainDirectionalLight,"intensity").min(0).max(10).step(.1),i.add(this._mainDirectionalLight,"castShadow"),i.addColor(this._params.mainDirLight,"color").onChange(e=>this._mainDirectionalLight.color=new s(e)),i.add(this._mainDirectionalLight.position,"x").min(-10).max(10).step(.1).onChange(()=>this._mainDirectionalLight.lookAt(new a(0,0,0))),i.add(this._mainDirectionalLight.position,"y").min(-10).max(50).step(.1).onChange(()=>this._mainDirectionalLight.lookAt(new a(0,0,0))),i.add(this._mainDirectionalLight.position,"z").min(-10).max(10).step(.1).onChange(()=>this._mainDirectionalLight.lookAt(new a(0,0,0)))}if(this._secondDirectionalLight){let i=n.addFolder("Second Directional Light");i.add(this._secondDirectionalLight,"visible"),i.add(this._secondDirectionalLight,"intensity").min(0).max(10).step(.1),i.add(this._secondDirectionalLight,"castShadow"),i.addColor(this._params.mainDirLight,"color").onChange(e=>this._mainDirectionalLight.color=new s(e)),i.add(this._secondDirectionalLight.position,"x").min(-10).max(10).step(.1).onChange(()=>this._mainDirectionalLight.lookAt(new a(0,0,0))),i.add(this._secondDirectionalLight.position,"y").min(-10).max(50).step(.1).onChange(()=>this._mainDirectionalLight.lookAt(new a(0,0,0))),i.add(this._secondDirectionalLight.position,"z").min(-10).max(10).step(.1).onChange(()=>this._mainDirectionalLight.lookAt(new a(0,0,0)))}}}}l("D",t)}}});
2
- //# sourceMappingURL=default-light-setting-DQxt3v5x.js.map
1
+ System.register(["./camera-behaviour-CzgZxW1D.js","./main-DVWEbQdM.js"],function(l,L){"use strict";var m,r,s,h,c,a,d,g;return{setters:[t=>{m=t.L},t=>{r=t.an,s=t.$,h=t.H,c=t.ao,a=t.V,d=t._,g=t.a0}],execute:function(){class t extends m{constructor(n,i){super(n,i),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 r(new s(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(h.LIGHTING),this._mainDirectionalLight.castShadow=!0,this._mainDirectionalLight.shadow.camera.near=.1,this._mainDirectionalLight.shadow.camera.far=100,this._mainDirectionalLight.shadow.mapSize=new c(1024,1024),this._mainDirectionalLight.visible=!0,this._mainDirectionalLight.lookAt(new a(0,0,0)),this._secondDirectionalLight=new r(new s(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(h.LIGHTING),this._secondDirectionalLight.castShadow=!1,this._secondDirectionalLight.shadow.camera.near=.1,this._secondDirectionalLight.shadow.camera.far=100,this._secondDirectionalLight.shadow.mapSize=new c(1024,1024),this._secondDirectionalLight.visible=!0,this._secondDirectionalLight.lookAt(new a(0,0,0)),this._ambientLight=new d(new s(this._params.ambientLight.color),.5),this._ambientLight.layers.set(h.LIGHTING),this.addToScene()}needsBounds(){return!0}updateBounds(n){const i=n.getSize(new a),e=Math.max(Math.max(i.x,i.y),i.z)+1,o=e/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*e,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*e,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 n=g();if(n){if(this._ambientLight){let i=n.addFolder("Ambient Light");i.add(this._ambientLight,"visible"),i.add(this._ambientLight,"intensity").min(0).max(5).step(.1),i.addColor(this._params.ambientLight,"color").onChange(e=>this._ambientLight.color=new s(e))}if(this._mainDirectionalLight){let i=n.addFolder("Main Directional Light");i.add(this._mainDirectionalLight,"visible"),i.add(this._mainDirectionalLight,"intensity").min(0).max(10).step(.1),i.add(this._mainDirectionalLight,"castShadow"),i.addColor(this._params.mainDirLight,"color").onChange(e=>this._mainDirectionalLight.color=new s(e)),i.add(this._mainDirectionalLight.position,"x").min(-10).max(10).step(.1).onChange(()=>this._mainDirectionalLight.lookAt(new a(0,0,0))),i.add(this._mainDirectionalLight.position,"y").min(-10).max(50).step(.1).onChange(()=>this._mainDirectionalLight.lookAt(new a(0,0,0))),i.add(this._mainDirectionalLight.position,"z").min(-10).max(10).step(.1).onChange(()=>this._mainDirectionalLight.lookAt(new a(0,0,0)))}if(this._secondDirectionalLight){let i=n.addFolder("Second Directional Light");i.add(this._secondDirectionalLight,"visible"),i.add(this._secondDirectionalLight,"intensity").min(0).max(10).step(.1),i.add(this._secondDirectionalLight,"castShadow"),i.addColor(this._params.mainDirLight,"color").onChange(e=>this._mainDirectionalLight.color=new s(e)),i.add(this._secondDirectionalLight.position,"x").min(-10).max(10).step(.1).onChange(()=>this._mainDirectionalLight.lookAt(new a(0,0,0))),i.add(this._secondDirectionalLight.position,"y").min(-10).max(50).step(.1).onChange(()=>this._mainDirectionalLight.lookAt(new a(0,0,0))),i.add(this._secondDirectionalLight.position,"z").min(-10).max(10).step(.1).onChange(()=>this._mainDirectionalLight.lookAt(new a(0,0,0)))}}}}l("D",t)}}});
2
+ //# sourceMappingURL=default-light-setting-CYiFuxeI.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"default-light-setting-DQxt3v5x.js","sources":["../../packages/configurator-core/src/webgl/lightsetting/default-light-setting.ts"],"sourcesContent":["import LightSetting from '../../../../common-core/src/lightsetting/light-setting';\nimport { LAYER } from '../../../../common-core/src/webgl/layer';\nimport { getGUI } from '../../../../common-core/src/utils/threejs-utils';\nimport type { Box3, ColorRepresentation, Scene } from 'three';\nimport { AmbientLight, Color, DirectionalLight, Vector2, Vector3 } from 'three';\n\nexport default class DefaultLightSetting extends LightSetting {\n private _ambientLight: AmbientLight;\n private _mainDirectionalLight: DirectionalLight;\n private _secondDirectionalLight: DirectionalLight;\n\n private _params = {\n ambientLight: {\n color: '#ffffff',\n },\n mainDirLight: {\n position: {\n x: -3,\n y: 4,\n z: 4,\n },\n color: '#ffffff',\n },\n secondDirLight: {\n position: {\n x: 3,\n y: 4,\n z: 3,\n },\n color: '#ffffff',\n },\n };\n\n constructor(scene: Scene, oldLightSetting?: LightSetting) {\n super(scene, oldLightSetting);\n\n this._mainDirectionalLight = new DirectionalLight(\n new Color(this._params.mainDirLight.color as ColorRepresentation),\n 0.8\n );\n this._mainDirectionalLight.position.set(\n this._params.mainDirLight.position.x,\n this._params.mainDirLight.position.y,\n this._params.mainDirLight.position.z\n );\n this._mainDirectionalLight.layers.set(LAYER.LIGHTING);\n this._mainDirectionalLight.castShadow = true;\n this._mainDirectionalLight.shadow.camera.near = 0.1;\n this._mainDirectionalLight.shadow.camera.far = 100;\n this._mainDirectionalLight.shadow.mapSize = new Vector2(1024, 1024);\n this._mainDirectionalLight.visible = true;\n this._mainDirectionalLight.lookAt(new Vector3(0, 0, 0));\n this._secondDirectionalLight = new DirectionalLight(\n new Color(this._params.secondDirLight.color as ColorRepresentation),\n\n 0.2\n );\n this._secondDirectionalLight.position.set(\n this._params.secondDirLight.position.x,\n this._params.secondDirLight.position.y,\n this._params.secondDirLight.position.z\n );\n this._secondDirectionalLight.layers.set(LAYER.LIGHTING);\n this._secondDirectionalLight.castShadow = false;\n this._secondDirectionalLight.shadow.camera.near = 0.1;\n this._secondDirectionalLight.shadow.camera.far = 100;\n this._secondDirectionalLight.shadow.mapSize = new Vector2(1024, 1024);\n this._secondDirectionalLight.visible = true;\n this._secondDirectionalLight.lookAt(new Vector3(0, 0, 0));\n this._ambientLight = new AmbientLight(\n new Color(this._params.ambientLight.color as ColorRepresentation),\n 0.5\n );\n this._ambientLight.layers.set(LAYER.LIGHTING);\n\n this.addToScene();\n }\n\n public needsBounds(): boolean {\n return true;\n }\n\n public updateBounds(bounds: Box3) {\n const size = bounds.getSize(new Vector3());\n const maxSize = Math.max(Math.max(size.x, size.y), size.z) + 1;\n const halfSize = maxSize / 2;\n this._mainDirectionalLight.shadow.camera.top = halfSize;\n this._mainDirectionalLight.shadow.camera.bottom = -halfSize;\n this._mainDirectionalLight.shadow.camera.left = -halfSize;\n this._mainDirectionalLight.shadow.camera.right = halfSize;\n this._mainDirectionalLight.shadow.camera.near = 0.01;\n this._mainDirectionalLight.shadow.camera.far = 4 * maxSize;\n this._mainDirectionalLight.shadow.camera.updateProjectionMatrix();\n\n this._secondDirectionalLight.shadow.camera.top = halfSize;\n this._secondDirectionalLight.shadow.camera.bottom = -halfSize;\n this._secondDirectionalLight.shadow.camera.left = -halfSize;\n this._secondDirectionalLight.shadow.camera.right = halfSize;\n this._secondDirectionalLight.shadow.camera.near = 0.01;\n this._secondDirectionalLight.shadow.camera.far = 4 * maxSize;\n this._secondDirectionalLight.shadow.camera.updateProjectionMatrix();\n }\n\n public addToScene(): void {\n this._scene.add(this._mainDirectionalLight);\n this._scene.add(this._secondDirectionalLight);\n this._scene.add(this._ambientLight);\n }\n\n public removeFromScene(): void {\n this._scene.remove(this._mainDirectionalLight);\n this._scene.remove(this._secondDirectionalLight);\n this._scene.remove(this._ambientLight);\n }\n\n public reload(): void {\n this.removeFromScene();\n this.addToScene();\n }\n\n public showGUI(): void {\n let gui = getGUI();\n if (!gui) {\n return;\n }\n if (this._ambientLight) {\n let ambiLight = gui.addFolder('Ambient Light');\n ambiLight.add<any>(this._ambientLight, 'visible');\n ambiLight\n .add<any>(this._ambientLight, 'intensity')\n .min(0)\n .max(5)\n .step(0.1);\n ambiLight\n .addColor(this._params.ambientLight, 'color')\n .onChange(\n (color: ColorRepresentation) =>\n (this._ambientLight.color = new Color(color))\n );\n }\n if (this._mainDirectionalLight) {\n let mainDirectionalLight = gui.addFolder('Main Directional Light');\n mainDirectionalLight.add<any>(this._mainDirectionalLight, 'visible');\n mainDirectionalLight\n .add<any>(this._mainDirectionalLight, 'intensity')\n .min(0)\n .max(10)\n .step(0.1);\n mainDirectionalLight.add<any>(this._mainDirectionalLight, 'castShadow');\n mainDirectionalLight\n .addColor(this._params.mainDirLight, 'color')\n .onChange(\n (color: ColorRepresentation) =>\n (this._mainDirectionalLight.color = new Color(color))\n );\n mainDirectionalLight\n .add<any>(this._mainDirectionalLight.position, 'x')\n .min(-10)\n .max(10)\n .step(0.1)\n .onChange(() =>\n this._mainDirectionalLight.lookAt(new Vector3(0, 0, 0))\n );\n mainDirectionalLight\n .add<any>(this._mainDirectionalLight.position, 'y')\n .min(-10)\n .max(50)\n .step(0.1)\n .onChange(() =>\n this._mainDirectionalLight.lookAt(new Vector3(0, 0, 0))\n );\n mainDirectionalLight\n .add<any>(this._mainDirectionalLight.position, 'z')\n .min(-10)\n .max(10)\n .step(0.1)\n .onChange(() =>\n this._mainDirectionalLight.lookAt(new Vector3(0, 0, 0))\n );\n }\n if (this._secondDirectionalLight) {\n let secondDirectionalLight = gui.addFolder('Second Directional Light');\n secondDirectionalLight.add<any>(this._secondDirectionalLight, 'visible');\n secondDirectionalLight\n .add<any>(this._secondDirectionalLight, 'intensity')\n .min(0)\n .max(10)\n .step(0.1);\n secondDirectionalLight.add<any>(\n this._secondDirectionalLight,\n 'castShadow'\n );\n secondDirectionalLight\n .addColor(this._params.mainDirLight, 'color')\n .onChange(\n (color: ColorRepresentation) =>\n (this._mainDirectionalLight.color = new Color(color))\n );\n secondDirectionalLight\n .add<any>(this._secondDirectionalLight.position, 'x')\n .min(-10)\n .max(10)\n .step(0.1)\n .onChange(() =>\n this._mainDirectionalLight.lookAt(new Vector3(0, 0, 0))\n );\n secondDirectionalLight\n .add<any>(this._secondDirectionalLight.position, 'y')\n .min(-10)\n .max(50)\n .step(0.1)\n .onChange(() =>\n this._mainDirectionalLight.lookAt(new Vector3(0, 0, 0))\n );\n secondDirectionalLight\n .add<any>(this._secondDirectionalLight.position, 'z')\n .min(-10)\n .max(10)\n .step(0.1)\n .onChange(() =>\n this._mainDirectionalLight.lookAt(new Vector3(0, 0, 0))\n );\n }\n }\n}\n"],"names":["DefaultLightSetting","LightSetting","scene","oldLightSetting","DirectionalLight","Color","LAYER","Vector2","Vector3","AmbientLight","bounds","size","maxSize","halfSize","gui","getGUI","ambiLight","color","mainDirectionalLight","secondDirectionalLight","exports"],"mappings":"wNAMA,MAAqBA,UAA4BC,CAAa,CA2B5D,YAAYC,EAAcC,EAAgC,CACxD,MAAMD,EAAOC,CAAe,EAvB9B,KAAQ,QAAU,CAChB,aAAc,CACZ,MAAO,SAAA,EAET,aAAc,CACZ,SAAU,CACR,EAAG,GACH,EAAG,EACH,EAAG,CAAA,EAEL,MAAO,SAAA,EAET,eAAgB,CACd,SAAU,CACR,EAAG,EACH,EAAG,EACH,EAAG,CAAA,EAEL,MAAO,SAAA,CACT,EAMA,KAAK,sBAAwB,IAAIC,EAC/B,IAAIC,EAAM,KAAK,QAAQ,aAAa,KAA4B,EAChE,EAAA,EAEF,KAAK,sBAAsB,SAAS,IAClC,KAAK,QAAQ,aAAa,SAAS,EACnC,KAAK,QAAQ,aAAa,SAAS,EACnC,KAAK,QAAQ,aAAa,SAAS,CAAA,EAErC,KAAK,sBAAsB,OAAO,IAAIC,EAAM,QAAQ,EACpD,KAAK,sBAAsB,WAAa,GACxC,KAAK,sBAAsB,OAAO,OAAO,KAAO,GAChD,KAAK,sBAAsB,OAAO,OAAO,IAAM,IAC/C,KAAK,sBAAsB,OAAO,QAAU,IAAIC,EAAQ,KAAM,IAAI,EAClE,KAAK,sBAAsB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AAG,EACP,IAAI,EAAE,EACN,KAAK,EAAG,EACR,SAAS,IACR,KAAK,sBAAsB,OAAO,IAAIX,EAAQ,EAAG,EAAG,CAAC,CAAC,CAAA,EAE1DW,EACG,IAAS,KAAK,wBAAwB,SAAU,GAAG,EACnD,IAAI,GAAG,EACP,IAAI,EAAE,EACN,KAAK,EAAG,EACR,SAAS,IACR,KAAK,sBAAsB,OAAO,IAAIX,EAAQ,EAAG,EAAG,CAAC,CAAC,CAAA,CAE5D,EACF,CACF,CAAAY,EAAA,IAAApB,CAAA"}
1
+ {"version":3,"file":"default-light-setting-CYiFuxeI.js","sources":["../../packages/configurator-core/src/webgl/lightsetting/default-light-setting.ts"],"sourcesContent":["import LightSetting from '../../../../common-core/src/lightsetting/light-setting';\nimport { LAYER } from '../../../../common-core/src/webgl/layer';\nimport { getGUI } from '../../../../common-core/src/utils/threejs-utils';\nimport type { Box3, ColorRepresentation, Scene } from 'three';\nimport { AmbientLight, Color, DirectionalLight, Vector2, Vector3 } from 'three';\n\nexport default class DefaultLightSetting extends LightSetting {\n private _ambientLight: AmbientLight;\n private _mainDirectionalLight: DirectionalLight;\n private _secondDirectionalLight: DirectionalLight;\n\n private _params = {\n ambientLight: {\n color: '#ffffff',\n },\n mainDirLight: {\n position: {\n x: -3,\n y: 4,\n z: 4,\n },\n color: '#ffffff',\n },\n secondDirLight: {\n position: {\n x: 3,\n y: 4,\n z: 3,\n },\n color: '#ffffff',\n },\n };\n\n constructor(scene: Scene, oldLightSetting?: LightSetting) {\n super(scene, oldLightSetting);\n\n this._mainDirectionalLight = new DirectionalLight(\n new Color(this._params.mainDirLight.color as ColorRepresentation),\n 0.8\n );\n this._mainDirectionalLight.position.set(\n this._params.mainDirLight.position.x,\n this._params.mainDirLight.position.y,\n this._params.mainDirLight.position.z\n );\n this._mainDirectionalLight.layers.set(LAYER.LIGHTING);\n this._mainDirectionalLight.castShadow = true;\n this._mainDirectionalLight.shadow.camera.near = 0.1;\n this._mainDirectionalLight.shadow.camera.far = 100;\n this._mainDirectionalLight.shadow.mapSize = new Vector2(1024, 1024);\n this._mainDirectionalLight.visible = true;\n this._mainDirectionalLight.lookAt(new Vector3(0, 0, 0));\n this._secondDirectionalLight = new DirectionalLight(\n new Color(this._params.secondDirLight.color as ColorRepresentation),\n\n 0.2\n );\n this._secondDirectionalLight.position.set(\n this._params.secondDirLight.position.x,\n this._params.secondDirLight.position.y,\n this._params.secondDirLight.position.z\n );\n this._secondDirectionalLight.layers.set(LAYER.LIGHTING);\n this._secondDirectionalLight.castShadow = false;\n this._secondDirectionalLight.shadow.camera.near = 0.1;\n this._secondDirectionalLight.shadow.camera.far = 100;\n this._secondDirectionalLight.shadow.mapSize = new Vector2(1024, 1024);\n this._secondDirectionalLight.visible = true;\n this._secondDirectionalLight.lookAt(new Vector3(0, 0, 0));\n this._ambientLight = new AmbientLight(\n new Color(this._params.ambientLight.color as ColorRepresentation),\n 0.5\n );\n this._ambientLight.layers.set(LAYER.LIGHTING);\n\n this.addToScene();\n }\n\n public needsBounds(): boolean {\n return true;\n }\n\n public updateBounds(bounds: Box3) {\n const size = bounds.getSize(new Vector3());\n const maxSize = Math.max(Math.max(size.x, size.y), size.z) + 1;\n const halfSize = maxSize / 2;\n this._mainDirectionalLight.shadow.camera.top = halfSize;\n this._mainDirectionalLight.shadow.camera.bottom = -halfSize;\n this._mainDirectionalLight.shadow.camera.left = -halfSize;\n this._mainDirectionalLight.shadow.camera.right = halfSize;\n this._mainDirectionalLight.shadow.camera.near = 0.01;\n this._mainDirectionalLight.shadow.camera.far = 4 * maxSize;\n this._mainDirectionalLight.shadow.camera.updateProjectionMatrix();\n\n this._secondDirectionalLight.shadow.camera.top = halfSize;\n this._secondDirectionalLight.shadow.camera.bottom = -halfSize;\n this._secondDirectionalLight.shadow.camera.left = -halfSize;\n this._secondDirectionalLight.shadow.camera.right = halfSize;\n this._secondDirectionalLight.shadow.camera.near = 0.01;\n this._secondDirectionalLight.shadow.camera.far = 4 * maxSize;\n this._secondDirectionalLight.shadow.camera.updateProjectionMatrix();\n }\n\n public addToScene(): void {\n this._scene.add(this._mainDirectionalLight);\n this._scene.add(this._secondDirectionalLight);\n this._scene.add(this._ambientLight);\n }\n\n public removeFromScene(): void {\n this._scene.remove(this._mainDirectionalLight);\n this._scene.remove(this._secondDirectionalLight);\n this._scene.remove(this._ambientLight);\n }\n\n public reload(): void {\n this.removeFromScene();\n this.addToScene();\n }\n\n public showGUI(): void {\n let gui = getGUI();\n if (!gui) {\n return;\n }\n if (this._ambientLight) {\n let ambiLight = gui.addFolder('Ambient Light');\n ambiLight.add<any>(this._ambientLight, 'visible');\n ambiLight\n .add<any>(this._ambientLight, 'intensity')\n .min(0)\n .max(5)\n .step(0.1);\n ambiLight\n .addColor(this._params.ambientLight, 'color')\n .onChange(\n (color: ColorRepresentation) =>\n (this._ambientLight.color = new Color(color))\n );\n }\n if (this._mainDirectionalLight) {\n let mainDirectionalLight = gui.addFolder('Main Directional Light');\n mainDirectionalLight.add<any>(this._mainDirectionalLight, 'visible');\n mainDirectionalLight\n .add<any>(this._mainDirectionalLight, 'intensity')\n .min(0)\n .max(10)\n .step(0.1);\n mainDirectionalLight.add<any>(this._mainDirectionalLight, 'castShadow');\n mainDirectionalLight\n .addColor(this._params.mainDirLight, 'color')\n .onChange(\n (color: ColorRepresentation) =>\n (this._mainDirectionalLight.color = new Color(color))\n );\n mainDirectionalLight\n .add<any>(this._mainDirectionalLight.position, 'x')\n .min(-10)\n .max(10)\n .step(0.1)\n .onChange(() =>\n this._mainDirectionalLight.lookAt(new Vector3(0, 0, 0))\n );\n mainDirectionalLight\n .add<any>(this._mainDirectionalLight.position, 'y')\n .min(-10)\n .max(50)\n .step(0.1)\n .onChange(() =>\n this._mainDirectionalLight.lookAt(new Vector3(0, 0, 0))\n );\n mainDirectionalLight\n .add<any>(this._mainDirectionalLight.position, 'z')\n .min(-10)\n .max(10)\n .step(0.1)\n .onChange(() =>\n this._mainDirectionalLight.lookAt(new Vector3(0, 0, 0))\n );\n }\n if (this._secondDirectionalLight) {\n let secondDirectionalLight = gui.addFolder('Second Directional Light');\n secondDirectionalLight.add<any>(this._secondDirectionalLight, 'visible');\n secondDirectionalLight\n .add<any>(this._secondDirectionalLight, 'intensity')\n .min(0)\n .max(10)\n .step(0.1);\n secondDirectionalLight.add<any>(\n this._secondDirectionalLight,\n 'castShadow'\n );\n secondDirectionalLight\n .addColor(this._params.mainDirLight, 'color')\n .onChange(\n (color: ColorRepresentation) =>\n (this._mainDirectionalLight.color = new Color(color))\n );\n secondDirectionalLight\n .add<any>(this._secondDirectionalLight.position, 'x')\n .min(-10)\n .max(10)\n .step(0.1)\n .onChange(() =>\n this._mainDirectionalLight.lookAt(new Vector3(0, 0, 0))\n );\n secondDirectionalLight\n .add<any>(this._secondDirectionalLight.position, 'y')\n .min(-10)\n .max(50)\n .step(0.1)\n .onChange(() =>\n this._mainDirectionalLight.lookAt(new Vector3(0, 0, 0))\n );\n secondDirectionalLight\n .add<any>(this._secondDirectionalLight.position, 'z')\n .min(-10)\n .max(10)\n .step(0.1)\n .onChange(() =>\n this._mainDirectionalLight.lookAt(new Vector3(0, 0, 0))\n );\n }\n }\n}\n"],"names":["DefaultLightSetting","LightSetting","scene","oldLightSetting","DirectionalLight","Color","LAYER","Vector2","Vector3","AmbientLight","bounds","size","maxSize","halfSize","gui","getGUI","ambiLight","color","mainDirectionalLight","secondDirectionalLight","exports"],"mappings":"wNAMA,MAAqBA,UAA4BC,CAAa,CA2B5D,YAAYC,EAAcC,EAAgC,CACxD,MAAMD,EAAOC,CAAe,EAvB9B,KAAQ,QAAU,CAChB,aAAc,CACZ,MAAO,SAAA,EAET,aAAc,CACZ,SAAU,CACR,EAAG,GACH,EAAG,EACH,EAAG,CAAA,EAEL,MAAO,SAAA,EAET,eAAgB,CACd,SAAU,CACR,EAAG,EACH,EAAG,EACH,EAAG,CAAA,EAEL,MAAO,SAAA,CACT,EAMA,KAAK,sBAAwB,IAAIC,EAC/B,IAAIC,EAAM,K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K,EAAG,EACXA,EAAuB,IACrB,KAAK,wBACL,YAAA,EAEFA,EACG,SAAS,KAAK,QAAQ,aAAc,OAAO,EAC3C,SACEF,GACE,KAAK,sBAAsB,MAAQ,IAAIZ,EAAMY,CAAK,CAAA,EAEzDE,EACG,IAAS,KAAK,wBAAwB,SAAU,GAAG,EACnD,IAAI,GAAG,EACP,IAAI,EAAE,EACN,KAAK,EAAG,EACR,SAAS,IACR,KAAK,sBAAsB,OAAO,IAAIX,EAAQ,EAAG,EAAG,CAAC,CAAC,CAAA,EAE1DW,EACG,IAAS,KAAK,wBAAwB,SAAU,GAAG,EACnD,IAAI,GAAG,EACP,IAAI,EAAE,EACN,KAAK,EAAG,EACR,SAAS,IACR,KAAK,sBAAsB,OAAO,IAAIX,EAAQ,EAAG,EAAG,CAAC,CAAC,CAAA,EAE1DW,EACG,IAAS,KAAK,wBAAwB,SAAU,GAAG,EACnD,IAAI,GAAG,EACP,IAAI,EAAE,EACN,KAAK,EAAG,EACR,SAAS,IACR,KAAK,sBAAsB,OAAO,IAAIX,EAAQ,EAAG,EAAG,CAAC,CAAC,CAAA,CAE5D,EACF,CACF,CAAAY,EAAA,IAAApB,CAAA"}
@@ -7,7 +7,9 @@ export declare class RoomleLightSource {
7
7
  private _light;
8
8
  constructor(lightSourceId: number, lightSource: Light);
9
9
  get lightSourceId(): number;
10
+ get isLightOn(): boolean;
10
11
  addToScene(object3d: Object3D): void;
11
12
  removeFromScene(): void;
13
+ setLightOnOff(state: boolean): void;
12
14
  updateLightSource(lightSourceAttributes: any): void;
13
15
  }
@@ -2,7 +2,7 @@ import { Dimensioning, KernelCube, KernelEnum } from '../../../typings/kernel';
2
2
  import { AssetUrl, RapiMaterial, RapiMaterialShading, RapiTexture } from '../../../typings/rapi-types';
3
3
  import { Position2, Position3 } from '../common-interfaces';
4
4
  import { default as WallPlanElementViewModel } from '../../../planner-core/src/view-model/wall-plan-element-view-model';
5
- import { Camera, Intersection, Material, Matrix4, MeshPhysicalMaterial, MeshStandardMaterial, NormalBufferAttributes, Object3D, Object3DEventMap, Quaternion, Texture, Vector2, Scene, Box3, BufferGeometry, Color, CubeTexture, DataTexture, Layers, Mesh, MeshBasicMaterial, Vector3 } from 'three';
5
+ import { ShaderChunk, Camera, Intersection, Material, Matrix4, MeshPhysicalMaterial, MeshStandardMaterial, NormalBufferAttributes, Object3D, Object3DEventMap, Quaternion, Texture, Vector2, Scene, Box3, BufferGeometry, Color, CubeTexture, DataTexture, Layers, Mesh, MeshBasicMaterial, Vector3 } from 'three';
6
6
  import { GUI } from 'dat.gui';
7
7
  import { OBJECT_EVENT } from '../../../configurator-core/src/utils/raycast-helper';
8
8
  import { INPUT_EVENT_TYPE } from '../input/input-manager';
@@ -132,4 +132,5 @@ export interface Object3DRoomleEventMap extends Object3DEventMap {
132
132
  * normalize the angle between -PI and PI
133
133
  */
134
134
  export declare const normalizeRotation: (angleInRad: number) => number;
135
+ export declare const patchLighting: (shaderChunk: typeof ShaderChunk) => void;
135
136
  export {};
@@ -29,6 +29,7 @@ export interface RoomleComponent extends RoomleEventedObject3D {
29
29
  getLightSourceById(lightSourceId: number): RoomleLightSource | null;
30
30
  removeLightSourceById(lightSourceId: number): void;
31
31
  addLightSource(lightSource: RoomleLightSource): void;
32
+ getAllLightSources(): Map<number, RoomleLightSource>;
32
33
  getMeshById(meshId: number): Mesh;
33
34
  removeAllMeshes(): void;
34
35
  select(): void;
@@ -103,7 +103,7 @@ export default abstract class SceneManager implements Context, LifeCycleCallback
103
103
  protected _setupScene(_offset?: CanvasOffset, transparent?: boolean): void;
104
104
  loadEnvMap(url: string): Promise<void>;
105
105
  private _getEnvMapIntensityAndRotation;
106
- private _setDefaultEnvironmentScene;
106
+ protected _setDefaultEnvironmentScene(): void;
107
107
  private _setEnvMap;
108
108
  private _tabVisible;
109
109
  private _releaseKeystrokeStates;
@@ -6,7 +6,7 @@ export declare const CEILING_LIGHT_INTENSITY = 2;
6
6
  export declare const CEILING_LIGHT_DISTANCE = 25;
7
7
  export declare const CEILING_LIGHT_DECAY = 0;
8
8
  export declare const CEILING_LIGHT_POWER = 25;
9
- export declare const CEILING_LIGHT_SHADOW_INTENSITY = 0.5;
9
+ export declare const CEILING_LIGHT_SHADOW_INTENSITY = 0;
10
10
  export declare const CEILING_LIGHT_SHADOW_MAP_SIZE = 0;
11
11
  export default class CeilingLight extends PointLight {
12
12
  private _container;
@@ -4,9 +4,8 @@ import { default as CeilingLight } from './ceiling-light';
4
4
  export declare class LightGroup extends Group {
5
5
  children: CeilingLight[];
6
6
  private _availableShadowMaps;
7
- private _lightsOn;
8
7
  get lightsOn(): boolean;
9
8
  constructor();
10
9
  add(...lights: Array<Object3D<Object3DEventMap>>): this;
11
- toggleAllLights(turnLightsOn: boolean): void;
10
+ toggleAllLights(on: boolean): void;
12
11
  }
@@ -28,6 +28,7 @@ import { PluginName } from '../../configurator-core/src/utils/plugin-types';
28
28
  import { Nullable } from '../../typings/helper';
29
29
  import { MaybePromise } from '../../common-core/src/utils/common-utils';
30
30
  import { HomagIntelligence } from '../../homag-intelligence/src/homag-intelligence';
31
+ import { RoomleLightSource } from '../../common-core/src/light/light-source';
31
32
 
32
33
  export type ID_TYPE = 'rml_id' | 'tc_id' | 'rml_serialized' | 'tc_serialized';
33
34
  export declare const EXT_OBJ_EXCEPTION = "Could not retrieve configuration for external object! Did you implement onGetConfigurationForExternalObject?";
@@ -499,15 +500,20 @@ export default class RoomlePlanner<P extends readonly PluginName[] = readonly []
499
500
  */
500
501
  resumeInputListeners(): void;
501
502
  /**
502
- * Enables experimental lights in the scene
503
- * @hidden
503
+ * Returns all configurable element's light/lamp sources in the scene.
504
504
  */
505
- turnLightsOn(): void;
505
+ getScenePlanElementLightSources(): Array<Map<number, RoomleLightSource>>;
506
506
  /**
507
- * Disables experimental lights in the scene
508
- * @hidden
507
+ * Turns all lights in the scene on or off.
508
+ * @param state whether the lights should be on or off
509
+ */
510
+ setAllLightsOnOff(state: boolean): void;
511
+ /**
512
+ * Turns lights by list of light IDs in the scene on or off
513
+ * @param state whether the lights should be on or off
514
+ * @param ids array of light IDs, see type interface RoomleLightSource._lightSourceId
509
515
  */
510
- turnLightsOff(): void;
516
+ setLightsOnOffByIds(ids: number[], state: boolean): void;
511
517
  getPlanObjectForRuntimeId(runtimeId: number): Promise<PlanElementViewModel | null>;
512
518
  rotateByRuntimeId(runtimeId: number, rotateBy: number): Promise<void>;
513
519
  deleteByRuntimeId(runtimeId: number): Promise<void>;
@@ -71,7 +71,7 @@ export default class PlannerKernelAccess extends ConfiguratorKernelAccess {
71
71
  externalObjectConfigurationLoaded(plan: Plan, planObject: PlanObject, configuration: string): void;
72
72
  externalObjectConfigurationDeleted(plan: Plan, planObject: PlanObject, uniqueId: string): void;
73
73
  externalObjectComponentDeleted(plan: Plan, planObject: PlanObject, remainingGroupOrGroups: ExternalObjectGroup | ExternalObjectGroup[], deletedRootModuleId: string): void;
74
- externalObjectConfigurationDuplicated(plan: Plan, planObject: PlanObject, sourceGroupId: string, newGroupPosition: ExternalObjectGroupPosition): void;
74
+ externalObjectConfigurationDuplicated(plan: Plan, planObject: PlanObject, duplicatedGroup: ExternalObjectGroup): void;
75
75
  externalObjectPlanChanged(plan: Plan, planObject: PlanObject, movedGroup: ExternalObjectGroup): void;
76
76
  externalObjectConfigurationsMerged(plan: Plan, planObject: PlanObject, mergedGroup: ExternalObjectGroup, idsOfGroupsMerged: string | string[], targetRootModuleId: string): void;
77
77
  externalObjectComponentSplitOff(plan: Plan, planObject: PlanObject, splitGroups: ExternalObjectGroup[]): void;
@@ -18,7 +18,6 @@ import { default as ConstructionPlanObjectViewModel } from './construction-plan-
18
18
  import { default as MeasurementLinePlanElementViewModel } from './measurement-line-plan-element-view-model';
19
19
  import { LightGroup } from '../lights/light-group';
20
20
  import { QualityLevel } from '../../../common-core/src/webgl/renderer/scene-renderer';
21
- import { default as LampLight } from '../lights/lamp-light';
22
21
  import { Point } from 'roomle-core-hsc/src/embind/configuratorCoreInterface';
23
22
  import { default as WallAtticPlanElementViewModel } from './wall-attic-plan-element-view-model';
24
23
 
@@ -96,7 +95,7 @@ export default class PlanViewModel extends ConfiguratorViewModel implements Plan
96
95
  rotation?: Point;
97
96
  active?: boolean;
98
97
  }): void;
99
- toggleCeilingLights(on: boolean, isInteriorLightsActive: boolean): void;
98
+ toggleCeilingLights(on: boolean): void;
100
99
  private commonHandlerForEditableAndTopView;
101
100
  protected dockComponent(componentId: number, isRootComponent: boolean, parentId: number, componentPosition: KernelVector3, componentRotation: KernelVector3): void;
102
101
  protected _addComponent(component: RoomleComponent): void;
@@ -113,7 +112,6 @@ export default class PlanViewModel extends ConfiguratorViewModel implements Plan
113
112
  getFloorGroup(): Group;
114
113
  getMeasurementLineGroup(): Group;
115
114
  getCeilingLightsGroup(): LightGroup;
116
- getLampLightsArray(): LampLight[];
117
115
  getWallAtticsGroup(): Group;
118
116
  getBoundingBox(): Box3;
119
117
  getBoundingBoxOfGeometry(): Box3;
@@ -170,5 +168,4 @@ export default class PlanViewModel extends ConfiguratorViewModel implements Plan
170
168
  setNodeZoom(zoom: number): void;
171
169
  planCleared(): void;
172
170
  requestCatalogItem(_catalogItemId: string): void;
173
- turnLightsOnOrOff(onOrOff: boolean): void;
174
171
  }
@@ -21,6 +21,7 @@ import { default as Planner3dCameraBehaviour } from '../../../common-core/src/ca
21
21
  import { default as PlannerFpCameraBehaviour } from '../../../common-core/src/cameracontrol/planner-fp-camera-behaviour';
22
22
  import { EMSConstant } from '../../../typings/planner-kernel-container';
23
23
  import { default as InitData } from '../../../common-core/src/utils/init-data';
24
+ import { RoomleLightSource } from '../../../common-core/src/light/light-source';
24
25
  import { default as __DTS_DEFAULT_0__ } from '../../../common-core/src/webgl/configurator-context';
25
26
 
26
27
  export declare function isLockedElement(planElementViewModel: PlanElementViewModel, initData: InitData): boolean;
@@ -55,6 +56,9 @@ export default class PlannerSceneManager extends ConfiguratorSceneManager implem
55
56
  constructor(creator: string, offset: CanvasOffset, plannerCallback: RoomlePlannerCallback, mode: Enumify<typeof CAMERA_TYPE>);
56
57
  get configuratorContext(): __DTS_DEFAULT_0__;
57
58
  get hasSingleRoom(): boolean;
59
+ get scenePlanElementLightSources(): Map<number, RoomleLightSource>[];
60
+ setAllLightsOnOff(state: boolean): void;
61
+ setLightsOnOffByIds(ids: number[], state: boolean): void;
58
62
  private _activateElement;
59
63
  planCleared(): void;
60
64
  planHistoryStateChanged(): void;
@@ -222,7 +226,7 @@ export default class PlannerSceneManager extends ConfiguratorSceneManager implem
222
226
  getObjectComponent(id: number): KernelPlanObjectComponent;
223
227
  getCameraParameters3d(): NonNullable<CameraParameter>;
224
228
  private _createCeilingLightGroup;
225
- toggleInteriorLightsSceneSettings(onOrOff: boolean): void;
229
+ toggleInteriorLightsSceneSettings(on: boolean): void;
226
230
  private _insertRapiItems;
227
231
  insertRapiObjects(rapiIds: InsertItemIdInfo[]): Promise<InsertItemResult[]>;
228
232
  }
@@ -1,9 +1,9 @@
1
- import { Y as L, D as d, b as B, x as M, a as E, V as _, W as p, Q as I, Z as G, _ as x, $ as f, a0 as y, a1 as O, a2 as A, a3 as R, a4 as D, a5 as v, a6 as w, a7 as P, a8 as j, a9 as F, j as o, h as V, z as T, R as U, B as k } from "./main-CMu7hOEO.mjs";
2
- import { S as z } from "./script-loader-BzwDLtbS.mjs";
3
- import { C as N, L as H, S as Z, b as C } from "./camera-behaviour-BLMduSEn.mjs";
4
- import { D as q } from "./default-light-setting-D0Ie_AEw.mjs";
1
+ import { Y as L, D as d, b as B, x as M, a as E, V as _, W as p, Q as I, Z as G, _ as x, $ as f, a0 as y, a1 as O, a2 as A, a3 as R, a4 as D, a5 as v, a6 as w, a7 as P, a8 as j, a9 as F, j as o, h as V, z as T, R as U, B as k } from "./main-RpgY_kch.mjs";
2
+ import { S as z } from "./script-loader-CHolkWhE.mjs";
3
+ import { C as N, L as H, S as Z, b as C } from "./camera-behaviour-DWkBHxkk.mjs";
4
+ import { D as q } from "./default-light-setting-BdD0jDeP.mjs";
5
5
  import { C as Y } from "./main-thread-to-worker-ByNW4PfN.mjs";
6
- import { G as J } from "./glb-viewer-camera-behaviour-DQ2sVbku.mjs";
6
+ import { G as J } from "./glb-viewer-camera-behaviour-CRnnMrL2.mjs";
7
7
  class W extends L {
8
8
  //move on, nothing to see here
9
9
  }
@@ -460,4 +460,4 @@ class he extends T {
460
460
  export {
461
461
  he as GlbViewer
462
462
  };
463
- //# sourceMappingURL=glb-viewer-BEWU9zxC.mjs.map
463
+ //# sourceMappingURL=glb-viewer-BoZgMSrk.mjs.map