@roomle/web-sdk 3.6.0-alpha.3 → 3.6.0-alpha.5
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.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.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-xDJ-Uyom.mjs +55 -0
- package/lib/api-xDJ-Uyom.mjs.map +1 -0
- 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-BaUt4_LF.mjs +2 -0
- package/lib/configurator-CmuhFgC9.mjs +45 -0
- package/lib/configurator-CmuhFgC9.mjs.map +1 -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-BzNA9-zH.mjs +315 -0
- package/lib/glb-viewer-BzNA9-zH.mjs.map +1 -0
- package/lib/glb-viewer-DOxBD5k-.mjs +2 -0
- package/lib/homag-intelligence-BwGjJEws.mjs +381 -0
- package/lib/homag-intelligence-BwGjJEws.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-CtVIB52l.mjs +20458 -0
- package/lib/main-CtVIB52l.mjs.map +1 -0
- package/lib/material-viewer-Bq4smZ6f.mjs +292 -0
- package/lib/material-viewer-Bq4smZ6f.mjs.map +1 -0
- package/lib/planner-CVw_xzGh.mjs +44 -0
- package/lib/planner-CVw_xzGh.mjs.map +1 -0
- package/lib/planner-si70gWA2.mjs +2 -0
- package/lib/plugin-system-D9K46xJk.mjs +55 -0
- package/lib/plugin-system-D9K46xJk.mjs.map +1 -0
- package/lib/roomle-sdk.d.ts +33 -21
- 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-D8xCRzTr.mjs +45 -0
- package/lib/script-loader-D8xCRzTr.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/roomle-core-hsc/node_modules/roomle-core-hsc/package.json +1 -0
- package/lib/static/roomle-core-hsc/{embind → node_modules/roomle-core-hsc/src/embind}/configuratorCoreInterface.d.ts +1 -0
- package/lib/static/roomle-core-hsc/{src → node_modules/roomle-core-hsc/src}/embind/plannerCoreInterface.d.ts +2 -0
- package/lib/static/roomle-core-hsc/{loader → node_modules/roomle-core-hsc/src/loader}/configurationGeometryConstructor.d.ts +1 -0
- package/lib/static/roomle-core-hsc/{loader → node_modules/roomle-core-hsc/src/loader}/configurationGeometryConstructor.js +22 -2
- package/lib/static/roomle-core-hsc/{configurationGeometryConstructor.js.map → node_modules/roomle-core-hsc/src/loader/configurationGeometryConstructor.js.map} +1 -1
- package/lib/static/roomle-core-hsc/{loader → node_modules/roomle-core-hsc/src/loader}/configurationLoader.d.ts +1 -0
- package/lib/static/roomle-core-hsc/{src → node_modules/roomle-core-hsc/src}/loader/configurationLoader.js +6 -4
- 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 +4 -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/{loader → node_modules/roomle-core-hsc/src/loader}/planElementManager.d.ts +2 -0
- package/lib/static/roomle-core-hsc/{loader → node_modules/roomle-core-hsc/src/loader}/planElementManager.js +12 -3
- package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/src/loader/planElementManager.js.map +1 -0
- package/lib/static/roomle-core-hsc/{wasm_modern → node_modules/roomle-core-hsc/wasm_modern}/ConfiguratorKernel.wasm +0 -0
- package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/wasm_modern/RoomleCore.wasm +0 -0
- package/lib/static/roomle-core-hsc/{wasm_modern → 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-Bf9WsK5v.mjs +30 -0
- package/lib/tools-core-Bf9WsK5v.mjs.map +1 -0
- package/package.json +1 -1
- package/lib/BufferGeometry-C1o0MiFL.mjs +0 -2064
- package/lib/BufferGeometry-C1o0MiFL.mjs.map +0 -1
- package/lib/GLTFExporter-CXMBueJw.mjs +0 -1323
- package/lib/GLTFExporter-CXMBueJw.mjs.map +0 -1
- package/lib/PointLightHelper-ICWLqwjK.mjs +0 -522
- package/lib/PointLightHelper-ICWLqwjK.mjs.map +0 -1
- package/lib/SpotLightHelper-CW5lDGFp.mjs +0 -222
- package/lib/SpotLightHelper-CW5lDGFp.mjs.map +0 -1
- package/lib/USDZExporter-CUp3dX08.mjs +0 -552
- package/lib/USDZExporter-CUp3dX08.mjs.map +0 -1
- package/lib/banana-for-scale-CfQ8dnY2.mjs +0 -50
- package/lib/banana-for-scale-CfQ8dnY2.mjs.map +0 -1
- package/lib/component-dimensioning-C9AWhxvj.mjs +0 -237
- package/lib/component-dimensioning-C9AWhxvj.mjs.map +0 -1
- package/lib/continuous-drawing-helper-B5BlbPPz.mjs +0 -48
- package/lib/continuous-drawing-helper-B5BlbPPz.mjs.map +0 -1
- package/lib/homag-intelligence-UFo9Z8FS.mjs +0 -549
- package/lib/homag-intelligence-UFo9Z8FS.mjs.map +0 -1
- package/lib/imos-ix-poc-export-helper-CGSk-8yx.mjs +0 -180
- package/lib/imos-ix-poc-export-helper-CGSk-8yx.mjs.map +0 -1
- package/lib/index-DIyMlQBA.mjs +0 -100947
- package/lib/index-DIyMlQBA.mjs.map +0 -1
- package/lib/material-viewer-QTlidNBs.mjs +0 -451
- package/lib/material-viewer-QTlidNBs.mjs.map +0 -1
- package/lib/roomle-sdk.js.map +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.wasm +0 -0
- 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/configurationGeometryConstructor.d.ts +0 -21
- package/lib/static/roomle-core-hsc/configurationGeometryConstructor.js +0 -90
- package/lib/static/roomle-core-hsc/configurationLoader.d.ts +0 -116
- package/lib/static/roomle-core-hsc/configurationLoader.js +0 -345
- package/lib/static/roomle-core-hsc/configurationLoader.js.map +0 -1
- package/lib/static/roomle-core-hsc/configurationManager.js +0 -147
- package/lib/static/roomle-core-hsc/configurationManager.js.map +0 -1
- package/lib/static/roomle-core-hsc/configuratorCoreInterface.d.ts +0 -746
- 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 -19
- 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.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/plannerCoreInterface.d.ts +0 -851
- package/lib/static/roomle-core-hsc/loader/configurableObject.d.ts +0 -30
- 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.js.map +0 -1
- package/lib/static/roomle-core-hsc/loader/configurationLoader.js +0 -345
- package/lib/static/roomle-core-hsc/loader/configurationLoader.js.map +0 -1
- package/lib/static/roomle-core-hsc/loader/configurationManager.d.ts +0 -41
- package/lib/static/roomle-core-hsc/loader/configurationManager.js.map +0 -1
- package/lib/static/roomle-core-hsc/loader/planElementManager.js.map +0 -1
- 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 -31
- 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.d.ts +0 -851
- package/lib/static/roomle-core-hsc/plannerCoreInterface.js +0 -93
- 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 -19
- 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 -746
- 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.d.ts +0 -31
- 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.d.ts +0 -39
- 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.js +0 -93
- 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 +0 -111
- 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 -41
- package/lib/static/roomle-core-hsc/src/loader/configurationManager.js +0 -147
- 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.d.ts +0 -96
- 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.js +0 -74
- package/lib/static/roomle-core-hsc/wasm_modern/RoomleCore.js +0 -79
- 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/stats-helper-cTITQsAT.mjs +0 -108
- package/lib/stats-helper-cTITQsAT.mjs.map +0 -1
- package/lib/tools-core-CCWbo8fD.mjs +0 -36
- package/lib/tools-core-CCWbo8fD.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/{asset-loader.worker.js → packages/workers/generated/asset-loader.worker.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.d.ts → node_modules/roomle-core-hsc/src/embind/configuratorCore.d.ts} +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.d.ts +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}/plannerCoreCallback.d.ts +0 -0
- /package/lib/static/roomle-core-hsc/{embind → node_modules/roomle-core-hsc/src/embind}/plannerCoreCallback.js +0 -0
- /package/lib/static/roomle-core-hsc/{embind → node_modules/roomle-core-hsc/src/embind}/plannerCoreCallback.js.map +0 -0
- /package/lib/static/roomle-core-hsc/{embind → node_modules/roomle-core-hsc/src/embind}/plannerCoreInterface.js +0 -0
- /package/lib/static/roomle-core-hsc/{embind → node_modules/roomle-core-hsc/src/embind}/plannerCoreInterface.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/{configurableObject.d.ts → node_modules/roomle-core-hsc/src/loader/configurableObject.d.ts} +0 -0
- /package/lib/static/roomle-core-hsc/{configurableObject.js → node_modules/roomle-core-hsc/src/loader/configurableObject.js} +0 -0
- /package/lib/static/roomle-core-hsc/{configurableObject.js.map → node_modules/roomle-core-hsc/src/loader/configurableObject.js.map} +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}/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/{ConfiguratorKernel.js → node_modules/roomle-core-hsc/wasm_modern/ConfiguratorKernel.js} +0 -0
- /package/lib/static/roomle-core-hsc/{RoomleCore.js → node_modules/roomle-core-hsc/wasm_modern/RoomleCore.js} +0 -0
- /package/lib/static/roomle-core-hsc/{RoomleToolsCore.js → node_modules/roomle-core-hsc/wasm_modern/RoomleToolsCore.js} +0 -0
|
@@ -1,552 +0,0 @@
|
|
|
1
|
-
import { aH as b, aI as k, j as A, f as v, aJ as D } from "./index-DIyMlQBA.mjs";
|
|
2
|
-
class $ {
|
|
3
|
-
constructor(r, e = "", n = [], o = []) {
|
|
4
|
-
this.name = r, this.type = e, this.metadata = n, this.properties = o, this.children = [];
|
|
5
|
-
}
|
|
6
|
-
addMetadata(r, e) {
|
|
7
|
-
this.metadata.push({ key: r, value: e });
|
|
8
|
-
}
|
|
9
|
-
addProperty(r, e = []) {
|
|
10
|
-
this.properties.push({ property: r, metadata: e });
|
|
11
|
-
}
|
|
12
|
-
addChild(r) {
|
|
13
|
-
this.children.push(r);
|
|
14
|
-
}
|
|
15
|
-
toString(r = 0) {
|
|
16
|
-
const e = " ".repeat(r), n = this.metadata.map((c) => {
|
|
17
|
-
const y = c.key, f = c.value;
|
|
18
|
-
if (Array.isArray(f)) {
|
|
19
|
-
const p = [];
|
|
20
|
-
return p.push(`${y} = {`), f.forEach((g) => {
|
|
21
|
-
p.push(`${e} ${g}`);
|
|
22
|
-
}), p.push(`${e} }`), p.join(`
|
|
23
|
-
`);
|
|
24
|
-
} else
|
|
25
|
-
return `${y} = ${f}`;
|
|
26
|
-
}), o = n.length ? ` (
|
|
27
|
-
${n.map((c) => `${e} ${c}`).join(`
|
|
28
|
-
`)}
|
|
29
|
-
${e})` : "", s = this.properties.map((c) => {
|
|
30
|
-
const y = c.property, f = c.metadata.length ? ` (
|
|
31
|
-
${c.metadata.map((p) => `${e} ${p}`).join(`
|
|
32
|
-
`)}
|
|
33
|
-
${e} )` : "";
|
|
34
|
-
return `${e} ${y}${f}`;
|
|
35
|
-
}), i = this.children.map((c) => c.toString(r + 1)), a = [];
|
|
36
|
-
if (s.length > 0 && a.push(...s), i.length > 0) {
|
|
37
|
-
s.length > 0 && a.push("");
|
|
38
|
-
for (let c = 0; c < i.length; c++)
|
|
39
|
-
a.push(i[c]), c < i.length - 1 && a.push("");
|
|
40
|
-
}
|
|
41
|
-
const d = a.join(`
|
|
42
|
-
`), l = this.type ? this.type + " " : "";
|
|
43
|
-
return `${e}def ${l}"${this.name}"${o}
|
|
44
|
-
${e}{
|
|
45
|
-
${d}
|
|
46
|
-
${e}}`;
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
class Y {
|
|
50
|
-
/**
|
|
51
|
-
* Constructs a new USDZ exporter.
|
|
52
|
-
*/
|
|
53
|
-
constructor() {
|
|
54
|
-
this.textureUtils = null;
|
|
55
|
-
}
|
|
56
|
-
/**
|
|
57
|
-
* Sets the texture utils for this exporter. Only relevant when compressed textures have to be exported.
|
|
58
|
-
*
|
|
59
|
-
* Depending on whether you use {@link WebGLRenderer} or {@link WebGPURenderer}, you must inject the
|
|
60
|
-
* corresponding texture utils {@link WebGLTextureUtils} or {@link WebGPUTextureUtils}.
|
|
61
|
-
*
|
|
62
|
-
* @param {WebGLTextureUtils|WebGPUTextureUtils} utils - The texture utils.
|
|
63
|
-
*/
|
|
64
|
-
setTextureUtils(r) {
|
|
65
|
-
this.textureUtils = r;
|
|
66
|
-
}
|
|
67
|
-
/**
|
|
68
|
-
* Parse the given 3D object and generates the USDZ output.
|
|
69
|
-
*
|
|
70
|
-
* @param {Object3D} scene - The 3D object to export.
|
|
71
|
-
* @param {USDZExporter~OnDone} onDone - A callback function that is executed when the export has finished.
|
|
72
|
-
* @param {USDZExporter~OnError} onError - A callback function that is executed when an error happens.
|
|
73
|
-
* @param {USDZExporter~Options} options - The export options.
|
|
74
|
-
*/
|
|
75
|
-
parse(r, e, n, o) {
|
|
76
|
-
this.parseAsync(r, o).then(e).catch(n);
|
|
77
|
-
}
|
|
78
|
-
/**
|
|
79
|
-
* Async version of {@link USDZExporter#parse}.
|
|
80
|
-
*
|
|
81
|
-
* @async
|
|
82
|
-
* @param {Object3D} scene - The 3D object to export.
|
|
83
|
-
* @param {USDZExporter~Options} options - The export options.
|
|
84
|
-
* @return {Promise<ArrayBuffer>} A Promise that resolved with the exported USDZ data.
|
|
85
|
-
*/
|
|
86
|
-
async parseAsync(r, e = {}) {
|
|
87
|
-
e = Object.assign(
|
|
88
|
-
{
|
|
89
|
-
ar: {
|
|
90
|
-
anchoring: { type: "plane" },
|
|
91
|
-
planeAnchoring: { alignment: "horizontal" }
|
|
92
|
-
},
|
|
93
|
-
includeAnchoringProperties: !0,
|
|
94
|
-
onlyVisible: !0,
|
|
95
|
-
quickLookCompatible: !1,
|
|
96
|
-
maxTextureSize: 1024
|
|
97
|
-
},
|
|
98
|
-
e
|
|
99
|
-
);
|
|
100
|
-
const n = /* @__PURE__ */ new Set(), o = {}, s = "model.usda";
|
|
101
|
-
o[s] = null;
|
|
102
|
-
const i = new $("Root", "Xform"), a = new $("Scenes", "Scope");
|
|
103
|
-
a.addMetadata("kind", '"sceneLibrary"'), i.addChild(a);
|
|
104
|
-
const d = "Scene", l = new $(d, "Xform");
|
|
105
|
-
l.addMetadata("customData", [
|
|
106
|
-
"bool preliminary_collidesWithEnvironment = 0",
|
|
107
|
-
`string sceneName = "${d}"`
|
|
108
|
-
]), l.addMetadata("sceneName", `"${d}"`), e.includeAnchoringProperties && (l.addProperty(
|
|
109
|
-
`token preliminary:anchoring:type = "${e.ar.anchoring.type}"`
|
|
110
|
-
), l.addProperty(
|
|
111
|
-
`token preliminary:planeAnchoring:alignment = "${e.ar.planeAnchoring.alignment}"`
|
|
112
|
-
)), a.addChild(l);
|
|
113
|
-
let c;
|
|
114
|
-
const y = {}, f = {};
|
|
115
|
-
T(r, l, y, n, o, e);
|
|
116
|
-
const p = X(
|
|
117
|
-
y,
|
|
118
|
-
f,
|
|
119
|
-
e.quickLookCompatible
|
|
120
|
-
);
|
|
121
|
-
c = E() + `
|
|
122
|
-
` + i.toString() + `
|
|
123
|
-
|
|
124
|
-
` + p.toString(), o[s] = b(c), c = null;
|
|
125
|
-
for (const M in f) {
|
|
126
|
-
let x = f[M];
|
|
127
|
-
if (x.isCompressedTexture === !0) {
|
|
128
|
-
if (this.textureUtils === null)
|
|
129
|
-
throw new Error(
|
|
130
|
-
"THREE.USDZExporter: setTextureUtils() must be called to process compressed textures."
|
|
131
|
-
);
|
|
132
|
-
x = await this.textureUtils.decompress(x);
|
|
133
|
-
}
|
|
134
|
-
const m = I(
|
|
135
|
-
x.image,
|
|
136
|
-
x.flipY,
|
|
137
|
-
e.maxTextureSize
|
|
138
|
-
), P = await new Promise(
|
|
139
|
-
(h) => m.toBlob(h, "image/png", 1)
|
|
140
|
-
);
|
|
141
|
-
o[`textures/Texture_${M}.png`] = new Uint8Array(
|
|
142
|
-
await P.arrayBuffer()
|
|
143
|
-
);
|
|
144
|
-
}
|
|
145
|
-
let g = 0;
|
|
146
|
-
for (const M in o) {
|
|
147
|
-
const x = o[M], m = 34 + M.length;
|
|
148
|
-
g += m;
|
|
149
|
-
const P = g & 63;
|
|
150
|
-
if (P !== 4) {
|
|
151
|
-
const h = 64 - P, U = new Uint8Array(h);
|
|
152
|
-
o[M] = [x, { extra: { 12345: U } }];
|
|
153
|
-
}
|
|
154
|
-
g = x.length;
|
|
155
|
-
}
|
|
156
|
-
return k(o, { level: 0 });
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
function N(t, r) {
|
|
160
|
-
let e = t.name;
|
|
161
|
-
return e = e.replace(/[^A-Za-z0-9_]/g, ""), /^[0-9]/.test(e) && (e = "_" + e), e === "" && (t.isCamera ? e = "Camera" : e = "Object"), r.has(e) && (e = e + "_" + t.id), r.add(e), e;
|
|
162
|
-
}
|
|
163
|
-
function I(t, r, e) {
|
|
164
|
-
if (typeof HTMLImageElement < "u" && t instanceof HTMLImageElement || typeof HTMLCanvasElement < "u" && t instanceof HTMLCanvasElement || typeof OffscreenCanvas < "u" && t instanceof OffscreenCanvas || typeof ImageBitmap < "u" && t instanceof ImageBitmap) {
|
|
165
|
-
const n = e / Math.max(t.width, t.height), o = document.createElement("canvas");
|
|
166
|
-
o.width = t.width * Math.min(1, n), o.height = t.height * Math.min(1, n);
|
|
167
|
-
const s = o.getContext("2d");
|
|
168
|
-
return r === !0 && (s.translate(0, o.height), s.scale(1, -1)), s.drawImage(t, 0, 0, o.width, o.height), o;
|
|
169
|
-
} else
|
|
170
|
-
throw new Error(
|
|
171
|
-
"THREE.USDZExporter: No valid image data found. Unable to process texture."
|
|
172
|
-
);
|
|
173
|
-
}
|
|
174
|
-
const u = 7;
|
|
175
|
-
function E() {
|
|
176
|
-
return `#usda 1.0
|
|
177
|
-
(
|
|
178
|
-
customLayerData = {
|
|
179
|
-
string creator = "Three.js USDZExporter"
|
|
180
|
-
}
|
|
181
|
-
defaultPrim = "Root"
|
|
182
|
-
metersPerUnit = 1
|
|
183
|
-
upAxis = "Y"
|
|
184
|
-
)
|
|
185
|
-
`;
|
|
186
|
-
}
|
|
187
|
-
function T(t, r, e, n, o, s) {
|
|
188
|
-
for (let i = 0, a = t.children.length; i < a; i++) {
|
|
189
|
-
const d = t.children[i];
|
|
190
|
-
if (d.visible === !1 && s.onlyVisible === !0) continue;
|
|
191
|
-
let l;
|
|
192
|
-
if (d.isMesh) {
|
|
193
|
-
const c = d.geometry, y = d.material;
|
|
194
|
-
if (y.isMeshStandardMaterial) {
|
|
195
|
-
const f = "geometries/Geometry_" + c.id + ".usda";
|
|
196
|
-
if (!(f in o)) {
|
|
197
|
-
const p = Z(c);
|
|
198
|
-
o[f] = b(
|
|
199
|
-
E() + `
|
|
200
|
-
` + p.toString()
|
|
201
|
-
);
|
|
202
|
-
}
|
|
203
|
-
y.uuid in e || (e[y.uuid] = y), l = H(
|
|
204
|
-
d,
|
|
205
|
-
c,
|
|
206
|
-
e[y.uuid],
|
|
207
|
-
n
|
|
208
|
-
);
|
|
209
|
-
} else
|
|
210
|
-
console.warn(
|
|
211
|
-
"THREE.USDZExporter: Unsupported material type (USDZ only supports MeshStandardMaterial)",
|
|
212
|
-
d
|
|
213
|
-
);
|
|
214
|
-
} else d.isCamera ? l = F(d, n) : l = R(d, n);
|
|
215
|
-
l && (r.addChild(l), T(d, l, e, n, o, s));
|
|
216
|
-
}
|
|
217
|
-
}
|
|
218
|
-
function R(t, r) {
|
|
219
|
-
const e = N(t, r);
|
|
220
|
-
t.matrix.determinant() < 0 && console.warn(
|
|
221
|
-
"THREE.USDZExporter: USDZ does not support negative scales",
|
|
222
|
-
t
|
|
223
|
-
);
|
|
224
|
-
const n = new $(e, "Xform");
|
|
225
|
-
if (t.pivot !== null) {
|
|
226
|
-
const o = t.position, s = t.quaternion, i = t.scale, a = t.pivot;
|
|
227
|
-
n.addProperty(`float3 xformOp:translate = (${o.x.toPrecision(u)}, ${o.y.toPrecision(u)}, ${o.z.toPrecision(u)})`), n.addProperty(`float3 xformOp:translate:pivot = (${a.x.toPrecision(u)}, ${a.y.toPrecision(u)}, ${a.z.toPrecision(u)})`), n.addProperty(`quatf xformOp:orient = (${s.w.toPrecision(u)}, ${s.x.toPrecision(u)}, ${s.y.toPrecision(u)}, ${s.z.toPrecision(u)})`), n.addProperty(`float3 xformOp:scale = (${i.x.toPrecision(u)}, ${i.y.toPrecision(u)}, ${i.z.toPrecision(u)})`), n.addProperty('uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:translate:pivot", "xformOp:orient", "xformOp:scale", "!invert!xformOp:translate:pivot"]');
|
|
228
|
-
} else {
|
|
229
|
-
const o = O(t.matrix);
|
|
230
|
-
n.addProperty(`matrix4d xformOp:transform = ${o}`), n.addProperty('uniform token[] xformOpOrder = ["xformOp:transform"]');
|
|
231
|
-
}
|
|
232
|
-
return n;
|
|
233
|
-
}
|
|
234
|
-
function H(t, r, e, n) {
|
|
235
|
-
const o = R(t, n);
|
|
236
|
-
return o.addMetadata(
|
|
237
|
-
"prepend references",
|
|
238
|
-
`@./geometries/Geometry_${r.id}.usda@</Geometry>`
|
|
239
|
-
), o.addMetadata("prepend apiSchemas", '["MaterialBindingAPI"]'), o.addProperty(
|
|
240
|
-
`rel material:binding = </Materials/Material_${e.id}>`
|
|
241
|
-
), o;
|
|
242
|
-
}
|
|
243
|
-
function O(t) {
|
|
244
|
-
const r = t.elements;
|
|
245
|
-
return `( ${C(r, 0)}, ${C(
|
|
246
|
-
r,
|
|
247
|
-
4
|
|
248
|
-
)}, ${C(r, 8)}, ${C(r, 12)} )`;
|
|
249
|
-
}
|
|
250
|
-
function C(t, r) {
|
|
251
|
-
return `(${t[r + 0]}, ${t[r + 1]}, ${t[r + 2]}, ${t[r + 3]})`;
|
|
252
|
-
}
|
|
253
|
-
function Z(t) {
|
|
254
|
-
const r = new $("Geometry"), e = z(t);
|
|
255
|
-
return r.addChild(e), r;
|
|
256
|
-
}
|
|
257
|
-
function z(t) {
|
|
258
|
-
const r = "Geometry", e = t.attributes, n = e.position.count, o = new $(r, "Mesh");
|
|
259
|
-
o.addProperty(
|
|
260
|
-
`int[] faceVertexCounts = [${L(t)}]`
|
|
261
|
-
), o.addProperty(
|
|
262
|
-
`int[] faceVertexIndices = [${V(t)}]`
|
|
263
|
-
), o.addProperty(
|
|
264
|
-
`normal3f[] normals = [${_(e.normal, n)}]`,
|
|
265
|
-
['interpolation = "vertex"']
|
|
266
|
-
), o.addProperty(
|
|
267
|
-
`point3f[] points = [${_(e.position, n)}]`
|
|
268
|
-
);
|
|
269
|
-
for (let i = 0; i < 4; i++) {
|
|
270
|
-
const a = i > 0 ? i : "", d = e["uv" + a];
|
|
271
|
-
d !== void 0 && o.addProperty(
|
|
272
|
-
`texCoord2f[] primvars:st${a} = [${G(d)}]`,
|
|
273
|
-
['interpolation = "vertex"']
|
|
274
|
-
);
|
|
275
|
-
}
|
|
276
|
-
const s = e.color;
|
|
277
|
-
return s !== void 0 && o.addProperty(
|
|
278
|
-
`color3f[] primvars:displayColor = [${_(
|
|
279
|
-
s,
|
|
280
|
-
n
|
|
281
|
-
)}]`,
|
|
282
|
-
['interpolation = "vertex"']
|
|
283
|
-
), o.addProperty('uniform token subdivisionScheme = "none"'), o;
|
|
284
|
-
}
|
|
285
|
-
function L(t) {
|
|
286
|
-
const r = t.index !== null ? t.index.count : t.attributes.position.count;
|
|
287
|
-
return Array(r / 3).fill(3).join(", ");
|
|
288
|
-
}
|
|
289
|
-
function V(t) {
|
|
290
|
-
const r = t.index, e = [];
|
|
291
|
-
if (r !== null)
|
|
292
|
-
for (let n = 0; n < r.count; n++)
|
|
293
|
-
e.push(r.getX(n));
|
|
294
|
-
else {
|
|
295
|
-
const n = t.attributes.position.count;
|
|
296
|
-
for (let o = 0; o < n; o++)
|
|
297
|
-
e.push(o);
|
|
298
|
-
}
|
|
299
|
-
return e.join(", ");
|
|
300
|
-
}
|
|
301
|
-
function _(t, r) {
|
|
302
|
-
if (t === void 0)
|
|
303
|
-
return console.warn("USDZExporter: Normals missing."), Array(r).fill("(0, 0, 0)").join(", ");
|
|
304
|
-
const e = [];
|
|
305
|
-
for (let n = 0; n < t.count; n++) {
|
|
306
|
-
const o = t.getX(n), s = t.getY(n), i = t.getZ(n);
|
|
307
|
-
e.push(
|
|
308
|
-
`(${o.toPrecision(u)}, ${s.toPrecision(
|
|
309
|
-
u
|
|
310
|
-
)}, ${i.toPrecision(u)})`
|
|
311
|
-
);
|
|
312
|
-
}
|
|
313
|
-
return e.join(", ");
|
|
314
|
-
}
|
|
315
|
-
function G(t) {
|
|
316
|
-
const r = [];
|
|
317
|
-
for (let e = 0; e < t.count; e++) {
|
|
318
|
-
const n = t.getX(e), o = t.getY(e);
|
|
319
|
-
r.push(
|
|
320
|
-
`(${n.toPrecision(u)}, ${1 - o.toPrecision(u)})`
|
|
321
|
-
);
|
|
322
|
-
}
|
|
323
|
-
return r.join(", ");
|
|
324
|
-
}
|
|
325
|
-
function X(t, r, e = !1) {
|
|
326
|
-
const n = new $("Materials");
|
|
327
|
-
for (const o in t) {
|
|
328
|
-
const s = t[o];
|
|
329
|
-
n.addChild(
|
|
330
|
-
j(s, r, e)
|
|
331
|
-
);
|
|
332
|
-
}
|
|
333
|
-
return n;
|
|
334
|
-
}
|
|
335
|
-
function j(t, r, e = !1) {
|
|
336
|
-
const n = new $(`Material_${t.id}`, "Material");
|
|
337
|
-
function o(i, a, d) {
|
|
338
|
-
const l = i.source.id + "_" + i.flipY;
|
|
339
|
-
r[l] = i;
|
|
340
|
-
const c = i.channel > 0 ? "st" + i.channel : "st", y = {
|
|
341
|
-
1e3: "repeat",
|
|
342
|
-
// RepeatWrapping
|
|
343
|
-
1001: "clamp",
|
|
344
|
-
// ClampToEdgeWrapping
|
|
345
|
-
1002: "mirror"
|
|
346
|
-
// MirroredRepeatWrapping
|
|
347
|
-
}, f = i.repeat.clone(), p = i.offset.clone(), g = i.rotation, M = Math.sin(g), x = Math.cos(g);
|
|
348
|
-
p.y = 1 - p.y - f.y, e ? (p.x = p.x / f.x, p.y = p.y / f.y, p.x += M / f.x, p.y += x - 1) : (p.x += M * f.x, p.y += (1 - x) * f.y);
|
|
349
|
-
const m = new $(`PrimvarReader_${a}`, "Shader");
|
|
350
|
-
m.addProperty(
|
|
351
|
-
'uniform token info:id = "UsdPrimvarReader_float2"'
|
|
352
|
-
), m.addProperty("float2 inputs:fallback = (0.0, 0.0)"), m.addProperty(`string inputs:varname = "${c}"`), m.addProperty("float2 outputs:result");
|
|
353
|
-
const P = new $(`Transform2d_${a}`, "Shader");
|
|
354
|
-
P.addProperty('uniform token info:id = "UsdTransform2d"'), P.addProperty(
|
|
355
|
-
`float2 inputs:in.connect = </Materials/Material_${t.id}/PrimvarReader_${a}.outputs:result>`
|
|
356
|
-
), P.addProperty(
|
|
357
|
-
`float inputs:rotation = ${(g * (180 / Math.PI)).toFixed(
|
|
358
|
-
u
|
|
359
|
-
)}`
|
|
360
|
-
), P.addProperty(
|
|
361
|
-
`float2 inputs:scale = ${S(f)}`
|
|
362
|
-
), P.addProperty(
|
|
363
|
-
`float2 inputs:translation = ${S(p)}`
|
|
364
|
-
), P.addProperty("float2 outputs:result");
|
|
365
|
-
const h = new $(
|
|
366
|
-
`Texture_${i.id}_${a}`,
|
|
367
|
-
"Shader"
|
|
368
|
-
);
|
|
369
|
-
return h.addProperty('uniform token info:id = "UsdUVTexture"'), h.addProperty(`asset inputs:file = @textures/Texture_${l}.png@`), h.addProperty(
|
|
370
|
-
`float2 inputs:st.connect = </Materials/Material_${t.id}/Transform2d_${a}.outputs:result>`
|
|
371
|
-
), d !== void 0 && h.addProperty(`float4 inputs:scale = ${B(d)}`), a === "normal" && (h.addProperty("float4 inputs:scale = (2, 2, 2, 1)"), h.addProperty("float4 inputs:bias = (-1, -1, -1, 0)")), h.addProperty(
|
|
372
|
-
`token inputs:sourceColorSpace = "${i.colorSpace === D ? "raw" : "sRGB"}"`
|
|
373
|
-
), h.addProperty(
|
|
374
|
-
`token inputs:wrapS = "${y[i.wrapS]}"`
|
|
375
|
-
), h.addProperty(
|
|
376
|
-
`token inputs:wrapT = "${y[i.wrapT]}"`
|
|
377
|
-
), h.addProperty("float outputs:r"), h.addProperty("float outputs:g"), h.addProperty("float outputs:b"), h.addProperty("float3 outputs:rgb"), (t.transparent || t.alphaTest > 0) && h.addProperty("float outputs:a"), [m, P, h];
|
|
378
|
-
}
|
|
379
|
-
t.side === A && console.warn(
|
|
380
|
-
"THREE.USDZExporter: USDZ does not support double sided materials",
|
|
381
|
-
t
|
|
382
|
-
);
|
|
383
|
-
const s = new $("PreviewSurface", "Shader");
|
|
384
|
-
if (s.addProperty('uniform token info:id = "UsdPreviewSurface"'), t.map !== null ? (s.addProperty(
|
|
385
|
-
`color3f inputs:diffuseColor.connect = </Materials/Material_${t.id}/Texture_${t.map.id}_diffuse.outputs:rgb>`
|
|
386
|
-
), t.transparent ? s.addProperty(
|
|
387
|
-
`float inputs:opacity.connect = </Materials/Material_${t.id}/Texture_${t.map.id}_diffuse.outputs:a>`
|
|
388
|
-
) : t.alphaTest > 0 && (s.addProperty(
|
|
389
|
-
`float inputs:opacity.connect = </Materials/Material_${t.id}/Texture_${t.map.id}_diffuse.outputs:a>`
|
|
390
|
-
), s.addProperty(
|
|
391
|
-
`float inputs:opacityThreshold = ${t.alphaTest}`
|
|
392
|
-
)), o(
|
|
393
|
-
t.map,
|
|
394
|
-
"diffuse",
|
|
395
|
-
t.color
|
|
396
|
-
).forEach((a) => n.addChild(a))) : s.addProperty(
|
|
397
|
-
`color3f inputs:diffuseColor = ${w(t.color)}`
|
|
398
|
-
), t.emissiveMap !== null) {
|
|
399
|
-
s.addProperty(
|
|
400
|
-
`color3f inputs:emissiveColor.connect = </Materials/Material_${t.id}/Texture_${t.emissiveMap.id}_emissive.outputs:rgb>`
|
|
401
|
-
);
|
|
402
|
-
const i = new v(
|
|
403
|
-
t.emissive.r * t.emissiveIntensity,
|
|
404
|
-
t.emissive.g * t.emissiveIntensity,
|
|
405
|
-
t.emissive.b * t.emissiveIntensity
|
|
406
|
-
);
|
|
407
|
-
o(
|
|
408
|
-
t.emissiveMap,
|
|
409
|
-
"emissive",
|
|
410
|
-
i
|
|
411
|
-
).forEach((d) => n.addChild(d));
|
|
412
|
-
} else t.emissive.getHex() > 0 && s.addProperty(
|
|
413
|
-
`color3f inputs:emissiveColor = ${w(t.emissive)}`
|
|
414
|
-
);
|
|
415
|
-
if (t.normalMap !== null && (s.addProperty(
|
|
416
|
-
`normal3f inputs:normal.connect = </Materials/Material_${t.id}/Texture_${t.normalMap.id}_normal.outputs:rgb>`
|
|
417
|
-
), o(t.normalMap, "normal").forEach((a) => n.addChild(a))), t.aoMap !== null) {
|
|
418
|
-
s.addProperty(
|
|
419
|
-
`float inputs:occlusion.connect = </Materials/Material_${t.id}/Texture_${t.aoMap.id}_occlusion.outputs:r>`
|
|
420
|
-
);
|
|
421
|
-
const i = new v(
|
|
422
|
-
t.aoMapIntensity,
|
|
423
|
-
t.aoMapIntensity,
|
|
424
|
-
t.aoMapIntensity
|
|
425
|
-
);
|
|
426
|
-
o(
|
|
427
|
-
t.aoMap,
|
|
428
|
-
"occlusion",
|
|
429
|
-
i
|
|
430
|
-
).forEach((d) => n.addChild(d));
|
|
431
|
-
}
|
|
432
|
-
if (t.roughnessMap !== null) {
|
|
433
|
-
s.addProperty(
|
|
434
|
-
`float inputs:roughness.connect = </Materials/Material_${t.id}/Texture_${t.roughnessMap.id}_roughness.outputs:g>`
|
|
435
|
-
);
|
|
436
|
-
const i = new v(
|
|
437
|
-
t.roughness,
|
|
438
|
-
t.roughness,
|
|
439
|
-
t.roughness
|
|
440
|
-
);
|
|
441
|
-
o(
|
|
442
|
-
t.roughnessMap,
|
|
443
|
-
"roughness",
|
|
444
|
-
i
|
|
445
|
-
).forEach((d) => n.addChild(d));
|
|
446
|
-
} else
|
|
447
|
-
s.addProperty(
|
|
448
|
-
`float inputs:roughness = ${t.roughness}`
|
|
449
|
-
);
|
|
450
|
-
if (t.metalnessMap !== null) {
|
|
451
|
-
s.addProperty(
|
|
452
|
-
`float inputs:metallic.connect = </Materials/Material_${t.id}/Texture_${t.metalnessMap.id}_metallic.outputs:b>`
|
|
453
|
-
);
|
|
454
|
-
const i = new v(
|
|
455
|
-
t.metalness,
|
|
456
|
-
t.metalness,
|
|
457
|
-
t.metalness
|
|
458
|
-
);
|
|
459
|
-
o(
|
|
460
|
-
t.metalnessMap,
|
|
461
|
-
"metallic",
|
|
462
|
-
i
|
|
463
|
-
).forEach((d) => n.addChild(d));
|
|
464
|
-
} else
|
|
465
|
-
s.addProperty(
|
|
466
|
-
`float inputs:metallic = ${t.metalness}`
|
|
467
|
-
);
|
|
468
|
-
if (t.alphaMap !== null ? (s.addProperty(
|
|
469
|
-
`float inputs:opacity.connect = </Materials/Material_${t.id}/Texture_${t.alphaMap.id}_opacity.outputs:r>`
|
|
470
|
-
), s.addProperty("float inputs:opacityThreshold = 0.0001"), o(t.alphaMap, "opacity").forEach((a) => n.addChild(a))) : s.addProperty(
|
|
471
|
-
`float inputs:opacity = ${t.opacity}`
|
|
472
|
-
), t.isMeshPhysicalMaterial) {
|
|
473
|
-
if (t.clearcoatMap !== null) {
|
|
474
|
-
s.addProperty(
|
|
475
|
-
`float inputs:clearcoat.connect = </Materials/Material_${t.id}/Texture_${t.clearcoatMap.id}_clearcoat.outputs:r>`
|
|
476
|
-
);
|
|
477
|
-
const i = new v(
|
|
478
|
-
t.clearcoat,
|
|
479
|
-
t.clearcoat,
|
|
480
|
-
t.clearcoat
|
|
481
|
-
);
|
|
482
|
-
o(
|
|
483
|
-
t.clearcoatMap,
|
|
484
|
-
"clearcoat",
|
|
485
|
-
i
|
|
486
|
-
).forEach((d) => n.addChild(d));
|
|
487
|
-
} else
|
|
488
|
-
s.addProperty(
|
|
489
|
-
`float inputs:clearcoat = ${t.clearcoat}`
|
|
490
|
-
);
|
|
491
|
-
if (t.clearcoatRoughnessMap !== null) {
|
|
492
|
-
s.addProperty(
|
|
493
|
-
`float inputs:clearcoatRoughness.connect = </Materials/Material_${t.id}/Texture_${t.clearcoatRoughnessMap.id}_clearcoatRoughness.outputs:g>`
|
|
494
|
-
);
|
|
495
|
-
const i = new v(
|
|
496
|
-
t.clearcoatRoughness,
|
|
497
|
-
t.clearcoatRoughness,
|
|
498
|
-
t.clearcoatRoughness
|
|
499
|
-
);
|
|
500
|
-
o(
|
|
501
|
-
t.clearcoatRoughnessMap,
|
|
502
|
-
"clearcoatRoughness",
|
|
503
|
-
i
|
|
504
|
-
).forEach((d) => n.addChild(d));
|
|
505
|
-
} else
|
|
506
|
-
s.addProperty(
|
|
507
|
-
`float inputs:clearcoatRoughness = ${t.clearcoatRoughness}`
|
|
508
|
-
);
|
|
509
|
-
s.addProperty(`float inputs:ior = ${t.ior}`);
|
|
510
|
-
}
|
|
511
|
-
return s.addProperty("int inputs:useSpecularWorkflow = 0"), s.addProperty("token outputs:surface"), n.addChild(s), n.addProperty(
|
|
512
|
-
`token outputs:surface.connect = </Materials/Material_${t.id}/PreviewSurface.outputs:surface>`
|
|
513
|
-
), n;
|
|
514
|
-
}
|
|
515
|
-
function w(t) {
|
|
516
|
-
return `(${t.r}, ${t.g}, ${t.b})`;
|
|
517
|
-
}
|
|
518
|
-
function B(t) {
|
|
519
|
-
return `(${t.r}, ${t.g}, ${t.b}, 1.0)`;
|
|
520
|
-
}
|
|
521
|
-
function S(t) {
|
|
522
|
-
return `(${t.x}, ${t.y})`;
|
|
523
|
-
}
|
|
524
|
-
function F(t, r) {
|
|
525
|
-
const e = N(t, r), n = O(t.matrix);
|
|
526
|
-
t.matrix.determinant() < 0 && console.warn(
|
|
527
|
-
"THREE.USDZExporter: USDZ does not support negative scales",
|
|
528
|
-
t
|
|
529
|
-
);
|
|
530
|
-
const o = new $(e, "Camera");
|
|
531
|
-
o.addProperty(`matrix4d xformOp:transform = ${n}`), o.addProperty('uniform token[] xformOpOrder = ["xformOp:transform"]');
|
|
532
|
-
const s = t.isOrthographicCamera ? "orthographic" : "perspective";
|
|
533
|
-
o.addProperty(`token projection = "${s}"`);
|
|
534
|
-
const i = `(${t.near.toPrecision(
|
|
535
|
-
u
|
|
536
|
-
)}, ${t.far.toPrecision(u)})`;
|
|
537
|
-
o.addProperty(`float2 clippingRange = ${i}`);
|
|
538
|
-
let a;
|
|
539
|
-
t.isOrthographicCamera ? a = ((Math.abs(t.left) + Math.abs(t.right)) * 10).toPrecision(u) : a = t.getFilmWidth().toPrecision(u), o.addProperty(`float horizontalAperture = ${a}`);
|
|
540
|
-
let d;
|
|
541
|
-
if (t.isOrthographicCamera ? d = ((Math.abs(t.top) + Math.abs(t.bottom)) * 10).toPrecision(u) : d = t.getFilmHeight().toPrecision(u), o.addProperty(`float verticalAperture = ${d}`), t.isPerspectiveCamera) {
|
|
542
|
-
const l = t.getFocalLength().toPrecision(u);
|
|
543
|
-
o.addProperty(`float focalLength = ${l}`);
|
|
544
|
-
const c = t.focus.toPrecision(u);
|
|
545
|
-
o.addProperty(`float focusDistance = ${c}`);
|
|
546
|
-
}
|
|
547
|
-
return o;
|
|
548
|
-
}
|
|
549
|
-
export {
|
|
550
|
-
Y as USDZExporter
|
|
551
|
-
};
|
|
552
|
-
//# sourceMappingURL=USDZExporter-CUp3dX08.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"USDZExporter-CUp3dX08.mjs","sources":["../../../../node_modules/three/examples/jsm/exporters/USDZExporter.js"],"sourcesContent":["import {\n\tNoColorSpace,\n\tDoubleSide,\n\tColor,\n} from 'three';\n\nimport {\n\tstrToU8,\n\tzipSync,\n} from '../libs/fflate.module.js';\n\nclass USDNode {\n\n\tconstructor( name, type = '', metadata = [], properties = [] ) {\n\n\t\tthis.name = name;\n\t\tthis.type = type;\n\t\tthis.metadata = metadata;\n\t\tthis.properties = properties;\n\t\tthis.children = [];\n\n\t}\n\n\taddMetadata( key, value ) {\n\n\t\tthis.metadata.push( { key, value } );\n\n\t}\n\n\taddProperty( property, metadata = [] ) {\n\n\t\tthis.properties.push( { property, metadata } );\n\n\t}\n\n\taddChild( child ) {\n\n\t\tthis.children.push( child );\n\n\t}\n\n\ttoString( indent = 0 ) {\n\n\t\tconst pad = '\\t'.repeat( indent );\n\n\t\tconst formattedMetadata = this.metadata.map( ( item ) => {\n\n\t\t\tconst key = item.key;\n\t\t\tconst value = item.value;\n\n\t\t\tif ( Array.isArray( value ) ) {\n\n\t\t\t\tconst lines = [];\n\t\t\t\tlines.push( `${key} = {` );\n\t\t\t\tvalue.forEach( ( line ) => {\n\n\t\t\t\t\tlines.push( `${pad}\\t\\t${line}` );\n\n\t\t\t\t} );\n\t\t\t\tlines.push( `${pad}\\t}` );\n\t\t\t\treturn lines.join( '\\n' );\n\n\t\t\t} else {\n\n\t\t\t\treturn `${key} = ${value}`;\n\n\t\t\t}\n\n\t\t} );\n\n\t\tconst meta = formattedMetadata.length\n\t\t\t? ` (\\n${formattedMetadata\n\t\t\t\t.map( ( l ) => `${pad}\\t${l}` )\n\t\t\t\t.join( '\\n' )}\\n${pad})`\n\t\t\t: '';\n\n\t\tconst properties = this.properties.map( ( l ) => {\n\n\t\t\tconst property = l.property;\n\t\t\tconst metadata = l.metadata.length\n\t\t\t\t? ` (\\n${l.metadata.map( ( m ) => `${pad}\\t\\t${m}` ).join( '\\n' )}\\n${pad}\\t)`\n\t\t\t\t: '';\n\t\t\treturn `${pad}\\t${property}${metadata}`;\n\n\t\t} );\n\t\tconst children = this.children.map( ( c ) => c.toString( indent + 1 ) );\n\n\t\tconst bodyLines = [];\n\n\t\tif ( properties.length > 0 ) {\n\n\t\t\tbodyLines.push( ...properties );\n\n\t\t}\n\n\t\tif ( children.length > 0 ) {\n\n\t\t\tif ( properties.length > 0 ) {\n\n\t\t\t\tbodyLines.push( '' );\n\n\t\t\t}\n\n\t\t\tfor ( let i = 0; i < children.length; i ++ ) {\n\n\t\t\t\tbodyLines.push( children[ i ] );\n\t\t\t\tif ( i < children.length - 1 ) {\n\n\t\t\t\t\tbodyLines.push( '' );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\tconst bodyContent = bodyLines.join( '\\n' );\n\n\t\tconst type = this.type ? this.type + ' ' : '';\n\n\t\treturn `${pad}def ${type}\"${this.name}\"${meta}\\n${pad}{\\n${bodyContent}\\n${pad}}`;\n\n\t}\n\n}\n\n/**\n * An exporter for USDZ.\n *\n * ```js\n * const exporter = new USDZExporter();\n * const arraybuffer = await exporter.parseAsync( scene );\n * ```\n *\n * @three_import import { USDZExporter } from 'three/addons/exporters/USDZExporter.js';\n */\nclass USDZExporter {\n\n\t/**\n\t * Constructs a new USDZ exporter.\n\t */\n\tconstructor() {\n\n\t\t/**\n\t\t * A reference to a texture utils module.\n\t\t *\n\t\t * @type {?(WebGLTextureUtils|WebGPUTextureUtils)}\n\t\t * @default null\n\t\t */\n\t\tthis.textureUtils = null;\n\n\t}\n\n\t/**\n\t * Sets the texture utils for this exporter. Only relevant when compressed textures have to be exported.\n\t *\n\t * Depending on whether you use {@link WebGLRenderer} or {@link WebGPURenderer}, you must inject the\n\t * corresponding texture utils {@link WebGLTextureUtils} or {@link WebGPUTextureUtils}.\n\t *\n\t * @param {WebGLTextureUtils|WebGPUTextureUtils} utils - The texture utils.\n\t */\n\tsetTextureUtils( utils ) {\n\n\t\tthis.textureUtils = utils;\n\n\t}\n\n\t/**\n\t * Parse the given 3D object and generates the USDZ output.\n\t *\n\t * @param {Object3D} scene - The 3D object to export.\n\t * @param {USDZExporter~OnDone} onDone - A callback function that is executed when the export has finished.\n\t * @param {USDZExporter~OnError} onError - A callback function that is executed when an error happens.\n\t * @param {USDZExporter~Options} options - The export options.\n\t */\n\tparse( scene, onDone, onError, options ) {\n\n\t\tthis.parseAsync( scene, options ).then( onDone ).catch( onError );\n\n\t}\n\n\t/**\n\t * Async version of {@link USDZExporter#parse}.\n\t *\n\t * @async\n\t * @param {Object3D} scene - The 3D object to export.\n\t * @param {USDZExporter~Options} options - The export options.\n\t * @return {Promise<ArrayBuffer>} A Promise that resolved with the exported USDZ data.\n\t */\n\tasync parseAsync( scene, options = {} ) {\n\n\t\toptions = Object.assign(\n\t\t\t{\n\t\t\t\tar: {\n\t\t\t\t\tanchoring: { type: 'plane' },\n\t\t\t\t\tplaneAnchoring: { alignment: 'horizontal' },\n\t\t\t\t},\n\t\t\t\tincludeAnchoringProperties: true,\n\t\t\t\tonlyVisible: true,\n\t\t\t\tquickLookCompatible: false,\n\t\t\t\tmaxTextureSize: 1024,\n\t\t\t},\n\t\t\toptions\n\t\t);\n\n\t\tconst usedNames = new Set();\n\n\t\tconst files = {};\n\t\tconst modelFileName = 'model.usda';\n\n\t\t// model file should be first in USDZ archive so we init it here\n\t\tfiles[ modelFileName ] = null;\n\n\t\tconst root = new USDNode( 'Root', 'Xform' );\n\t\tconst scenesNode = new USDNode( 'Scenes', 'Scope' );\n\t\tscenesNode.addMetadata( 'kind', '\"sceneLibrary\"' );\n\t\troot.addChild( scenesNode );\n\n\t\tconst sceneName = 'Scene';\n\t\tconst sceneNode = new USDNode( sceneName, 'Xform' );\n\t\tsceneNode.addMetadata( 'customData', [\n\t\t\t'bool preliminary_collidesWithEnvironment = 0',\n\t\t\t`string sceneName = \"${sceneName}\"`,\n\t\t] );\n\t\tsceneNode.addMetadata( 'sceneName', `\"${sceneName}\"` );\n\t\tif ( options.includeAnchoringProperties ) {\n\n\t\t\tsceneNode.addProperty(\n\t\t\t\t`token preliminary:anchoring:type = \"${options.ar.anchoring.type}\"`\n\t\t\t);\n\t\t\tsceneNode.addProperty(\n\t\t\t\t`token preliminary:planeAnchoring:alignment = \"${options.ar.planeAnchoring.alignment}\"`\n\t\t\t);\n\n\t\t}\n\n\t\tscenesNode.addChild( sceneNode );\n\n\t\tlet output;\n\n\t\tconst materials = {};\n\t\tconst textures = {};\n\n\t\tbuildHierarchy( scene, sceneNode, materials, usedNames, files, options );\n\n\t\tconst materialsNode = buildMaterials(\n\t\t\tmaterials,\n\t\t\ttextures,\n\t\t\toptions.quickLookCompatible\n\t\t);\n\n\t\toutput =\n\t\t\tbuildHeader() +\n\t\t\t'\\n' +\n\t\t\troot.toString() +\n\t\t\t'\\n\\n' +\n\t\t\tmaterialsNode.toString();\n\n\t\tfiles[ modelFileName ] = strToU8( output );\n\t\toutput = null;\n\n\t\tfor ( const id in textures ) {\n\n\t\t\tlet texture = textures[ id ];\n\n\t\t\tif ( texture.isCompressedTexture === true ) {\n\n\t\t\t\tif ( this.textureUtils === null ) {\n\n\t\t\t\t\tthrow new Error(\n\t\t\t\t\t\t'THREE.USDZExporter: setTextureUtils() must be called to process compressed textures.'\n\t\t\t\t\t);\n\n\t\t\t\t} else {\n\n\t\t\t\t\ttexture = await this.textureUtils.decompress( texture );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tconst canvas = imageToCanvas(\n\t\t\t\ttexture.image,\n\t\t\t\ttexture.flipY,\n\t\t\t\toptions.maxTextureSize\n\t\t\t);\n\t\t\tconst blob = await new Promise( ( resolve ) =>\n\t\t\t\tcanvas.toBlob( resolve, 'image/png', 1 )\n\t\t\t);\n\n\t\t\tfiles[ `textures/Texture_${id}.png` ] = new Uint8Array(\n\t\t\t\tawait blob.arrayBuffer()\n\t\t\t);\n\n\t\t}\n\n\t\t// 64 byte alignment\n\t\t// https://github.com/101arrowz/fflate/issues/39#issuecomment-777263109\n\n\t\tlet offset = 0;\n\n\t\tfor ( const filename in files ) {\n\n\t\t\tconst file = files[ filename ];\n\t\t\tconst headerSize = 34 + filename.length;\n\n\t\t\toffset += headerSize;\n\n\t\t\tconst offsetMod64 = offset & 63;\n\n\t\t\tif ( offsetMod64 !== 4 ) {\n\n\t\t\t\tconst padLength = 64 - offsetMod64;\n\t\t\t\tconst padding = new Uint8Array( padLength );\n\n\t\t\t\tfiles[ filename ] = [ file, { extra: { 12345: padding } } ];\n\n\t\t\t}\n\n\t\t\toffset = file.length;\n\n\t\t}\n\n\t\treturn zipSync( files, { level: 0 } );\n\n\t}\n\n}\n\nfunction getName( object, namesSet ) {\n\n\tlet name = object.name;\n\tname = name.replace( /[^A-Za-z0-9_]/g, '' );\n\tif ( /^[0-9]/.test( name ) ) {\n\n\t\tname = '_' + name;\n\n\t}\n\n\tif ( name === '' ) {\n\n\t\tif ( object.isCamera ) {\n\n\t\t\tname = 'Camera';\n\n\t\t} else {\n\n\t\t\tname = 'Object';\n\n\t\t}\n\n\t}\n\n\tif ( namesSet.has( name ) ) {\n\n\t\tname = name + '_' + object.id;\n\n\t}\n\n\tnamesSet.add( name );\n\n\treturn name;\n\n}\n\nfunction imageToCanvas( image, flipY, maxTextureSize ) {\n\n\tif (\n\t\t( typeof HTMLImageElement !== 'undefined' &&\n\t\t\timage instanceof HTMLImageElement ) ||\n\t\t( typeof HTMLCanvasElement !== 'undefined' &&\n\t\t\timage instanceof HTMLCanvasElement ) ||\n\t\t( typeof OffscreenCanvas !== 'undefined' &&\n\t\t\timage instanceof OffscreenCanvas ) ||\n\t\t( typeof ImageBitmap !== 'undefined' && image instanceof ImageBitmap )\n\t) {\n\n\t\tconst scale = maxTextureSize / Math.max( image.width, image.height );\n\n\t\tconst canvas = document.createElement( 'canvas' );\n\t\tcanvas.width = image.width * Math.min( 1, scale );\n\t\tcanvas.height = image.height * Math.min( 1, scale );\n\n\t\tconst context = canvas.getContext( '2d' );\n\n\t\t// TODO: We should be able to do this in the UsdTransform2d?\n\n\t\tif ( flipY === true ) {\n\n\t\t\tcontext.translate( 0, canvas.height );\n\t\t\tcontext.scale( 1, - 1 );\n\n\t\t}\n\n\t\tcontext.drawImage( image, 0, 0, canvas.width, canvas.height );\n\n\t\treturn canvas;\n\n\t} else {\n\n\t\tthrow new Error(\n\t\t\t'THREE.USDZExporter: No valid image data found. Unable to process texture.'\n\t\t);\n\n\t}\n\n}\n\n//\n\nconst PRECISION = 7;\n\nfunction buildHeader() {\n\n\treturn `#usda 1.0\n(\n\tcustomLayerData = {\n\t\tstring creator = \"Three.js USDZExporter\"\n\t}\n\tdefaultPrim = \"Root\"\n\tmetersPerUnit = 1\n\tupAxis = \"Y\"\n)\n`;\n\n}\n\n// Xform\n\nfunction buildHierarchy( object, parentNode, materials, usedNames, files, options ) {\n\n\tfor ( let i = 0, l = object.children.length; i < l; i ++ ) {\n\n\t\tconst child = object.children[ i ];\n\n\t\tif ( child.visible === false && options.onlyVisible === true ) continue;\n\n\t\tlet childNode;\n\n\t\tif ( child.isMesh ) {\n\n\t\t\tconst geometry = child.geometry;\n\t\t\tconst material = child.material;\n\n\t\t\tif ( material.isMeshStandardMaterial ) {\n\n\t\t\t\tconst geometryFileName = 'geometries/Geometry_' + geometry.id + '.usda';\n\n\t\t\t\tif ( ! ( geometryFileName in files ) ) {\n\n\t\t\t\t\tconst meshObject = buildMeshObject( geometry );\n\t\t\t\t\tfiles[ geometryFileName ] = strToU8(\n\t\t\t\t\t\tbuildHeader() + '\\n' + meshObject.toString()\n\t\t\t\t\t);\n\n\t\t\t\t}\n\n\t\t\t\tif ( ! ( material.uuid in materials ) ) {\n\n\t\t\t\t\tmaterials[ material.uuid ] = material;\n\n\t\t\t\t}\n\n\t\t\t\tchildNode = buildMesh(\n\t\t\t\t\tchild,\n\t\t\t\t\tgeometry,\n\t\t\t\t\tmaterials[ material.uuid ],\n\t\t\t\t\tusedNames\n\t\t\t\t);\n\n\t\t\t} else {\n\n\t\t\t\tconsole.warn(\n\t\t\t\t\t'THREE.USDZExporter: Unsupported material type (USDZ only supports MeshStandardMaterial)',\n\t\t\t\t\tchild\n\t\t\t\t);\n\n\t\t\t}\n\n\t\t} else if ( child.isCamera ) {\n\n\t\t\tchildNode = buildCamera( child, usedNames );\n\n\t\t} else {\n\n\t\t\tchildNode = buildXform( child, usedNames );\n\n\t\t}\n\n\t\tif ( childNode ) {\n\n\t\t\tparentNode.addChild( childNode );\n\t\t\tbuildHierarchy( child, childNode, materials, usedNames, files, options );\n\n\t\t}\n\n\t}\n\n}\n\nfunction buildXform( object, usedNames ) {\n\n\tconst name = getName( object, usedNames );\n\n\tif ( object.matrix.determinant() < 0 ) {\n\n\t\tconsole.warn(\n\t\t\t'THREE.USDZExporter: USDZ does not support negative scales',\n\t\t\tobject\n\t\t);\n\n\t}\n\n\tconst node = new USDNode( name, 'Xform' );\n\n\tif ( object.pivot !== null ) {\n\n\t\t// Export with pivot using separate transform ops\n\t\tconst p = object.position;\n\t\tconst q = object.quaternion;\n\t\tconst s = object.scale;\n\t\tconst piv = object.pivot;\n\n\t\tnode.addProperty( `float3 xformOp:translate = (${p.x.toPrecision( PRECISION )}, ${p.y.toPrecision( PRECISION )}, ${p.z.toPrecision( PRECISION )})` );\n\t\tnode.addProperty( `float3 xformOp:translate:pivot = (${piv.x.toPrecision( PRECISION )}, ${piv.y.toPrecision( PRECISION )}, ${piv.z.toPrecision( PRECISION )})` );\n\t\tnode.addProperty( `quatf xformOp:orient = (${q.w.toPrecision( PRECISION )}, ${q.x.toPrecision( PRECISION )}, ${q.y.toPrecision( PRECISION )}, ${q.z.toPrecision( PRECISION )})` );\n\t\tnode.addProperty( `float3 xformOp:scale = (${s.x.toPrecision( PRECISION )}, ${s.y.toPrecision( PRECISION )}, ${s.z.toPrecision( PRECISION )})` );\n\t\tnode.addProperty( 'uniform token[] xformOpOrder = [\"xformOp:translate\", \"xformOp:translate:pivot\", \"xformOp:orient\", \"xformOp:scale\", \"!invert!xformOp:translate:pivot\"]' );\n\n\t} else {\n\n\t\t// Export as single transform matrix\n\t\tconst transform = buildMatrix( object.matrix );\n\t\tnode.addProperty( `matrix4d xformOp:transform = ${transform}` );\n\t\tnode.addProperty( 'uniform token[] xformOpOrder = [\"xformOp:transform\"]' );\n\n\t}\n\n\treturn node;\n\n}\n\nfunction buildMesh( object, geometry, material, usedNames ) {\n\n\tconst node = buildXform( object, usedNames );\n\n\tnode.addMetadata(\n\t\t'prepend references',\n\t\t`@./geometries/Geometry_${geometry.id}.usda@</Geometry>`\n\t);\n\tnode.addMetadata( 'prepend apiSchemas', '[\"MaterialBindingAPI\"]' );\n\n\tnode.addProperty(\n\t\t`rel material:binding = </Materials/Material_${material.id}>`\n\t);\n\n\treturn node;\n\n}\n\nfunction buildMatrix( matrix ) {\n\n\tconst array = matrix.elements;\n\n\treturn `( ${buildMatrixRow( array, 0 )}, ${buildMatrixRow(\n\t\tarray,\n\t\t4\n\t)}, ${buildMatrixRow( array, 8 )}, ${buildMatrixRow( array, 12 )} )`;\n\n}\n\nfunction buildMatrixRow( array, offset ) {\n\n\treturn `(${array[ offset + 0 ]}, ${array[ offset + 1 ]}, ${array[ offset + 2 ]}, ${\n\t\tarray[ offset + 3 ]\n\t})`;\n\n}\n\n// Mesh\n\nfunction buildMeshObject( geometry ) {\n\n\tconst node = new USDNode( 'Geometry' );\n\n\tconst meshNode = buildMeshNode( geometry );\n\tnode.addChild( meshNode );\n\n\treturn node;\n\n}\n\nfunction buildMeshNode( geometry ) {\n\n\tconst name = 'Geometry';\n\tconst attributes = geometry.attributes;\n\tconst count = attributes.position.count;\n\n\tconst node = new USDNode( name, 'Mesh' );\n\n\tnode.addProperty(\n\t\t`int[] faceVertexCounts = [${buildMeshVertexCount( geometry )}]`\n\t);\n\tnode.addProperty(\n\t\t`int[] faceVertexIndices = [${buildMeshVertexIndices( geometry )}]`\n\t);\n\tnode.addProperty(\n\t\t`normal3f[] normals = [${buildVector3Array( attributes.normal, count )}]`,\n\t\t[ 'interpolation = \"vertex\"' ]\n\t);\n\tnode.addProperty(\n\t\t`point3f[] points = [${buildVector3Array( attributes.position, count )}]`\n\t);\n\n\tfor ( let i = 0; i < 4; i ++ ) {\n\n\t\tconst id = i > 0 ? i : '';\n\t\tconst attribute = attributes[ 'uv' + id ];\n\t\tif ( attribute !== undefined ) {\n\n\t\t\tnode.addProperty(\n\t\t\t\t`texCoord2f[] primvars:st${id} = [${buildVector2Array( attribute )}]`,\n\t\t\t\t[ 'interpolation = \"vertex\"' ]\n\t\t\t);\n\n\t\t}\n\n\t}\n\n\tconst colorAttribute = attributes.color;\n\tif ( colorAttribute !== undefined ) {\n\n\t\tnode.addProperty(\n\t\t\t`color3f[] primvars:displayColor = [${buildVector3Array(\n\t\t\t\tcolorAttribute,\n\t\t\t\tcount\n\t\t\t)}]`,\n\t\t\t[ 'interpolation = \"vertex\"' ]\n\t\t);\n\n\t}\n\n\tnode.addProperty( 'uniform token subdivisionScheme = \"none\"' );\n\n\treturn node;\n\n}\n\nfunction buildMeshVertexCount( geometry ) {\n\n\tconst count =\n\t\tgeometry.index !== null\n\t\t\t? geometry.index.count\n\t\t\t: geometry.attributes.position.count;\n\n\treturn Array( count / 3 )\n\t\t.fill( 3 )\n\t\t.join( ', ' );\n\n}\n\nfunction buildMeshVertexIndices( geometry ) {\n\n\tconst index = geometry.index;\n\tconst array = [];\n\n\tif ( index !== null ) {\n\n\t\tfor ( let i = 0; i < index.count; i ++ ) {\n\n\t\t\tarray.push( index.getX( i ) );\n\n\t\t}\n\n\t} else {\n\n\t\tconst length = geometry.attributes.position.count;\n\n\t\tfor ( let i = 0; i < length; i ++ ) {\n\n\t\t\tarray.push( i );\n\n\t\t}\n\n\t}\n\n\treturn array.join( ', ' );\n\n}\n\nfunction buildVector3Array( attribute, count ) {\n\n\tif ( attribute === undefined ) {\n\n\t\tconsole.warn( 'USDZExporter: Normals missing.' );\n\t\treturn Array( count ).fill( '(0, 0, 0)' ).join( ', ' );\n\n\t}\n\n\tconst array = [];\n\n\tfor ( let i = 0; i < attribute.count; i ++ ) {\n\n\t\tconst x = attribute.getX( i );\n\t\tconst y = attribute.getY( i );\n\t\tconst z = attribute.getZ( i );\n\n\t\tarray.push(\n\t\t\t`(${x.toPrecision( PRECISION )}, ${y.toPrecision(\n\t\t\t\tPRECISION\n\t\t\t)}, ${z.toPrecision( PRECISION )})`\n\t\t);\n\n\t}\n\n\treturn array.join( ', ' );\n\n}\n\nfunction buildVector2Array( attribute ) {\n\n\tconst array = [];\n\n\tfor ( let i = 0; i < attribute.count; i ++ ) {\n\n\t\tconst x = attribute.getX( i );\n\t\tconst y = attribute.getY( i );\n\n\t\tarray.push(\n\t\t\t`(${x.toPrecision( PRECISION )}, ${1 - y.toPrecision( PRECISION )})`\n\t\t);\n\n\t}\n\n\treturn array.join( ', ' );\n\n}\n\n// Materials\n\nfunction buildMaterials( materials, textures, quickLookCompatible = false ) {\n\n\tconst materialsNode = new USDNode( 'Materials' );\n\n\tfor ( const uuid in materials ) {\n\n\t\tconst material = materials[ uuid ];\n\n\t\tmaterialsNode.addChild(\n\t\t\tbuildMaterial( material, textures, quickLookCompatible )\n\t\t);\n\n\t}\n\n\treturn materialsNode;\n\n}\n\nfunction buildMaterial( material, textures, quickLookCompatible = false ) {\n\n\t// https://graphics.pixar.com/usd/docs/UsdPreviewSurface-Proposal.html\n\n\tconst materialNode = new USDNode( `Material_${material.id}`, 'Material' );\n\n\tfunction buildTextureNodes( texture, mapType, color ) {\n\n\t\tconst id = texture.source.id + '_' + texture.flipY;\n\n\t\ttextures[ id ] = texture;\n\n\t\tconst uv = texture.channel > 0 ? 'st' + texture.channel : 'st';\n\n\t\tconst WRAPPINGS = {\n\t\t\t1000: 'repeat', // RepeatWrapping\n\t\t\t1001: 'clamp', // ClampToEdgeWrapping\n\t\t\t1002: 'mirror', // MirroredRepeatWrapping\n\t\t};\n\n\t\tconst repeat = texture.repeat.clone();\n\t\tconst offset = texture.offset.clone();\n\t\tconst rotation = texture.rotation;\n\n\t\t// rotation is around the wrong point. after rotation we need to shift offset again so that we're rotating around the right spot\n\t\tconst xRotationOffset = Math.sin( rotation );\n\t\tconst yRotationOffset = Math.cos( rotation );\n\n\t\t// texture coordinates start in the opposite corner, need to correct\n\t\toffset.y = 1 - offset.y - repeat.y;\n\n\t\t// turns out QuickLook is buggy and interprets texture repeat inverted/applies operations in a different order.\n\t\t// Apple Feedback: \tFB10036297 and FB11442287\n\t\tif ( quickLookCompatible ) {\n\n\t\t\t// This is NOT correct yet in QuickLook, but comes close for a range of models.\n\t\t\t// It becomes more incorrect the bigger the offset is\n\n\t\t\toffset.x = offset.x / repeat.x;\n\t\t\toffset.y = offset.y / repeat.y;\n\n\t\t\toffset.x += xRotationOffset / repeat.x;\n\t\t\toffset.y += yRotationOffset - 1;\n\n\t\t} else {\n\n\t\t\t// results match glTF results exactly. verified correct in usdview.\n\t\t\toffset.x += xRotationOffset * repeat.x;\n\t\t\toffset.y += ( 1 - yRotationOffset ) * repeat.y;\n\n\t\t}\n\n\t\tconst primvarReaderNode = new USDNode( `PrimvarReader_${mapType}`, 'Shader' );\n\t\tprimvarReaderNode.addProperty(\n\t\t\t'uniform token info:id = \"UsdPrimvarReader_float2\"'\n\t\t);\n\t\tprimvarReaderNode.addProperty( 'float2 inputs:fallback = (0.0, 0.0)' );\n\t\tprimvarReaderNode.addProperty( `string inputs:varname = \"${uv}\"` );\n\t\tprimvarReaderNode.addProperty( 'float2 outputs:result' );\n\n\t\tconst transform2dNode = new USDNode( `Transform2d_${mapType}`, 'Shader' );\n\t\ttransform2dNode.addProperty( 'uniform token info:id = \"UsdTransform2d\"' );\n\t\ttransform2dNode.addProperty(\n\t\t\t`float2 inputs:in.connect = </Materials/Material_${material.id}/PrimvarReader_${mapType}.outputs:result>`\n\t\t);\n\t\ttransform2dNode.addProperty(\n\t\t\t`float inputs:rotation = ${( rotation * ( 180 / Math.PI ) ).toFixed(\n\t\t\t\tPRECISION\n\t\t\t)}`\n\t\t);\n\t\ttransform2dNode.addProperty(\n\t\t\t`float2 inputs:scale = ${buildVector2( repeat )}`\n\t\t);\n\t\ttransform2dNode.addProperty(\n\t\t\t`float2 inputs:translation = ${buildVector2( offset )}`\n\t\t);\n\t\ttransform2dNode.addProperty( 'float2 outputs:result' );\n\n\t\tconst textureNode = new USDNode(\n\t\t\t`Texture_${texture.id}_${mapType}`,\n\t\t\t'Shader'\n\t\t);\n\t\ttextureNode.addProperty( 'uniform token info:id = \"UsdUVTexture\"' );\n\t\ttextureNode.addProperty( `asset inputs:file = @textures/Texture_${id}.png@` );\n\t\ttextureNode.addProperty(\n\t\t\t`float2 inputs:st.connect = </Materials/Material_${material.id}/Transform2d_${mapType}.outputs:result>`\n\t\t);\n\n\t\tif ( color !== undefined ) {\n\n\t\t\ttextureNode.addProperty( `float4 inputs:scale = ${buildColor4( color )}` );\n\n\t\t}\n\n\t\tif ( mapType === 'normal' ) {\n\n\t\t\ttextureNode.addProperty( 'float4 inputs:scale = (2, 2, 2, 1)' );\n\t\t\ttextureNode.addProperty( 'float4 inputs:bias = (-1, -1, -1, 0)' );\n\n\t\t}\n\n\t\ttextureNode.addProperty(\n\t\t\t`token inputs:sourceColorSpace = \"${\n\t\t\t\ttexture.colorSpace === NoColorSpace ? 'raw' : 'sRGB'\n\t\t\t}\"`\n\t\t);\n\t\ttextureNode.addProperty(\n\t\t\t`token inputs:wrapS = \"${WRAPPINGS[ texture.wrapS ]}\"`\n\t\t);\n\t\ttextureNode.addProperty(\n\t\t\t`token inputs:wrapT = \"${WRAPPINGS[ texture.wrapT ]}\"`\n\t\t);\n\t\ttextureNode.addProperty( 'float outputs:r' );\n\t\ttextureNode.addProperty( 'float outputs:g' );\n\t\ttextureNode.addProperty( 'float outputs:b' );\n\t\ttextureNode.addProperty( 'float3 outputs:rgb' );\n\n\t\tif ( material.transparent || material.alphaTest > 0.0 ) {\n\n\t\t\ttextureNode.addProperty( 'float outputs:a' );\n\n\t\t}\n\n\t\treturn [ primvarReaderNode, transform2dNode, textureNode ];\n\n\t}\n\n\tif ( material.side === DoubleSide ) {\n\n\t\tconsole.warn(\n\t\t\t'THREE.USDZExporter: USDZ does not support double sided materials',\n\t\t\tmaterial\n\t\t);\n\n\t}\n\n\tconst previewSurfaceNode = new USDNode( 'PreviewSurface', 'Shader' );\n\tpreviewSurfaceNode.addProperty( 'uniform token info:id = \"UsdPreviewSurface\"' );\n\n\tif ( material.map !== null ) {\n\n\t\tpreviewSurfaceNode.addProperty(\n\t\t\t`color3f inputs:diffuseColor.connect = </Materials/Material_${material.id}/Texture_${material.map.id}_diffuse.outputs:rgb>`\n\t\t);\n\n\t\tif ( material.transparent ) {\n\n\t\t\tpreviewSurfaceNode.addProperty(\n\t\t\t\t`float inputs:opacity.connect = </Materials/Material_${material.id}/Texture_${material.map.id}_diffuse.outputs:a>`\n\t\t\t);\n\n\t\t} else if ( material.alphaTest > 0.0 ) {\n\n\t\t\tpreviewSurfaceNode.addProperty(\n\t\t\t\t`float inputs:opacity.connect = </Materials/Material_${material.id}/Texture_${material.map.id}_diffuse.outputs:a>`\n\t\t\t);\n\t\t\tpreviewSurfaceNode.addProperty(\n\t\t\t\t`float inputs:opacityThreshold = ${material.alphaTest}`\n\t\t\t);\n\n\t\t}\n\n\t\tconst textureNodes = buildTextureNodes(\n\t\t\tmaterial.map,\n\t\t\t'diffuse',\n\t\t\tmaterial.color\n\t\t);\n\t\ttextureNodes.forEach( ( node ) => materialNode.addChild( node ) );\n\n\t} else {\n\n\t\tpreviewSurfaceNode.addProperty(\n\t\t\t`color3f inputs:diffuseColor = ${buildColor( material.color )}`\n\t\t);\n\n\t}\n\n\tif ( material.emissiveMap !== null ) {\n\n\t\tpreviewSurfaceNode.addProperty(\n\t\t\t`color3f inputs:emissiveColor.connect = </Materials/Material_${material.id}/Texture_${material.emissiveMap.id}_emissive.outputs:rgb>`\n\t\t);\n\n\t\tconst emissiveColor = new Color(\n\t\t\tmaterial.emissive.r * material.emissiveIntensity,\n\t\t\tmaterial.emissive.g * material.emissiveIntensity,\n\t\t\tmaterial.emissive.b * material.emissiveIntensity\n\t\t);\n\t\tconst textureNodes = buildTextureNodes(\n\t\t\tmaterial.emissiveMap,\n\t\t\t'emissive',\n\t\t\temissiveColor\n\t\t);\n\t\ttextureNodes.forEach( ( node ) => materialNode.addChild( node ) );\n\n\t} else if ( material.emissive.getHex() > 0 ) {\n\n\t\tpreviewSurfaceNode.addProperty(\n\t\t\t`color3f inputs:emissiveColor = ${buildColor( material.emissive )}`\n\t\t);\n\n\t}\n\n\tif ( material.normalMap !== null ) {\n\n\t\tpreviewSurfaceNode.addProperty(\n\t\t\t`normal3f inputs:normal.connect = </Materials/Material_${material.id}/Texture_${material.normalMap.id}_normal.outputs:rgb>`\n\t\t);\n\n\t\tconst textureNodes = buildTextureNodes( material.normalMap, 'normal' );\n\t\ttextureNodes.forEach( ( node ) => materialNode.addChild( node ) );\n\n\t}\n\n\tif ( material.aoMap !== null ) {\n\n\t\tpreviewSurfaceNode.addProperty(\n\t\t\t`float inputs:occlusion.connect = </Materials/Material_${material.id}/Texture_${material.aoMap.id}_occlusion.outputs:r>`\n\t\t);\n\n\t\tconst aoColor = new Color(\n\t\t\tmaterial.aoMapIntensity,\n\t\t\tmaterial.aoMapIntensity,\n\t\t\tmaterial.aoMapIntensity\n\t\t);\n\t\tconst textureNodes = buildTextureNodes(\n\t\t\tmaterial.aoMap,\n\t\t\t'occlusion',\n\t\t\taoColor\n\t\t);\n\t\ttextureNodes.forEach( ( node ) => materialNode.addChild( node ) );\n\n\t}\n\n\tif ( material.roughnessMap !== null ) {\n\n\t\tpreviewSurfaceNode.addProperty(\n\t\t\t`float inputs:roughness.connect = </Materials/Material_${material.id}/Texture_${material.roughnessMap.id}_roughness.outputs:g>`\n\t\t);\n\n\t\tconst roughnessColor = new Color(\n\t\t\tmaterial.roughness,\n\t\t\tmaterial.roughness,\n\t\t\tmaterial.roughness\n\t\t);\n\t\tconst textureNodes = buildTextureNodes(\n\t\t\tmaterial.roughnessMap,\n\t\t\t'roughness',\n\t\t\troughnessColor\n\t\t);\n\t\ttextureNodes.forEach( ( node ) => materialNode.addChild( node ) );\n\n\t} else {\n\n\t\tpreviewSurfaceNode.addProperty(\n\t\t\t`float inputs:roughness = ${material.roughness}`\n\t\t);\n\n\t}\n\n\tif ( material.metalnessMap !== null ) {\n\n\t\tpreviewSurfaceNode.addProperty(\n\t\t\t`float inputs:metallic.connect = </Materials/Material_${material.id}/Texture_${material.metalnessMap.id}_metallic.outputs:b>`\n\t\t);\n\n\t\tconst metalnessColor = new Color(\n\t\t\tmaterial.metalness,\n\t\t\tmaterial.metalness,\n\t\t\tmaterial.metalness\n\t\t);\n\t\tconst textureNodes = buildTextureNodes(\n\t\t\tmaterial.metalnessMap,\n\t\t\t'metallic',\n\t\t\tmetalnessColor\n\t\t);\n\t\ttextureNodes.forEach( ( node ) => materialNode.addChild( node ) );\n\n\t} else {\n\n\t\tpreviewSurfaceNode.addProperty(\n\t\t\t`float inputs:metallic = ${material.metalness}`\n\t\t);\n\n\t}\n\n\tif ( material.alphaMap !== null ) {\n\n\t\tpreviewSurfaceNode.addProperty(\n\t\t\t`float inputs:opacity.connect = </Materials/Material_${material.id}/Texture_${material.alphaMap.id}_opacity.outputs:r>`\n\t\t);\n\t\tpreviewSurfaceNode.addProperty( 'float inputs:opacityThreshold = 0.0001' );\n\n\t\tconst textureNodes = buildTextureNodes( material.alphaMap, 'opacity' );\n\t\ttextureNodes.forEach( ( node ) => materialNode.addChild( node ) );\n\n\t} else {\n\n\t\tpreviewSurfaceNode.addProperty(\n\t\t\t`float inputs:opacity = ${material.opacity}`\n\t\t);\n\n\t}\n\n\tif ( material.isMeshPhysicalMaterial ) {\n\n\t\tif ( material.clearcoatMap !== null ) {\n\n\t\t\tpreviewSurfaceNode.addProperty(\n\t\t\t\t`float inputs:clearcoat.connect = </Materials/Material_${material.id}/Texture_${material.clearcoatMap.id}_clearcoat.outputs:r>`\n\t\t\t);\n\n\t\t\tconst clearcoatColor = new Color(\n\t\t\t\tmaterial.clearcoat,\n\t\t\t\tmaterial.clearcoat,\n\t\t\t\tmaterial.clearcoat\n\t\t\t);\n\t\t\tconst textureNodes = buildTextureNodes(\n\t\t\t\tmaterial.clearcoatMap,\n\t\t\t\t'clearcoat',\n\t\t\t\tclearcoatColor\n\t\t\t);\n\t\t\ttextureNodes.forEach( ( node ) => materialNode.addChild( node ) );\n\n\t\t} else {\n\n\t\t\tpreviewSurfaceNode.addProperty(\n\t\t\t\t`float inputs:clearcoat = ${material.clearcoat}`\n\t\t\t);\n\n\t\t}\n\n\t\tif ( material.clearcoatRoughnessMap !== null ) {\n\n\t\t\tpreviewSurfaceNode.addProperty(\n\t\t\t\t`float inputs:clearcoatRoughness.connect = </Materials/Material_${material.id}/Texture_${material.clearcoatRoughnessMap.id}_clearcoatRoughness.outputs:g>`\n\t\t\t);\n\n\t\t\tconst clearcoatRoughnessColor = new Color(\n\t\t\t\tmaterial.clearcoatRoughness,\n\t\t\t\tmaterial.clearcoatRoughness,\n\t\t\t\tmaterial.clearcoatRoughness\n\t\t\t);\n\t\t\tconst textureNodes = buildTextureNodes(\n\t\t\t\tmaterial.clearcoatRoughnessMap,\n\t\t\t\t'clearcoatRoughness',\n\t\t\t\tclearcoatRoughnessColor\n\t\t\t);\n\t\t\ttextureNodes.forEach( ( node ) => materialNode.addChild( node ) );\n\n\t\t} else {\n\n\t\t\tpreviewSurfaceNode.addProperty(\n\t\t\t\t`float inputs:clearcoatRoughness = ${material.clearcoatRoughness}`\n\t\t\t);\n\n\t\t}\n\n\t\tpreviewSurfaceNode.addProperty( `float inputs:ior = ${material.ior}` );\n\n\t}\n\n\tpreviewSurfaceNode.addProperty( 'int inputs:useSpecularWorkflow = 0' );\n\tpreviewSurfaceNode.addProperty( 'token outputs:surface' );\n\n\tmaterialNode.addChild( previewSurfaceNode );\n\n\tmaterialNode.addProperty(\n\t\t`token outputs:surface.connect = </Materials/Material_${material.id}/PreviewSurface.outputs:surface>`\n\t);\n\n\treturn materialNode;\n\n}\n\nfunction buildColor( color ) {\n\n\treturn `(${color.r}, ${color.g}, ${color.b})`;\n\n}\n\nfunction buildColor4( color ) {\n\n\treturn `(${color.r}, ${color.g}, ${color.b}, 1.0)`;\n\n}\n\nfunction buildVector2( vector ) {\n\n\treturn `(${vector.x}, ${vector.y})`;\n\n}\n\nfunction buildCamera( camera, usedNames ) {\n\n\tconst name = getName( camera, usedNames );\n\n\tconst transform = buildMatrix( camera.matrix );\n\n\tif ( camera.matrix.determinant() < 0 ) {\n\n\t\tconsole.warn(\n\t\t\t'THREE.USDZExporter: USDZ does not support negative scales',\n\t\t\tcamera\n\t\t);\n\n\t}\n\n\tconst node = new USDNode( name, 'Camera' );\n\tnode.addProperty( `matrix4d xformOp:transform = ${transform}` );\n\tnode.addProperty( 'uniform token[] xformOpOrder = [\"xformOp:transform\"]' );\n\n\tconst projection = camera.isOrthographicCamera\n\t\t? 'orthographic'\n\t\t: 'perspective';\n\tnode.addProperty( `token projection = \"${projection}\"` );\n\n\tconst clippingRange = `(${camera.near.toPrecision(\n\t\tPRECISION\n\t)}, ${camera.far.toPrecision( PRECISION )})`;\n\tnode.addProperty( `float2 clippingRange = ${clippingRange}` );\n\n\tlet horizontalAperture;\n\tif ( camera.isOrthographicCamera ) {\n\n\t\thorizontalAperture = (\n\t\t\t( Math.abs( camera.left ) + Math.abs( camera.right ) ) *\n\t\t\t10\n\t\t).toPrecision( PRECISION );\n\n\t} else {\n\n\t\thorizontalAperture = camera.getFilmWidth().toPrecision( PRECISION );\n\n\t}\n\n\tnode.addProperty( `float horizontalAperture = ${horizontalAperture}` );\n\n\tlet verticalAperture;\n\tif ( camera.isOrthographicCamera ) {\n\n\t\tverticalAperture = (\n\t\t\t( Math.abs( camera.top ) + Math.abs( camera.bottom ) ) *\n\t\t\t10\n\t\t).toPrecision( PRECISION );\n\n\t} else {\n\n\t\tverticalAperture = camera.getFilmHeight().toPrecision( PRECISION );\n\n\t}\n\n\tnode.addProperty( `float verticalAperture = ${verticalAperture}` );\n\n\tif ( camera.isPerspectiveCamera ) {\n\n\t\tconst focalLength = camera.getFocalLength().toPrecision( PRECISION );\n\t\tnode.addProperty( `float focalLength = ${focalLength}` );\n\n\t\tconst focusDistance = camera.focus.toPrecision( PRECISION );\n\t\tnode.addProperty( `float focusDistance = ${focusDistance}` );\n\n\t}\n\n\treturn node;\n\n}\n\n/**\n * Export options of `USDZExporter`.\n *\n * @typedef {Object} USDZExporter~Options\n * @property {number} [maxTextureSize=1024] - The maximum texture size that is going to be exported.\n * @property {boolean} [includeAnchoringProperties=true] - Whether to include anchoring properties or not.\n * @property {boolean} [onlyVisible=true] - Export only visible 3D objects.\n * @property {Object} [ar] - If `includeAnchoringProperties` is set to `true`, the anchoring type and alignment\n * can be configured via `ar.anchoring.type` and `ar.planeAnchoring.alignment`.\n * @property {boolean} [quickLookCompatible=false] - Whether to make the exported USDZ compatible to QuickLook\n * which means the asset is modified to accommodate the bugs FB10036297 and FB11442287 (Apple Feedback).\n **/\n\n/**\n * onDone callback of `USDZExporter`.\n *\n * @callback USDZExporter~OnDone\n * @param {ArrayBuffer} result - The generated USDZ.\n */\n\n/**\n * onError callback of `USDZExporter`.\n *\n * @callback USDZExporter~OnError\n * @param {Error} error - The error object.\n */\n\nexport { USDZExporter };\n"],"names":["USDNode","name","type","metadata","properties","key","value","property","child","indent","pad","formattedMetadata","item","lines","line","meta","l","m","children","bodyLines","i","bodyContent","USDZExporter","utils","scene","onDone","onError","options","usedNames","files","modelFileName","root","scenesNode","sceneName","sceneNode","output","materials","textures","buildHierarchy","materialsNode","buildMaterials","buildHeader","strToU8","id","texture","canvas","imageToCanvas","blob","resolve","offset","filename","file","headerSize","offsetMod64","padLength","padding","zipSync","getName","object","namesSet","image","flipY","maxTextureSize","scale","context","PRECISION","parentNode","childNode","geometry","material","geometryFileName","meshObject","buildMeshObject","buildMesh","buildCamera","buildXform","node","p","q","s","piv","transform","buildMatrix","matrix","array","buildMatrixRow","meshNode","buildMeshNode","attributes","count","buildMeshVertexCount","buildMeshVertexIndices","buildVector3Array","attribute","buildVector2Array","colorAttribute","index","length","x","y","z","quickLookCompatible","uuid","buildMaterial","materialNode","buildTextureNodes","mapType","color","uv","WRAPPINGS","repeat","rotation","xRotationOffset","yRotationOffset","primvarReaderNode","transform2dNode","buildVector2","textureNode","buildColor4","NoColorSpace","DoubleSide","previewSurfaceNode","buildColor","emissiveColor","Color","aoColor","roughnessColor","metalnessColor","clearcoatColor","clearcoatRoughnessColor","vector","camera","projection","clippingRange","horizontalAperture","verticalAperture","focalLength","focusDistance"],"mappings":";AAWA,MAAMA,EAAQ;AAAA,EAEb,YAAaC,GAAMC,IAAO,IAAIC,IAAW,CAAA,GAAIC,IAAa,IAAK;AAE9D,SAAK,OAAOH,GACZ,KAAK,OAAOC,GACZ,KAAK,WAAWC,GAChB,KAAK,aAAaC,GAClB,KAAK,WAAW,CAAA;AAAA,EAEjB;AAAA,EAEA,YAAaC,GAAKC,GAAQ;AAEzB,SAAK,SAAS,KAAM,EAAE,KAAAD,GAAK,OAAAC,EAAK,CAAE;AAAA,EAEnC;AAAA,EAEA,YAAaC,GAAUJ,IAAW,IAAK;AAEtC,SAAK,WAAW,KAAM,EAAE,UAAAI,GAAU,UAAAJ,EAAQ,CAAE;AAAA,EAE7C;AAAA,EAEA,SAAUK,GAAQ;AAEjB,SAAK,SAAS,KAAMA,CAAK;AAAA,EAE1B;AAAA,EAEA,SAAUC,IAAS,GAAI;A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