@roomle/web-sdk 3.6.0-alpha.2 → 3.6.0-alpha.4
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/BufferGeometry-DLEagG41.mjs +1022 -0
- package/lib/BufferGeometry-DLEagG41.mjs.map +1 -0
- package/lib/ConfiguratorKernel.js +2 -2
- package/lib/ConfiguratorKernel.wasm +0 -0
- package/lib/GLTFExporter-D8qsdwDK.mjs +1092 -0
- package/lib/GLTFExporter-D8qsdwDK.mjs.map +1 -0
- package/lib/Object3D-DSjIOhON.mjs +1713 -0
- package/lib/Object3D-DSjIOhON.mjs.map +1 -0
- package/lib/PointLightHelper-BnjxGaOG.mjs +257 -0
- package/lib/PointLightHelper-BnjxGaOG.mjs.map +1 -0
- package/lib/RoomleCore.js +4 -4
- package/lib/RoomleCore.wasm +0 -0
- package/lib/RoomleToolsCore.wasm +0 -0
- package/lib/SpotLightHelper-DqsfqCrs.mjs +154 -0
- package/lib/SpotLightHelper-DqsfqCrs.mjs.map +1 -0
- package/lib/USDZExporter-DxIqi8St.mjs +296 -0
- package/lib/USDZExporter-DxIqi8St.mjs.map +1 -0
- package/lib/Vector4-DGmBYfpK.mjs +204 -0
- package/lib/Vector4-DGmBYfpK.mjs.map +1 -0
- package/lib/api-CNoIBuvr.mjs +55 -0
- package/lib/api-CNoIBuvr.mjs.map +1 -0
- package/lib/asset-loader.worker.js +1 -1
- package/lib/banana-for-scale-C_iNmlCT.mjs +36 -0
- package/lib/banana-for-scale-C_iNmlCT.mjs.map +1 -0
- package/lib/common-utils-DMSTohiS.mjs +187 -0
- package/lib/common-utils-DMSTohiS.mjs.map +1 -0
- package/lib/component-dimensioning-CvRmUja4.mjs +162 -0
- package/lib/component-dimensioning-CvRmUja4.mjs.map +1 -0
- package/lib/component-raycast-helper-CEp7wy9c.mjs +97 -0
- package/lib/component-raycast-helper-CEp7wy9c.mjs.map +1 -0
- package/lib/configurator-B_5XVG2O.mjs +45 -0
- package/lib/configurator-B_5XVG2O.mjs.map +1 -0
- package/lib/configurator-DCdvMM0o.mjs +2 -0
- package/lib/continuous-drawing-helper-v_5UAM9A.mjs +42 -0
- package/lib/continuous-drawing-helper-v_5UAM9A.mjs.map +1 -0
- package/lib/decorate-C1QnXPYw.mjs +35 -0
- package/lib/decorate-C1QnXPYw.mjs.map +1 -0
- package/lib/dimensioning-helper-DTcW85Oq.mjs +2 -0
- package/lib/dimensioning-helper-Fwpt1HTT.mjs +268 -0
- package/lib/dimensioning-helper-Fwpt1HTT.mjs.map +1 -0
- package/lib/fflate.module-dFNj5UPI.mjs +536 -0
- package/lib/fflate.module-dFNj5UPI.mjs.map +1 -0
- package/lib/glb-viewer-cP8g6bcm.mjs +315 -0
- package/lib/glb-viewer-cP8g6bcm.mjs.map +1 -0
- package/lib/glb-viewer-dZThmlwM.mjs +2 -0
- package/lib/homag-intelligence-LoOJ7roM.mjs +381 -0
- package/lib/homag-intelligence-LoOJ7roM.mjs.map +1 -0
- package/lib/imos-ix-poc-export-helper-CQh94HsO.mjs +161 -0
- package/lib/imos-ix-poc-export-helper-CQh94HsO.mjs.map +1 -0
- package/lib/kernel-BAQSG9r5.mjs +46 -0
- package/lib/kernel-BAQSG9r5.mjs.map +1 -0
- package/lib/kernel-utils-H74uNY1h.mjs +44 -0
- package/lib/kernel-utils-H74uNY1h.mjs.map +1 -0
- package/lib/layer-C_JtkhdO.mjs +8 -0
- package/lib/layer-C_JtkhdO.mjs.map +1 -0
- package/lib/main-BxEZ11ag.mjs +20461 -0
- package/lib/main-BxEZ11ag.mjs.map +1 -0
- package/lib/material-viewer-njBFF0Zg.mjs +292 -0
- package/lib/material-viewer-njBFF0Zg.mjs.map +1 -0
- package/lib/planner-Cr495Cyn.mjs +2 -0
- package/lib/planner-DY73rplC.mjs +44 -0
- package/lib/planner-DY73rplC.mjs.map +1 -0
- package/lib/plugin-system-D9K46xJk.mjs +55 -0
- package/lib/plugin-system-D9K46xJk.mjs.map +1 -0
- package/lib/roomle-sdk.d.ts +302 -134
- package/lib/roomle-sdk.js +7 -36
- package/lib/scene-renderer-D8HkTFeZ.mjs +3826 -0
- package/lib/scene-renderer-D8HkTFeZ.mjs.map +1 -0
- package/lib/script-loader-KBq8SjP6.mjs +45 -0
- package/lib/script-loader-KBq8SjP6.mjs.map +1 -0
- package/lib/static/draco/node_modules/three/examples/jsm/libs/draco/draco_decoder.js +34 -0
- package/lib/static/draco/node_modules/three/examples/jsm/libs/draco/draco_decoder.wasm +0 -0
- package/lib/static/draco/node_modules/three/examples/jsm/libs/draco/draco_encoder.js +33 -0
- package/lib/static/draco/node_modules/three/examples/jsm/libs/draco/draco_wasm_wrapper.js +117 -0
- package/lib/static/packages/workers/generated/asset-loader.worker.js +1 -0
- package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/package.json +1 -0
- package/lib/static/roomle-core-hsc/{configuratorCore.d.ts → node_modules/roomle-core-hsc/src/embind/configuratorCore.d.ts} +1 -2
- package/lib/static/roomle-core-hsc/{configuratorCoreInterface.d.ts → node_modules/roomle-core-hsc/src/embind/configuratorCoreInterface.d.ts} +22 -29
- package/lib/static/roomle-core-hsc/{src → node_modules/roomle-core-hsc/src}/embind/plannerCore.d.ts +1 -2
- package/lib/static/roomle-core-hsc/{src → node_modules/roomle-core-hsc/src}/embind/plannerCoreCallback.d.ts +1 -1
- package/lib/static/roomle-core-hsc/{embind → node_modules/roomle-core-hsc/src/embind}/plannerCoreCallback.js +1 -1
- package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/src/embind/plannerCoreCallback.js.map +1 -0
- package/lib/static/roomle-core-hsc/{plannerCoreInterface.d.ts → node_modules/roomle-core-hsc/src/embind/plannerCoreInterface.d.ts} +76 -81
- package/lib/static/roomle-core-hsc/{embind → node_modules/roomle-core-hsc/src/embind}/plannerCoreInterface.js +1 -6
- package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/src/embind/plannerCoreInterface.js.map +1 -0
- package/lib/static/roomle-core-hsc/{loader → node_modules/roomle-core-hsc/src/loader}/configurableObject.d.ts +2 -2
- package/lib/static/roomle-core-hsc/{src → node_modules/roomle-core-hsc/src}/loader/configurableObject.js +6 -6
- package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/src/loader/configurableObject.js.map +1 -0
- package/lib/static/roomle-core-hsc/{src → node_modules/roomle-core-hsc/src}/loader/configurationLoader.js +1 -5
- package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/src/loader/configurationLoader.js.map +1 -0
- package/lib/static/roomle-core-hsc/{configurationManager.d.ts → node_modules/roomle-core-hsc/src/loader/configurationManager.d.ts} +1 -0
- package/lib/static/roomle-core-hsc/{loader → node_modules/roomle-core-hsc/src/loader}/configurationManager.js +6 -0
- package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/src/loader/configurationManager.js.map +1 -0
- package/lib/static/roomle-core-hsc/{src → node_modules/roomle-core-hsc/src}/loader/planElementManager.d.ts +2 -2
- package/lib/static/roomle-core-hsc/{loader → node_modules/roomle-core-hsc/src/loader}/planElementManager.js.map +1 -1
- package/lib/static/roomle-core-hsc/{wasm_modern → node_modules/roomle-core-hsc/wasm_modern}/ConfiguratorKernel.js +2 -2
- package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/wasm_modern/ConfiguratorKernel.wasm +0 -0
- package/lib/static/roomle-core-hsc/{wasm_modern → node_modules/roomle-core-hsc/wasm_modern}/RoomleCore.js +4 -4
- package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/wasm_modern/RoomleCore.wasm +0 -0
- package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/wasm_modern/RoomleToolsCore.wasm +0 -0
- package/lib/stats-helper-HM0TaIM5.mjs +95 -0
- package/lib/stats-helper-HM0TaIM5.mjs.map +1 -0
- package/lib/three.core-CLIofecG.mjs +7629 -0
- package/lib/three.core-CLIofecG.mjs.map +1 -0
- package/lib/three.module-C4Q1skJQ.mjs +5795 -0
- package/lib/three.module-C4Q1skJQ.mjs.map +1 -0
- package/lib/three.webgpu-dFspy2yF.mjs +16057 -0
- package/lib/three.webgpu-dFspy2yF.mjs.map +1 -0
- package/lib/threejs-utils-jEzvlJF1.mjs +2233 -0
- package/lib/threejs-utils-jEzvlJF1.mjs.map +1 -0
- package/lib/tools-core-CZbPygRC.mjs +30 -0
- package/lib/tools-core-CZbPygRC.mjs.map +1 -0
- package/package.json +3 -3
- package/lib/BufferGeometry-BZdSmtHt.mjs +0 -2064
- package/lib/BufferGeometry-BZdSmtHt.mjs.map +0 -1
- package/lib/GLTFExporter-DiE_HuI6.mjs +0 -1286
- package/lib/GLTFExporter-DiE_HuI6.mjs.map +0 -1
- package/lib/PointLightHelper-BvRpTX7D.mjs +0 -522
- package/lib/PointLightHelper-BvRpTX7D.mjs.map +0 -1
- package/lib/SpotLightHelper-Byg39thi.mjs +0 -222
- package/lib/SpotLightHelper-Byg39thi.mjs.map +0 -1
- package/lib/USDZExporter-VBx9xybH.mjs +0 -545
- package/lib/USDZExporter-VBx9xybH.mjs.map +0 -1
- package/lib/banana-for-scale-C9_AyZkI.mjs +0 -50
- package/lib/banana-for-scale-C9_AyZkI.mjs.map +0 -1
- package/lib/component-dimensioning-DHTSa-If.mjs +0 -229
- package/lib/component-dimensioning-DHTSa-If.mjs.map +0 -1
- package/lib/continuous-drawing-helper-BNHRsd4B.mjs +0 -48
- package/lib/continuous-drawing-helper-BNHRsd4B.mjs.map +0 -1
- package/lib/homag-intelligence-BraN723F.mjs +0 -545
- package/lib/homag-intelligence-BraN723F.mjs.map +0 -1
- package/lib/imos-ix-poc-export-helper-D7ubISCJ.mjs +0 -180
- package/lib/imos-ix-poc-export-helper-D7ubISCJ.mjs.map +0 -1
- package/lib/index-C-Prfui2.mjs +0 -73502
- package/lib/index-C-Prfui2.mjs.map +0 -1
- package/lib/material-viewer-DyVGp6Xm.mjs +0 -450
- package/lib/material-viewer-DyVGp6Xm.mjs.map +0 -1
- package/lib/roomle-sdk.js.map +0 -1
- package/lib/static/asset-loader.worker.js +0 -1
- package/lib/static/draco/gltf/draco_decoder.js +0 -33
- package/lib/static/draco/gltf/draco_decoder.wasm +0 -0
- package/lib/static/draco/gltf/draco_encoder.js +0 -33
- package/lib/static/draco/gltf/draco_wasm_wrapper.js +0 -116
- package/lib/static/roomle-core-hsc/ConfiguratorKernel.js +0 -74
- package/lib/static/roomle-core-hsc/ConfiguratorKernel.wasm +0 -0
- package/lib/static/roomle-core-hsc/RoomleCore.js +0 -79
- package/lib/static/roomle-core-hsc/RoomleCore.wasm +0 -0
- package/lib/static/roomle-core-hsc/RoomleToolsCore.wasm +0 -0
- package/lib/static/roomle-core-hsc/configurableObject.d.ts +0 -30
- package/lib/static/roomle-core-hsc/configurableObject.js +0 -111
- package/lib/static/roomle-core-hsc/configurableObject.js.map +0 -1
- package/lib/static/roomle-core-hsc/configurationLoader.js +0 -349
- package/lib/static/roomle-core-hsc/configurationLoader.js.map +0 -1
- package/lib/static/roomle-core-hsc/configurationManager.js +0 -141
- package/lib/static/roomle-core-hsc/configurationManager.js.map +0 -1
- package/lib/static/roomle-core-hsc/embind/configuratorCallback.d.ts +0 -82
- package/lib/static/roomle-core-hsc/embind/configuratorCallback.js +0 -355
- package/lib/static/roomle-core-hsc/embind/configuratorCallback.js.map +0 -1
- package/lib/static/roomle-core-hsc/embind/configuratorCore.d.ts +0 -20
- package/lib/static/roomle-core-hsc/embind/configuratorCore.js +0 -50
- package/lib/static/roomle-core-hsc/embind/configuratorCore.js.map +0 -1
- package/lib/static/roomle-core-hsc/embind/configuratorCoreInterface.d.ts +0 -753
- package/lib/static/roomle-core-hsc/embind/configuratorCoreInterface.js +0 -99
- package/lib/static/roomle-core-hsc/embind/configuratorCoreInterface.js.map +0 -1
- package/lib/static/roomle-core-hsc/embind/configuratorUtils.d.ts +0 -3
- package/lib/static/roomle-core-hsc/embind/configuratorUtils.js +0 -52
- package/lib/static/roomle-core-hsc/embind/configuratorUtils.js.map +0 -1
- package/lib/static/roomle-core-hsc/embind/coreModue.d.ts +0 -4
- package/lib/static/roomle-core-hsc/embind/coreModue.js +0 -3
- package/lib/static/roomle-core-hsc/embind/coreModue.js.map +0 -1
- package/lib/static/roomle-core-hsc/embind/coreModule.d.ts +0 -11
- package/lib/static/roomle-core-hsc/embind/coreModule.js +0 -19
- package/lib/static/roomle-core-hsc/embind/coreModule.js.map +0 -1
- package/lib/static/roomle-core-hsc/embind/plannerCore.d.ts +0 -32
- package/lib/static/roomle-core-hsc/embind/plannerCoreCallback.d.ts +0 -39
- package/lib/static/roomle-core-hsc/embind/plannerCoreCallback.js.map +0 -1
- package/lib/static/roomle-core-hsc/embind/plannerCoreInterface.d.ts +0 -858
- package/lib/static/roomle-core-hsc/embind/plannerCoreInterface.js.map +0 -1
- package/lib/static/roomle-core-hsc/loader/configurableObject.js +0 -111
- package/lib/static/roomle-core-hsc/loader/configurableObject.js.map +0 -1
- package/lib/static/roomle-core-hsc/loader/configurationGeometryConstructor.d.ts +0 -21
- package/lib/static/roomle-core-hsc/loader/configurationGeometryConstructor.js +0 -90
- package/lib/static/roomle-core-hsc/loader/configurationGeometryConstructor.js.map +0 -1
- package/lib/static/roomle-core-hsc/loader/configurationLoader.d.ts +0 -116
- package/lib/static/roomle-core-hsc/loader/configurationLoader.js +0 -349
- package/lib/static/roomle-core-hsc/loader/configurationLoader.js.map +0 -1
- package/lib/static/roomle-core-hsc/loader/configurationManager.d.ts +0 -40
- package/lib/static/roomle-core-hsc/loader/configurationManager.js.map +0 -1
- package/lib/static/roomle-core-hsc/loader/planElementManager.d.ts +0 -96
- package/lib/static/roomle-core-hsc/loaderUtility.d.ts +0 -81
- package/lib/static/roomle-core-hsc/loaderUtility.js +0 -141
- package/lib/static/roomle-core-hsc/loaderUtility.js.map +0 -1
- package/lib/static/roomle-core-hsc/logger.d.ts +0 -29
- package/lib/static/roomle-core-hsc/logger.js +0 -61
- package/lib/static/roomle-core-hsc/logger.js.map +0 -1
- package/lib/static/roomle-core-hsc/package.json +0 -1
- package/lib/static/roomle-core-hsc/planElementManager.d.ts +0 -96
- package/lib/static/roomle-core-hsc/planElementManager.js +0 -300
- package/lib/static/roomle-core-hsc/planElementManager.js.map +0 -1
- package/lib/static/roomle-core-hsc/plannerCore.d.ts +0 -32
- package/lib/static/roomle-core-hsc/plannerCore.js +0 -111
- package/lib/static/roomle-core-hsc/plannerCore.js.map +0 -1
- package/lib/static/roomle-core-hsc/plannerCoreCallback.d.ts +0 -39
- package/lib/static/roomle-core-hsc/plannerCoreCallback.js +0 -116
- package/lib/static/roomle-core-hsc/plannerCoreCallback.js.map +0 -1
- package/lib/static/roomle-core-hsc/plannerCoreInterface.js +0 -98
- package/lib/static/roomle-core-hsc/plannerCoreInterface.js.map +0 -1
- package/lib/static/roomle-core-hsc/rapiAccess.d.ts +0 -70
- package/lib/static/roomle-core-hsc/rapiAccess.js +0 -227
- package/lib/static/roomle-core-hsc/rapiAccess.js.map +0 -1
- package/lib/static/roomle-core-hsc/serviceCore.d.ts +0 -20
- package/lib/static/roomle-core-hsc/serviceCore.js +0 -54
- package/lib/static/roomle-core-hsc/serviceCore.js.map +0 -1
- package/lib/static/roomle-core-hsc/serviceCoreInterface.d.ts +0 -13
- package/lib/static/roomle-core-hsc/serviceCoreInterface.js +0 -3
- package/lib/static/roomle-core-hsc/serviceCoreInterface.js.map +0 -1
- package/lib/static/roomle-core-hsc/src/embind/configuratorCallback.d.ts +0 -82
- package/lib/static/roomle-core-hsc/src/embind/configuratorCallback.js +0 -355
- package/lib/static/roomle-core-hsc/src/embind/configuratorCallback.js.map +0 -1
- package/lib/static/roomle-core-hsc/src/embind/configuratorCore.d.ts +0 -20
- package/lib/static/roomle-core-hsc/src/embind/configuratorCore.js +0 -50
- package/lib/static/roomle-core-hsc/src/embind/configuratorCore.js.map +0 -1
- package/lib/static/roomle-core-hsc/src/embind/configuratorCoreInterface.d.ts +0 -753
- package/lib/static/roomle-core-hsc/src/embind/configuratorCoreInterface.js +0 -99
- package/lib/static/roomle-core-hsc/src/embind/configuratorCoreInterface.js.map +0 -1
- package/lib/static/roomle-core-hsc/src/embind/configuratorUtils.d.ts +0 -3
- package/lib/static/roomle-core-hsc/src/embind/configuratorUtils.js +0 -52
- package/lib/static/roomle-core-hsc/src/embind/configuratorUtils.js.map +0 -1
- package/lib/static/roomle-core-hsc/src/embind/coreModue.d.ts +0 -4
- package/lib/static/roomle-core-hsc/src/embind/coreModue.js +0 -3
- package/lib/static/roomle-core-hsc/src/embind/coreModue.js.map +0 -1
- package/lib/static/roomle-core-hsc/src/embind/coreModule.d.ts +0 -11
- package/lib/static/roomle-core-hsc/src/embind/coreModule.js +0 -19
- package/lib/static/roomle-core-hsc/src/embind/coreModule.js.map +0 -1
- package/lib/static/roomle-core-hsc/src/embind/plannerCore.js +0 -111
- package/lib/static/roomle-core-hsc/src/embind/plannerCore.js.map +0 -1
- package/lib/static/roomle-core-hsc/src/embind/plannerCoreCallback.js +0 -116
- package/lib/static/roomle-core-hsc/src/embind/plannerCoreCallback.js.map +0 -1
- package/lib/static/roomle-core-hsc/src/embind/plannerCoreInterface.d.ts +0 -858
- package/lib/static/roomle-core-hsc/src/embind/plannerCoreInterface.js +0 -98
- package/lib/static/roomle-core-hsc/src/embind/plannerCoreInterface.js.map +0 -1
- package/lib/static/roomle-core-hsc/src/embind/serviceCore.d.ts +0 -20
- package/lib/static/roomle-core-hsc/src/embind/serviceCore.js +0 -54
- package/lib/static/roomle-core-hsc/src/embind/serviceCore.js.map +0 -1
- package/lib/static/roomle-core-hsc/src/embind/serviceCoreInterface.d.ts +0 -13
- package/lib/static/roomle-core-hsc/src/embind/serviceCoreInterface.js +0 -3
- package/lib/static/roomle-core-hsc/src/embind/serviceCoreInterface.js.map +0 -1
- package/lib/static/roomle-core-hsc/src/embind/toolsCore.d.ts +0 -17
- package/lib/static/roomle-core-hsc/src/embind/toolsCore.js +0 -75
- package/lib/static/roomle-core-hsc/src/embind/toolsCore.js.map +0 -1
- package/lib/static/roomle-core-hsc/src/embind/toolsCoreInterface.d.ts +0 -40
- package/lib/static/roomle-core-hsc/src/embind/toolsCoreInterface.js +0 -8
- package/lib/static/roomle-core-hsc/src/embind/toolsCoreInterface.js.map +0 -1
- package/lib/static/roomle-core-hsc/src/loader/configurableObject.d.ts +0 -30
- package/lib/static/roomle-core-hsc/src/loader/configurableObject.js.map +0 -1
- package/lib/static/roomle-core-hsc/src/loader/configurationGeometryConstructor.d.ts +0 -21
- package/lib/static/roomle-core-hsc/src/loader/configurationGeometryConstructor.js +0 -90
- package/lib/static/roomle-core-hsc/src/loader/configurationGeometryConstructor.js.map +0 -1
- package/lib/static/roomle-core-hsc/src/loader/configurationLoader.d.ts +0 -116
- package/lib/static/roomle-core-hsc/src/loader/configurationLoader.js.map +0 -1
- package/lib/static/roomle-core-hsc/src/loader/configurationManager.d.ts +0 -40
- package/lib/static/roomle-core-hsc/src/loader/configurationManager.js +0 -141
- package/lib/static/roomle-core-hsc/src/loader/configurationManager.js.map +0 -1
- package/lib/static/roomle-core-hsc/src/loader/loaderUtility.d.ts +0 -81
- package/lib/static/roomle-core-hsc/src/loader/loaderUtility.js +0 -141
- package/lib/static/roomle-core-hsc/src/loader/loaderUtility.js.map +0 -1
- package/lib/static/roomle-core-hsc/src/loader/logger.d.ts +0 -29
- package/lib/static/roomle-core-hsc/src/loader/logger.js +0 -61
- package/lib/static/roomle-core-hsc/src/loader/logger.js.map +0 -1
- package/lib/static/roomle-core-hsc/src/loader/planElementManager.js +0 -300
- package/lib/static/roomle-core-hsc/src/loader/planElementManager.js.map +0 -1
- package/lib/static/roomle-core-hsc/src/loader/rapiAccess.d.ts +0 -70
- package/lib/static/roomle-core-hsc/src/loader/rapiAccess.js +0 -227
- package/lib/static/roomle-core-hsc/src/loader/rapiAccess.js.map +0 -1
- package/lib/static/roomle-core-hsc/toolsCore.d.ts +0 -17
- package/lib/static/roomle-core-hsc/toolsCore.js +0 -75
- package/lib/static/roomle-core-hsc/toolsCore.js.map +0 -1
- package/lib/static/roomle-core-hsc/toolsCoreInterface.d.ts +0 -40
- package/lib/static/roomle-core-hsc/toolsCoreInterface.js +0 -8
- package/lib/static/roomle-core-hsc/toolsCoreInterface.js.map +0 -1
- package/lib/static/roomle-core-hsc/wasm_modern/ConfiguratorKernel.wasm +0 -0
- package/lib/static/roomle-core-hsc/wasm_modern/RoomleCore.wasm +0 -0
- package/lib/static/roomle-core-hsc/wasm_modern/RoomleToolsCore.js +0 -74
- package/lib/static/roomle-core-hsc/wasm_modern/RoomleToolsCore.wasm +0 -0
- package/lib/stats-helper-UQlUyOTj.mjs +0 -108
- package/lib/stats-helper-UQlUyOTj.mjs.map +0 -1
- package/lib/three.webgpu-sHJcp001.mjs +0 -27625
- package/lib/three.webgpu-sHJcp001.mjs.map +0 -1
- package/lib/tools-core-wkPFRdnH.mjs +0 -36
- package/lib/tools-core-wkPFRdnH.mjs.map +0 -1
- /package/lib/static/draco/{README.md → node_modules/three/examples/jsm/libs/draco/README.md} +0 -0
- /package/lib/static/draco/{draco_decoder.js → node_modules/three/examples/jsm/libs/draco/gltf/draco_decoder.js} +0 -0
- /package/lib/static/draco/{draco_decoder.wasm → node_modules/three/examples/jsm/libs/draco/gltf/draco_decoder.wasm} +0 -0
- /package/lib/static/draco/{draco_encoder.js → node_modules/three/examples/jsm/libs/draco/gltf/draco_encoder.js} +0 -0
- /package/lib/static/draco/{draco_wasm_wrapper.js → node_modules/three/examples/jsm/libs/draco/gltf/draco_wasm_wrapper.js} +0 -0
- /package/lib/static/{budgeteer.sw.js → packages/workers/generated/budgeteer.sw.js} +0 -0
- /package/lib/static/roomle-core-hsc/{configuratorCallback.d.ts → node_modules/roomle-core-hsc/src/embind/configuratorCallback.d.ts} +0 -0
- /package/lib/static/roomle-core-hsc/{configuratorCallback.js → node_modules/roomle-core-hsc/src/embind/configuratorCallback.js} +0 -0
- /package/lib/static/roomle-core-hsc/{configuratorCallback.js.map → node_modules/roomle-core-hsc/src/embind/configuratorCallback.js.map} +0 -0
- /package/lib/static/roomle-core-hsc/{configuratorCore.js → node_modules/roomle-core-hsc/src/embind/configuratorCore.js} +0 -0
- /package/lib/static/roomle-core-hsc/{configuratorCore.js.map → node_modules/roomle-core-hsc/src/embind/configuratorCore.js.map} +0 -0
- /package/lib/static/roomle-core-hsc/{configuratorCoreInterface.js → node_modules/roomle-core-hsc/src/embind/configuratorCoreInterface.js} +0 -0
- /package/lib/static/roomle-core-hsc/{configuratorCoreInterface.js.map → node_modules/roomle-core-hsc/src/embind/configuratorCoreInterface.js.map} +0 -0
- /package/lib/static/roomle-core-hsc/{configuratorUtils.d.ts → node_modules/roomle-core-hsc/src/embind/configuratorUtils.d.ts} +0 -0
- /package/lib/static/roomle-core-hsc/{configuratorUtils.js → node_modules/roomle-core-hsc/src/embind/configuratorUtils.js} +0 -0
- /package/lib/static/roomle-core-hsc/{configuratorUtils.js.map → node_modules/roomle-core-hsc/src/embind/configuratorUtils.js.map} +0 -0
- /package/lib/static/roomle-core-hsc/{coreModue.d.ts → node_modules/roomle-core-hsc/src/embind/coreModue.d.ts} +0 -0
- /package/lib/static/roomle-core-hsc/{coreModue.js → node_modules/roomle-core-hsc/src/embind/coreModue.js} +0 -0
- /package/lib/static/roomle-core-hsc/{coreModue.js.map → node_modules/roomle-core-hsc/src/embind/coreModue.js.map} +0 -0
- /package/lib/static/roomle-core-hsc/{coreModule.d.ts → node_modules/roomle-core-hsc/src/embind/coreModule.d.ts} +0 -0
- /package/lib/static/roomle-core-hsc/{coreModule.js → node_modules/roomle-core-hsc/src/embind/coreModule.js} +0 -0
- /package/lib/static/roomle-core-hsc/{coreModule.js.map → node_modules/roomle-core-hsc/src/embind/coreModule.js.map} +0 -0
- /package/lib/static/roomle-core-hsc/{embind → node_modules/roomle-core-hsc/src/embind}/plannerCore.js +0 -0
- /package/lib/static/roomle-core-hsc/{embind → node_modules/roomle-core-hsc/src/embind}/plannerCore.js.map +0 -0
- /package/lib/static/roomle-core-hsc/{embind → node_modules/roomle-core-hsc/src/embind}/serviceCore.d.ts +0 -0
- /package/lib/static/roomle-core-hsc/{embind → node_modules/roomle-core-hsc/src/embind}/serviceCore.js +0 -0
- /package/lib/static/roomle-core-hsc/{embind → node_modules/roomle-core-hsc/src/embind}/serviceCore.js.map +0 -0
- /package/lib/static/roomle-core-hsc/{embind → node_modules/roomle-core-hsc/src/embind}/serviceCoreInterface.d.ts +0 -0
- /package/lib/static/roomle-core-hsc/{embind → node_modules/roomle-core-hsc/src/embind}/serviceCoreInterface.js +0 -0
- /package/lib/static/roomle-core-hsc/{embind → node_modules/roomle-core-hsc/src/embind}/serviceCoreInterface.js.map +0 -0
- /package/lib/static/roomle-core-hsc/{embind → node_modules/roomle-core-hsc/src/embind}/toolsCore.d.ts +0 -0
- /package/lib/static/roomle-core-hsc/{embind → node_modules/roomle-core-hsc/src/embind}/toolsCore.js +0 -0
- /package/lib/static/roomle-core-hsc/{embind → node_modules/roomle-core-hsc/src/embind}/toolsCore.js.map +0 -0
- /package/lib/static/roomle-core-hsc/{embind → node_modules/roomle-core-hsc/src/embind}/toolsCoreInterface.d.ts +0 -0
- /package/lib/static/roomle-core-hsc/{embind → node_modules/roomle-core-hsc/src/embind}/toolsCoreInterface.js +0 -0
- /package/lib/static/roomle-core-hsc/{embind → node_modules/roomle-core-hsc/src/embind}/toolsCoreInterface.js.map +0 -0
- /package/lib/static/roomle-core-hsc/{configurationGeometryConstructor.d.ts → node_modules/roomle-core-hsc/src/loader/configurationGeometryConstructor.d.ts} +0 -0
- /package/lib/static/roomle-core-hsc/{configurationGeometryConstructor.js → node_modules/roomle-core-hsc/src/loader/configurationGeometryConstructor.js} +0 -0
- /package/lib/static/roomle-core-hsc/{configurationGeometryConstructor.js.map → node_modules/roomle-core-hsc/src/loader/configurationGeometryConstructor.js.map} +0 -0
- /package/lib/static/roomle-core-hsc/{configurationLoader.d.ts → node_modules/roomle-core-hsc/src/loader/configurationLoader.d.ts} +0 -0
- /package/lib/static/roomle-core-hsc/{loader → node_modules/roomle-core-hsc/src/loader}/loaderUtility.d.ts +0 -0
- /package/lib/static/roomle-core-hsc/{loader → node_modules/roomle-core-hsc/src/loader}/loaderUtility.js +0 -0
- /package/lib/static/roomle-core-hsc/{loader → node_modules/roomle-core-hsc/src/loader}/loaderUtility.js.map +0 -0
- /package/lib/static/roomle-core-hsc/{loader → node_modules/roomle-core-hsc/src/loader}/logger.d.ts +0 -0
- /package/lib/static/roomle-core-hsc/{loader → node_modules/roomle-core-hsc/src/loader}/logger.js +0 -0
- /package/lib/static/roomle-core-hsc/{loader → node_modules/roomle-core-hsc/src/loader}/logger.js.map +0 -0
- /package/lib/static/roomle-core-hsc/{loader → node_modules/roomle-core-hsc/src/loader}/planElementManager.js +0 -0
- /package/lib/static/roomle-core-hsc/{loader → node_modules/roomle-core-hsc/src/loader}/rapiAccess.d.ts +0 -0
- /package/lib/static/roomle-core-hsc/{loader → node_modules/roomle-core-hsc/src/loader}/rapiAccess.js +0 -0
- /package/lib/static/roomle-core-hsc/{loader → node_modules/roomle-core-hsc/src/loader}/rapiAccess.js.map +0 -0
- /package/lib/static/roomle-core-hsc/{RoomleToolsCore.js → node_modules/roomle-core-hsc/wasm_modern/RoomleToolsCore.js} +0 -0
|
@@ -0,0 +1,1713 @@
|
|
|
1
|
+
//#region ../../node_modules/three/src/constants.js
|
|
2
|
+
var e = 1009, t = 1015, n = "srgb", r = "srgb-linear", i = "linear", a = "srgb", o = 7680, s = 35044, c = 2e3, l = 2001;
|
|
3
|
+
//#endregion
|
|
4
|
+
//#region ../../node_modules/three/src/utils.js
|
|
5
|
+
function u(e) {
|
|
6
|
+
for (let t = e.length - 1; t >= 0; --t) if (e[t] >= 65535) return !0;
|
|
7
|
+
return !1;
|
|
8
|
+
}
|
|
9
|
+
var d = {}, f = null;
|
|
10
|
+
function p(e) {
|
|
11
|
+
let t = e[0];
|
|
12
|
+
if (typeof t == "string" && t.startsWith("TSL:")) {
|
|
13
|
+
let t = e[1];
|
|
14
|
+
t && t.isStackTrace ? e[0] += " " + t.getLocation() : e[1] = "Stack trace not available. Enable \"THREE.Node.captureStackTrace\" to capture stack traces.";
|
|
15
|
+
}
|
|
16
|
+
return e;
|
|
17
|
+
}
|
|
18
|
+
function m(...e) {
|
|
19
|
+
e = p(e);
|
|
20
|
+
let t = "THREE." + e.shift();
|
|
21
|
+
if (f) f("warn", t, ...e);
|
|
22
|
+
else {
|
|
23
|
+
let n = e[0];
|
|
24
|
+
n && n.isStackTrace ? console.warn(n.getError(t)) : console.warn(t, ...e);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
function h(...e) {
|
|
28
|
+
e = p(e);
|
|
29
|
+
let t = "THREE." + e.shift();
|
|
30
|
+
if (f) f("error", t, ...e);
|
|
31
|
+
else {
|
|
32
|
+
let n = e[0];
|
|
33
|
+
n && n.isStackTrace ? console.error(n.getError(t)) : console.error(t, ...e);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
function g(...e) {
|
|
37
|
+
let t = e.join(" ");
|
|
38
|
+
t in d || (d[t] = !0, m(...e));
|
|
39
|
+
}
|
|
40
|
+
//#endregion
|
|
41
|
+
//#region ../../node_modules/three/src/math/MathUtils.js
|
|
42
|
+
var _ = /* @__PURE__ */ "00.01.02.03.04.05.06.07.08.09.0a.0b.0c.0d.0e.0f.10.11.12.13.14.15.16.17.18.19.1a.1b.1c.1d.1e.1f.20.21.22.23.24.25.26.27.28.29.2a.2b.2c.2d.2e.2f.30.31.32.33.34.35.36.37.38.39.3a.3b.3c.3d.3e.3f.40.41.42.43.44.45.46.47.48.49.4a.4b.4c.4d.4e.4f.50.51.52.53.54.55.56.57.58.59.5a.5b.5c.5d.5e.5f.60.61.62.63.64.65.66.67.68.69.6a.6b.6c.6d.6e.6f.70.71.72.73.74.75.76.77.78.79.7a.7b.7c.7d.7e.7f.80.81.82.83.84.85.86.87.88.89.8a.8b.8c.8d.8e.8f.90.91.92.93.94.95.96.97.98.99.9a.9b.9c.9d.9e.9f.a0.a1.a2.a3.a4.a5.a6.a7.a8.a9.aa.ab.ac.ad.ae.af.b0.b1.b2.b3.b4.b5.b6.b7.b8.b9.ba.bb.bc.bd.be.bf.c0.c1.c2.c3.c4.c5.c6.c7.c8.c9.ca.cb.cc.cd.ce.cf.d0.d1.d2.d3.d4.d5.d6.d7.d8.d9.da.db.dc.dd.de.df.e0.e1.e2.e3.e4.e5.e6.e7.e8.e9.ea.eb.ec.ed.ee.ef.f0.f1.f2.f3.f4.f5.f6.f7.f8.f9.fa.fb.fc.fd.fe.ff".split("."), v = Math.PI / 180, y = 180 / Math.PI;
|
|
43
|
+
function b() {
|
|
44
|
+
let e = Math.random() * 4294967295 | 0, t = Math.random() * 4294967295 | 0, n = Math.random() * 4294967295 | 0, r = Math.random() * 4294967295 | 0;
|
|
45
|
+
return (_[e & 255] + _[e >> 8 & 255] + _[e >> 16 & 255] + _[e >> 24 & 255] + "-" + _[t & 255] + _[t >> 8 & 255] + "-" + _[t >> 16 & 15 | 64] + _[t >> 24 & 255] + "-" + _[n & 63 | 128] + _[n >> 8 & 255] + "-" + _[n >> 16 & 255] + _[n >> 24 & 255] + _[r & 255] + _[r >> 8 & 255] + _[r >> 16 & 255] + _[r >> 24 & 255]).toLowerCase();
|
|
46
|
+
}
|
|
47
|
+
function x(e, t, n) {
|
|
48
|
+
return Math.max(t, Math.min(n, e));
|
|
49
|
+
}
|
|
50
|
+
function S(e, t) {
|
|
51
|
+
return (e % t + t) % t;
|
|
52
|
+
}
|
|
53
|
+
function C(e, t, n) {
|
|
54
|
+
return (1 - n) * e + n * t;
|
|
55
|
+
}
|
|
56
|
+
function w(e, t) {
|
|
57
|
+
switch (t.constructor) {
|
|
58
|
+
case Float32Array: return e;
|
|
59
|
+
case Uint32Array: return e / 4294967295;
|
|
60
|
+
case Uint16Array: return e / 65535;
|
|
61
|
+
case Uint8Array: return e / 255;
|
|
62
|
+
case Int32Array: return Math.max(e / 2147483647, -1);
|
|
63
|
+
case Int16Array: return Math.max(e / 32767, -1);
|
|
64
|
+
case Int8Array: return Math.max(e / 127, -1);
|
|
65
|
+
default: throw Error("Invalid component type.");
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
function T(e, t) {
|
|
69
|
+
switch (t.constructor) {
|
|
70
|
+
case Float32Array: return e;
|
|
71
|
+
case Uint32Array: return Math.round(e * 4294967295);
|
|
72
|
+
case Uint16Array: return Math.round(e * 65535);
|
|
73
|
+
case Uint8Array: return Math.round(e * 255);
|
|
74
|
+
case Int32Array: return Math.round(e * 2147483647);
|
|
75
|
+
case Int16Array: return Math.round(e * 32767);
|
|
76
|
+
case Int8Array: return Math.round(e * 127);
|
|
77
|
+
default: throw Error("Invalid component type.");
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
//#endregion
|
|
81
|
+
//#region ../../node_modules/three/src/math/Quaternion.js
|
|
82
|
+
var E = class {
|
|
83
|
+
constructor(e = 0, t = 0, n = 0, r = 1) {
|
|
84
|
+
this.isQuaternion = !0, this._x = e, this._y = t, this._z = n, this._w = r;
|
|
85
|
+
}
|
|
86
|
+
static slerpFlat(e, t, n, r, i, a, o) {
|
|
87
|
+
let s = n[r + 0], c = n[r + 1], l = n[r + 2], u = n[r + 3], d = i[a + 0], f = i[a + 1], p = i[a + 2], m = i[a + 3];
|
|
88
|
+
if (u !== m || s !== d || c !== f || l !== p) {
|
|
89
|
+
let e = s * d + c * f + l * p + u * m;
|
|
90
|
+
e < 0 && (d = -d, f = -f, p = -p, m = -m, e = -e);
|
|
91
|
+
let t = 1 - o;
|
|
92
|
+
if (e < .9995) {
|
|
93
|
+
let n = Math.acos(e), r = Math.sin(n);
|
|
94
|
+
t = Math.sin(t * n) / r, o = Math.sin(o * n) / r, s = s * t + d * o, c = c * t + f * o, l = l * t + p * o, u = u * t + m * o;
|
|
95
|
+
} else {
|
|
96
|
+
s = s * t + d * o, c = c * t + f * o, l = l * t + p * o, u = u * t + m * o;
|
|
97
|
+
let e = 1 / Math.sqrt(s * s + c * c + l * l + u * u);
|
|
98
|
+
s *= e, c *= e, l *= e, u *= e;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
e[t] = s, e[t + 1] = c, e[t + 2] = l, e[t + 3] = u;
|
|
102
|
+
}
|
|
103
|
+
static multiplyQuaternionsFlat(e, t, n, r, i, a) {
|
|
104
|
+
let o = n[r], s = n[r + 1], c = n[r + 2], l = n[r + 3], u = i[a], d = i[a + 1], f = i[a + 2], p = i[a + 3];
|
|
105
|
+
return e[t] = o * p + l * u + s * f - c * d, e[t + 1] = s * p + l * d + c * u - o * f, e[t + 2] = c * p + l * f + o * d - s * u, e[t + 3] = l * p - o * u - s * d - c * f, e;
|
|
106
|
+
}
|
|
107
|
+
get x() {
|
|
108
|
+
return this._x;
|
|
109
|
+
}
|
|
110
|
+
set x(e) {
|
|
111
|
+
this._x = e, this._onChangeCallback();
|
|
112
|
+
}
|
|
113
|
+
get y() {
|
|
114
|
+
return this._y;
|
|
115
|
+
}
|
|
116
|
+
set y(e) {
|
|
117
|
+
this._y = e, this._onChangeCallback();
|
|
118
|
+
}
|
|
119
|
+
get z() {
|
|
120
|
+
return this._z;
|
|
121
|
+
}
|
|
122
|
+
set z(e) {
|
|
123
|
+
this._z = e, this._onChangeCallback();
|
|
124
|
+
}
|
|
125
|
+
get w() {
|
|
126
|
+
return this._w;
|
|
127
|
+
}
|
|
128
|
+
set w(e) {
|
|
129
|
+
this._w = e, this._onChangeCallback();
|
|
130
|
+
}
|
|
131
|
+
set(e, t, n, r) {
|
|
132
|
+
return this._x = e, this._y = t, this._z = n, this._w = r, this._onChangeCallback(), this;
|
|
133
|
+
}
|
|
134
|
+
clone() {
|
|
135
|
+
return new this.constructor(this._x, this._y, this._z, this._w);
|
|
136
|
+
}
|
|
137
|
+
copy(e) {
|
|
138
|
+
return this._x = e.x, this._y = e.y, this._z = e.z, this._w = e.w, this._onChangeCallback(), this;
|
|
139
|
+
}
|
|
140
|
+
setFromEuler(e, t = !0) {
|
|
141
|
+
let n = e._x, r = e._y, i = e._z, a = e._order, o = Math.cos, s = Math.sin, c = o(n / 2), l = o(r / 2), u = o(i / 2), d = s(n / 2), f = s(r / 2), p = s(i / 2);
|
|
142
|
+
switch (a) {
|
|
143
|
+
case "XYZ":
|
|
144
|
+
this._x = d * l * u + c * f * p, this._y = c * f * u - d * l * p, this._z = c * l * p + d * f * u, this._w = c * l * u - d * f * p;
|
|
145
|
+
break;
|
|
146
|
+
case "YXZ":
|
|
147
|
+
this._x = d * l * u + c * f * p, this._y = c * f * u - d * l * p, this._z = c * l * p - d * f * u, this._w = c * l * u + d * f * p;
|
|
148
|
+
break;
|
|
149
|
+
case "ZXY":
|
|
150
|
+
this._x = d * l * u - c * f * p, this._y = c * f * u + d * l * p, this._z = c * l * p + d * f * u, this._w = c * l * u - d * f * p;
|
|
151
|
+
break;
|
|
152
|
+
case "ZYX":
|
|
153
|
+
this._x = d * l * u - c * f * p, this._y = c * f * u + d * l * p, this._z = c * l * p - d * f * u, this._w = c * l * u + d * f * p;
|
|
154
|
+
break;
|
|
155
|
+
case "YZX":
|
|
156
|
+
this._x = d * l * u + c * f * p, this._y = c * f * u + d * l * p, this._z = c * l * p - d * f * u, this._w = c * l * u - d * f * p;
|
|
157
|
+
break;
|
|
158
|
+
case "XZY":
|
|
159
|
+
this._x = d * l * u - c * f * p, this._y = c * f * u - d * l * p, this._z = c * l * p + d * f * u, this._w = c * l * u + d * f * p;
|
|
160
|
+
break;
|
|
161
|
+
default: m("Quaternion: .setFromEuler() encountered an unknown order: " + a);
|
|
162
|
+
}
|
|
163
|
+
return t === !0 && this._onChangeCallback(), this;
|
|
164
|
+
}
|
|
165
|
+
setFromAxisAngle(e, t) {
|
|
166
|
+
let n = t / 2, r = Math.sin(n);
|
|
167
|
+
return this._x = e.x * r, this._y = e.y * r, this._z = e.z * r, this._w = Math.cos(n), this._onChangeCallback(), this;
|
|
168
|
+
}
|
|
169
|
+
setFromRotationMatrix(e) {
|
|
170
|
+
let t = e.elements, n = t[0], r = t[4], i = t[8], a = t[1], o = t[5], s = t[9], c = t[2], l = t[6], u = t[10], d = n + o + u;
|
|
171
|
+
if (d > 0) {
|
|
172
|
+
let e = .5 / Math.sqrt(d + 1);
|
|
173
|
+
this._w = .25 / e, this._x = (l - s) * e, this._y = (i - c) * e, this._z = (a - r) * e;
|
|
174
|
+
} else if (n > o && n > u) {
|
|
175
|
+
let e = 2 * Math.sqrt(1 + n - o - u);
|
|
176
|
+
this._w = (l - s) / e, this._x = .25 * e, this._y = (r + a) / e, this._z = (i + c) / e;
|
|
177
|
+
} else if (o > u) {
|
|
178
|
+
let e = 2 * Math.sqrt(1 + o - n - u);
|
|
179
|
+
this._w = (i - c) / e, this._x = (r + a) / e, this._y = .25 * e, this._z = (s + l) / e;
|
|
180
|
+
} else {
|
|
181
|
+
let e = 2 * Math.sqrt(1 + u - n - o);
|
|
182
|
+
this._w = (a - r) / e, this._x = (i + c) / e, this._y = (s + l) / e, this._z = .25 * e;
|
|
183
|
+
}
|
|
184
|
+
return this._onChangeCallback(), this;
|
|
185
|
+
}
|
|
186
|
+
setFromUnitVectors(e, t) {
|
|
187
|
+
let n = e.dot(t) + 1;
|
|
188
|
+
return n < 1e-8 ? (n = 0, Math.abs(e.x) > Math.abs(e.z) ? (this._x = -e.y, this._y = e.x, this._z = 0, this._w = n) : (this._x = 0, this._y = -e.z, this._z = e.y, this._w = n)) : (this._x = e.y * t.z - e.z * t.y, this._y = e.z * t.x - e.x * t.z, this._z = e.x * t.y - e.y * t.x, this._w = n), this.normalize();
|
|
189
|
+
}
|
|
190
|
+
angleTo(e) {
|
|
191
|
+
return 2 * Math.acos(Math.abs(x(this.dot(e), -1, 1)));
|
|
192
|
+
}
|
|
193
|
+
rotateTowards(e, t) {
|
|
194
|
+
let n = this.angleTo(e);
|
|
195
|
+
if (n === 0) return this;
|
|
196
|
+
let r = Math.min(1, t / n);
|
|
197
|
+
return this.slerp(e, r), this;
|
|
198
|
+
}
|
|
199
|
+
identity() {
|
|
200
|
+
return this.set(0, 0, 0, 1);
|
|
201
|
+
}
|
|
202
|
+
invert() {
|
|
203
|
+
return this.conjugate();
|
|
204
|
+
}
|
|
205
|
+
conjugate() {
|
|
206
|
+
return this._x *= -1, this._y *= -1, this._z *= -1, this._onChangeCallback(), this;
|
|
207
|
+
}
|
|
208
|
+
dot(e) {
|
|
209
|
+
return this._x * e._x + this._y * e._y + this._z * e._z + this._w * e._w;
|
|
210
|
+
}
|
|
211
|
+
lengthSq() {
|
|
212
|
+
return this._x * this._x + this._y * this._y + this._z * this._z + this._w * this._w;
|
|
213
|
+
}
|
|
214
|
+
length() {
|
|
215
|
+
return Math.sqrt(this._x * this._x + this._y * this._y + this._z * this._z + this._w * this._w);
|
|
216
|
+
}
|
|
217
|
+
normalize() {
|
|
218
|
+
let e = this.length();
|
|
219
|
+
return e === 0 ? (this._x = 0, this._y = 0, this._z = 0, this._w = 1) : (e = 1 / e, this._x *= e, this._y *= e, this._z *= e, this._w *= e), this._onChangeCallback(), this;
|
|
220
|
+
}
|
|
221
|
+
multiply(e) {
|
|
222
|
+
return this.multiplyQuaternions(this, e);
|
|
223
|
+
}
|
|
224
|
+
premultiply(e) {
|
|
225
|
+
return this.multiplyQuaternions(e, this);
|
|
226
|
+
}
|
|
227
|
+
multiplyQuaternions(e, t) {
|
|
228
|
+
let n = e._x, r = e._y, i = e._z, a = e._w, o = t._x, s = t._y, c = t._z, l = t._w;
|
|
229
|
+
return this._x = n * l + a * o + r * c - i * s, this._y = r * l + a * s + i * o - n * c, this._z = i * l + a * c + n * s - r * o, this._w = a * l - n * o - r * s - i * c, this._onChangeCallback(), this;
|
|
230
|
+
}
|
|
231
|
+
slerp(e, t) {
|
|
232
|
+
let n = e._x, r = e._y, i = e._z, a = e._w, o = this.dot(e);
|
|
233
|
+
o < 0 && (n = -n, r = -r, i = -i, a = -a, o = -o);
|
|
234
|
+
let s = 1 - t;
|
|
235
|
+
if (o < .9995) {
|
|
236
|
+
let e = Math.acos(o), c = Math.sin(e);
|
|
237
|
+
s = Math.sin(s * e) / c, t = Math.sin(t * e) / c, this._x = this._x * s + n * t, this._y = this._y * s + r * t, this._z = this._z * s + i * t, this._w = this._w * s + a * t, this._onChangeCallback();
|
|
238
|
+
} else this._x = this._x * s + n * t, this._y = this._y * s + r * t, this._z = this._z * s + i * t, this._w = this._w * s + a * t, this.normalize();
|
|
239
|
+
return this;
|
|
240
|
+
}
|
|
241
|
+
slerpQuaternions(e, t, n) {
|
|
242
|
+
return this.copy(e).slerp(t, n);
|
|
243
|
+
}
|
|
244
|
+
random() {
|
|
245
|
+
let e = 2 * Math.PI * Math.random(), t = 2 * Math.PI * Math.random(), n = Math.random(), r = Math.sqrt(1 - n), i = Math.sqrt(n);
|
|
246
|
+
return this.set(r * Math.sin(e), r * Math.cos(e), i * Math.sin(t), i * Math.cos(t));
|
|
247
|
+
}
|
|
248
|
+
equals(e) {
|
|
249
|
+
return e._x === this._x && e._y === this._y && e._z === this._z && e._w === this._w;
|
|
250
|
+
}
|
|
251
|
+
fromArray(e, t = 0) {
|
|
252
|
+
return this._x = e[t], this._y = e[t + 1], this._z = e[t + 2], this._w = e[t + 3], this._onChangeCallback(), this;
|
|
253
|
+
}
|
|
254
|
+
toArray(e = [], t = 0) {
|
|
255
|
+
return e[t] = this._x, e[t + 1] = this._y, e[t + 2] = this._z, e[t + 3] = this._w, e;
|
|
256
|
+
}
|
|
257
|
+
fromBufferAttribute(e, t) {
|
|
258
|
+
return this._x = e.getX(t), this._y = e.getY(t), this._z = e.getZ(t), this._w = e.getW(t), this._onChangeCallback(), this;
|
|
259
|
+
}
|
|
260
|
+
toJSON() {
|
|
261
|
+
return this.toArray();
|
|
262
|
+
}
|
|
263
|
+
_onChange(e) {
|
|
264
|
+
return this._onChangeCallback = e, this;
|
|
265
|
+
}
|
|
266
|
+
_onChangeCallback() {}
|
|
267
|
+
*[Symbol.iterator]() {
|
|
268
|
+
yield this._x, yield this._y, yield this._z, yield this._w;
|
|
269
|
+
}
|
|
270
|
+
}, D = class e {
|
|
271
|
+
constructor(t = 0, n = 0, r = 0) {
|
|
272
|
+
e.prototype.isVector3 = !0, this.x = t, this.y = n, this.z = r;
|
|
273
|
+
}
|
|
274
|
+
set(e, t, n) {
|
|
275
|
+
return n === void 0 && (n = this.z), this.x = e, this.y = t, this.z = n, this;
|
|
276
|
+
}
|
|
277
|
+
setScalar(e) {
|
|
278
|
+
return this.x = e, this.y = e, this.z = e, this;
|
|
279
|
+
}
|
|
280
|
+
setX(e) {
|
|
281
|
+
return this.x = e, this;
|
|
282
|
+
}
|
|
283
|
+
setY(e) {
|
|
284
|
+
return this.y = e, this;
|
|
285
|
+
}
|
|
286
|
+
setZ(e) {
|
|
287
|
+
return this.z = e, this;
|
|
288
|
+
}
|
|
289
|
+
setComponent(e, t) {
|
|
290
|
+
switch (e) {
|
|
291
|
+
case 0:
|
|
292
|
+
this.x = t;
|
|
293
|
+
break;
|
|
294
|
+
case 1:
|
|
295
|
+
this.y = t;
|
|
296
|
+
break;
|
|
297
|
+
case 2:
|
|
298
|
+
this.z = t;
|
|
299
|
+
break;
|
|
300
|
+
default: throw Error("index is out of range: " + e);
|
|
301
|
+
}
|
|
302
|
+
return this;
|
|
303
|
+
}
|
|
304
|
+
getComponent(e) {
|
|
305
|
+
switch (e) {
|
|
306
|
+
case 0: return this.x;
|
|
307
|
+
case 1: return this.y;
|
|
308
|
+
case 2: return this.z;
|
|
309
|
+
default: throw Error("index is out of range: " + e);
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
clone() {
|
|
313
|
+
return new this.constructor(this.x, this.y, this.z);
|
|
314
|
+
}
|
|
315
|
+
copy(e) {
|
|
316
|
+
return this.x = e.x, this.y = e.y, this.z = e.z, this;
|
|
317
|
+
}
|
|
318
|
+
add(e) {
|
|
319
|
+
return this.x += e.x, this.y += e.y, this.z += e.z, this;
|
|
320
|
+
}
|
|
321
|
+
addScalar(e) {
|
|
322
|
+
return this.x += e, this.y += e, this.z += e, this;
|
|
323
|
+
}
|
|
324
|
+
addVectors(e, t) {
|
|
325
|
+
return this.x = e.x + t.x, this.y = e.y + t.y, this.z = e.z + t.z, this;
|
|
326
|
+
}
|
|
327
|
+
addScaledVector(e, t) {
|
|
328
|
+
return this.x += e.x * t, this.y += e.y * t, this.z += e.z * t, this;
|
|
329
|
+
}
|
|
330
|
+
sub(e) {
|
|
331
|
+
return this.x -= e.x, this.y -= e.y, this.z -= e.z, this;
|
|
332
|
+
}
|
|
333
|
+
subScalar(e) {
|
|
334
|
+
return this.x -= e, this.y -= e, this.z -= e, this;
|
|
335
|
+
}
|
|
336
|
+
subVectors(e, t) {
|
|
337
|
+
return this.x = e.x - t.x, this.y = e.y - t.y, this.z = e.z - t.z, this;
|
|
338
|
+
}
|
|
339
|
+
multiply(e) {
|
|
340
|
+
return this.x *= e.x, this.y *= e.y, this.z *= e.z, this;
|
|
341
|
+
}
|
|
342
|
+
multiplyScalar(e) {
|
|
343
|
+
return this.x *= e, this.y *= e, this.z *= e, this;
|
|
344
|
+
}
|
|
345
|
+
multiplyVectors(e, t) {
|
|
346
|
+
return this.x = e.x * t.x, this.y = e.y * t.y, this.z = e.z * t.z, this;
|
|
347
|
+
}
|
|
348
|
+
applyEuler(e) {
|
|
349
|
+
return this.applyQuaternion(k.setFromEuler(e));
|
|
350
|
+
}
|
|
351
|
+
applyAxisAngle(e, t) {
|
|
352
|
+
return this.applyQuaternion(k.setFromAxisAngle(e, t));
|
|
353
|
+
}
|
|
354
|
+
applyMatrix3(e) {
|
|
355
|
+
let t = this.x, n = this.y, r = this.z, i = e.elements;
|
|
356
|
+
return this.x = i[0] * t + i[3] * n + i[6] * r, this.y = i[1] * t + i[4] * n + i[7] * r, this.z = i[2] * t + i[5] * n + i[8] * r, this;
|
|
357
|
+
}
|
|
358
|
+
applyNormalMatrix(e) {
|
|
359
|
+
return this.applyMatrix3(e).normalize();
|
|
360
|
+
}
|
|
361
|
+
applyMatrix4(e) {
|
|
362
|
+
let t = this.x, n = this.y, r = this.z, i = e.elements, a = 1 / (i[3] * t + i[7] * n + i[11] * r + i[15]);
|
|
363
|
+
return this.x = (i[0] * t + i[4] * n + i[8] * r + i[12]) * a, this.y = (i[1] * t + i[5] * n + i[9] * r + i[13]) * a, this.z = (i[2] * t + i[6] * n + i[10] * r + i[14]) * a, this;
|
|
364
|
+
}
|
|
365
|
+
applyQuaternion(e) {
|
|
366
|
+
let t = this.x, n = this.y, r = this.z, i = e.x, a = e.y, o = e.z, s = e.w, c = 2 * (a * r - o * n), l = 2 * (o * t - i * r), u = 2 * (i * n - a * t);
|
|
367
|
+
return this.x = t + s * c + a * u - o * l, this.y = n + s * l + o * c - i * u, this.z = r + s * u + i * l - a * c, this;
|
|
368
|
+
}
|
|
369
|
+
project(e) {
|
|
370
|
+
return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix);
|
|
371
|
+
}
|
|
372
|
+
unproject(e) {
|
|
373
|
+
return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld);
|
|
374
|
+
}
|
|
375
|
+
transformDirection(e) {
|
|
376
|
+
let t = this.x, n = this.y, r = this.z, i = e.elements;
|
|
377
|
+
return this.x = i[0] * t + i[4] * n + i[8] * r, this.y = i[1] * t + i[5] * n + i[9] * r, this.z = i[2] * t + i[6] * n + i[10] * r, this.normalize();
|
|
378
|
+
}
|
|
379
|
+
divide(e) {
|
|
380
|
+
return this.x /= e.x, this.y /= e.y, this.z /= e.z, this;
|
|
381
|
+
}
|
|
382
|
+
divideScalar(e) {
|
|
383
|
+
return this.multiplyScalar(1 / e);
|
|
384
|
+
}
|
|
385
|
+
min(e) {
|
|
386
|
+
return this.x = Math.min(this.x, e.x), this.y = Math.min(this.y, e.y), this.z = Math.min(this.z, e.z), this;
|
|
387
|
+
}
|
|
388
|
+
max(e) {
|
|
389
|
+
return this.x = Math.max(this.x, e.x), this.y = Math.max(this.y, e.y), this.z = Math.max(this.z, e.z), this;
|
|
390
|
+
}
|
|
391
|
+
clamp(e, t) {
|
|
392
|
+
return this.x = x(this.x, e.x, t.x), this.y = x(this.y, e.y, t.y), this.z = x(this.z, e.z, t.z), this;
|
|
393
|
+
}
|
|
394
|
+
clampScalar(e, t) {
|
|
395
|
+
return this.x = x(this.x, e, t), this.y = x(this.y, e, t), this.z = x(this.z, e, t), this;
|
|
396
|
+
}
|
|
397
|
+
clampLength(e, t) {
|
|
398
|
+
let n = this.length();
|
|
399
|
+
return this.divideScalar(n || 1).multiplyScalar(x(n, e, t));
|
|
400
|
+
}
|
|
401
|
+
floor() {
|
|
402
|
+
return this.x = Math.floor(this.x), this.y = Math.floor(this.y), this.z = Math.floor(this.z), this;
|
|
403
|
+
}
|
|
404
|
+
ceil() {
|
|
405
|
+
return this.x = Math.ceil(this.x), this.y = Math.ceil(this.y), this.z = Math.ceil(this.z), this;
|
|
406
|
+
}
|
|
407
|
+
round() {
|
|
408
|
+
return this.x = Math.round(this.x), this.y = Math.round(this.y), this.z = Math.round(this.z), this;
|
|
409
|
+
}
|
|
410
|
+
roundToZero() {
|
|
411
|
+
return this.x = Math.trunc(this.x), this.y = Math.trunc(this.y), this.z = Math.trunc(this.z), this;
|
|
412
|
+
}
|
|
413
|
+
negate() {
|
|
414
|
+
return this.x = -this.x, this.y = -this.y, this.z = -this.z, this;
|
|
415
|
+
}
|
|
416
|
+
dot(e) {
|
|
417
|
+
return this.x * e.x + this.y * e.y + this.z * e.z;
|
|
418
|
+
}
|
|
419
|
+
lengthSq() {
|
|
420
|
+
return this.x * this.x + this.y * this.y + this.z * this.z;
|
|
421
|
+
}
|
|
422
|
+
length() {
|
|
423
|
+
return Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.z);
|
|
424
|
+
}
|
|
425
|
+
manhattanLength() {
|
|
426
|
+
return Math.abs(this.x) + Math.abs(this.y) + Math.abs(this.z);
|
|
427
|
+
}
|
|
428
|
+
normalize() {
|
|
429
|
+
return this.divideScalar(this.length() || 1);
|
|
430
|
+
}
|
|
431
|
+
setLength(e) {
|
|
432
|
+
return this.normalize().multiplyScalar(e);
|
|
433
|
+
}
|
|
434
|
+
lerp(e, t) {
|
|
435
|
+
return this.x += (e.x - this.x) * t, this.y += (e.y - this.y) * t, this.z += (e.z - this.z) * t, this;
|
|
436
|
+
}
|
|
437
|
+
lerpVectors(e, t, n) {
|
|
438
|
+
return this.x = e.x + (t.x - e.x) * n, this.y = e.y + (t.y - e.y) * n, this.z = e.z + (t.z - e.z) * n, this;
|
|
439
|
+
}
|
|
440
|
+
cross(e) {
|
|
441
|
+
return this.crossVectors(this, e);
|
|
442
|
+
}
|
|
443
|
+
crossVectors(e, t) {
|
|
444
|
+
let n = e.x, r = e.y, i = e.z, a = t.x, o = t.y, s = t.z;
|
|
445
|
+
return this.x = r * s - i * o, this.y = i * a - n * s, this.z = n * o - r * a, this;
|
|
446
|
+
}
|
|
447
|
+
projectOnVector(e) {
|
|
448
|
+
let t = e.lengthSq();
|
|
449
|
+
if (t === 0) return this.set(0, 0, 0);
|
|
450
|
+
let n = e.dot(this) / t;
|
|
451
|
+
return this.copy(e).multiplyScalar(n);
|
|
452
|
+
}
|
|
453
|
+
projectOnPlane(e) {
|
|
454
|
+
return O.copy(this).projectOnVector(e), this.sub(O);
|
|
455
|
+
}
|
|
456
|
+
reflect(e) {
|
|
457
|
+
return this.sub(O.copy(e).multiplyScalar(2 * this.dot(e)));
|
|
458
|
+
}
|
|
459
|
+
angleTo(e) {
|
|
460
|
+
let t = Math.sqrt(this.lengthSq() * e.lengthSq());
|
|
461
|
+
if (t === 0) return Math.PI / 2;
|
|
462
|
+
let n = this.dot(e) / t;
|
|
463
|
+
return Math.acos(x(n, -1, 1));
|
|
464
|
+
}
|
|
465
|
+
distanceTo(e) {
|
|
466
|
+
return Math.sqrt(this.distanceToSquared(e));
|
|
467
|
+
}
|
|
468
|
+
distanceToSquared(e) {
|
|
469
|
+
let t = this.x - e.x, n = this.y - e.y, r = this.z - e.z;
|
|
470
|
+
return t * t + n * n + r * r;
|
|
471
|
+
}
|
|
472
|
+
manhattanDistanceTo(e) {
|
|
473
|
+
return Math.abs(this.x - e.x) + Math.abs(this.y - e.y) + Math.abs(this.z - e.z);
|
|
474
|
+
}
|
|
475
|
+
setFromSpherical(e) {
|
|
476
|
+
return this.setFromSphericalCoords(e.radius, e.phi, e.theta);
|
|
477
|
+
}
|
|
478
|
+
setFromSphericalCoords(e, t, n) {
|
|
479
|
+
let r = Math.sin(t) * e;
|
|
480
|
+
return this.x = r * Math.sin(n), this.y = Math.cos(t) * e, this.z = r * Math.cos(n), this;
|
|
481
|
+
}
|
|
482
|
+
setFromCylindrical(e) {
|
|
483
|
+
return this.setFromCylindricalCoords(e.radius, e.theta, e.y);
|
|
484
|
+
}
|
|
485
|
+
setFromCylindricalCoords(e, t, n) {
|
|
486
|
+
return this.x = e * Math.sin(t), this.y = n, this.z = e * Math.cos(t), this;
|
|
487
|
+
}
|
|
488
|
+
setFromMatrixPosition(e) {
|
|
489
|
+
let t = e.elements;
|
|
490
|
+
return this.x = t[12], this.y = t[13], this.z = t[14], this;
|
|
491
|
+
}
|
|
492
|
+
setFromMatrixScale(e) {
|
|
493
|
+
let t = this.setFromMatrixColumn(e, 0).length(), n = this.setFromMatrixColumn(e, 1).length(), r = this.setFromMatrixColumn(e, 2).length();
|
|
494
|
+
return this.x = t, this.y = n, this.z = r, this;
|
|
495
|
+
}
|
|
496
|
+
setFromMatrixColumn(e, t) {
|
|
497
|
+
return this.fromArray(e.elements, t * 4);
|
|
498
|
+
}
|
|
499
|
+
setFromMatrix3Column(e, t) {
|
|
500
|
+
return this.fromArray(e.elements, t * 3);
|
|
501
|
+
}
|
|
502
|
+
setFromEuler(e) {
|
|
503
|
+
return this.x = e._x, this.y = e._y, this.z = e._z, this;
|
|
504
|
+
}
|
|
505
|
+
setFromColor(e) {
|
|
506
|
+
return this.x = e.r, this.y = e.g, this.z = e.b, this;
|
|
507
|
+
}
|
|
508
|
+
equals(e) {
|
|
509
|
+
return e.x === this.x && e.y === this.y && e.z === this.z;
|
|
510
|
+
}
|
|
511
|
+
fromArray(e, t = 0) {
|
|
512
|
+
return this.x = e[t], this.y = e[t + 1], this.z = e[t + 2], this;
|
|
513
|
+
}
|
|
514
|
+
toArray(e = [], t = 0) {
|
|
515
|
+
return e[t] = this.x, e[t + 1] = this.y, e[t + 2] = this.z, e;
|
|
516
|
+
}
|
|
517
|
+
fromBufferAttribute(e, t) {
|
|
518
|
+
return this.x = e.getX(t), this.y = e.getY(t), this.z = e.getZ(t), this;
|
|
519
|
+
}
|
|
520
|
+
random() {
|
|
521
|
+
return this.x = Math.random(), this.y = Math.random(), this.z = Math.random(), this;
|
|
522
|
+
}
|
|
523
|
+
randomDirection() {
|
|
524
|
+
let e = Math.random() * Math.PI * 2, t = Math.random() * 2 - 1, n = Math.sqrt(1 - t * t);
|
|
525
|
+
return this.x = n * Math.cos(e), this.y = t, this.z = n * Math.sin(e), this;
|
|
526
|
+
}
|
|
527
|
+
*[Symbol.iterator]() {
|
|
528
|
+
yield this.x, yield this.y, yield this.z;
|
|
529
|
+
}
|
|
530
|
+
}, O = /* @__PURE__ */ new D(), k = /* @__PURE__ */ new E(), A = class e {
|
|
531
|
+
constructor(t, n, r, i, a, o, s, c, l, u, d, f, p, m, h, g) {
|
|
532
|
+
e.prototype.isMatrix4 = !0, this.elements = [
|
|
533
|
+
1,
|
|
534
|
+
0,
|
|
535
|
+
0,
|
|
536
|
+
0,
|
|
537
|
+
0,
|
|
538
|
+
1,
|
|
539
|
+
0,
|
|
540
|
+
0,
|
|
541
|
+
0,
|
|
542
|
+
0,
|
|
543
|
+
1,
|
|
544
|
+
0,
|
|
545
|
+
0,
|
|
546
|
+
0,
|
|
547
|
+
0,
|
|
548
|
+
1
|
|
549
|
+
], t !== void 0 && this.set(t, n, r, i, a, o, s, c, l, u, d, f, p, m, h, g);
|
|
550
|
+
}
|
|
551
|
+
set(e, t, n, r, i, a, o, s, c, l, u, d, f, p, m, h) {
|
|
552
|
+
let g = this.elements;
|
|
553
|
+
return g[0] = e, g[4] = t, g[8] = n, g[12] = r, g[1] = i, g[5] = a, g[9] = o, g[13] = s, g[2] = c, g[6] = l, g[10] = u, g[14] = d, g[3] = f, g[7] = p, g[11] = m, g[15] = h, this;
|
|
554
|
+
}
|
|
555
|
+
identity() {
|
|
556
|
+
return this.set(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1), this;
|
|
557
|
+
}
|
|
558
|
+
clone() {
|
|
559
|
+
return new e().fromArray(this.elements);
|
|
560
|
+
}
|
|
561
|
+
copy(e) {
|
|
562
|
+
let t = this.elements, n = e.elements;
|
|
563
|
+
return t[0] = n[0], t[1] = n[1], t[2] = n[2], t[3] = n[3], t[4] = n[4], t[5] = n[5], t[6] = n[6], t[7] = n[7], t[8] = n[8], t[9] = n[9], t[10] = n[10], t[11] = n[11], t[12] = n[12], t[13] = n[13], t[14] = n[14], t[15] = n[15], this;
|
|
564
|
+
}
|
|
565
|
+
copyPosition(e) {
|
|
566
|
+
let t = this.elements, n = e.elements;
|
|
567
|
+
return t[12] = n[12], t[13] = n[13], t[14] = n[14], this;
|
|
568
|
+
}
|
|
569
|
+
setFromMatrix3(e) {
|
|
570
|
+
let t = e.elements;
|
|
571
|
+
return this.set(t[0], t[3], t[6], 0, t[1], t[4], t[7], 0, t[2], t[5], t[8], 0, 0, 0, 0, 1), this;
|
|
572
|
+
}
|
|
573
|
+
extractBasis(e, t, n) {
|
|
574
|
+
return this.determinant() === 0 ? (e.set(1, 0, 0), t.set(0, 1, 0), n.set(0, 0, 1), this) : (e.setFromMatrixColumn(this, 0), t.setFromMatrixColumn(this, 1), n.setFromMatrixColumn(this, 2), this);
|
|
575
|
+
}
|
|
576
|
+
makeBasis(e, t, n) {
|
|
577
|
+
return this.set(e.x, t.x, n.x, 0, e.y, t.y, n.y, 0, e.z, t.z, n.z, 0, 0, 0, 0, 1), this;
|
|
578
|
+
}
|
|
579
|
+
extractRotation(e) {
|
|
580
|
+
if (e.determinant() === 0) return this.identity();
|
|
581
|
+
let t = this.elements, n = e.elements, r = 1 / j.setFromMatrixColumn(e, 0).length(), i = 1 / j.setFromMatrixColumn(e, 1).length(), a = 1 / j.setFromMatrixColumn(e, 2).length();
|
|
582
|
+
return t[0] = n[0] * r, t[1] = n[1] * r, t[2] = n[2] * r, t[3] = 0, t[4] = n[4] * i, t[5] = n[5] * i, t[6] = n[6] * i, t[7] = 0, t[8] = n[8] * a, t[9] = n[9] * a, t[10] = n[10] * a, t[11] = 0, t[12] = 0, t[13] = 0, t[14] = 0, t[15] = 1, this;
|
|
583
|
+
}
|
|
584
|
+
makeRotationFromEuler(e) {
|
|
585
|
+
let t = this.elements, n = e.x, r = e.y, i = e.z, a = Math.cos(n), o = Math.sin(n), s = Math.cos(r), c = Math.sin(r), l = Math.cos(i), u = Math.sin(i);
|
|
586
|
+
if (e.order === "XYZ") {
|
|
587
|
+
let e = a * l, n = a * u, r = o * l, i = o * u;
|
|
588
|
+
t[0] = s * l, t[4] = -s * u, t[8] = c, t[1] = n + r * c, t[5] = e - i * c, t[9] = -o * s, t[2] = i - e * c, t[6] = r + n * c, t[10] = a * s;
|
|
589
|
+
} else if (e.order === "YXZ") {
|
|
590
|
+
let e = s * l, n = s * u, r = c * l, i = c * u;
|
|
591
|
+
t[0] = e + i * o, t[4] = r * o - n, t[8] = a * c, t[1] = a * u, t[5] = a * l, t[9] = -o, t[2] = n * o - r, t[6] = i + e * o, t[10] = a * s;
|
|
592
|
+
} else if (e.order === "ZXY") {
|
|
593
|
+
let e = s * l, n = s * u, r = c * l, i = c * u;
|
|
594
|
+
t[0] = e - i * o, t[4] = -a * u, t[8] = r + n * o, t[1] = n + r * o, t[5] = a * l, t[9] = i - e * o, t[2] = -a * c, t[6] = o, t[10] = a * s;
|
|
595
|
+
} else if (e.order === "ZYX") {
|
|
596
|
+
let e = a * l, n = a * u, r = o * l, i = o * u;
|
|
597
|
+
t[0] = s * l, t[4] = r * c - n, t[8] = e * c + i, t[1] = s * u, t[5] = i * c + e, t[9] = n * c - r, t[2] = -c, t[6] = o * s, t[10] = a * s;
|
|
598
|
+
} else if (e.order === "YZX") {
|
|
599
|
+
let e = a * s, n = a * c, r = o * s, i = o * c;
|
|
600
|
+
t[0] = s * l, t[4] = i - e * u, t[8] = r * u + n, t[1] = u, t[5] = a * l, t[9] = -o * l, t[2] = -c * l, t[6] = n * u + r, t[10] = e - i * u;
|
|
601
|
+
} else if (e.order === "XZY") {
|
|
602
|
+
let e = a * s, n = a * c, r = o * s, i = o * c;
|
|
603
|
+
t[0] = s * l, t[4] = -u, t[8] = c * l, t[1] = e * u + i, t[5] = a * l, t[9] = n * u - r, t[2] = r * u - n, t[6] = o * l, t[10] = i * u + e;
|
|
604
|
+
}
|
|
605
|
+
return t[3] = 0, t[7] = 0, t[11] = 0, t[12] = 0, t[13] = 0, t[14] = 0, t[15] = 1, this;
|
|
606
|
+
}
|
|
607
|
+
makeRotationFromQuaternion(e) {
|
|
608
|
+
return this.compose(N, e, P);
|
|
609
|
+
}
|
|
610
|
+
lookAt(e, t, n) {
|
|
611
|
+
let r = this.elements;
|
|
612
|
+
return L.subVectors(e, t), L.lengthSq() === 0 && (L.z = 1), L.normalize(), F.crossVectors(n, L), F.lengthSq() === 0 && (Math.abs(n.z) === 1 ? L.x += 1e-4 : L.z += 1e-4, L.normalize(), F.crossVectors(n, L)), F.normalize(), I.crossVectors(L, F), r[0] = F.x, r[4] = I.x, r[8] = L.x, r[1] = F.y, r[5] = I.y, r[9] = L.y, r[2] = F.z, r[6] = I.z, r[10] = L.z, this;
|
|
613
|
+
}
|
|
614
|
+
multiply(e) {
|
|
615
|
+
return this.multiplyMatrices(this, e);
|
|
616
|
+
}
|
|
617
|
+
premultiply(e) {
|
|
618
|
+
return this.multiplyMatrices(e, this);
|
|
619
|
+
}
|
|
620
|
+
multiplyMatrices(e, t) {
|
|
621
|
+
let n = e.elements, r = t.elements, i = this.elements, a = n[0], o = n[4], s = n[8], c = n[12], l = n[1], u = n[5], d = n[9], f = n[13], p = n[2], m = n[6], h = n[10], g = n[14], _ = n[3], v = n[7], y = n[11], b = n[15], x = r[0], S = r[4], C = r[8], w = r[12], T = r[1], E = r[5], D = r[9], O = r[13], k = r[2], A = r[6], j = r[10], M = r[14], N = r[3], P = r[7], F = r[11], I = r[15];
|
|
622
|
+
return i[0] = a * x + o * T + s * k + c * N, i[4] = a * S + o * E + s * A + c * P, i[8] = a * C + o * D + s * j + c * F, i[12] = a * w + o * O + s * M + c * I, i[1] = l * x + u * T + d * k + f * N, i[5] = l * S + u * E + d * A + f * P, i[9] = l * C + u * D + d * j + f * F, i[13] = l * w + u * O + d * M + f * I, i[2] = p * x + m * T + h * k + g * N, i[6] = p * S + m * E + h * A + g * P, i[10] = p * C + m * D + h * j + g * F, i[14] = p * w + m * O + h * M + g * I, i[3] = _ * x + v * T + y * k + b * N, i[7] = _ * S + v * E + y * A + b * P, i[11] = _ * C + v * D + y * j + b * F, i[15] = _ * w + v * O + y * M + b * I, this;
|
|
623
|
+
}
|
|
624
|
+
multiplyScalar(e) {
|
|
625
|
+
let t = this.elements;
|
|
626
|
+
return t[0] *= e, t[4] *= e, t[8] *= e, t[12] *= e, t[1] *= e, t[5] *= e, t[9] *= e, t[13] *= e, t[2] *= e, t[6] *= e, t[10] *= e, t[14] *= e, t[3] *= e, t[7] *= e, t[11] *= e, t[15] *= e, this;
|
|
627
|
+
}
|
|
628
|
+
determinant() {
|
|
629
|
+
let e = this.elements, t = e[0], n = e[4], r = e[8], i = e[12], a = e[1], o = e[5], s = e[9], c = e[13], l = e[2], u = e[6], d = e[10], f = e[14], p = e[3], m = e[7], h = e[11], g = e[15], _ = s * f - c * d, v = o * f - c * u, y = o * d - s * u, b = a * f - c * l, x = a * d - s * l, S = a * u - o * l;
|
|
630
|
+
return t * (m * _ - h * v + g * y) - n * (p * _ - h * b + g * x) + r * (p * v - m * b + g * S) - i * (p * y - m * x + h * S);
|
|
631
|
+
}
|
|
632
|
+
transpose() {
|
|
633
|
+
let e = this.elements, t;
|
|
634
|
+
return t = e[1], e[1] = e[4], e[4] = t, t = e[2], e[2] = e[8], e[8] = t, t = e[6], e[6] = e[9], e[9] = t, t = e[3], e[3] = e[12], e[12] = t, t = e[7], e[7] = e[13], e[13] = t, t = e[11], e[11] = e[14], e[14] = t, this;
|
|
635
|
+
}
|
|
636
|
+
setPosition(e, t, n) {
|
|
637
|
+
let r = this.elements;
|
|
638
|
+
return e.isVector3 ? (r[12] = e.x, r[13] = e.y, r[14] = e.z) : (r[12] = e, r[13] = t, r[14] = n), this;
|
|
639
|
+
}
|
|
640
|
+
invert() {
|
|
641
|
+
let e = this.elements, t = e[0], n = e[1], r = e[2], i = e[3], a = e[4], o = e[5], s = e[6], c = e[7], l = e[8], u = e[9], d = e[10], f = e[11], p = e[12], m = e[13], h = e[14], g = e[15], _ = t * o - n * a, v = t * s - r * a, y = t * c - i * a, b = n * s - r * o, x = n * c - i * o, S = r * c - i * s, C = l * m - u * p, w = l * h - d * p, T = l * g - f * p, E = u * h - d * m, D = u * g - f * m, O = d * g - f * h, k = _ * O - v * D + y * E + b * T - x * w + S * C;
|
|
642
|
+
if (k === 0) return this.set(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
|
643
|
+
let A = 1 / k;
|
|
644
|
+
return e[0] = (o * O - s * D + c * E) * A, e[1] = (r * D - n * O - i * E) * A, e[2] = (m * S - h * x + g * b) * A, e[3] = (d * x - u * S - f * b) * A, e[4] = (s * T - a * O - c * w) * A, e[5] = (t * O - r * T + i * w) * A, e[6] = (h * y - p * S - g * v) * A, e[7] = (l * S - d * y + f * v) * A, e[8] = (a * D - o * T + c * C) * A, e[9] = (n * T - t * D - i * C) * A, e[10] = (p * x - m * y + g * _) * A, e[11] = (u * y - l * x - f * _) * A, e[12] = (o * w - a * E - s * C) * A, e[13] = (t * E - n * w + r * C) * A, e[14] = (m * v - p * b - h * _) * A, e[15] = (l * b - u * v + d * _) * A, this;
|
|
645
|
+
}
|
|
646
|
+
scale(e) {
|
|
647
|
+
let t = this.elements, n = e.x, r = e.y, i = e.z;
|
|
648
|
+
return t[0] *= n, t[4] *= r, t[8] *= i, t[1] *= n, t[5] *= r, t[9] *= i, t[2] *= n, t[6] *= r, t[10] *= i, t[3] *= n, t[7] *= r, t[11] *= i, this;
|
|
649
|
+
}
|
|
650
|
+
getMaxScaleOnAxis() {
|
|
651
|
+
let e = this.elements, t = e[0] * e[0] + e[1] * e[1] + e[2] * e[2], n = e[4] * e[4] + e[5] * e[5] + e[6] * e[6], r = e[8] * e[8] + e[9] * e[9] + e[10] * e[10];
|
|
652
|
+
return Math.sqrt(Math.max(t, n, r));
|
|
653
|
+
}
|
|
654
|
+
makeTranslation(e, t, n) {
|
|
655
|
+
return e.isVector3 ? this.set(1, 0, 0, e.x, 0, 1, 0, e.y, 0, 0, 1, e.z, 0, 0, 0, 1) : this.set(1, 0, 0, e, 0, 1, 0, t, 0, 0, 1, n, 0, 0, 0, 1), this;
|
|
656
|
+
}
|
|
657
|
+
makeRotationX(e) {
|
|
658
|
+
let t = Math.cos(e), n = Math.sin(e);
|
|
659
|
+
return this.set(1, 0, 0, 0, 0, t, -n, 0, 0, n, t, 0, 0, 0, 0, 1), this;
|
|
660
|
+
}
|
|
661
|
+
makeRotationY(e) {
|
|
662
|
+
let t = Math.cos(e), n = Math.sin(e);
|
|
663
|
+
return this.set(t, 0, n, 0, 0, 1, 0, 0, -n, 0, t, 0, 0, 0, 0, 1), this;
|
|
664
|
+
}
|
|
665
|
+
makeRotationZ(e) {
|
|
666
|
+
let t = Math.cos(e), n = Math.sin(e);
|
|
667
|
+
return this.set(t, -n, 0, 0, n, t, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1), this;
|
|
668
|
+
}
|
|
669
|
+
makeRotationAxis(e, t) {
|
|
670
|
+
let n = Math.cos(t), r = Math.sin(t), i = 1 - n, a = e.x, o = e.y, s = e.z, c = i * a, l = i * o;
|
|
671
|
+
return this.set(c * a + n, c * o - r * s, c * s + r * o, 0, c * o + r * s, l * o + n, l * s - r * a, 0, c * s - r * o, l * s + r * a, i * s * s + n, 0, 0, 0, 0, 1), this;
|
|
672
|
+
}
|
|
673
|
+
makeScale(e, t, n) {
|
|
674
|
+
return this.set(e, 0, 0, 0, 0, t, 0, 0, 0, 0, n, 0, 0, 0, 0, 1), this;
|
|
675
|
+
}
|
|
676
|
+
makeShear(e, t, n, r, i, a) {
|
|
677
|
+
return this.set(1, n, i, 0, e, 1, a, 0, t, r, 1, 0, 0, 0, 0, 1), this;
|
|
678
|
+
}
|
|
679
|
+
compose(e, t, n) {
|
|
680
|
+
let r = this.elements, i = t._x, a = t._y, o = t._z, s = t._w, c = i + i, l = a + a, u = o + o, d = i * c, f = i * l, p = i * u, m = a * l, h = a * u, g = o * u, _ = s * c, v = s * l, y = s * u, b = n.x, x = n.y, S = n.z;
|
|
681
|
+
return r[0] = (1 - (m + g)) * b, r[1] = (f + y) * b, r[2] = (p - v) * b, r[3] = 0, r[4] = (f - y) * x, r[5] = (1 - (d + g)) * x, r[6] = (h + _) * x, r[7] = 0, r[8] = (p + v) * S, r[9] = (h - _) * S, r[10] = (1 - (d + m)) * S, r[11] = 0, r[12] = e.x, r[13] = e.y, r[14] = e.z, r[15] = 1, this;
|
|
682
|
+
}
|
|
683
|
+
decompose(e, t, n) {
|
|
684
|
+
let r = this.elements;
|
|
685
|
+
e.x = r[12], e.y = r[13], e.z = r[14];
|
|
686
|
+
let i = this.determinant();
|
|
687
|
+
if (i === 0) return n.set(1, 1, 1), t.identity(), this;
|
|
688
|
+
let a = j.set(r[0], r[1], r[2]).length(), o = j.set(r[4], r[5], r[6]).length(), s = j.set(r[8], r[9], r[10]).length();
|
|
689
|
+
i < 0 && (a = -a), M.copy(this);
|
|
690
|
+
let c = 1 / a, l = 1 / o, u = 1 / s;
|
|
691
|
+
return M.elements[0] *= c, M.elements[1] *= c, M.elements[2] *= c, M.elements[4] *= l, M.elements[5] *= l, M.elements[6] *= l, M.elements[8] *= u, M.elements[9] *= u, M.elements[10] *= u, t.setFromRotationMatrix(M), n.x = a, n.y = o, n.z = s, this;
|
|
692
|
+
}
|
|
693
|
+
makePerspective(e, t, n, r, i, a, o = c, s = !1) {
|
|
694
|
+
let l = this.elements, u = 2 * i / (t - e), d = 2 * i / (n - r), f = (t + e) / (t - e), p = (n + r) / (n - r), m, h;
|
|
695
|
+
if (s) m = i / (a - i), h = a * i / (a - i);
|
|
696
|
+
else if (o === 2e3) m = -(a + i) / (a - i), h = -2 * a * i / (a - i);
|
|
697
|
+
else if (o === 2001) m = -a / (a - i), h = -a * i / (a - i);
|
|
698
|
+
else throw Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: " + o);
|
|
699
|
+
return l[0] = u, l[4] = 0, l[8] = f, l[12] = 0, l[1] = 0, l[5] = d, l[9] = p, l[13] = 0, l[2] = 0, l[6] = 0, l[10] = m, l[14] = h, l[3] = 0, l[7] = 0, l[11] = -1, l[15] = 0, this;
|
|
700
|
+
}
|
|
701
|
+
makeOrthographic(e, t, n, r, i, a, o = c, s = !1) {
|
|
702
|
+
let l = this.elements, u = 2 / (t - e), d = 2 / (n - r), f = -(t + e) / (t - e), p = -(n + r) / (n - r), m, h;
|
|
703
|
+
if (s) m = 1 / (a - i), h = a / (a - i);
|
|
704
|
+
else if (o === 2e3) m = -2 / (a - i), h = -(a + i) / (a - i);
|
|
705
|
+
else if (o === 2001) m = -1 / (a - i), h = -i / (a - i);
|
|
706
|
+
else throw Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: " + o);
|
|
707
|
+
return l[0] = u, l[4] = 0, l[8] = 0, l[12] = f, l[1] = 0, l[5] = d, l[9] = 0, l[13] = p, l[2] = 0, l[6] = 0, l[10] = m, l[14] = h, l[3] = 0, l[7] = 0, l[11] = 0, l[15] = 1, this;
|
|
708
|
+
}
|
|
709
|
+
equals(e) {
|
|
710
|
+
let t = this.elements, n = e.elements;
|
|
711
|
+
for (let e = 0; e < 16; e++) if (t[e] !== n[e]) return !1;
|
|
712
|
+
return !0;
|
|
713
|
+
}
|
|
714
|
+
fromArray(e, t = 0) {
|
|
715
|
+
for (let n = 0; n < 16; n++) this.elements[n] = e[n + t];
|
|
716
|
+
return this;
|
|
717
|
+
}
|
|
718
|
+
toArray(e = [], t = 0) {
|
|
719
|
+
let n = this.elements;
|
|
720
|
+
return e[t] = n[0], e[t + 1] = n[1], e[t + 2] = n[2], e[t + 3] = n[3], e[t + 4] = n[4], e[t + 5] = n[5], e[t + 6] = n[6], e[t + 7] = n[7], e[t + 8] = n[8], e[t + 9] = n[9], e[t + 10] = n[10], e[t + 11] = n[11], e[t + 12] = n[12], e[t + 13] = n[13], e[t + 14] = n[14], e[t + 15] = n[15], e;
|
|
721
|
+
}
|
|
722
|
+
}, j = /* @__PURE__ */ new D(), M = /* @__PURE__ */ new A(), N = /* @__PURE__ */ new D(0, 0, 0), P = /* @__PURE__ */ new D(1, 1, 1), F = /* @__PURE__ */ new D(), I = /* @__PURE__ */ new D(), L = /* @__PURE__ */ new D(), ee = class e {
|
|
723
|
+
constructor(t = 0, n = 0) {
|
|
724
|
+
e.prototype.isVector2 = !0, this.x = t, this.y = n;
|
|
725
|
+
}
|
|
726
|
+
get width() {
|
|
727
|
+
return this.x;
|
|
728
|
+
}
|
|
729
|
+
set width(e) {
|
|
730
|
+
this.x = e;
|
|
731
|
+
}
|
|
732
|
+
get height() {
|
|
733
|
+
return this.y;
|
|
734
|
+
}
|
|
735
|
+
set height(e) {
|
|
736
|
+
this.y = e;
|
|
737
|
+
}
|
|
738
|
+
set(e, t) {
|
|
739
|
+
return this.x = e, this.y = t, this;
|
|
740
|
+
}
|
|
741
|
+
setScalar(e) {
|
|
742
|
+
return this.x = e, this.y = e, this;
|
|
743
|
+
}
|
|
744
|
+
setX(e) {
|
|
745
|
+
return this.x = e, this;
|
|
746
|
+
}
|
|
747
|
+
setY(e) {
|
|
748
|
+
return this.y = e, this;
|
|
749
|
+
}
|
|
750
|
+
setComponent(e, t) {
|
|
751
|
+
switch (e) {
|
|
752
|
+
case 0:
|
|
753
|
+
this.x = t;
|
|
754
|
+
break;
|
|
755
|
+
case 1:
|
|
756
|
+
this.y = t;
|
|
757
|
+
break;
|
|
758
|
+
default: throw Error("index is out of range: " + e);
|
|
759
|
+
}
|
|
760
|
+
return this;
|
|
761
|
+
}
|
|
762
|
+
getComponent(e) {
|
|
763
|
+
switch (e) {
|
|
764
|
+
case 0: return this.x;
|
|
765
|
+
case 1: return this.y;
|
|
766
|
+
default: throw Error("index is out of range: " + e);
|
|
767
|
+
}
|
|
768
|
+
}
|
|
769
|
+
clone() {
|
|
770
|
+
return new this.constructor(this.x, this.y);
|
|
771
|
+
}
|
|
772
|
+
copy(e) {
|
|
773
|
+
return this.x = e.x, this.y = e.y, this;
|
|
774
|
+
}
|
|
775
|
+
add(e) {
|
|
776
|
+
return this.x += e.x, this.y += e.y, this;
|
|
777
|
+
}
|
|
778
|
+
addScalar(e) {
|
|
779
|
+
return this.x += e, this.y += e, this;
|
|
780
|
+
}
|
|
781
|
+
addVectors(e, t) {
|
|
782
|
+
return this.x = e.x + t.x, this.y = e.y + t.y, this;
|
|
783
|
+
}
|
|
784
|
+
addScaledVector(e, t) {
|
|
785
|
+
return this.x += e.x * t, this.y += e.y * t, this;
|
|
786
|
+
}
|
|
787
|
+
sub(e) {
|
|
788
|
+
return this.x -= e.x, this.y -= e.y, this;
|
|
789
|
+
}
|
|
790
|
+
subScalar(e) {
|
|
791
|
+
return this.x -= e, this.y -= e, this;
|
|
792
|
+
}
|
|
793
|
+
subVectors(e, t) {
|
|
794
|
+
return this.x = e.x - t.x, this.y = e.y - t.y, this;
|
|
795
|
+
}
|
|
796
|
+
multiply(e) {
|
|
797
|
+
return this.x *= e.x, this.y *= e.y, this;
|
|
798
|
+
}
|
|
799
|
+
multiplyScalar(e) {
|
|
800
|
+
return this.x *= e, this.y *= e, this;
|
|
801
|
+
}
|
|
802
|
+
divide(e) {
|
|
803
|
+
return this.x /= e.x, this.y /= e.y, this;
|
|
804
|
+
}
|
|
805
|
+
divideScalar(e) {
|
|
806
|
+
return this.multiplyScalar(1 / e);
|
|
807
|
+
}
|
|
808
|
+
applyMatrix3(e) {
|
|
809
|
+
let t = this.x, n = this.y, r = e.elements;
|
|
810
|
+
return this.x = r[0] * t + r[3] * n + r[6], this.y = r[1] * t + r[4] * n + r[7], this;
|
|
811
|
+
}
|
|
812
|
+
min(e) {
|
|
813
|
+
return this.x = Math.min(this.x, e.x), this.y = Math.min(this.y, e.y), this;
|
|
814
|
+
}
|
|
815
|
+
max(e) {
|
|
816
|
+
return this.x = Math.max(this.x, e.x), this.y = Math.max(this.y, e.y), this;
|
|
817
|
+
}
|
|
818
|
+
clamp(e, t) {
|
|
819
|
+
return this.x = x(this.x, e.x, t.x), this.y = x(this.y, e.y, t.y), this;
|
|
820
|
+
}
|
|
821
|
+
clampScalar(e, t) {
|
|
822
|
+
return this.x = x(this.x, e, t), this.y = x(this.y, e, t), this;
|
|
823
|
+
}
|
|
824
|
+
clampLength(e, t) {
|
|
825
|
+
let n = this.length();
|
|
826
|
+
return this.divideScalar(n || 1).multiplyScalar(x(n, e, t));
|
|
827
|
+
}
|
|
828
|
+
floor() {
|
|
829
|
+
return this.x = Math.floor(this.x), this.y = Math.floor(this.y), this;
|
|
830
|
+
}
|
|
831
|
+
ceil() {
|
|
832
|
+
return this.x = Math.ceil(this.x), this.y = Math.ceil(this.y), this;
|
|
833
|
+
}
|
|
834
|
+
round() {
|
|
835
|
+
return this.x = Math.round(this.x), this.y = Math.round(this.y), this;
|
|
836
|
+
}
|
|
837
|
+
roundToZero() {
|
|
838
|
+
return this.x = Math.trunc(this.x), this.y = Math.trunc(this.y), this;
|
|
839
|
+
}
|
|
840
|
+
negate() {
|
|
841
|
+
return this.x = -this.x, this.y = -this.y, this;
|
|
842
|
+
}
|
|
843
|
+
dot(e) {
|
|
844
|
+
return this.x * e.x + this.y * e.y;
|
|
845
|
+
}
|
|
846
|
+
cross(e) {
|
|
847
|
+
return this.x * e.y - this.y * e.x;
|
|
848
|
+
}
|
|
849
|
+
lengthSq() {
|
|
850
|
+
return this.x * this.x + this.y * this.y;
|
|
851
|
+
}
|
|
852
|
+
length() {
|
|
853
|
+
return Math.sqrt(this.x * this.x + this.y * this.y);
|
|
854
|
+
}
|
|
855
|
+
manhattanLength() {
|
|
856
|
+
return Math.abs(this.x) + Math.abs(this.y);
|
|
857
|
+
}
|
|
858
|
+
normalize() {
|
|
859
|
+
return this.divideScalar(this.length() || 1);
|
|
860
|
+
}
|
|
861
|
+
angle() {
|
|
862
|
+
return Math.atan2(-this.y, -this.x) + Math.PI;
|
|
863
|
+
}
|
|
864
|
+
angleTo(e) {
|
|
865
|
+
let t = Math.sqrt(this.lengthSq() * e.lengthSq());
|
|
866
|
+
if (t === 0) return Math.PI / 2;
|
|
867
|
+
let n = this.dot(e) / t;
|
|
868
|
+
return Math.acos(x(n, -1, 1));
|
|
869
|
+
}
|
|
870
|
+
distanceTo(e) {
|
|
871
|
+
return Math.sqrt(this.distanceToSquared(e));
|
|
872
|
+
}
|
|
873
|
+
distanceToSquared(e) {
|
|
874
|
+
let t = this.x - e.x, n = this.y - e.y;
|
|
875
|
+
return t * t + n * n;
|
|
876
|
+
}
|
|
877
|
+
manhattanDistanceTo(e) {
|
|
878
|
+
return Math.abs(this.x - e.x) + Math.abs(this.y - e.y);
|
|
879
|
+
}
|
|
880
|
+
setLength(e) {
|
|
881
|
+
return this.normalize().multiplyScalar(e);
|
|
882
|
+
}
|
|
883
|
+
lerp(e, t) {
|
|
884
|
+
return this.x += (e.x - this.x) * t, this.y += (e.y - this.y) * t, this;
|
|
885
|
+
}
|
|
886
|
+
lerpVectors(e, t, n) {
|
|
887
|
+
return this.x = e.x + (t.x - e.x) * n, this.y = e.y + (t.y - e.y) * n, this;
|
|
888
|
+
}
|
|
889
|
+
equals(e) {
|
|
890
|
+
return e.x === this.x && e.y === this.y;
|
|
891
|
+
}
|
|
892
|
+
fromArray(e, t = 0) {
|
|
893
|
+
return this.x = e[t], this.y = e[t + 1], this;
|
|
894
|
+
}
|
|
895
|
+
toArray(e = [], t = 0) {
|
|
896
|
+
return e[t] = this.x, e[t + 1] = this.y, e;
|
|
897
|
+
}
|
|
898
|
+
fromBufferAttribute(e, t) {
|
|
899
|
+
return this.x = e.getX(t), this.y = e.getY(t), this;
|
|
900
|
+
}
|
|
901
|
+
rotateAround(e, t) {
|
|
902
|
+
let n = Math.cos(t), r = Math.sin(t), i = this.x - e.x, a = this.y - e.y;
|
|
903
|
+
return this.x = i * n - a * r + e.x, this.y = i * r + a * n + e.y, this;
|
|
904
|
+
}
|
|
905
|
+
random() {
|
|
906
|
+
return this.x = Math.random(), this.y = Math.random(), this;
|
|
907
|
+
}
|
|
908
|
+
*[Symbol.iterator]() {
|
|
909
|
+
yield this.x, yield this.y;
|
|
910
|
+
}
|
|
911
|
+
}, te = class {
|
|
912
|
+
constructor(e = new D(Infinity, Infinity, Infinity), t = new D(-Infinity, -Infinity, -Infinity)) {
|
|
913
|
+
this.isBox3 = !0, this.min = e, this.max = t;
|
|
914
|
+
}
|
|
915
|
+
set(e, t) {
|
|
916
|
+
return this.min.copy(e), this.max.copy(t), this;
|
|
917
|
+
}
|
|
918
|
+
setFromArray(e) {
|
|
919
|
+
this.makeEmpty();
|
|
920
|
+
for (let t = 0, n = e.length; t < n; t += 3) this.expandByPoint(z.fromArray(e, t));
|
|
921
|
+
return this;
|
|
922
|
+
}
|
|
923
|
+
setFromBufferAttribute(e) {
|
|
924
|
+
this.makeEmpty();
|
|
925
|
+
for (let t = 0, n = e.count; t < n; t++) this.expandByPoint(z.fromBufferAttribute(e, t));
|
|
926
|
+
return this;
|
|
927
|
+
}
|
|
928
|
+
setFromPoints(e) {
|
|
929
|
+
this.makeEmpty();
|
|
930
|
+
for (let t = 0, n = e.length; t < n; t++) this.expandByPoint(e[t]);
|
|
931
|
+
return this;
|
|
932
|
+
}
|
|
933
|
+
setFromCenterAndSize(e, t) {
|
|
934
|
+
let n = z.copy(t).multiplyScalar(.5);
|
|
935
|
+
return this.min.copy(e).sub(n), this.max.copy(e).add(n), this;
|
|
936
|
+
}
|
|
937
|
+
setFromObject(e, t = !1) {
|
|
938
|
+
return this.makeEmpty(), this.expandByObject(e, t);
|
|
939
|
+
}
|
|
940
|
+
clone() {
|
|
941
|
+
return new this.constructor().copy(this);
|
|
942
|
+
}
|
|
943
|
+
copy(e) {
|
|
944
|
+
return this.min.copy(e.min), this.max.copy(e.max), this;
|
|
945
|
+
}
|
|
946
|
+
makeEmpty() {
|
|
947
|
+
return this.min.x = this.min.y = this.min.z = Infinity, this.max.x = this.max.y = this.max.z = -Infinity, this;
|
|
948
|
+
}
|
|
949
|
+
isEmpty() {
|
|
950
|
+
return this.max.x < this.min.x || this.max.y < this.min.y || this.max.z < this.min.z;
|
|
951
|
+
}
|
|
952
|
+
getCenter(e) {
|
|
953
|
+
return this.isEmpty() ? e.set(0, 0, 0) : e.addVectors(this.min, this.max).multiplyScalar(.5);
|
|
954
|
+
}
|
|
955
|
+
getSize(e) {
|
|
956
|
+
return this.isEmpty() ? e.set(0, 0, 0) : e.subVectors(this.max, this.min);
|
|
957
|
+
}
|
|
958
|
+
expandByPoint(e) {
|
|
959
|
+
return this.min.min(e), this.max.max(e), this;
|
|
960
|
+
}
|
|
961
|
+
expandByVector(e) {
|
|
962
|
+
return this.min.sub(e), this.max.add(e), this;
|
|
963
|
+
}
|
|
964
|
+
expandByScalar(e) {
|
|
965
|
+
return this.min.addScalar(-e), this.max.addScalar(e), this;
|
|
966
|
+
}
|
|
967
|
+
expandByObject(e, t = !1) {
|
|
968
|
+
e.updateWorldMatrix(!1, !1);
|
|
969
|
+
let n = e.geometry;
|
|
970
|
+
if (n !== void 0) {
|
|
971
|
+
let r = n.getAttribute("position");
|
|
972
|
+
if (t === !0 && r !== void 0 && e.isInstancedMesh !== !0) for (let t = 0, n = r.count; t < n; t++) e.isMesh === !0 ? e.getVertexPosition(t, z) : z.fromBufferAttribute(r, t), z.applyMatrix4(e.matrixWorld), this.expandByPoint(z);
|
|
973
|
+
else e.boundingBox === void 0 ? (n.boundingBox === null && n.computeBoundingBox(), B.copy(n.boundingBox)) : (e.boundingBox === null && e.computeBoundingBox(), B.copy(e.boundingBox)), B.applyMatrix4(e.matrixWorld), this.union(B);
|
|
974
|
+
}
|
|
975
|
+
let r = e.children;
|
|
976
|
+
for (let e = 0, n = r.length; e < n; e++) this.expandByObject(r[e], t);
|
|
977
|
+
return this;
|
|
978
|
+
}
|
|
979
|
+
containsPoint(e) {
|
|
980
|
+
return e.x >= this.min.x && e.x <= this.max.x && e.y >= this.min.y && e.y <= this.max.y && e.z >= this.min.z && e.z <= this.max.z;
|
|
981
|
+
}
|
|
982
|
+
containsBox(e) {
|
|
983
|
+
return this.min.x <= e.min.x && e.max.x <= this.max.x && this.min.y <= e.min.y && e.max.y <= this.max.y && this.min.z <= e.min.z && e.max.z <= this.max.z;
|
|
984
|
+
}
|
|
985
|
+
getParameter(e, t) {
|
|
986
|
+
return t.set((e.x - this.min.x) / (this.max.x - this.min.x), (e.y - this.min.y) / (this.max.y - this.min.y), (e.z - this.min.z) / (this.max.z - this.min.z));
|
|
987
|
+
}
|
|
988
|
+
intersectsBox(e) {
|
|
989
|
+
return e.max.x >= this.min.x && e.min.x <= this.max.x && e.max.y >= this.min.y && e.min.y <= this.max.y && e.max.z >= this.min.z && e.min.z <= this.max.z;
|
|
990
|
+
}
|
|
991
|
+
intersectsSphere(e) {
|
|
992
|
+
return this.clampPoint(e.center, z), z.distanceToSquared(e.center) <= e.radius * e.radius;
|
|
993
|
+
}
|
|
994
|
+
intersectsPlane(e) {
|
|
995
|
+
let t, n;
|
|
996
|
+
return e.normal.x > 0 ? (t = e.normal.x * this.min.x, n = e.normal.x * this.max.x) : (t = e.normal.x * this.max.x, n = e.normal.x * this.min.x), e.normal.y > 0 ? (t += e.normal.y * this.min.y, n += e.normal.y * this.max.y) : (t += e.normal.y * this.max.y, n += e.normal.y * this.min.y), e.normal.z > 0 ? (t += e.normal.z * this.min.z, n += e.normal.z * this.max.z) : (t += e.normal.z * this.max.z, n += e.normal.z * this.min.z), t <= -e.constant && n >= -e.constant;
|
|
997
|
+
}
|
|
998
|
+
intersectsTriangle(e) {
|
|
999
|
+
if (this.isEmpty()) return !1;
|
|
1000
|
+
this.getCenter(q), ne.subVectors(this.max, q), V.subVectors(e.a, q), H.subVectors(e.b, q), U.subVectors(e.c, q), W.subVectors(H, V), G.subVectors(U, H), K.subVectors(V, U);
|
|
1001
|
+
let t = [
|
|
1002
|
+
0,
|
|
1003
|
+
-W.z,
|
|
1004
|
+
W.y,
|
|
1005
|
+
0,
|
|
1006
|
+
-G.z,
|
|
1007
|
+
G.y,
|
|
1008
|
+
0,
|
|
1009
|
+
-K.z,
|
|
1010
|
+
K.y,
|
|
1011
|
+
W.z,
|
|
1012
|
+
0,
|
|
1013
|
+
-W.x,
|
|
1014
|
+
G.z,
|
|
1015
|
+
0,
|
|
1016
|
+
-G.x,
|
|
1017
|
+
K.z,
|
|
1018
|
+
0,
|
|
1019
|
+
-K.x,
|
|
1020
|
+
-W.y,
|
|
1021
|
+
W.x,
|
|
1022
|
+
0,
|
|
1023
|
+
-G.y,
|
|
1024
|
+
G.x,
|
|
1025
|
+
0,
|
|
1026
|
+
-K.y,
|
|
1027
|
+
K.x,
|
|
1028
|
+
0
|
|
1029
|
+
];
|
|
1030
|
+
return !ie(t, V, H, U, ne) || (t = [
|
|
1031
|
+
1,
|
|
1032
|
+
0,
|
|
1033
|
+
0,
|
|
1034
|
+
0,
|
|
1035
|
+
1,
|
|
1036
|
+
0,
|
|
1037
|
+
0,
|
|
1038
|
+
0,
|
|
1039
|
+
1
|
|
1040
|
+
], !ie(t, V, H, U, ne)) ? !1 : (re.crossVectors(W, G), t = [
|
|
1041
|
+
re.x,
|
|
1042
|
+
re.y,
|
|
1043
|
+
re.z
|
|
1044
|
+
], ie(t, V, H, U, ne));
|
|
1045
|
+
}
|
|
1046
|
+
clampPoint(e, t) {
|
|
1047
|
+
return t.copy(e).clamp(this.min, this.max);
|
|
1048
|
+
}
|
|
1049
|
+
distanceToPoint(e) {
|
|
1050
|
+
return this.clampPoint(e, z).distanceTo(e);
|
|
1051
|
+
}
|
|
1052
|
+
getBoundingSphere(e) {
|
|
1053
|
+
return this.isEmpty() ? e.makeEmpty() : (this.getCenter(e.center), e.radius = this.getSize(z).length() * .5), e;
|
|
1054
|
+
}
|
|
1055
|
+
intersect(e) {
|
|
1056
|
+
return this.min.max(e.min), this.max.min(e.max), this.isEmpty() && this.makeEmpty(), this;
|
|
1057
|
+
}
|
|
1058
|
+
union(e) {
|
|
1059
|
+
return this.min.min(e.min), this.max.max(e.max), this;
|
|
1060
|
+
}
|
|
1061
|
+
applyMatrix4(e) {
|
|
1062
|
+
return this.isEmpty() ? this : (R[0].set(this.min.x, this.min.y, this.min.z).applyMatrix4(e), R[1].set(this.min.x, this.min.y, this.max.z).applyMatrix4(e), R[2].set(this.min.x, this.max.y, this.min.z).applyMatrix4(e), R[3].set(this.min.x, this.max.y, this.max.z).applyMatrix4(e), R[4].set(this.max.x, this.min.y, this.min.z).applyMatrix4(e), R[5].set(this.max.x, this.min.y, this.max.z).applyMatrix4(e), R[6].set(this.max.x, this.max.y, this.min.z).applyMatrix4(e), R[7].set(this.max.x, this.max.y, this.max.z).applyMatrix4(e), this.setFromPoints(R), this);
|
|
1063
|
+
}
|
|
1064
|
+
translate(e) {
|
|
1065
|
+
return this.min.add(e), this.max.add(e), this;
|
|
1066
|
+
}
|
|
1067
|
+
equals(e) {
|
|
1068
|
+
return e.min.equals(this.min) && e.max.equals(this.max);
|
|
1069
|
+
}
|
|
1070
|
+
toJSON() {
|
|
1071
|
+
return {
|
|
1072
|
+
min: this.min.toArray(),
|
|
1073
|
+
max: this.max.toArray()
|
|
1074
|
+
};
|
|
1075
|
+
}
|
|
1076
|
+
fromJSON(e) {
|
|
1077
|
+
return this.min.fromArray(e.min), this.max.fromArray(e.max), this;
|
|
1078
|
+
}
|
|
1079
|
+
}, R = [
|
|
1080
|
+
/* @__PURE__ */ new D(),
|
|
1081
|
+
/* @__PURE__ */ new D(),
|
|
1082
|
+
/* @__PURE__ */ new D(),
|
|
1083
|
+
/* @__PURE__ */ new D(),
|
|
1084
|
+
/* @__PURE__ */ new D(),
|
|
1085
|
+
/* @__PURE__ */ new D(),
|
|
1086
|
+
/* @__PURE__ */ new D(),
|
|
1087
|
+
/* @__PURE__ */ new D()
|
|
1088
|
+
], z = /* @__PURE__ */ new D(), B = /* @__PURE__ */ new te(), V = /* @__PURE__ */ new D(), H = /* @__PURE__ */ new D(), U = /* @__PURE__ */ new D(), W = /* @__PURE__ */ new D(), G = /* @__PURE__ */ new D(), K = /* @__PURE__ */ new D(), q = /* @__PURE__ */ new D(), ne = /* @__PURE__ */ new D(), re = /* @__PURE__ */ new D(), J = /* @__PURE__ */ new D();
|
|
1089
|
+
function ie(e, t, n, r, i) {
|
|
1090
|
+
for (let a = 0, o = e.length - 3; a <= o; a += 3) {
|
|
1091
|
+
J.fromArray(e, a);
|
|
1092
|
+
let o = i.x * Math.abs(J.x) + i.y * Math.abs(J.y) + i.z * Math.abs(J.z), s = t.dot(J), c = n.dot(J), l = r.dot(J);
|
|
1093
|
+
if (Math.max(-Math.max(s, c, l), Math.min(s, c, l)) > o) return !1;
|
|
1094
|
+
}
|
|
1095
|
+
return !0;
|
|
1096
|
+
}
|
|
1097
|
+
//#endregion
|
|
1098
|
+
//#region ../../node_modules/three/src/math/Sphere.js
|
|
1099
|
+
var ae = /* @__PURE__ */ new te(), Y = /* @__PURE__ */ new D(), oe = /* @__PURE__ */ new D(), se = class {
|
|
1100
|
+
constructor(e = new D(), t = -1) {
|
|
1101
|
+
this.isSphere = !0, this.center = e, this.radius = t;
|
|
1102
|
+
}
|
|
1103
|
+
set(e, t) {
|
|
1104
|
+
return this.center.copy(e), this.radius = t, this;
|
|
1105
|
+
}
|
|
1106
|
+
setFromPoints(e, t) {
|
|
1107
|
+
let n = this.center;
|
|
1108
|
+
t === void 0 ? ae.setFromPoints(e).getCenter(n) : n.copy(t);
|
|
1109
|
+
let r = 0;
|
|
1110
|
+
for (let t = 0, i = e.length; t < i; t++) r = Math.max(r, n.distanceToSquared(e[t]));
|
|
1111
|
+
return this.radius = Math.sqrt(r), this;
|
|
1112
|
+
}
|
|
1113
|
+
copy(e) {
|
|
1114
|
+
return this.center.copy(e.center), this.radius = e.radius, this;
|
|
1115
|
+
}
|
|
1116
|
+
isEmpty() {
|
|
1117
|
+
return this.radius < 0;
|
|
1118
|
+
}
|
|
1119
|
+
makeEmpty() {
|
|
1120
|
+
return this.center.set(0, 0, 0), this.radius = -1, this;
|
|
1121
|
+
}
|
|
1122
|
+
containsPoint(e) {
|
|
1123
|
+
return e.distanceToSquared(this.center) <= this.radius * this.radius;
|
|
1124
|
+
}
|
|
1125
|
+
distanceToPoint(e) {
|
|
1126
|
+
return e.distanceTo(this.center) - this.radius;
|
|
1127
|
+
}
|
|
1128
|
+
intersectsSphere(e) {
|
|
1129
|
+
let t = this.radius + e.radius;
|
|
1130
|
+
return e.center.distanceToSquared(this.center) <= t * t;
|
|
1131
|
+
}
|
|
1132
|
+
intersectsBox(e) {
|
|
1133
|
+
return e.intersectsSphere(this);
|
|
1134
|
+
}
|
|
1135
|
+
intersectsPlane(e) {
|
|
1136
|
+
return Math.abs(e.distanceToPoint(this.center)) <= this.radius;
|
|
1137
|
+
}
|
|
1138
|
+
clampPoint(e, t) {
|
|
1139
|
+
let n = this.center.distanceToSquared(e);
|
|
1140
|
+
return t.copy(e), n > this.radius * this.radius && (t.sub(this.center).normalize(), t.multiplyScalar(this.radius).add(this.center)), t;
|
|
1141
|
+
}
|
|
1142
|
+
getBoundingBox(e) {
|
|
1143
|
+
return this.isEmpty() ? (e.makeEmpty(), e) : (e.set(this.center, this.center), e.expandByScalar(this.radius), e);
|
|
1144
|
+
}
|
|
1145
|
+
applyMatrix4(e) {
|
|
1146
|
+
return this.center.applyMatrix4(e), this.radius *= e.getMaxScaleOnAxis(), this;
|
|
1147
|
+
}
|
|
1148
|
+
translate(e) {
|
|
1149
|
+
return this.center.add(e), this;
|
|
1150
|
+
}
|
|
1151
|
+
expandByPoint(e) {
|
|
1152
|
+
if (this.isEmpty()) return this.center.copy(e), this.radius = 0, this;
|
|
1153
|
+
Y.subVectors(e, this.center);
|
|
1154
|
+
let t = Y.lengthSq();
|
|
1155
|
+
if (t > this.radius * this.radius) {
|
|
1156
|
+
let e = Math.sqrt(t), n = (e - this.radius) * .5;
|
|
1157
|
+
this.center.addScaledVector(Y, n / e), this.radius += n;
|
|
1158
|
+
}
|
|
1159
|
+
return this;
|
|
1160
|
+
}
|
|
1161
|
+
union(e) {
|
|
1162
|
+
return e.isEmpty() ? this : this.isEmpty() ? (this.copy(e), this) : (this.center.equals(e.center) === !0 ? this.radius = Math.max(this.radius, e.radius) : (oe.subVectors(e.center, this.center).setLength(e.radius), this.expandByPoint(Y.copy(e.center).add(oe)), this.expandByPoint(Y.copy(e.center).sub(oe))), this);
|
|
1163
|
+
}
|
|
1164
|
+
equals(e) {
|
|
1165
|
+
return e.center.equals(this.center) && e.radius === this.radius;
|
|
1166
|
+
}
|
|
1167
|
+
clone() {
|
|
1168
|
+
return new this.constructor().copy(this);
|
|
1169
|
+
}
|
|
1170
|
+
toJSON() {
|
|
1171
|
+
return {
|
|
1172
|
+
radius: this.radius,
|
|
1173
|
+
center: this.center.toArray()
|
|
1174
|
+
};
|
|
1175
|
+
}
|
|
1176
|
+
fromJSON(e) {
|
|
1177
|
+
return this.radius = e.radius, this.center.fromArray(e.center), this;
|
|
1178
|
+
}
|
|
1179
|
+
}, ce = class e {
|
|
1180
|
+
constructor(t, n, r, i, a, o, s, c, l) {
|
|
1181
|
+
e.prototype.isMatrix3 = !0, this.elements = [
|
|
1182
|
+
1,
|
|
1183
|
+
0,
|
|
1184
|
+
0,
|
|
1185
|
+
0,
|
|
1186
|
+
1,
|
|
1187
|
+
0,
|
|
1188
|
+
0,
|
|
1189
|
+
0,
|
|
1190
|
+
1
|
|
1191
|
+
], t !== void 0 && this.set(t, n, r, i, a, o, s, c, l);
|
|
1192
|
+
}
|
|
1193
|
+
set(e, t, n, r, i, a, o, s, c) {
|
|
1194
|
+
let l = this.elements;
|
|
1195
|
+
return l[0] = e, l[1] = r, l[2] = o, l[3] = t, l[4] = i, l[5] = s, l[6] = n, l[7] = a, l[8] = c, this;
|
|
1196
|
+
}
|
|
1197
|
+
identity() {
|
|
1198
|
+
return this.set(1, 0, 0, 0, 1, 0, 0, 0, 1), this;
|
|
1199
|
+
}
|
|
1200
|
+
copy(e) {
|
|
1201
|
+
let t = this.elements, n = e.elements;
|
|
1202
|
+
return t[0] = n[0], t[1] = n[1], t[2] = n[2], t[3] = n[3], t[4] = n[4], t[5] = n[5], t[6] = n[6], t[7] = n[7], t[8] = n[8], this;
|
|
1203
|
+
}
|
|
1204
|
+
extractBasis(e, t, n) {
|
|
1205
|
+
return e.setFromMatrix3Column(this, 0), t.setFromMatrix3Column(this, 1), n.setFromMatrix3Column(this, 2), this;
|
|
1206
|
+
}
|
|
1207
|
+
setFromMatrix4(e) {
|
|
1208
|
+
let t = e.elements;
|
|
1209
|
+
return this.set(t[0], t[4], t[8], t[1], t[5], t[9], t[2], t[6], t[10]), this;
|
|
1210
|
+
}
|
|
1211
|
+
multiply(e) {
|
|
1212
|
+
return this.multiplyMatrices(this, e);
|
|
1213
|
+
}
|
|
1214
|
+
premultiply(e) {
|
|
1215
|
+
return this.multiplyMatrices(e, this);
|
|
1216
|
+
}
|
|
1217
|
+
multiplyMatrices(e, t) {
|
|
1218
|
+
let n = e.elements, r = t.elements, i = this.elements, a = n[0], o = n[3], s = n[6], c = n[1], l = n[4], u = n[7], d = n[2], f = n[5], p = n[8], m = r[0], h = r[3], g = r[6], _ = r[1], v = r[4], y = r[7], b = r[2], x = r[5], S = r[8];
|
|
1219
|
+
return i[0] = a * m + o * _ + s * b, i[3] = a * h + o * v + s * x, i[6] = a * g + o * y + s * S, i[1] = c * m + l * _ + u * b, i[4] = c * h + l * v + u * x, i[7] = c * g + l * y + u * S, i[2] = d * m + f * _ + p * b, i[5] = d * h + f * v + p * x, i[8] = d * g + f * y + p * S, this;
|
|
1220
|
+
}
|
|
1221
|
+
multiplyScalar(e) {
|
|
1222
|
+
let t = this.elements;
|
|
1223
|
+
return t[0] *= e, t[3] *= e, t[6] *= e, t[1] *= e, t[4] *= e, t[7] *= e, t[2] *= e, t[5] *= e, t[8] *= e, this;
|
|
1224
|
+
}
|
|
1225
|
+
determinant() {
|
|
1226
|
+
let e = this.elements, t = e[0], n = e[1], r = e[2], i = e[3], a = e[4], o = e[5], s = e[6], c = e[7], l = e[8];
|
|
1227
|
+
return t * a * l - t * o * c - n * i * l + n * o * s + r * i * c - r * a * s;
|
|
1228
|
+
}
|
|
1229
|
+
invert() {
|
|
1230
|
+
let e = this.elements, t = e[0], n = e[1], r = e[2], i = e[3], a = e[4], o = e[5], s = e[6], c = e[7], l = e[8], u = l * a - o * c, d = o * s - l * i, f = c * i - a * s, p = t * u + n * d + r * f;
|
|
1231
|
+
if (p === 0) return this.set(0, 0, 0, 0, 0, 0, 0, 0, 0);
|
|
1232
|
+
let m = 1 / p;
|
|
1233
|
+
return e[0] = u * m, e[1] = (r * c - l * n) * m, e[2] = (o * n - r * a) * m, e[3] = d * m, e[4] = (l * t - r * s) * m, e[5] = (r * i - o * t) * m, e[6] = f * m, e[7] = (n * s - c * t) * m, e[8] = (a * t - n * i) * m, this;
|
|
1234
|
+
}
|
|
1235
|
+
transpose() {
|
|
1236
|
+
let e, t = this.elements;
|
|
1237
|
+
return e = t[1], t[1] = t[3], t[3] = e, e = t[2], t[2] = t[6], t[6] = e, e = t[5], t[5] = t[7], t[7] = e, this;
|
|
1238
|
+
}
|
|
1239
|
+
getNormalMatrix(e) {
|
|
1240
|
+
return this.setFromMatrix4(e).invert().transpose();
|
|
1241
|
+
}
|
|
1242
|
+
transposeIntoArray(e) {
|
|
1243
|
+
let t = this.elements;
|
|
1244
|
+
return e[0] = t[0], e[1] = t[3], e[2] = t[6], e[3] = t[1], e[4] = t[4], e[5] = t[7], e[6] = t[2], e[7] = t[5], e[8] = t[8], this;
|
|
1245
|
+
}
|
|
1246
|
+
setUvTransform(e, t, n, r, i, a, o) {
|
|
1247
|
+
let s = Math.cos(i), c = Math.sin(i);
|
|
1248
|
+
return this.set(n * s, n * c, -n * (s * a + c * o) + a + e, -r * c, r * s, -r * (-c * a + s * o) + o + t, 0, 0, 1), this;
|
|
1249
|
+
}
|
|
1250
|
+
scale(e, t) {
|
|
1251
|
+
return this.premultiply(le.makeScale(e, t)), this;
|
|
1252
|
+
}
|
|
1253
|
+
rotate(e) {
|
|
1254
|
+
return this.premultiply(le.makeRotation(-e)), this;
|
|
1255
|
+
}
|
|
1256
|
+
translate(e, t) {
|
|
1257
|
+
return this.premultiply(le.makeTranslation(e, t)), this;
|
|
1258
|
+
}
|
|
1259
|
+
makeTranslation(e, t) {
|
|
1260
|
+
return e.isVector2 ? this.set(1, 0, e.x, 0, 1, e.y, 0, 0, 1) : this.set(1, 0, e, 0, 1, t, 0, 0, 1), this;
|
|
1261
|
+
}
|
|
1262
|
+
makeRotation(e) {
|
|
1263
|
+
let t = Math.cos(e), n = Math.sin(e);
|
|
1264
|
+
return this.set(t, -n, 0, n, t, 0, 0, 0, 1), this;
|
|
1265
|
+
}
|
|
1266
|
+
makeScale(e, t) {
|
|
1267
|
+
return this.set(e, 0, 0, 0, t, 0, 0, 0, 1), this;
|
|
1268
|
+
}
|
|
1269
|
+
equals(e) {
|
|
1270
|
+
let t = this.elements, n = e.elements;
|
|
1271
|
+
for (let e = 0; e < 9; e++) if (t[e] !== n[e]) return !1;
|
|
1272
|
+
return !0;
|
|
1273
|
+
}
|
|
1274
|
+
fromArray(e, t = 0) {
|
|
1275
|
+
for (let n = 0; n < 9; n++) this.elements[n] = e[n + t];
|
|
1276
|
+
return this;
|
|
1277
|
+
}
|
|
1278
|
+
toArray(e = [], t = 0) {
|
|
1279
|
+
let n = this.elements;
|
|
1280
|
+
return e[t] = n[0], e[t + 1] = n[1], e[t + 2] = n[2], e[t + 3] = n[3], e[t + 4] = n[4], e[t + 5] = n[5], e[t + 6] = n[6], e[t + 7] = n[7], e[t + 8] = n[8], e;
|
|
1281
|
+
}
|
|
1282
|
+
clone() {
|
|
1283
|
+
return new this.constructor().fromArray(this.elements);
|
|
1284
|
+
}
|
|
1285
|
+
}, le = /* @__PURE__ */ new ce(), ue = class {
|
|
1286
|
+
addEventListener(e, t) {
|
|
1287
|
+
this._listeners === void 0 && (this._listeners = {});
|
|
1288
|
+
let n = this._listeners;
|
|
1289
|
+
n[e] === void 0 && (n[e] = []), n[e].indexOf(t) === -1 && n[e].push(t);
|
|
1290
|
+
}
|
|
1291
|
+
hasEventListener(e, t) {
|
|
1292
|
+
let n = this._listeners;
|
|
1293
|
+
return n === void 0 ? !1 : n[e] !== void 0 && n[e].indexOf(t) !== -1;
|
|
1294
|
+
}
|
|
1295
|
+
removeEventListener(e, t) {
|
|
1296
|
+
let n = this._listeners;
|
|
1297
|
+
if (n === void 0) return;
|
|
1298
|
+
let r = n[e];
|
|
1299
|
+
if (r !== void 0) {
|
|
1300
|
+
let e = r.indexOf(t);
|
|
1301
|
+
e !== -1 && r.splice(e, 1);
|
|
1302
|
+
}
|
|
1303
|
+
}
|
|
1304
|
+
dispatchEvent(e) {
|
|
1305
|
+
let t = this._listeners;
|
|
1306
|
+
if (t === void 0) return;
|
|
1307
|
+
let n = t[e.type];
|
|
1308
|
+
if (n !== void 0) {
|
|
1309
|
+
e.target = this;
|
|
1310
|
+
let t = n.slice(0);
|
|
1311
|
+
for (let n = 0, r = t.length; n < r; n++) t[n].call(this, e);
|
|
1312
|
+
e.target = null;
|
|
1313
|
+
}
|
|
1314
|
+
}
|
|
1315
|
+
}, de = /* @__PURE__ */ new A(), fe = /* @__PURE__ */ new E(), pe = class e {
|
|
1316
|
+
constructor(t = 0, n = 0, r = 0, i = e.DEFAULT_ORDER) {
|
|
1317
|
+
this.isEuler = !0, this._x = t, this._y = n, this._z = r, this._order = i;
|
|
1318
|
+
}
|
|
1319
|
+
get x() {
|
|
1320
|
+
return this._x;
|
|
1321
|
+
}
|
|
1322
|
+
set x(e) {
|
|
1323
|
+
this._x = e, this._onChangeCallback();
|
|
1324
|
+
}
|
|
1325
|
+
get y() {
|
|
1326
|
+
return this._y;
|
|
1327
|
+
}
|
|
1328
|
+
set y(e) {
|
|
1329
|
+
this._y = e, this._onChangeCallback();
|
|
1330
|
+
}
|
|
1331
|
+
get z() {
|
|
1332
|
+
return this._z;
|
|
1333
|
+
}
|
|
1334
|
+
set z(e) {
|
|
1335
|
+
this._z = e, this._onChangeCallback();
|
|
1336
|
+
}
|
|
1337
|
+
get order() {
|
|
1338
|
+
return this._order;
|
|
1339
|
+
}
|
|
1340
|
+
set order(e) {
|
|
1341
|
+
this._order = e, this._onChangeCallback();
|
|
1342
|
+
}
|
|
1343
|
+
set(e, t, n, r = this._order) {
|
|
1344
|
+
return this._x = e, this._y = t, this._z = n, this._order = r, this._onChangeCallback(), this;
|
|
1345
|
+
}
|
|
1346
|
+
clone() {
|
|
1347
|
+
return new this.constructor(this._x, this._y, this._z, this._order);
|
|
1348
|
+
}
|
|
1349
|
+
copy(e) {
|
|
1350
|
+
return this._x = e._x, this._y = e._y, this._z = e._z, this._order = e._order, this._onChangeCallback(), this;
|
|
1351
|
+
}
|
|
1352
|
+
setFromRotationMatrix(e, t = this._order, n = !0) {
|
|
1353
|
+
let r = e.elements, i = r[0], a = r[4], o = r[8], s = r[1], c = r[5], l = r[9], u = r[2], d = r[6], f = r[10];
|
|
1354
|
+
switch (t) {
|
|
1355
|
+
case "XYZ":
|
|
1356
|
+
this._y = Math.asin(x(o, -1, 1)), Math.abs(o) < .9999999 ? (this._x = Math.atan2(-l, f), this._z = Math.atan2(-a, i)) : (this._x = Math.atan2(d, c), this._z = 0);
|
|
1357
|
+
break;
|
|
1358
|
+
case "YXZ":
|
|
1359
|
+
this._x = Math.asin(-x(l, -1, 1)), Math.abs(l) < .9999999 ? (this._y = Math.atan2(o, f), this._z = Math.atan2(s, c)) : (this._y = Math.atan2(-u, i), this._z = 0);
|
|
1360
|
+
break;
|
|
1361
|
+
case "ZXY":
|
|
1362
|
+
this._x = Math.asin(x(d, -1, 1)), Math.abs(d) < .9999999 ? (this._y = Math.atan2(-u, f), this._z = Math.atan2(-a, c)) : (this._y = 0, this._z = Math.atan2(s, i));
|
|
1363
|
+
break;
|
|
1364
|
+
case "ZYX":
|
|
1365
|
+
this._y = Math.asin(-x(u, -1, 1)), Math.abs(u) < .9999999 ? (this._x = Math.atan2(d, f), this._z = Math.atan2(s, i)) : (this._x = 0, this._z = Math.atan2(-a, c));
|
|
1366
|
+
break;
|
|
1367
|
+
case "YZX":
|
|
1368
|
+
this._z = Math.asin(x(s, -1, 1)), Math.abs(s) < .9999999 ? (this._x = Math.atan2(-l, c), this._y = Math.atan2(-u, i)) : (this._x = 0, this._y = Math.atan2(o, f));
|
|
1369
|
+
break;
|
|
1370
|
+
case "XZY":
|
|
1371
|
+
this._z = Math.asin(-x(a, -1, 1)), Math.abs(a) < .9999999 ? (this._x = Math.atan2(d, c), this._y = Math.atan2(o, i)) : (this._x = Math.atan2(-l, f), this._y = 0);
|
|
1372
|
+
break;
|
|
1373
|
+
default: m("Euler: .setFromRotationMatrix() encountered an unknown order: " + t);
|
|
1374
|
+
}
|
|
1375
|
+
return this._order = t, n === !0 && this._onChangeCallback(), this;
|
|
1376
|
+
}
|
|
1377
|
+
setFromQuaternion(e, t, n) {
|
|
1378
|
+
return de.makeRotationFromQuaternion(e), this.setFromRotationMatrix(de, t, n);
|
|
1379
|
+
}
|
|
1380
|
+
setFromVector3(e, t = this._order) {
|
|
1381
|
+
return this.set(e.x, e.y, e.z, t);
|
|
1382
|
+
}
|
|
1383
|
+
reorder(e) {
|
|
1384
|
+
return fe.setFromEuler(this), this.setFromQuaternion(fe, e);
|
|
1385
|
+
}
|
|
1386
|
+
equals(e) {
|
|
1387
|
+
return e._x === this._x && e._y === this._y && e._z === this._z && e._order === this._order;
|
|
1388
|
+
}
|
|
1389
|
+
fromArray(e) {
|
|
1390
|
+
return this._x = e[0], this._y = e[1], this._z = e[2], e[3] !== void 0 && (this._order = e[3]), this._onChangeCallback(), this;
|
|
1391
|
+
}
|
|
1392
|
+
toArray(e = [], t = 0) {
|
|
1393
|
+
return e[t] = this._x, e[t + 1] = this._y, e[t + 2] = this._z, e[t + 3] = this._order, e;
|
|
1394
|
+
}
|
|
1395
|
+
_onChange(e) {
|
|
1396
|
+
return this._onChangeCallback = e, this;
|
|
1397
|
+
}
|
|
1398
|
+
_onChangeCallback() {}
|
|
1399
|
+
*[Symbol.iterator]() {
|
|
1400
|
+
yield this._x, yield this._y, yield this._z, yield this._order;
|
|
1401
|
+
}
|
|
1402
|
+
};
|
|
1403
|
+
pe.DEFAULT_ORDER = "XYZ";
|
|
1404
|
+
//#endregion
|
|
1405
|
+
//#region ../../node_modules/three/src/core/Layers.js
|
|
1406
|
+
var me = class {
|
|
1407
|
+
constructor() {
|
|
1408
|
+
this.mask = 1;
|
|
1409
|
+
}
|
|
1410
|
+
set(e) {
|
|
1411
|
+
this.mask = (1 << e | 0) >>> 0;
|
|
1412
|
+
}
|
|
1413
|
+
enable(e) {
|
|
1414
|
+
this.mask |= 1 << e | 0;
|
|
1415
|
+
}
|
|
1416
|
+
enableAll() {
|
|
1417
|
+
this.mask = -1;
|
|
1418
|
+
}
|
|
1419
|
+
toggle(e) {
|
|
1420
|
+
this.mask ^= 1 << e | 0;
|
|
1421
|
+
}
|
|
1422
|
+
disable(e) {
|
|
1423
|
+
this.mask &= ~(1 << e | 0);
|
|
1424
|
+
}
|
|
1425
|
+
disableAll() {
|
|
1426
|
+
this.mask = 0;
|
|
1427
|
+
}
|
|
1428
|
+
test(e) {
|
|
1429
|
+
return (this.mask & e.mask) !== 0;
|
|
1430
|
+
}
|
|
1431
|
+
isEnabled(e) {
|
|
1432
|
+
return (this.mask & (1 << e | 0)) != 0;
|
|
1433
|
+
}
|
|
1434
|
+
}, he = 0, ge = /* @__PURE__ */ new D(), X = /* @__PURE__ */ new E(), Z = /* @__PURE__ */ new A(), _e = /* @__PURE__ */ new D(), Q = /* @__PURE__ */ new D(), ve = /* @__PURE__ */ new D(), ye = /* @__PURE__ */ new E(), be = /* @__PURE__ */ new D(1, 0, 0), xe = /* @__PURE__ */ new D(0, 1, 0), Se = /* @__PURE__ */ new D(0, 0, 1), Ce = { type: "added" }, we = { type: "removed" }, $ = {
|
|
1435
|
+
type: "childadded",
|
|
1436
|
+
child: null
|
|
1437
|
+
}, Te = {
|
|
1438
|
+
type: "childremoved",
|
|
1439
|
+
child: null
|
|
1440
|
+
}, Ee = class e extends ue {
|
|
1441
|
+
constructor() {
|
|
1442
|
+
super(), this.isObject3D = !0, Object.defineProperty(this, "id", { value: he++ }), this.uuid = b(), this.name = "", this.type = "Object3D", this.parent = null, this.children = [], this.up = e.DEFAULT_UP.clone();
|
|
1443
|
+
let t = new D(), n = new pe(), r = new E(), i = new D(1, 1, 1);
|
|
1444
|
+
function a() {
|
|
1445
|
+
r.setFromEuler(n, !1);
|
|
1446
|
+
}
|
|
1447
|
+
function o() {
|
|
1448
|
+
n.setFromQuaternion(r, void 0, !1);
|
|
1449
|
+
}
|
|
1450
|
+
n._onChange(a), r._onChange(o), Object.defineProperties(this, {
|
|
1451
|
+
position: {
|
|
1452
|
+
configurable: !0,
|
|
1453
|
+
enumerable: !0,
|
|
1454
|
+
value: t
|
|
1455
|
+
},
|
|
1456
|
+
rotation: {
|
|
1457
|
+
configurable: !0,
|
|
1458
|
+
enumerable: !0,
|
|
1459
|
+
value: n
|
|
1460
|
+
},
|
|
1461
|
+
quaternion: {
|
|
1462
|
+
configurable: !0,
|
|
1463
|
+
enumerable: !0,
|
|
1464
|
+
value: r
|
|
1465
|
+
},
|
|
1466
|
+
scale: {
|
|
1467
|
+
configurable: !0,
|
|
1468
|
+
enumerable: !0,
|
|
1469
|
+
value: i
|
|
1470
|
+
},
|
|
1471
|
+
modelViewMatrix: { value: new A() },
|
|
1472
|
+
normalMatrix: { value: new ce() }
|
|
1473
|
+
}), this.matrix = new A(), this.matrixWorld = new A(), this.matrixAutoUpdate = e.DEFAULT_MATRIX_AUTO_UPDATE, this.matrixWorldAutoUpdate = e.DEFAULT_MATRIX_WORLD_AUTO_UPDATE, this.matrixWorldNeedsUpdate = !1, this.layers = new me(), this.visible = !0, this.castShadow = !1, this.receiveShadow = !1, this.frustumCulled = !0, this.renderOrder = 0, this.animations = [], this.customDepthMaterial = void 0, this.customDistanceMaterial = void 0, this.static = !1, this.userData = {}, this.pivot = null;
|
|
1474
|
+
}
|
|
1475
|
+
onBeforeShadow() {}
|
|
1476
|
+
onAfterShadow() {}
|
|
1477
|
+
onBeforeRender() {}
|
|
1478
|
+
onAfterRender() {}
|
|
1479
|
+
applyMatrix4(e) {
|
|
1480
|
+
this.matrixAutoUpdate && this.updateMatrix(), this.matrix.premultiply(e), this.matrix.decompose(this.position, this.quaternion, this.scale);
|
|
1481
|
+
}
|
|
1482
|
+
applyQuaternion(e) {
|
|
1483
|
+
return this.quaternion.premultiply(e), this;
|
|
1484
|
+
}
|
|
1485
|
+
setRotationFromAxisAngle(e, t) {
|
|
1486
|
+
this.quaternion.setFromAxisAngle(e, t);
|
|
1487
|
+
}
|
|
1488
|
+
setRotationFromEuler(e) {
|
|
1489
|
+
this.quaternion.setFromEuler(e, !0);
|
|
1490
|
+
}
|
|
1491
|
+
setRotationFromMatrix(e) {
|
|
1492
|
+
this.quaternion.setFromRotationMatrix(e);
|
|
1493
|
+
}
|
|
1494
|
+
setRotationFromQuaternion(e) {
|
|
1495
|
+
this.quaternion.copy(e);
|
|
1496
|
+
}
|
|
1497
|
+
rotateOnAxis(e, t) {
|
|
1498
|
+
return X.setFromAxisAngle(e, t), this.quaternion.multiply(X), this;
|
|
1499
|
+
}
|
|
1500
|
+
rotateOnWorldAxis(e, t) {
|
|
1501
|
+
return X.setFromAxisAngle(e, t), this.quaternion.premultiply(X), this;
|
|
1502
|
+
}
|
|
1503
|
+
rotateX(e) {
|
|
1504
|
+
return this.rotateOnAxis(be, e);
|
|
1505
|
+
}
|
|
1506
|
+
rotateY(e) {
|
|
1507
|
+
return this.rotateOnAxis(xe, e);
|
|
1508
|
+
}
|
|
1509
|
+
rotateZ(e) {
|
|
1510
|
+
return this.rotateOnAxis(Se, e);
|
|
1511
|
+
}
|
|
1512
|
+
translateOnAxis(e, t) {
|
|
1513
|
+
return ge.copy(e).applyQuaternion(this.quaternion), this.position.add(ge.multiplyScalar(t)), this;
|
|
1514
|
+
}
|
|
1515
|
+
translateX(e) {
|
|
1516
|
+
return this.translateOnAxis(be, e);
|
|
1517
|
+
}
|
|
1518
|
+
translateY(e) {
|
|
1519
|
+
return this.translateOnAxis(xe, e);
|
|
1520
|
+
}
|
|
1521
|
+
translateZ(e) {
|
|
1522
|
+
return this.translateOnAxis(Se, e);
|
|
1523
|
+
}
|
|
1524
|
+
localToWorld(e) {
|
|
1525
|
+
return this.updateWorldMatrix(!0, !1), e.applyMatrix4(this.matrixWorld);
|
|
1526
|
+
}
|
|
1527
|
+
worldToLocal(e) {
|
|
1528
|
+
return this.updateWorldMatrix(!0, !1), e.applyMatrix4(Z.copy(this.matrixWorld).invert());
|
|
1529
|
+
}
|
|
1530
|
+
lookAt(e, t, n) {
|
|
1531
|
+
e.isVector3 ? _e.copy(e) : _e.set(e, t, n);
|
|
1532
|
+
let r = this.parent;
|
|
1533
|
+
this.updateWorldMatrix(!0, !1), Q.setFromMatrixPosition(this.matrixWorld), this.isCamera || this.isLight ? Z.lookAt(Q, _e, this.up) : Z.lookAt(_e, Q, this.up), this.quaternion.setFromRotationMatrix(Z), r && (Z.extractRotation(r.matrixWorld), X.setFromRotationMatrix(Z), this.quaternion.premultiply(X.invert()));
|
|
1534
|
+
}
|
|
1535
|
+
add(e) {
|
|
1536
|
+
if (arguments.length > 1) {
|
|
1537
|
+
for (let e = 0; e < arguments.length; e++) this.add(arguments[e]);
|
|
1538
|
+
return this;
|
|
1539
|
+
}
|
|
1540
|
+
return e === this ? (h("Object3D.add: object can't be added as a child of itself.", e), this) : (e && e.isObject3D ? (e.removeFromParent(), e.parent = this, this.children.push(e), e.dispatchEvent(Ce), $.child = e, this.dispatchEvent($), $.child = null) : h("Object3D.add: object not an instance of THREE.Object3D.", e), this);
|
|
1541
|
+
}
|
|
1542
|
+
remove(e) {
|
|
1543
|
+
if (arguments.length > 1) {
|
|
1544
|
+
for (let e = 0; e < arguments.length; e++) this.remove(arguments[e]);
|
|
1545
|
+
return this;
|
|
1546
|
+
}
|
|
1547
|
+
let t = this.children.indexOf(e);
|
|
1548
|
+
return t !== -1 && (e.parent = null, this.children.splice(t, 1), e.dispatchEvent(we), Te.child = e, this.dispatchEvent(Te), Te.child = null), this;
|
|
1549
|
+
}
|
|
1550
|
+
removeFromParent() {
|
|
1551
|
+
let e = this.parent;
|
|
1552
|
+
return e !== null && e.remove(this), this;
|
|
1553
|
+
}
|
|
1554
|
+
clear() {
|
|
1555
|
+
return this.remove(...this.children);
|
|
1556
|
+
}
|
|
1557
|
+
attach(e) {
|
|
1558
|
+
return this.updateWorldMatrix(!0, !1), Z.copy(this.matrixWorld).invert(), e.parent !== null && (e.parent.updateWorldMatrix(!0, !1), Z.multiply(e.parent.matrixWorld)), e.applyMatrix4(Z), e.removeFromParent(), e.parent = this, this.children.push(e), e.updateWorldMatrix(!1, !0), e.dispatchEvent(Ce), $.child = e, this.dispatchEvent($), $.child = null, this;
|
|
1559
|
+
}
|
|
1560
|
+
getObjectById(e) {
|
|
1561
|
+
return this.getObjectByProperty("id", e);
|
|
1562
|
+
}
|
|
1563
|
+
getObjectByName(e) {
|
|
1564
|
+
return this.getObjectByProperty("name", e);
|
|
1565
|
+
}
|
|
1566
|
+
getObjectByProperty(e, t) {
|
|
1567
|
+
if (this[e] === t) return this;
|
|
1568
|
+
for (let n = 0, r = this.children.length; n < r; n++) {
|
|
1569
|
+
let r = this.children[n].getObjectByProperty(e, t);
|
|
1570
|
+
if (r !== void 0) return r;
|
|
1571
|
+
}
|
|
1572
|
+
}
|
|
1573
|
+
getObjectsByProperty(e, t, n = []) {
|
|
1574
|
+
this[e] === t && n.push(this);
|
|
1575
|
+
let r = this.children;
|
|
1576
|
+
for (let i = 0, a = r.length; i < a; i++) r[i].getObjectsByProperty(e, t, n);
|
|
1577
|
+
return n;
|
|
1578
|
+
}
|
|
1579
|
+
getWorldPosition(e) {
|
|
1580
|
+
return this.updateWorldMatrix(!0, !1), e.setFromMatrixPosition(this.matrixWorld);
|
|
1581
|
+
}
|
|
1582
|
+
getWorldQuaternion(e) {
|
|
1583
|
+
return this.updateWorldMatrix(!0, !1), this.matrixWorld.decompose(Q, e, ve), e;
|
|
1584
|
+
}
|
|
1585
|
+
getWorldScale(e) {
|
|
1586
|
+
return this.updateWorldMatrix(!0, !1), this.matrixWorld.decompose(Q, ye, e), e;
|
|
1587
|
+
}
|
|
1588
|
+
getWorldDirection(e) {
|
|
1589
|
+
this.updateWorldMatrix(!0, !1);
|
|
1590
|
+
let t = this.matrixWorld.elements;
|
|
1591
|
+
return e.set(t[8], t[9], t[10]).normalize();
|
|
1592
|
+
}
|
|
1593
|
+
raycast() {}
|
|
1594
|
+
traverse(e) {
|
|
1595
|
+
e(this);
|
|
1596
|
+
let t = this.children;
|
|
1597
|
+
for (let n = 0, r = t.length; n < r; n++) t[n].traverse(e);
|
|
1598
|
+
}
|
|
1599
|
+
traverseVisible(e) {
|
|
1600
|
+
if (this.visible === !1) return;
|
|
1601
|
+
e(this);
|
|
1602
|
+
let t = this.children;
|
|
1603
|
+
for (let n = 0, r = t.length; n < r; n++) t[n].traverseVisible(e);
|
|
1604
|
+
}
|
|
1605
|
+
traverseAncestors(e) {
|
|
1606
|
+
let t = this.parent;
|
|
1607
|
+
t !== null && (e(t), t.traverseAncestors(e));
|
|
1608
|
+
}
|
|
1609
|
+
updateMatrix() {
|
|
1610
|
+
this.matrix.compose(this.position, this.quaternion, this.scale);
|
|
1611
|
+
let e = this.pivot;
|
|
1612
|
+
if (e !== null) {
|
|
1613
|
+
let t = e.x, n = e.y, r = e.z, i = this.matrix.elements;
|
|
1614
|
+
i[12] += t - i[0] * t - i[4] * n - i[8] * r, i[13] += n - i[1] * t - i[5] * n - i[9] * r, i[14] += r - i[2] * t - i[6] * n - i[10] * r;
|
|
1615
|
+
}
|
|
1616
|
+
this.matrixWorldNeedsUpdate = !0;
|
|
1617
|
+
}
|
|
1618
|
+
updateMatrixWorld(e) {
|
|
1619
|
+
this.matrixAutoUpdate && this.updateMatrix(), (this.matrixWorldNeedsUpdate || e) && (this.matrixWorldAutoUpdate === !0 && (this.parent === null ? this.matrixWorld.copy(this.matrix) : this.matrixWorld.multiplyMatrices(this.parent.matrixWorld, this.matrix)), this.matrixWorldNeedsUpdate = !1, e = !0);
|
|
1620
|
+
let t = this.children;
|
|
1621
|
+
for (let n = 0, r = t.length; n < r; n++) t[n].updateMatrixWorld(e);
|
|
1622
|
+
}
|
|
1623
|
+
updateWorldMatrix(e, t) {
|
|
1624
|
+
let n = this.parent;
|
|
1625
|
+
if (e === !0 && n !== null && n.updateWorldMatrix(!0, !1), this.matrixAutoUpdate && this.updateMatrix(), this.matrixWorldAutoUpdate === !0 && (this.parent === null ? this.matrixWorld.copy(this.matrix) : this.matrixWorld.multiplyMatrices(this.parent.matrixWorld, this.matrix)), t === !0) {
|
|
1626
|
+
let e = this.children;
|
|
1627
|
+
for (let t = 0, n = e.length; t < n; t++) e[t].updateWorldMatrix(!1, !0);
|
|
1628
|
+
}
|
|
1629
|
+
}
|
|
1630
|
+
toJSON(e) {
|
|
1631
|
+
let t = e === void 0 || typeof e == "string", n = {};
|
|
1632
|
+
t && (e = {
|
|
1633
|
+
geometries: {},
|
|
1634
|
+
materials: {},
|
|
1635
|
+
textures: {},
|
|
1636
|
+
images: {},
|
|
1637
|
+
shapes: {},
|
|
1638
|
+
skeletons: {},
|
|
1639
|
+
animations: {},
|
|
1640
|
+
nodes: {}
|
|
1641
|
+
}, n.metadata = {
|
|
1642
|
+
version: 4.7,
|
|
1643
|
+
type: "Object",
|
|
1644
|
+
generator: "Object3D.toJSON"
|
|
1645
|
+
});
|
|
1646
|
+
let r = {};
|
|
1647
|
+
r.uuid = this.uuid, r.type = this.type, this.name !== "" && (r.name = this.name), this.castShadow === !0 && (r.castShadow = !0), this.receiveShadow === !0 && (r.receiveShadow = !0), this.visible === !1 && (r.visible = !1), this.frustumCulled === !1 && (r.frustumCulled = !1), this.renderOrder !== 0 && (r.renderOrder = this.renderOrder), this.static !== !1 && (r.static = this.static), Object.keys(this.userData).length > 0 && (r.userData = this.userData), r.layers = this.layers.mask, r.matrix = this.matrix.toArray(), r.up = this.up.toArray(), this.pivot !== null && (r.pivot = this.pivot.toArray()), this.matrixAutoUpdate === !1 && (r.matrixAutoUpdate = !1), this.morphTargetDictionary !== void 0 && (r.morphTargetDictionary = Object.assign({}, this.morphTargetDictionary)), this.morphTargetInfluences !== void 0 && (r.morphTargetInfluences = this.morphTargetInfluences.slice()), this.isInstancedMesh && (r.type = "InstancedMesh", r.count = this.count, r.instanceMatrix = this.instanceMatrix.toJSON(), this.instanceColor !== null && (r.instanceColor = this.instanceColor.toJSON())), this.isBatchedMesh && (r.type = "BatchedMesh", r.perObjectFrustumCulled = this.perObjectFrustumCulled, r.sortObjects = this.sortObjects, r.drawRanges = this._drawRanges, r.reservedRanges = this._reservedRanges, r.geometryInfo = this._geometryInfo.map((e) => ({
|
|
1648
|
+
...e,
|
|
1649
|
+
boundingBox: e.boundingBox ? e.boundingBox.toJSON() : void 0,
|
|
1650
|
+
boundingSphere: e.boundingSphere ? e.boundingSphere.toJSON() : void 0
|
|
1651
|
+
})), r.instanceInfo = this._instanceInfo.map((e) => ({ ...e })), r.availableInstanceIds = this._availableInstanceIds.slice(), r.availableGeometryIds = this._availableGeometryIds.slice(), r.nextIndexStart = this._nextIndexStart, r.nextVertexStart = this._nextVertexStart, r.geometryCount = this._geometryCount, r.maxInstanceCount = this._maxInstanceCount, r.maxVertexCount = this._maxVertexCount, r.maxIndexCount = this._maxIndexCount, r.geometryInitialized = this._geometryInitialized, r.matricesTexture = this._matricesTexture.toJSON(e), r.indirectTexture = this._indirectTexture.toJSON(e), this._colorsTexture !== null && (r.colorsTexture = this._colorsTexture.toJSON(e)), this.boundingSphere !== null && (r.boundingSphere = this.boundingSphere.toJSON()), this.boundingBox !== null && (r.boundingBox = this.boundingBox.toJSON()));
|
|
1652
|
+
function i(t, n) {
|
|
1653
|
+
return t[n.uuid] === void 0 && (t[n.uuid] = n.toJSON(e)), n.uuid;
|
|
1654
|
+
}
|
|
1655
|
+
if (this.isScene) this.background && (this.background.isColor ? r.background = this.background.toJSON() : this.background.isTexture && (r.background = this.background.toJSON(e).uuid)), this.environment && this.environment.isTexture && this.environment.isRenderTargetTexture !== !0 && (r.environment = this.environment.toJSON(e).uuid);
|
|
1656
|
+
else if (this.isMesh || this.isLine || this.isPoints) {
|
|
1657
|
+
r.geometry = i(e.geometries, this.geometry);
|
|
1658
|
+
let t = this.geometry.parameters;
|
|
1659
|
+
if (t !== void 0 && t.shapes !== void 0) {
|
|
1660
|
+
let n = t.shapes;
|
|
1661
|
+
if (Array.isArray(n)) for (let t = 0, r = n.length; t < r; t++) {
|
|
1662
|
+
let r = n[t];
|
|
1663
|
+
i(e.shapes, r);
|
|
1664
|
+
}
|
|
1665
|
+
else i(e.shapes, n);
|
|
1666
|
+
}
|
|
1667
|
+
}
|
|
1668
|
+
if (this.isSkinnedMesh && (r.bindMode = this.bindMode, r.bindMatrix = this.bindMatrix.toArray(), this.skeleton !== void 0 && (i(e.skeletons, this.skeleton), r.skeleton = this.skeleton.uuid)), this.material !== void 0) if (Array.isArray(this.material)) {
|
|
1669
|
+
let t = [];
|
|
1670
|
+
for (let n = 0, r = this.material.length; n < r; n++) t.push(i(e.materials, this.material[n]));
|
|
1671
|
+
r.material = t;
|
|
1672
|
+
} else r.material = i(e.materials, this.material);
|
|
1673
|
+
if (this.children.length > 0) {
|
|
1674
|
+
r.children = [];
|
|
1675
|
+
for (let t = 0; t < this.children.length; t++) r.children.push(this.children[t].toJSON(e).object);
|
|
1676
|
+
}
|
|
1677
|
+
if (this.animations.length > 0) {
|
|
1678
|
+
r.animations = [];
|
|
1679
|
+
for (let t = 0; t < this.animations.length; t++) {
|
|
1680
|
+
let n = this.animations[t];
|
|
1681
|
+
r.animations.push(i(e.animations, n));
|
|
1682
|
+
}
|
|
1683
|
+
}
|
|
1684
|
+
if (t) {
|
|
1685
|
+
let t = a(e.geometries), r = a(e.materials), i = a(e.textures), o = a(e.images), s = a(e.shapes), c = a(e.skeletons), l = a(e.animations), u = a(e.nodes);
|
|
1686
|
+
t.length > 0 && (n.geometries = t), r.length > 0 && (n.materials = r), i.length > 0 && (n.textures = i), o.length > 0 && (n.images = o), s.length > 0 && (n.shapes = s), c.length > 0 && (n.skeletons = c), l.length > 0 && (n.animations = l), u.length > 0 && (n.nodes = u);
|
|
1687
|
+
}
|
|
1688
|
+
return n.object = r, n;
|
|
1689
|
+
function a(e) {
|
|
1690
|
+
let t = [];
|
|
1691
|
+
for (let n in e) {
|
|
1692
|
+
let r = e[n];
|
|
1693
|
+
delete r.metadata, t.push(r);
|
|
1694
|
+
}
|
|
1695
|
+
return t;
|
|
1696
|
+
}
|
|
1697
|
+
}
|
|
1698
|
+
clone(e) {
|
|
1699
|
+
return new this.constructor().copy(this, e);
|
|
1700
|
+
}
|
|
1701
|
+
copy(e, t = !0) {
|
|
1702
|
+
if (this.name = e.name, this.up.copy(e.up), this.position.copy(e.position), this.rotation.order = e.rotation.order, this.quaternion.copy(e.quaternion), this.scale.copy(e.scale), e.pivot !== null && (this.pivot = e.pivot.clone()), this.matrix.copy(e.matrix), this.matrixWorld.copy(e.matrixWorld), this.matrixAutoUpdate = e.matrixAutoUpdate, this.matrixWorldAutoUpdate = e.matrixWorldAutoUpdate, this.matrixWorldNeedsUpdate = e.matrixWorldNeedsUpdate, this.layers.mask = e.layers.mask, this.visible = e.visible, this.castShadow = e.castShadow, this.receiveShadow = e.receiveShadow, this.frustumCulled = e.frustumCulled, this.renderOrder = e.renderOrder, this.static = e.static, this.animations = e.animations.slice(), this.userData = JSON.parse(JSON.stringify(e.userData)), t === !0) for (let t = 0; t < e.children.length; t++) {
|
|
1703
|
+
let n = e.children[t];
|
|
1704
|
+
this.add(n.clone());
|
|
1705
|
+
}
|
|
1706
|
+
return this;
|
|
1707
|
+
}
|
|
1708
|
+
};
|
|
1709
|
+
Ee.DEFAULT_UP = /* @__PURE__ */ new D(0, 1, 0), Ee.DEFAULT_MATRIX_AUTO_UPDATE = !0, Ee.DEFAULT_MATRIX_WORLD_AUTO_UPDATE = !0;
|
|
1710
|
+
//#endregion
|
|
1711
|
+
export { e as A, t as C, n as D, i as E, l as M, a as O, g as S, r as T, C as _, se as a, h as b, A as c, v as d, y as f, b as g, S as h, ce as i, c as j, s as k, D as l, w as m, pe as n, te as o, x as p, ue as r, ee as s, Ee as t, E as u, T as v, o as w, m as x, u as y };
|
|
1712
|
+
|
|
1713
|
+
//# sourceMappingURL=Object3D-DSjIOhON.mjs.map
|