@needle-tools/engine 4.4.1 → 4.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +3671 -3667
- package/LICENSE.md +10 -10
- package/README.md +64 -64
- package/components.needle.json +1 -1
- package/dist/needle-engine.bundle.js +333 -219
- package/dist/needle-engine.bundle.light.js +333 -219
- package/dist/needle-engine.bundle.light.min.js +4 -4
- package/dist/needle-engine.bundle.light.umd.cjs +4 -4
- package/dist/needle-engine.bundle.min.js +4 -4
- package/dist/needle-engine.bundle.umd.cjs +4 -4
- package/dist/needle-engine.d.ts +130 -129
- package/dist/needle-engine.light.d.ts +130 -129
- package/lib/asap/needle-asap.d.ts +1 -1
- package/lib/asap/needle-asap.js +95 -95
- package/lib/asap/sessiongranted.d.ts +3 -3
- package/lib/asap/sessiongranted.js +65 -65
- package/lib/asap/utils.d.ts +1 -1
- package/lib/asap/utils.js +3 -3
- package/lib/engine/analytics/index.d.ts +6 -6
- package/lib/engine/analytics/index.js +12 -12
- package/lib/engine/analytics/lcp.d.ts +3 -3
- package/lib/engine/analytics/lcp.js +34 -34
- package/lib/engine/api.d.ts +81 -81
- package/lib/engine/api.js +80 -80
- package/lib/engine/assets/index.d.ts +11 -11
- package/lib/engine/assets/index.js +47 -47
- package/lib/engine/assets/static.d.ts +1 -1
- package/lib/engine/assets/static.js +4 -4
- package/lib/engine/codegen/register_types.d.ts +1 -1
- package/lib/engine/codegen/register_types.js +300 -300
- package/lib/engine/debug/debug.d.ts +15 -15
- package/lib/engine/debug/debug.js +44 -44
- package/lib/engine/debug/debug_console.d.ts +2 -2
- package/lib/engine/debug/debug_console.js +307 -307
- package/lib/engine/debug/debug_overlay.d.ts +22 -22
- package/lib/engine/debug/debug_overlay.js +316 -316
- package/lib/engine/debug/debug_spatial_console.d.ts +2 -2
- package/lib/engine/debug/debug_spatial_console.js +390 -390
- package/lib/engine/debug/index.d.ts +2 -2
- package/lib/engine/debug/index.js +2 -2
- package/lib/engine/engine_addressables.d.ts +166 -166
- package/lib/engine/engine_addressables.js +608 -608
- package/lib/engine/engine_animation.d.ts +43 -43
- package/lib/engine/engine_animation.js +133 -133
- package/lib/engine/engine_application.d.ts +40 -40
- package/lib/engine/engine_application.js +104 -104
- package/lib/engine/engine_assetdatabase.d.ts +25 -25
- package/lib/engine/engine_assetdatabase.js +344 -344
- package/lib/engine/engine_audio.d.ts +4 -4
- package/lib/engine/engine_audio.js +23 -23
- package/lib/engine/engine_camera.d.ts +13 -13
- package/lib/engine/engine_camera.js +30 -30
- package/lib/engine/engine_components.d.ts +110 -110
- package/lib/engine/engine_components.js +382 -382
- package/lib/engine/engine_components_internal.d.ts +9 -9
- package/lib/engine/engine_components_internal.js +36 -36
- package/lib/engine/engine_constants.d.ts +10 -10
- package/lib/engine/engine_constants.js +41 -41
- package/lib/engine/engine_context.d.ts +472 -354
- package/lib/engine/engine_context.js +1653 -1536
- package/lib/engine/engine_context.js.map +1 -1
- package/lib/engine/engine_context_registry.d.ts +71 -71
- package/lib/engine/engine_context_registry.js +117 -117
- package/lib/engine/engine_coroutine.d.ts +35 -35
- package/lib/engine/engine_coroutine.js +52 -52
- package/lib/engine/engine_create_objects.d.ts +118 -118
- package/lib/engine/engine_create_objects.js +308 -308
- package/lib/engine/engine_default_parameters.d.ts +2 -2
- package/lib/engine/engine_default_parameters.js +3 -3
- package/lib/engine/engine_editor-sync.d.ts +21 -21
- package/lib/engine/engine_editor-sync.js +4 -4
- package/lib/engine/engine_element.d.ts +113 -113
- package/lib/engine/engine_element.js +832 -832
- package/lib/engine/engine_element_attributes.d.ts +72 -72
- package/lib/engine/engine_element_attributes.js +1 -1
- package/lib/engine/engine_element_extras.d.ts +6 -6
- package/lib/engine/engine_element_extras.js +13 -13
- package/lib/engine/engine_element_loading.d.ts +44 -44
- package/lib/engine/engine_element_loading.js +349 -349
- package/lib/engine/engine_element_overlay.d.ts +21 -21
- package/lib/engine/engine_element_overlay.js +166 -166
- package/lib/engine/engine_fileloader.d.ts +2 -2
- package/lib/engine/engine_fileloader.js +8 -8
- package/lib/engine/engine_gameobject.d.ts +68 -68
- package/lib/engine/engine_gameobject.js +596 -596
- package/lib/engine/engine_generic_utils.d.ts +1 -1
- package/lib/engine/engine_generic_utils.js +13 -13
- package/lib/engine/engine_gizmos.d.ts +149 -149
- package/lib/engine/engine_gizmos.js +530 -530
- package/lib/engine/engine_gltf.d.ts +12 -12
- package/lib/engine/engine_gltf.js +15 -15
- package/lib/engine/engine_gltf_builtin_components.d.ts +7 -7
- package/lib/engine/engine_gltf_builtin_components.js +341 -341
- package/lib/engine/engine_hot_reload.d.ts +7 -7
- package/lib/engine/engine_hot_reload.js +184 -184
- package/lib/engine/engine_input.d.ts +352 -352
- package/lib/engine/engine_input.js +1265 -1265
- package/lib/engine/engine_input_utils.d.ts +2 -2
- package/lib/engine/engine_input_utils.js +22 -22
- package/lib/engine/engine_instancing.d.ts +19 -19
- package/lib/engine/engine_instancing.js +39 -39
- package/lib/engine/engine_license.d.ts +11 -11
- package/lib/engine/engine_license.js +361 -361
- package/lib/engine/engine_lifecycle_api.d.ts +76 -76
- package/lib/engine/engine_lifecycle_api.js +99 -99
- package/lib/engine/engine_lifecycle_functions_internal.d.ts +32 -32
- package/lib/engine/engine_lifecycle_functions_internal.js +146 -146
- package/lib/engine/engine_lightdata.d.ts +23 -23
- package/lib/engine/engine_lightdata.js +91 -91
- package/lib/engine/engine_loaders.d.ts +13 -13
- package/lib/engine/engine_loaders.js +62 -62
- package/lib/engine/engine_lods.d.ts +31 -31
- package/lib/engine/engine_lods.js +146 -146
- package/lib/engine/engine_mainloop_utils.d.ts +32 -32
- package/lib/engine/engine_mainloop_utils.js +466 -466
- package/lib/engine/engine_math.d.ts +114 -114
- package/lib/engine/engine_math.js +247 -247
- package/lib/engine/engine_modules.d.ts +36 -36
- package/lib/engine/engine_modules.js +85 -85
- package/lib/engine/engine_networking.d.ts +252 -252
- package/lib/engine/engine_networking.js +743 -743
- package/lib/engine/engine_networking_auto.d.ts +24 -24
- package/lib/engine/engine_networking_auto.js +310 -310
- package/lib/engine/engine_networking_blob.d.ts +48 -48
- package/lib/engine/engine_networking_blob.js +228 -228
- package/lib/engine/engine_networking_files.d.ts +35 -35
- package/lib/engine/engine_networking_files.js +172 -172
- package/lib/engine/engine_networking_files_default_components.d.ts +6 -6
- package/lib/engine/engine_networking_files_default_components.js +42 -42
- package/lib/engine/engine_networking_instantiate.d.ts +100 -100
- package/lib/engine/engine_networking_instantiate.js +345 -345
- package/lib/engine/engine_networking_peer.d.ts +15 -15
- package/lib/engine/engine_networking_peer.js +132 -132
- package/lib/engine/engine_networking_streams.d.ts +123 -123
- package/lib/engine/engine_networking_streams.js +645 -645
- package/lib/engine/engine_networking_types.d.ts +22 -22
- package/lib/engine/engine_networking_types.js +7 -7
- package/lib/engine/engine_networking_utils.d.ts +2 -2
- package/lib/engine/engine_networking_utils.js +20 -20
- package/lib/engine/engine_networking_websocket.d.ts +1 -1
- package/lib/engine/engine_networking_websocket.js +2 -2
- package/lib/engine/engine_patcher.d.ts +10 -10
- package/lib/engine/engine_patcher.js +142 -142
- package/lib/engine/engine_physics.d.ts +152 -152
- package/lib/engine/engine_physics.js +645 -645
- package/lib/engine/engine_physics.types.d.ts +40 -40
- package/lib/engine/engine_physics.types.js +33 -33
- package/lib/engine/engine_physics_rapier.d.ts +147 -147
- package/lib/engine/engine_physics_rapier.js +1433 -1433
- package/lib/engine/engine_playerview.d.ts +26 -26
- package/lib/engine/engine_playerview.js +64 -64
- package/lib/engine/engine_scenelighting.d.ts +71 -71
- package/lib/engine/engine_scenelighting.js +226 -226
- package/lib/engine/engine_scenetools.d.ts +50 -50
- package/lib/engine/engine_scenetools.js +321 -321
- package/lib/engine/engine_serialization.d.ts +3 -3
- package/lib/engine/engine_serialization.js +3 -3
- package/lib/engine/engine_serialization_builtin_serializer.d.ts +72 -72
- package/lib/engine/engine_serialization_builtin_serializer.js +403 -403
- package/lib/engine/engine_serialization_core.d.ts +85 -85
- package/lib/engine/engine_serialization_core.js +606 -606
- package/lib/engine/engine_serialization_decorator.d.ts +23 -23
- package/lib/engine/engine_serialization_decorator.js +66 -66
- package/lib/engine/engine_setup.d.ts +1 -1
- package/lib/engine/engine_setup.js +2 -2
- package/lib/engine/engine_shaders.d.ts +53 -53
- package/lib/engine/engine_shaders.js +252 -252
- package/lib/engine/engine_shims.d.ts +4 -4
- package/lib/engine/engine_shims.js +24 -24
- package/lib/engine/engine_test_utils.d.ts +39 -39
- package/lib/engine/engine_test_utils.js +83 -83
- package/lib/engine/engine_texture.d.ts +28 -28
- package/lib/engine/engine_texture.js +64 -64
- package/lib/engine/engine_three_utils.d.ts +201 -201
- package/lib/engine/engine_three_utils.js +731 -731
- package/lib/engine/engine_time.d.ts +51 -51
- package/lib/engine/engine_time.js +82 -82
- package/lib/engine/engine_time_utils.d.ts +88 -88
- package/lib/engine/engine_time_utils.js +215 -215
- package/lib/engine/engine_tonemapping.d.ts +2 -2
- package/lib/engine/engine_tonemapping.js +194 -194
- package/lib/engine/engine_types.d.ts +572 -572
- package/lib/engine/engine_types.js +88 -88
- package/lib/engine/engine_typestore.d.ts +28 -28
- package/lib/engine/engine_typestore.js +55 -55
- package/lib/engine/engine_util_decorator.d.ts +13 -13
- package/lib/engine/engine_util_decorator.js +116 -116
- package/lib/engine/engine_utils.d.ts +266 -266
- package/lib/engine/engine_utils.js +878 -878
- package/lib/engine/engine_utils_format.d.ts +21 -21
- package/lib/engine/engine_utils_format.js +193 -193
- package/lib/engine/engine_utils_screenshot.d.ts +159 -159
- package/lib/engine/engine_utils_screenshot.js +513 -513
- package/lib/engine/engine_utils_screenshot.xr.d.ts +5 -5
- package/lib/engine/engine_utils_screenshot.xr.js +90 -90
- package/lib/engine/engine_xr.d.ts +1 -1
- package/lib/engine/engine_xr.js +1 -1
- package/lib/engine/export/gltf/Writers.d.ts +19 -19
- package/lib/engine/export/gltf/Writers.js +24 -24
- package/lib/engine/export/gltf/index.d.ts +11 -11
- package/lib/engine/export/gltf/index.js +123 -123
- package/lib/engine/export/index.d.ts +2 -2
- package/lib/engine/export/index.js +2 -2
- package/lib/engine/export/state.d.ts +7 -7
- package/lib/engine/export/state.js +17 -17
- package/lib/engine/export/utils.d.ts +2 -2
- package/lib/engine/export/utils.js +7 -7
- package/lib/engine/extensions/EXT_texture_exr.d.ts +8 -8
- package/lib/engine/extensions/EXT_texture_exr.js +32 -32
- package/lib/engine/extensions/NEEDLE_animator_controller_model.d.ts +122 -122
- package/lib/engine/extensions/NEEDLE_animator_controller_model.js +95 -95
- package/lib/engine/extensions/NEEDLE_components.d.ts +35 -35
- package/lib/engine/extensions/NEEDLE_components.js +220 -220
- package/lib/engine/extensions/NEEDLE_gameobject_data.d.ts +10 -10
- package/lib/engine/extensions/NEEDLE_gameobject_data.js +57 -57
- package/lib/engine/extensions/NEEDLE_lighting_settings.d.ts +37 -37
- package/lib/engine/extensions/NEEDLE_lighting_settings.js +157 -157
- package/lib/engine/extensions/NEEDLE_lightmaps.d.ts +18 -18
- package/lib/engine/extensions/NEEDLE_lightmaps.js +99 -99
- package/lib/engine/extensions/NEEDLE_persistent_assets.d.ts +11 -11
- package/lib/engine/extensions/NEEDLE_persistent_assets.js +63 -63
- package/lib/engine/extensions/NEEDLE_progressive.d.ts +1 -1
- package/lib/engine/extensions/NEEDLE_progressive.js +1 -1
- package/lib/engine/extensions/NEEDLE_render_objects.d.ts +13 -13
- package/lib/engine/extensions/NEEDLE_render_objects.js +159 -159
- package/lib/engine/extensions/NEEDLE_techniques_webgl.d.ts +38 -38
- package/lib/engine/extensions/NEEDLE_techniques_webgl.js +564 -564
- package/lib/engine/extensions/extension_resolver.d.ts +4 -4
- package/lib/engine/extensions/extension_resolver.js +1 -1
- package/lib/engine/extensions/extension_utils.d.ts +12 -12
- package/lib/engine/extensions/extension_utils.js +152 -152
- package/lib/engine/extensions/extensions.d.ts +31 -31
- package/lib/engine/extensions/extensions.js +103 -103
- package/lib/engine/extensions/index.d.ts +6 -6
- package/lib/engine/extensions/index.js +6 -6
- package/lib/engine/extensions/usage_tracker.d.ts +13 -13
- package/lib/engine/extensions/usage_tracker.js +65 -65
- package/lib/engine/js-extensions/Camera.d.ts +1 -1
- package/lib/engine/js-extensions/Camera.js +39 -39
- package/lib/engine/js-extensions/ExtensionUtils.d.ts +9 -9
- package/lib/engine/js-extensions/ExtensionUtils.js +67 -67
- package/lib/engine/js-extensions/Layers.d.ts +6 -6
- package/lib/engine/js-extensions/Layers.js +22 -22
- package/lib/engine/js-extensions/Object3D.d.ts +120 -120
- package/lib/engine/js-extensions/Object3D.js +136 -136
- package/lib/engine/js-extensions/RGBAColor.d.ts +23 -23
- package/lib/engine/js-extensions/RGBAColor.js +111 -110
- package/lib/engine/js-extensions/RGBAColor.js.map +1 -1
- package/lib/engine/js-extensions/Vector.d.ts +3 -3
- package/lib/engine/js-extensions/Vector.js +13 -13
- package/lib/engine/js-extensions/index.d.ts +5 -5
- package/lib/engine/js-extensions/index.js +5 -5
- package/lib/engine/physics/workers/mesh-bvh/GenerateMeshBVHWorker.d.ts +4 -4
- package/lib/engine/physics/workers/mesh-bvh/GenerateMeshBVHWorker.js +76 -76
- package/lib/engine/shaders/shaderData.d.ts +55 -55
- package/lib/engine/shaders/shaderData.js +58 -58
- package/lib/engine/tests/test_utils.d.ts +2 -2
- package/lib/engine/tests/test_utils.js +53 -53
- package/lib/engine/webcomponents/WebXRButtons.d.ts +56 -56
- package/lib/engine/webcomponents/WebXRButtons.js +230 -230
- package/lib/engine/webcomponents/api.d.ts +5 -5
- package/lib/engine/webcomponents/api.js +4 -4
- package/lib/engine/webcomponents/buttons.d.ts +39 -39
- package/lib/engine/webcomponents/buttons.js +237 -237
- package/lib/engine/webcomponents/fonts.d.ts +9 -9
- package/lib/engine/webcomponents/fonts.js +32 -32
- package/lib/engine/webcomponents/icons.d.ts +9 -9
- package/lib/engine/webcomponents/icons.js +52 -52
- package/lib/engine/webcomponents/index.d.ts +1 -1
- package/lib/engine/webcomponents/index.js +1 -1
- package/lib/engine/webcomponents/logo-element.d.ts +10 -10
- package/lib/engine/webcomponents/logo-element.js +67 -67
- package/lib/engine/webcomponents/needle menu/needle-menu-spatial.d.ts +37 -37
- package/lib/engine/webcomponents/needle menu/needle-menu-spatial.js +513 -513
- package/lib/engine/webcomponents/needle menu/needle-menu.d.ts +155 -155
- package/lib/engine/webcomponents/needle menu/needle-menu.js +1029 -1029
- package/lib/engine/webcomponents/needle-button.d.ts +34 -34
- package/lib/engine/webcomponents/needle-button.js +161 -161
- package/lib/engine/xr/NeedleXRController.d.ts +313 -313
- package/lib/engine/xr/NeedleXRController.js +1007 -1007
- package/lib/engine/xr/NeedleXRSession.d.ts +339 -339
- package/lib/engine/xr/NeedleXRSession.js +1427 -1427
- package/lib/engine/xr/NeedleXRSync.d.ts +22 -22
- package/lib/engine/xr/NeedleXRSync.js +188 -188
- package/lib/engine/xr/SceneTransition.d.ts +18 -18
- package/lib/engine/xr/SceneTransition.js +69 -69
- package/lib/engine/xr/TempXRContext.d.ts +34 -34
- package/lib/engine/xr/TempXRContext.js +187 -187
- package/lib/engine/xr/XRRig.d.ts +7 -7
- package/lib/engine/xr/XRRig.js +1 -1
- package/lib/engine/xr/api.d.ts +6 -6
- package/lib/engine/xr/api.js +6 -6
- package/lib/engine/xr/events.d.ts +66 -66
- package/lib/engine/xr/events.js +93 -93
- package/lib/engine/xr/internal.d.ts +12 -12
- package/lib/engine/xr/internal.js +25 -25
- package/lib/engine/xr/usdz.d.ts +12 -12
- package/lib/engine/xr/usdz.js +29 -29
- package/lib/engine/xr/utils.d.ts +11 -11
- package/lib/engine/xr/utils.js +34 -34
- package/lib/engine-components/AlignmentConstraint.d.ts +10 -10
- package/lib/engine-components/AlignmentConstraint.js +39 -39
- package/lib/engine-components/Animation.d.ts +156 -156
- package/lib/engine-components/Animation.js +508 -508
- package/lib/engine-components/AnimationCurve.d.ts +40 -40
- package/lib/engine-components/AnimationCurve.js +159 -159
- package/lib/engine-components/AnimationUtils.d.ts +8 -8
- package/lib/engine-components/AnimationUtils.js +27 -27
- package/lib/engine-components/AnimationUtilsAutoplay.d.ts +1 -1
- package/lib/engine-components/AnimationUtilsAutoplay.js +39 -39
- package/lib/engine-components/Animator.d.ts +217 -217
- package/lib/engine-components/Animator.js +354 -354
- package/lib/engine-components/AnimatorController.d.ts +227 -227
- package/lib/engine-components/AnimatorController.js +1152 -1152
- package/lib/engine-components/AudioListener.d.ts +33 -33
- package/lib/engine-components/AudioListener.js +86 -86
- package/lib/engine-components/AudioSource.d.ts +217 -217
- package/lib/engine-components/AudioSource.js +634 -634
- package/lib/engine-components/AvatarLoader.d.ts +80 -80
- package/lib/engine-components/AvatarLoader.js +231 -231
- package/lib/engine-components/AxesHelper.d.ts +32 -32
- package/lib/engine-components/AxesHelper.js +67 -67
- package/lib/engine-components/BasicIKConstraint.d.ts +9 -9
- package/lib/engine-components/BasicIKConstraint.js +43 -43
- package/lib/engine-components/BoxCollider.d.ts +2 -2
- package/lib/engine-components/BoxCollider.js +2 -2
- package/lib/engine-components/BoxHelperComponent.d.ts +47 -47
- package/lib/engine-components/BoxHelperComponent.js +102 -102
- package/lib/engine-components/Camera.d.ts +231 -231
- package/lib/engine-components/Camera.js +700 -700
- package/lib/engine-components/CameraUtils.d.ts +1 -1
- package/lib/engine-components/CameraUtils.js +121 -121
- package/lib/engine-components/CharacterController.d.ts +55 -55
- package/lib/engine-components/CharacterController.js +236 -236
- package/lib/engine-components/Collider.d.ts +188 -188
- package/lib/engine-components/Collider.js +369 -369
- package/lib/engine-components/Component.d.ts +792 -792
- package/lib/engine-components/Component.js +915 -915
- package/lib/engine-components/ContactShadows.d.ts +82 -82
- package/lib/engine-components/ContactShadows.js +430 -430
- package/lib/engine-components/DeleteBox.d.ts +19 -19
- package/lib/engine-components/DeleteBox.js +58 -58
- package/lib/engine-components/DeviceFlag.d.ts +16 -16
- package/lib/engine-components/DeviceFlag.js +47 -47
- package/lib/engine-components/DragControls.d.ts +170 -170
- package/lib/engine-components/DragControls.js +1421 -1421
- package/lib/engine-components/DropListener.d.ts +215 -215
- package/lib/engine-components/DropListener.js +630 -630
- package/lib/engine-components/Duplicatable.d.ts +35 -35
- package/lib/engine-components/Duplicatable.js +202 -202
- package/lib/engine-components/EventList.d.ts +54 -54
- package/lib/engine-components/EventList.js +232 -232
- package/lib/engine-components/EventTrigger.d.ts +33 -33
- package/lib/engine-components/EventTrigger.js +75 -75
- package/lib/engine-components/EventType.d.ts +22 -22
- package/lib/engine-components/EventType.js +23 -23
- package/lib/engine-components/Fog.d.ts +22 -22
- package/lib/engine-components/Fog.js +61 -61
- package/lib/engine-components/Gizmos.d.ts +17 -17
- package/lib/engine-components/Gizmos.js +64 -64
- package/lib/engine-components/GridHelper.d.ts +20 -20
- package/lib/engine-components/GridHelper.js +54 -54
- package/lib/engine-components/GroundProjection.d.ts +67 -67
- package/lib/engine-components/GroundProjection.js +343 -343
- package/lib/engine-components/Interactable.d.ts +12 -12
- package/lib/engine-components/Interactable.js +12 -12
- package/lib/engine-components/Joints.d.ts +19 -19
- package/lib/engine-components/Joints.js +51 -51
- package/lib/engine-components/LODGroup.d.ts +35 -35
- package/lib/engine-components/LODGroup.js +152 -152
- package/lib/engine-components/Light.d.ts +180 -180
- package/lib/engine-components/Light.js +535 -535
- package/lib/engine-components/LookAtConstraint.d.ts +19 -19
- package/lib/engine-components/LookAtConstraint.js +35 -35
- package/lib/engine-components/NeedleMenu.d.ts +50 -50
- package/lib/engine-components/NeedleMenu.js +92 -92
- package/lib/engine-components/NestedGltf.d.ts +25 -25
- package/lib/engine-components/NestedGltf.js +88 -88
- package/lib/engine-components/Networking.d.ts +54 -54
- package/lib/engine-components/Networking.js +112 -112
- package/lib/engine-components/OffsetConstraint.d.ts +14 -14
- package/lib/engine-components/OffsetConstraint.js +65 -65
- package/lib/engine-components/OrbitControls.d.ts +266 -266
- package/lib/engine-components/OrbitControls.js +1011 -1011
- package/lib/engine-components/PlayerColor.d.ts +19 -19
- package/lib/engine-components/PlayerColor.js +94 -94
- package/lib/engine-components/ReflectionProbe.d.ts +27 -27
- package/lib/engine-components/ReflectionProbe.js +201 -201
- package/lib/engine-components/Renderer.d.ts +153 -153
- package/lib/engine-components/Renderer.js +830 -830
- package/lib/engine-components/RendererInstancing.d.ts +140 -140
- package/lib/engine-components/RendererInstancing.js +744 -744
- package/lib/engine-components/RendererLightmap.d.ts +24 -24
- package/lib/engine-components/RendererLightmap.js +182 -182
- package/lib/engine-components/RigidBody.d.ts +155 -155
- package/lib/engine-components/RigidBody.js +517 -517
- package/lib/engine-components/SceneSwitcher.d.ts +263 -263
- package/lib/engine-components/SceneSwitcher.js +972 -972
- package/lib/engine-components/ScreenCapture.d.ts +144 -144
- package/lib/engine-components/ScreenCapture.js +547 -547
- package/lib/engine-components/ShadowCatcher.d.ts +33 -33
- package/lib/engine-components/ShadowCatcher.js +166 -166
- package/lib/engine-components/Skybox.d.ts +82 -82
- package/lib/engine-components/Skybox.js +448 -448
- package/lib/engine-components/SmoothFollow.d.ts +34 -34
- package/lib/engine-components/SmoothFollow.js +82 -82
- package/lib/engine-components/SpatialTrigger.d.ts +102 -102
- package/lib/engine-components/SpatialTrigger.js +225 -225
- package/lib/engine-components/SpectatorCamera.d.ts +111 -111
- package/lib/engine-components/SpectatorCamera.js +715 -715
- package/lib/engine-components/SphereCollider.d.ts +2 -2
- package/lib/engine-components/SphereCollider.js +2 -2
- package/lib/engine-components/SpriteRenderer.d.ts +132 -132
- package/lib/engine-components/SpriteRenderer.js +472 -472
- package/lib/engine-components/SyncedCamera.d.ts +41 -41
- package/lib/engine-components/SyncedCamera.js +199 -199
- package/lib/engine-components/SyncedRoom.d.ts +106 -106
- package/lib/engine-components/SyncedRoom.js +371 -371
- package/lib/engine-components/SyncedTransform.d.ts +94 -94
- package/lib/engine-components/SyncedTransform.js +331 -331
- package/lib/engine-components/TestRunner.d.ts +16 -16
- package/lib/engine-components/TestRunner.js +102 -102
- package/lib/engine-components/TransformGizmo.d.ts +75 -75
- package/lib/engine-components/TransformGizmo.js +209 -209
- package/lib/engine-components/VideoPlayer.d.ts +184 -184
- package/lib/engine-components/VideoPlayer.js +978 -978
- package/lib/engine-components/Voip.d.ts +67 -67
- package/lib/engine-components/Voip.js +360 -360
- package/lib/engine-components/api.d.ts +51 -51
- package/lib/engine-components/api.js +50 -50
- package/lib/engine-components/avatar/AvatarBlink_Simple.d.ts +11 -11
- package/lib/engine-components/avatar/AvatarBlink_Simple.js +76 -76
- package/lib/engine-components/avatar/AvatarEyeLook_Rotation.d.ts +14 -14
- package/lib/engine-components/avatar/AvatarEyeLook_Rotation.js +68 -68
- package/lib/engine-components/avatar/Avatar_Brain_LookAt.d.ts +29 -29
- package/lib/engine-components/avatar/Avatar_Brain_LookAt.js +121 -121
- package/lib/engine-components/avatar/Avatar_MouthShapes.d.ts +15 -15
- package/lib/engine-components/avatar/Avatar_MouthShapes.js +79 -79
- package/lib/engine-components/avatar/Avatar_MustacheShake.d.ts +9 -9
- package/lib/engine-components/avatar/Avatar_MustacheShake.js +29 -29
- package/lib/engine-components/codegen/components.d.ts +216 -216
- package/lib/engine-components/codegen/components.js +218 -218
- package/lib/engine-components/debug/LogStats.d.ts +5 -5
- package/lib/engine-components/debug/LogStats.js +18 -18
- package/lib/engine-components/export/gltf/GltfExport.d.ts +30 -30
- package/lib/engine-components/export/gltf/GltfExport.js +246 -246
- package/lib/engine-components/export/gltf/index.d.ts +1 -1
- package/lib/engine-components/export/gltf/index.js +1 -1
- package/lib/engine-components/export/index.d.ts +1 -1
- package/lib/engine-components/export/index.js +1 -1
- package/lib/engine-components/export/usdz/Extension.d.ts +22 -22
- package/lib/engine-components/export/usdz/Extension.js +1 -1
- package/lib/engine-components/export/usdz/ThreeUSDZExporter.d.ts +160 -160
- package/lib/engine-components/export/usdz/ThreeUSDZExporter.js +1782 -1782
- package/lib/engine-components/export/usdz/USDZExporter.d.ts +130 -130
- package/lib/engine-components/export/usdz/USDZExporter.js +663 -663
- package/lib/engine-components/export/usdz/extensions/Animation.d.ts +106 -106
- package/lib/engine-components/export/usdz/extensions/Animation.js +1071 -1071
- package/lib/engine-components/export/usdz/extensions/DocumentExtension.d.ts +5 -5
- package/lib/engine-components/export/usdz/extensions/DocumentExtension.js +6 -6
- package/lib/engine-components/export/usdz/extensions/USDZText.d.ts +54 -54
- package/lib/engine-components/export/usdz/extensions/USDZText.js +203 -203
- package/lib/engine-components/export/usdz/extensions/USDZUI.d.ts +8 -8
- package/lib/engine-components/export/usdz/extensions/USDZUI.js +158 -158
- package/lib/engine-components/export/usdz/extensions/behavior/Actions.d.ts +30 -30
- package/lib/engine-components/export/usdz/extensions/behavior/Actions.js +88 -88
- package/lib/engine-components/export/usdz/extensions/behavior/AudioExtension.d.ts +10 -10
- package/lib/engine-components/export/usdz/extensions/behavior/AudioExtension.js +86 -86
- package/lib/engine-components/export/usdz/extensions/behavior/Behaviour.d.ts +28 -28
- package/lib/engine-components/export/usdz/extensions/behavior/Behaviour.js +290 -290
- package/lib/engine-components/export/usdz/extensions/behavior/BehaviourComponents.d.ts +190 -190
- package/lib/engine-components/export/usdz/extensions/behavior/BehaviourComponents.js +1060 -1060
- package/lib/engine-components/export/usdz/extensions/behavior/BehavioursBuilder.d.ts +135 -135
- package/lib/engine-components/export/usdz/extensions/behavior/BehavioursBuilder.js +548 -548
- package/lib/engine-components/export/usdz/extensions/behavior/PhysicsExtension.d.ts +7 -7
- package/lib/engine-components/export/usdz/extensions/behavior/PhysicsExtension.js +115 -115
- package/lib/engine-components/export/usdz/index.d.ts +3 -3
- package/lib/engine-components/export/usdz/index.js +2 -2
- package/lib/engine-components/export/usdz/utils/animationutils.d.ts +7 -7
- package/lib/engine-components/export/usdz/utils/animationutils.js +163 -163
- package/lib/engine-components/export/usdz/utils/quicklook.d.ts +2 -2
- package/lib/engine-components/export/usdz/utils/quicklook.js +43 -43
- package/lib/engine-components/particlesystem/ParticleSystem.d.ts +177 -177
- package/lib/engine-components/particlesystem/ParticleSystem.js +1176 -1176
- package/lib/engine-components/particlesystem/ParticleSystemModules.d.ts +526 -526
- package/lib/engine-components/particlesystem/ParticleSystemModules.js +1930 -1930
- package/lib/engine-components/particlesystem/ParticleSystemSubEmitter.d.ts +25 -25
- package/lib/engine-components/particlesystem/ParticleSystemSubEmitter.js +87 -87
- package/lib/engine-components/particlesystem/api.d.ts +2 -2
- package/lib/engine-components/particlesystem/api.js +2 -2
- package/lib/engine-components/postprocessing/Effects/Antialiasing.d.ts +17 -17
- package/lib/engine-components/postprocessing/Effects/Antialiasing.js +50 -50
- package/lib/engine-components/postprocessing/Effects/BloomEffect.d.ts +46 -46
- package/lib/engine-components/postprocessing/Effects/BloomEffect.js +113 -113
- package/lib/engine-components/postprocessing/Effects/ChromaticAberration.d.ts +11 -11
- package/lib/engine-components/postprocessing/Effects/ChromaticAberration.js +39 -39
- package/lib/engine-components/postprocessing/Effects/ColorAdjustments.d.ts +15 -15
- package/lib/engine-components/postprocessing/Effects/ColorAdjustments.js +92 -92
- package/lib/engine-components/postprocessing/Effects/DepthOfField.d.ts +25 -25
- package/lib/engine-components/postprocessing/Effects/DepthOfField.js +104 -104
- package/lib/engine-components/postprocessing/Effects/EffectWrapper.d.ts +12 -12
- package/lib/engine-components/postprocessing/Effects/EffectWrapper.js +18 -18
- package/lib/engine-components/postprocessing/Effects/Pixelation.d.ts +11 -11
- package/lib/engine-components/postprocessing/Effects/Pixelation.js +32 -32
- package/lib/engine-components/postprocessing/Effects/ScreenspaceAmbientOcclusion.d.ts +18 -18
- package/lib/engine-components/postprocessing/Effects/ScreenspaceAmbientOcclusion.js +91 -91
- package/lib/engine-components/postprocessing/Effects/ScreenspaceAmbientOcclusionN8.d.ts +70 -70
- package/lib/engine-components/postprocessing/Effects/ScreenspaceAmbientOcclusionN8.js +175 -175
- package/lib/engine-components/postprocessing/Effects/Sharpening.d.ts +17 -17
- package/lib/engine-components/postprocessing/Effects/Sharpening.js +123 -123
- package/lib/engine-components/postprocessing/Effects/TiltShiftEffect.d.ts +17 -17
- package/lib/engine-components/postprocessing/Effects/TiltShiftEffect.js +70 -70
- package/lib/engine-components/postprocessing/Effects/Tonemapping.d.ts +26 -26
- package/lib/engine-components/postprocessing/Effects/Tonemapping.js +138 -138
- package/lib/engine-components/postprocessing/Effects/Vignette.d.ts +15 -15
- package/lib/engine-components/postprocessing/Effects/Vignette.js +60 -60
- package/lib/engine-components/postprocessing/PostProcessingEffect.d.ts +72 -72
- package/lib/engine-components/postprocessing/PostProcessingEffect.js +149 -149
- package/lib/engine-components/postprocessing/PostProcessingHandler.d.ts +25 -25
- package/lib/engine-components/postprocessing/PostProcessingHandler.js +350 -350
- package/lib/engine-components/postprocessing/Volume.d.ts +89 -89
- package/lib/engine-components/postprocessing/Volume.js +367 -367
- package/lib/engine-components/postprocessing/VolumeParameter.d.ts +26 -26
- package/lib/engine-components/postprocessing/VolumeParameter.js +136 -136
- package/lib/engine-components/postprocessing/VolumeProfile.d.ts +15 -15
- package/lib/engine-components/postprocessing/VolumeProfile.js +60 -60
- package/lib/engine-components/postprocessing/index.d.ts +5 -5
- package/lib/engine-components/postprocessing/index.js +5 -5
- package/lib/engine-components/postprocessing/utils.d.ts +11 -11
- package/lib/engine-components/postprocessing/utils.js +37 -37
- package/lib/engine-components/timeline/PlayableDirector.d.ts +163 -163
- package/lib/engine-components/timeline/PlayableDirector.js +686 -686
- package/lib/engine-components/timeline/SignalAsset.d.ts +24 -24
- package/lib/engine-components/timeline/SignalAsset.js +130 -130
- package/lib/engine-components/timeline/TimelineModels.d.ts +89 -89
- package/lib/engine-components/timeline/TimelineModels.js +22 -22
- package/lib/engine-components/timeline/TimelineTracks.d.ts +110 -110
- package/lib/engine-components/timeline/TimelineTracks.js +879 -879
- package/lib/engine-components/timeline/index.d.ts +4 -4
- package/lib/engine-components/timeline/index.js +3 -3
- package/lib/engine-components/ui/BaseUIComponent.d.ts +48 -48
- package/lib/engine-components/ui/BaseUIComponent.js +170 -170
- package/lib/engine-components/ui/Button.d.ts +64 -64
- package/lib/engine-components/ui/Button.js +315 -315
- package/lib/engine-components/ui/Canvas.d.ts +74 -74
- package/lib/engine-components/ui/Canvas.js +407 -407
- package/lib/engine-components/ui/CanvasGroup.d.ts +19 -19
- package/lib/engine-components/ui/CanvasGroup.js +58 -58
- package/lib/engine-components/ui/EventSystem.d.ts +125 -125
- package/lib/engine-components/ui/EventSystem.js +764 -764
- package/lib/engine-components/ui/Graphic.d.ts +55 -55
- package/lib/engine-components/ui/Graphic.js +255 -255
- package/lib/engine-components/ui/Image.d.ts +35 -35
- package/lib/engine-components/ui/Image.js +116 -116
- package/lib/engine-components/ui/InputField.d.ts +42 -42
- package/lib/engine-components/ui/InputField.js +268 -268
- package/lib/engine-components/ui/Interfaces.d.ts +38 -38
- package/lib/engine-components/ui/Interfaces.js +12 -12
- package/lib/engine-components/ui/Layout.d.ts +84 -84
- package/lib/engine-components/ui/Layout.js +330 -330
- package/lib/engine-components/ui/Outline.d.ts +7 -7
- package/lib/engine-components/ui/Outline.js +20 -20
- package/lib/engine-components/ui/PointerEvents.d.ts +115 -115
- package/lib/engine-components/ui/PointerEvents.js +145 -145
- package/lib/engine-components/ui/RaycastUtils.d.ts +11 -11
- package/lib/engine-components/ui/RaycastUtils.js +67 -67
- package/lib/engine-components/ui/Raycaster.d.ts +30 -30
- package/lib/engine-components/ui/Raycaster.js +95 -95
- package/lib/engine-components/ui/RectTransform.d.ts +61 -61
- package/lib/engine-components/ui/RectTransform.js +356 -356
- package/lib/engine-components/ui/SpatialHtml.d.ts +8 -8
- package/lib/engine-components/ui/SpatialHtml.js +79 -79
- package/lib/engine-components/ui/Symbols.d.ts +1 -1
- package/lib/engine-components/ui/Symbols.js +1 -1
- package/lib/engine-components/ui/Text.d.ts +78 -78
- package/lib/engine-components/ui/Text.js +539 -539
- package/lib/engine-components/ui/Utils.d.ts +24 -24
- package/lib/engine-components/ui/Utils.js +90 -90
- package/lib/engine-components/ui/index.d.ts +1 -1
- package/lib/engine-components/ui/index.js +1 -1
- package/lib/engine-components/utils/EnvironmentScene.d.ts +5 -5
- package/lib/engine-components/utils/EnvironmentScene.js +205 -205
- package/lib/engine-components/utils/LookAt.d.ts +31 -31
- package/lib/engine-components/utils/LookAt.js +82 -82
- package/lib/engine-components/utils/OpenURL.d.ts +42 -42
- package/lib/engine-components/utils/OpenURL.js +119 -119
- package/lib/engine-components/webxr/Avatar.d.ts +25 -25
- package/lib/engine-components/webxr/Avatar.js +255 -255
- package/lib/engine-components/webxr/TeleportTarget.d.ts +7 -7
- package/lib/engine-components/webxr/TeleportTarget.js +7 -7
- package/lib/engine-components/webxr/WebARCameraBackground.d.ts +30 -30
- package/lib/engine-components/webxr/WebARCameraBackground.js +155 -155
- package/lib/engine-components/webxr/WebARSessionRoot.d.ts +98 -98
- package/lib/engine-components/webxr/WebARSessionRoot.js +770 -770
- package/lib/engine-components/webxr/WebXR.d.ts +232 -232
- package/lib/engine-components/webxr/WebXR.js +561 -561
- package/lib/engine-components/webxr/WebXRAvatar.d.ts +27 -27
- package/lib/engine-components/webxr/WebXRAvatar.js +44 -44
- package/lib/engine-components/webxr/WebXRImageTracking.d.ts +86 -86
- package/lib/engine-components/webxr/WebXRImageTracking.js +470 -470
- package/lib/engine-components/webxr/WebXRPlaneTracking.d.ts +92 -92
- package/lib/engine-components/webxr/WebXRPlaneTracking.js +500 -500
- package/lib/engine-components/webxr/WebXRRig.d.ts +32 -32
- package/lib/engine-components/webxr/WebXRRig.js +72 -72
- package/lib/engine-components/webxr/XRFlag.d.ts +38 -38
- package/lib/engine-components/webxr/XRFlag.js +139 -139
- package/lib/engine-components/webxr/controllers/XRControllerFollow.d.ts +47 -47
- package/lib/engine-components/webxr/controllers/XRControllerFollow.js +120 -120
- package/lib/engine-components/webxr/controllers/XRControllerModel.d.ts +43 -43
- package/lib/engine-components/webxr/controllers/XRControllerModel.js +351 -351
- package/lib/engine-components/webxr/controllers/XRControllerMovement.d.ts +78 -78
- package/lib/engine-components/webxr/controllers/XRControllerMovement.js +506 -506
- package/lib/engine-components/webxr/index.d.ts +3 -3
- package/lib/engine-components/webxr/index.js +3 -3
- package/lib/engine-components/webxr/types.d.ts +3 -3
- package/lib/engine-components/webxr/types.js +1 -1
- package/lib/engine-components-experimental/Presentation.d.ts +6 -6
- package/lib/engine-components-experimental/Presentation.js +9 -9
- package/lib/engine-components-experimental/api.d.ts +4 -4
- package/lib/engine-components-experimental/api.js +4 -4
- package/lib/engine-components-experimental/networking/PlayerSync.d.ts +156 -156
- package/lib/engine-components-experimental/networking/PlayerSync.js +377 -377
- package/lib/engine-schemes/api.d.ts +12 -12
- package/lib/engine-schemes/api.js +12 -12
- package/lib/engine-schemes/schemes.d.ts +7 -7
- package/lib/engine-schemes/schemes.js +19 -19
- package/lib/engine-schemes/synced-camera-model.d.ts +25 -25
- package/lib/engine-schemes/synced-camera-model.js +67 -67
- package/lib/engine-schemes/synced-transform-model.d.ts +31 -31
- package/lib/engine-schemes/synced-transform-model.js +66 -66
- package/lib/engine-schemes/transform.d.ts +12 -12
- package/lib/engine-schemes/transform.js +39 -39
- package/lib/engine-schemes/vec2.d.ts +10 -10
- package/lib/engine-schemes/vec2.js +25 -25
- package/lib/engine-schemes/vec3.d.ts +11 -11
- package/lib/engine-schemes/vec3.js +29 -29
- package/lib/engine-schemes/vec4.d.ts +12 -12
- package/lib/engine-schemes/vec4.js +33 -33
- package/lib/engine-schemes/vr-user-state-buffer.d.ts +37 -37
- package/lib/engine-schemes/vr-user-state-buffer.js +110 -110
- package/lib/include/three/EXT_mesh_gpu_instancing_exporter.d.ts +6 -6
- package/lib/include/three/EXT_mesh_gpu_instancing_exporter.js +45 -45
- package/lib/needle-engine.d.ts +7 -7
- package/lib/needle-engine.js +64 -64
- package/package.json +1 -1
- package/plugins/common/buildinfo.js +64 -64
- package/plugins/common/cloud.js +1 -1
- package/plugins/common/config.cjs +31 -31
- package/plugins/common/config.js +35 -35
- package/plugins/common/files.js +31 -31
- package/plugins/common/generator.js +10 -10
- package/plugins/common/license.js +405 -365
- package/plugins/common/npm.js +15 -15
- package/plugins/common/timers.js +7 -7
- package/plugins/common/version.js +37 -37
- package/plugins/gltf-packer.mjs +1 -1
- package/plugins/next/alias.cjs +39 -39
- package/plugins/next/license.cjs +18 -18
- package/plugins/next/meshbvhworker.cjs +18 -18
- package/plugins/next/next.js +128 -128
- package/plugins/types/index.d.ts +2 -2
- package/plugins/types/license.d.ts +24 -24
- package/plugins/types/needleConfig.d.ts +27 -27
- package/plugins/types/userconfig.d.ts +113 -110
- package/plugins/types/webmanifest.d.ts +32 -32
- package/plugins/vite/alias.js +174 -174
- package/plugins/vite/asap.js +245 -245
- package/plugins/vite/build-pipeline.js +355 -355
- package/plugins/vite/build.js +19 -19
- package/plugins/vite/buildinfo.js +41 -41
- package/plugins/vite/config.js +106 -106
- package/plugins/vite/copyfiles.js +138 -138
- package/plugins/vite/defines.js +68 -66
- package/plugins/vite/dependencies.js +232 -223
- package/plugins/vite/dependency-watcher.js +231 -231
- package/plugins/vite/drop-client.js +76 -76
- package/plugins/vite/drop.js +87 -87
- package/plugins/vite/editor-connection.js +124 -124
- package/plugins/vite/facebook-instant-games.js +102 -102
- package/plugins/vite/gzip.js +5 -5
- package/plugins/vite/imports-logger.js +143 -143
- package/plugins/vite/index.js +139 -139
- package/plugins/vite/license.js +56 -55
- package/plugins/vite/meta.js +163 -163
- package/plugins/vite/npm.js +7 -7
- package/plugins/vite/peer.js +29 -29
- package/plugins/vite/poster-client.js +73 -73
- package/plugins/vite/poster.js +79 -79
- package/plugins/vite/pwa.js +604 -604
- package/plugins/vite/reload-client.js +15 -15
- package/plugins/vite/reload.js +363 -363
- package/plugins/vite/server.js +66 -66
- package/plugins/vite/transform-codegen.js +55 -55
- package/plugins/vite/transform.js +31 -31
- package/plugins/vite/vite-4.4-hack.js +31 -31
- package/src/asap/needle-asap.ts +111 -111
- package/src/asap/sessiongranted.ts +75 -75
- package/src/asap/utils.ts +4 -4
- package/src/engine/analytics/index.ts +10 -10
- package/src/engine/analytics/lcp.ts +35 -35
- package/src/engine/api.ts +81 -81
- package/src/engine/assets/index.ts +59 -59
- package/src/engine/assets/static.js +5 -5
- package/src/engine/codegen/register_types.ts +300 -300
- package/src/engine/debug/debug.ts +51 -51
- package/src/engine/debug/debug_console.ts +333 -333
- package/src/engine/debug/debug_overlay.ts +332 -332
- package/src/engine/debug/debug_spatial_console.ts +429 -429
- package/src/engine/debug/index.ts +1 -1
- package/src/engine/engine_addressables.ts +680 -680
- package/src/engine/engine_animation.ts +145 -145
- package/src/engine/engine_application.ts +113 -113
- package/src/engine/engine_assetdatabase.ts +387 -387
- package/src/engine/engine_audio.ts +24 -24
- package/src/engine/engine_camera.ts +39 -39
- package/src/engine/engine_components.ts +374 -374
- package/src/engine/engine_components_internal.ts +40 -40
- package/src/engine/engine_constants.ts +52 -52
- package/src/engine/engine_context.ts +1798 -1686
- package/src/engine/engine_context_registry.ts +129 -129
- package/src/engine/engine_coroutine.ts +54 -54
- package/src/engine/engine_create_objects.ts +398 -398
- package/src/engine/engine_default_parameters.ts +3 -3
- package/src/engine/engine_editor-sync.ts +28 -28
- package/src/engine/engine_element.ts +872 -872
- package/src/engine/engine_element_attributes.ts +85 -85
- package/src/engine/engine_element_extras.ts +16 -16
- package/src/engine/engine_element_loading.ts +381 -381
- package/src/engine/engine_element_overlay.ts +186 -186
- package/src/engine/engine_fileloader.js +9 -9
- package/src/engine/engine_gameobject.ts +691 -691
- package/src/engine/engine_generic_utils.js +13 -13
- package/src/engine/engine_gizmos.ts +577 -577
- package/src/engine/engine_gltf.ts +29 -29
- package/src/engine/engine_gltf_builtin_components.ts +403 -403
- package/src/engine/engine_hot_reload.ts +198 -198
- package/src/engine/engine_input.ts +1460 -1460
- package/src/engine/engine_input_utils.ts +23 -23
- package/src/engine/engine_instancing.ts +45 -45
- package/src/engine/engine_license.ts +378 -378
- package/src/engine/engine_lifecycle_api.ts +106 -106
- package/src/engine/engine_lifecycle_functions_internal.ts +193 -193
- package/src/engine/engine_lightdata.ts +117 -117
- package/src/engine/engine_loaders.ts +82 -82
- package/src/engine/engine_lods.ts +168 -168
- package/src/engine/engine_mainloop_utils.ts +472 -472
- package/src/engine/engine_math.ts +282 -282
- package/src/engine/engine_modules.ts +83 -83
- package/src/engine/engine_networking.ts +841 -841
- package/src/engine/engine_networking_auto.ts +352 -352
- package/src/engine/engine_networking_blob.ts +275 -275
- package/src/engine/engine_networking_files.ts +217 -217
- package/src/engine/engine_networking_files_default_components.ts +58 -58
- package/src/engine/engine_networking_instantiate.ts +419 -419
- package/src/engine/engine_networking_peer.ts +159 -159
- package/src/engine/engine_networking_streams.ts +713 -713
- package/src/engine/engine_networking_types.ts +24 -24
- package/src/engine/engine_networking_utils.ts +23 -23
- package/src/engine/engine_networking_websocket.ts +2 -2
- package/src/engine/engine_patcher.ts +199 -199
- package/src/engine/engine_physics.ts +783 -783
- package/src/engine/engine_physics.types.ts +46 -46
- package/src/engine/engine_physics_rapier.ts +1577 -1577
- package/src/engine/engine_playerview.ts +80 -80
- package/src/engine/engine_scenelighting.ts +294 -294
- package/src/engine/engine_scenetools.ts +365 -365
- package/src/engine/engine_serialization.ts +2 -2
- package/src/engine/engine_serialization_builtin_serializer.ts +473 -473
- package/src/engine/engine_serialization_core.ts +710 -710
- package/src/engine/engine_serialization_decorator.ts +80 -80
- package/src/engine/engine_setup.ts +1 -1
- package/src/engine/engine_shaders.ts +267 -267
- package/src/engine/engine_shims.ts +32 -32
- package/src/engine/engine_test_utils.ts +109 -109
- package/src/engine/engine_texture.ts +82 -82
- package/src/engine/engine_three_utils.ts +849 -849
- package/src/engine/engine_time.ts +94 -94
- package/src/engine/engine_time_utils.ts +237 -237
- package/src/engine/engine_tonemapping.ts +210 -210
- package/src/engine/engine_types.ts +714 -714
- package/src/engine/engine_typestore.ts +63 -63
- package/src/engine/engine_util_decorator.ts +136 -136
- package/src/engine/engine_utils.ts +972 -972
- package/src/engine/engine_utils_format.ts +212 -212
- package/src/engine/engine_utils_screenshot.ts +698 -698
- package/src/engine/engine_utils_screenshot.xr.ts +103 -103
- package/src/engine/export/gltf/Writers.ts +34 -34
- package/src/engine/export/gltf/index.ts +158 -158
- package/src/engine/export/index.ts +2 -2
- package/src/engine/export/state.ts +19 -19
- package/src/engine/export/utils.ts +9 -9
- package/src/engine/extensions/EXT_texture_exr.ts +50 -50
- package/src/engine/extensions/NEEDLE_animator_controller_model.ts +195 -195
- package/src/engine/extensions/NEEDLE_components.ts +268 -268
- package/src/engine/extensions/NEEDLE_gameobject_data.ts +81 -81
- package/src/engine/extensions/NEEDLE_lighting_settings.ts +185 -185
- package/src/engine/extensions/NEEDLE_lightmaps.ts +119 -119
- package/src/engine/extensions/NEEDLE_persistent_assets.ts +76 -76
- package/src/engine/extensions/NEEDLE_render_objects.ts +209 -209
- package/src/engine/extensions/NEEDLE_techniques_webgl.ts +640 -640
- package/src/engine/extensions/extension_resolver.ts +4 -4
- package/src/engine/extensions/extension_utils.ts +166 -166
- package/src/engine/extensions/extensions.ts +135 -135
- package/src/engine/extensions/index.ts +5 -5
- package/src/engine/extensions/usage_tracker.ts +100 -100
- package/src/engine/js-extensions/Camera.ts +37 -37
- package/src/engine/js-extensions/ExtensionUtils.ts +85 -85
- package/src/engine/js-extensions/Layers.ts +23 -23
- package/src/engine/js-extensions/Object3D.ts +296 -296
- package/src/engine/js-extensions/RGBAColor.ts +126 -125
- package/src/engine/js-extensions/Vector.ts +18 -18
- package/src/engine/js-extensions/index.ts +4 -4
- package/src/engine/physics/workers/mesh-bvh/GenerateMeshBVHWorker.js +122 -122
- package/src/engine/shaders/shaderData.ts +67 -67
- package/src/engine/tests/test_utils.ts +63 -63
- package/src/engine/webcomponents/WebXRButtons.ts +260 -260
- package/src/engine/webcomponents/api.ts +6 -6
- package/src/engine/webcomponents/buttons.ts +262 -262
- package/src/engine/webcomponents/fonts.ts +41 -41
- package/src/engine/webcomponents/icons.ts +57 -57
- package/src/engine/webcomponents/index.ts +1 -1
- package/src/engine/webcomponents/logo-element.ts +78 -78
- package/src/engine/webcomponents/needle menu/needle-menu-spatial.ts +573 -573
- package/src/engine/webcomponents/needle menu/needle-menu.ts +1118 -1118
- package/src/engine/webcomponents/needle-button.ts +181 -181
- package/src/engine/xr/NeedleXRController.ts +1125 -1125
- package/src/engine/xr/NeedleXRSession.ts +1585 -1585
- package/src/engine/xr/NeedleXRSync.ts +220 -220
- package/src/engine/xr/SceneTransition.ts +78 -78
- package/src/engine/xr/TempXRContext.ts +216 -216
- package/src/engine/xr/XRRig.ts +9 -9
- package/src/engine/xr/api.ts +5 -5
- package/src/engine/xr/events.ts +102 -102
- package/src/engine/xr/internal.ts +34 -34
- package/src/engine/xr/usdz.ts +30 -30
- package/src/engine/xr/utils.ts +39 -39
- package/src/engine-components/AlignmentConstraint.ts +36 -36
- package/src/engine-components/Animation.ts +557 -557
- package/src/engine-components/AnimationCurve.ts +150 -150
- package/src/engine-components/AnimationUtils.ts +28 -28
- package/src/engine-components/AnimationUtilsAutoplay.ts +43 -43
- package/src/engine-components/Animator.ts +397 -397
- package/src/engine-components/AnimatorController.ts +1293 -1293
- package/src/engine-components/AudioListener.ts +92 -92
- package/src/engine-components/AudioSource.ts +644 -644
- package/src/engine-components/AvatarLoader.ts +263 -263
- package/src/engine-components/AxesHelper.ts +59 -59
- package/src/engine-components/BasicIKConstraint.ts +54 -54
- package/src/engine-components/BoxCollider.ts +1 -1
- package/src/engine-components/BoxHelperComponent.ts +114 -114
- package/src/engine-components/Camera.ts +719 -719
- package/src/engine-components/CameraUtils.ts +136 -136
- package/src/engine-components/CharacterController.ts +253 -253
- package/src/engine-components/Collider.ts +374 -374
- package/src/engine-components/Component.ts +1294 -1294
- package/src/engine-components/ContactShadows.ts +482 -482
- package/src/engine-components/DeleteBox.ts +62 -62
- package/src/engine-components/DeviceFlag.ts +46 -46
- package/src/engine-components/DragControls.ts +1623 -1623
- package/src/engine-components/DropListener.ts +698 -698
- package/src/engine-components/Duplicatable.ts +198 -198
- package/src/engine-components/EventList.ts +266 -266
- package/src/engine-components/EventTrigger.ts +74 -74
- package/src/engine-components/EventType.ts +22 -22
- package/src/engine-components/Fog.ts +60 -60
- package/src/engine-components/Gizmos.ts +56 -56
- package/src/engine-components/GridHelper.ts +48 -48
- package/src/engine-components/GroundProjection.ts +356 -356
- package/src/engine-components/Interactable.ts +14 -14
- package/src/engine-components/Joints.ts +52 -52
- package/src/engine-components/LODGroup.ts +153 -153
- package/src/engine-components/Light.ts +558 -558
- package/src/engine-components/LookAtConstraint.ts +25 -25
- package/src/engine-components/NeedleMenu.ts +84 -84
- package/src/engine-components/NestedGltf.ts +86 -86
- package/src/engine-components/Networking.ts +114 -114
- package/src/engine-components/OffsetConstraint.ts +60 -60
- package/src/engine-components/OrbitControls.ts +1069 -1069
- package/src/engine-components/PlayerColor.ts +103 -103
- package/src/engine-components/ReflectionProbe.ts +216 -216
- package/src/engine-components/Renderer.ts +900 -900
- package/src/engine-components/RendererInstancing.ts +855 -855
- package/src/engine-components/RendererLightmap.ts +198 -198
- package/src/engine-components/RigidBody.ts +526 -526
- package/src/engine-components/SceneSwitcher.ts +1030 -1030
- package/src/engine-components/ScreenCapture.ts +592 -592
- package/src/engine-components/ShadowCatcher.ts +172 -172
- package/src/engine-components/Skybox.ts +455 -455
- package/src/engine-components/SmoothFollow.ts +76 -76
- package/src/engine-components/SpatialTrigger.ts +229 -229
- package/src/engine-components/SpectatorCamera.ts +787 -787
- package/src/engine-components/SphereCollider.ts +1 -1
- package/src/engine-components/SpriteRenderer.ts +468 -468
- package/src/engine-components/SyncedCamera.ts +220 -220
- package/src/engine-components/SyncedRoom.ts +380 -380
- package/src/engine-components/SyncedTransform.ts +383 -383
- package/src/engine-components/TestRunner.ts +118 -118
- package/src/engine-components/TransformGizmo.ts +219 -219
- package/src/engine-components/VideoPlayer.ts +1025 -1025
- package/src/engine-components/Voip.ts +363 -363
- package/src/engine-components/api.ts +60 -60
- package/src/engine-components/avatar/AvatarBlink_Simple.ts +69 -69
- package/src/engine-components/avatar/AvatarEyeLook_Rotation.ts +63 -63
- package/src/engine-components/avatar/Avatar_Brain_LookAt.ts +139 -139
- package/src/engine-components/avatar/Avatar_MouthShapes.ts +83 -83
- package/src/engine-components/avatar/Avatar_MustacheShake.ts +31 -31
- package/src/engine-components/codegen/components.ts +217 -217
- package/src/engine-components/debug/LogStats.ts +21 -21
- package/src/engine-components/export/gltf/GltfExport.ts +265 -265
- package/src/engine-components/export/usdz/Extension.ts +24 -24
- package/src/engine-components/export/usdz/ThreeUSDZExporter.ts +2413 -2413
- package/src/engine-components/export/usdz/USDZExporter.ts +705 -705
- package/src/engine-components/export/usdz/extensions/Animation.ts +1204 -1204
- package/src/engine-components/export/usdz/extensions/DocumentExtension.ts +9 -9
- package/src/engine-components/export/usdz/extensions/USDZText.ts +240 -240
- package/src/engine-components/export/usdz/extensions/USDZUI.ts +189 -189
- package/src/engine-components/export/usdz/extensions/behavior/Actions.ts +99 -99
- package/src/engine-components/export/usdz/extensions/behavior/AudioExtension.ts +102 -102
- package/src/engine-components/export/usdz/extensions/behavior/Behaviour.ts +320 -320
- package/src/engine-components/export/usdz/extensions/behavior/BehaviourComponents.ts +1225 -1225
- package/src/engine-components/export/usdz/extensions/behavior/BehavioursBuilder.ts +646 -646
- package/src/engine-components/export/usdz/extensions/behavior/PhysicsExtension.ts +132 -132
- package/src/engine-components/export/usdz/index.ts +2 -2
- package/src/engine-components/export/usdz/utils/animationutils.ts +191 -191
- package/src/engine-components/export/usdz/utils/quicklook.ts +50 -50
- package/src/engine-components/particlesystem/ParticleSystem.ts +1287 -1287
- package/src/engine-components/particlesystem/ParticleSystemModules.ts +1765 -1765
- package/src/engine-components/particlesystem/ParticleSystemSubEmitter.ts +111 -111
- package/src/engine-components/particlesystem/api.ts +1 -1
- package/src/engine-components/postprocessing/Effects/Antialiasing.ts +55 -55
- package/src/engine-components/postprocessing/Effects/BloomEffect.ts +116 -116
- package/src/engine-components/postprocessing/Effects/ChromaticAberration.ts +37 -37
- package/src/engine-components/postprocessing/Effects/ColorAdjustments.ts +95 -95
- package/src/engine-components/postprocessing/Effects/DepthOfField.ts +103 -103
- package/src/engine-components/postprocessing/Effects/EffectWrapper.ts +25 -25
- package/src/engine-components/postprocessing/Effects/Pixelation.ts +32 -32
- package/src/engine-components/postprocessing/Effects/ScreenspaceAmbientOcclusion.ts +90 -90
- package/src/engine-components/postprocessing/Effects/ScreenspaceAmbientOcclusionN8.ts +191 -191
- package/src/engine-components/postprocessing/Effects/Sharpening.ts +138 -138
- package/src/engine-components/postprocessing/Effects/TiltShiftEffect.ts +61 -61
- package/src/engine-components/postprocessing/Effects/Tonemapping.ts +155 -155
- package/src/engine-components/postprocessing/Effects/Vignette.ts +59 -59
- package/src/engine-components/postprocessing/PostProcessingEffect.ts +172 -172
- package/src/engine-components/postprocessing/PostProcessingHandler.ts +398 -398
- package/src/engine-components/postprocessing/Volume.ts +410 -410
- package/src/engine-components/postprocessing/VolumeParameter.ts +158 -158
- package/src/engine-components/postprocessing/VolumeProfile.ts +61 -61
- package/src/engine-components/postprocessing/index.ts +5 -5
- package/src/engine-components/postprocessing/utils.ts +52 -52
- package/src/engine-components/timeline/PlayableDirector.ts +722 -722
- package/src/engine-components/timeline/SignalAsset.ts +144 -144
- package/src/engine-components/timeline/TimelineModels.ts +92 -92
- package/src/engine-components/timeline/TimelineTracks.ts +967 -967
- package/src/engine-components/timeline/index.ts +3 -3
- package/src/engine-components/ui/BaseUIComponent.ts +203 -203
- package/src/engine-components/ui/Button.ts +307 -307
- package/src/engine-components/ui/Canvas.ts +419 -419
- package/src/engine-components/ui/CanvasGroup.ts +54 -54
- package/src/engine-components/ui/EventSystem.ts +853 -853
- package/src/engine-components/ui/Graphic.ts +275 -275
- package/src/engine-components/ui/Image.ts +112 -112
- package/src/engine-components/ui/InputField.ts +321 -321
- package/src/engine-components/ui/Interfaces.ts +57 -57
- package/src/engine-components/ui/Layout.ts +334 -334
- package/src/engine-components/ui/Outline.ts +13 -13
- package/src/engine-components/ui/PointerEvents.ts +206 -206
- package/src/engine-components/ui/RaycastUtils.ts +69 -69
- package/src/engine-components/ui/Raycaster.ts +102 -102
- package/src/engine-components/ui/RectTransform.ts +375 -375
- package/src/engine-components/ui/SpatialHtml.ts +79 -79
- package/src/engine-components/ui/Symbols.ts +1 -1
- package/src/engine-components/ui/Text.ts +578 -578
- package/src/engine-components/ui/Utils.ts +113 -113
- package/src/engine-components/utils/EnvironmentScene.ts +245 -245
- package/src/engine-components/utils/LookAt.ts +88 -88
- package/src/engine-components/utils/OpenURL.ts +114 -114
- package/src/engine-components/webxr/Avatar.ts +265 -265
- package/src/engine-components/webxr/TeleportTarget.ts +9 -9
- package/src/engine-components/webxr/WebARCameraBackground.ts +175 -175
- package/src/engine-components/webxr/WebARSessionRoot.ts +880 -880
- package/src/engine-components/webxr/WebXR.ts +585 -585
- package/src/engine-components/webxr/WebXRAvatar.ts +66 -66
- package/src/engine-components/webxr/WebXRImageTracking.ts +518 -518
- package/src/engine-components/webxr/WebXRPlaneTracking.ts +570 -570
- package/src/engine-components/webxr/WebXRRig.ts +77 -77
- package/src/engine-components/webxr/XRFlag.ts +147 -147
- package/src/engine-components/webxr/controllers/XRControllerFollow.ts +118 -118
- package/src/engine-components/webxr/controllers/XRControllerModel.ts +374 -374
- package/src/engine-components/webxr/controllers/XRControllerMovement.ts +550 -550
- package/src/engine-components/webxr/index.ts +2 -2
- package/src/engine-components/webxr/types.ts +3 -3
- package/src/engine-components-experimental/Presentation.ts +12 -12
- package/src/engine-components-experimental/api.ts +4 -4
- package/src/engine-components-experimental/networking/PlayerSync.ts +401 -401
- package/src/engine-schemes/COMPILE_SCHEMES.bat +3 -3
- package/src/engine-schemes/COMPILE_TS.bat +11 -11
- package/src/engine-schemes/README.md +1 -1
- package/src/engine-schemes/api.ts +12 -12
- package/src/engine-schemes/schemes.ts +28 -28
- package/src/engine-schemes/synced-camera-model.ts +92 -92
- package/src/engine-schemes/synced-transform-model.ts +90 -90
- package/src/engine-schemes/syncedCamera.fbs +10 -10
- package/src/engine-schemes/transform.ts +50 -50
- package/src/engine-schemes/transforms.fbs +25 -25
- package/src/engine-schemes/vec.fbs +19 -19
- package/src/engine-schemes/vec2.ts +33 -33
- package/src/engine-schemes/vec3.ts +38 -38
- package/src/engine-schemes/vec4.ts +43 -43
- package/src/engine-schemes/vr-user-state-buffer.ts +145 -145
- package/src/engine-schemes/vrUserStateBuffer.fbs +17 -17
- package/src/include/draco/draco_decoder.js +34 -34
- package/src/include/ktx2/basis_transcoder.js +21 -21
- package/src/include/needle/arial-msdf.json +1471 -1471
- package/src/include/three/DragControls.js +231 -231
- package/src/include/three/EXT_mesh_gpu_instancing_exporter.js +66 -66
- package/src/needle-engine.ts +70 -70
- package/lib/engine/engine.d.ts +0 -4
- package/lib/engine/engine.js +0 -12
- package/lib/engine/engine.js.map +0 -1
- package/lib/engine/engine_web_api.d.ts +0 -12
- package/lib/engine/engine_web_api.js +0 -113
- package/lib/engine/engine_web_api.js.map +0 -1
- package/lib/engine-components/FlyControls.d.ts +0 -10
- package/lib/engine-components/FlyControls.js +0 -29
- package/lib/engine-components/FlyControls.js.map +0 -1
- package/src/engine-schemes/dist/api.js +0 -17
- package/src/engine-schemes/dist/api.js.meta +0 -7
- package/src/engine-schemes/dist/schemes.js +0 -25
- package/src/engine-schemes/dist/schemes.js.meta +0 -7
- package/src/engine-schemes/dist/synced-camera-model.js +0 -74
- package/src/engine-schemes/dist/synced-camera-model.js.meta +0 -7
- package/src/engine-schemes/dist/synced-transform-model.js +0 -73
- package/src/engine-schemes/dist/synced-transform-model.js.meta +0 -7
- package/src/engine-schemes/dist/transform.js +0 -46
- package/src/engine-schemes/dist/transform.js.meta +0 -7
- package/src/engine-schemes/dist/vec2.js +0 -32
- package/src/engine-schemes/dist/vec2.js.meta +0 -7
- package/src/engine-schemes/dist/vec3.js +0 -36
- package/src/engine-schemes/dist/vec3.js.meta +0 -7
- package/src/engine-schemes/dist/vec4.js +0 -40
- package/src/engine-schemes/dist/vec4.js.meta +0 -7
- package/src/engine-schemes/dist/vr-user-state-buffer.js +0 -110
- package/src/engine-schemes/dist/vr-user-state-buffer.js.meta +0 -7
|
@@ -1803,18 +1803,18 @@ function AC() {
|
|
|
1803
1803
|
return s || null;
|
|
1804
1804
|
}
|
|
1805
1805
|
const $0 = x("debugdefines");
|
|
1806
|
-
Mo('if(!globalThis[""4.4.
|
|
1806
|
+
Mo('if(!globalThis[""4.4.2""]) globalThis[""4.4.2""] = "0.0.0";');
|
|
1807
1807
|
Mo('if(!globalThis[""undefined""]) globalThis[""undefined""] = "unknown";');
|
|
1808
|
-
Mo('if(!globalThis[""Thu Apr
|
|
1809
|
-
Mo('if(!globalThis[""
|
|
1810
|
-
Mo('globalThis["__NEEDLE_ENGINE_VERSION__"] = "4.4.
|
|
1808
|
+
Mo('if(!globalThis[""Thu Apr 24 2025 21:36:18 GMT+0700 (Indochina Time)""]) globalThis[""Thu Apr 24 2025 21:36:18 GMT+0700 (Indochina Time)""] = "unknown";');
|
|
1809
|
+
Mo('if(!globalThis[""npk_ad8e492e31253a2800d563522e42a7311d0d7b766ac4ec1f64d3b425f06eacbd""]) globalThis[""npk_ad8e492e31253a2800d563522e42a7311d0d7b766ac4ec1f64d3b425f06eacbd""] = "unknown";');
|
|
1810
|
+
Mo('globalThis["__NEEDLE_ENGINE_VERSION__"] = "4.4.2";');
|
|
1811
1811
|
Mo('globalThis["__NEEDLE_ENGINE_GENERATOR__"] = "undefined";');
|
|
1812
|
-
Mo('globalThis["__NEEDLE_PROJECT_BUILD_TIME__"] = "Thu Apr
|
|
1813
|
-
Mo('globalThis["__NEEDLE_PUBLIC_KEY__"] = "
|
|
1814
|
-
const Nn = "4.4.
|
|
1812
|
+
Mo('globalThis["__NEEDLE_PROJECT_BUILD_TIME__"] = "Thu Apr 24 2025 21:36:18 GMT+0700 (Indochina Time)";');
|
|
1813
|
+
Mo('globalThis["__NEEDLE_PUBLIC_KEY__"] = "npk_ad8e492e31253a2800d563522e42a7311d0d7b766ac4ec1f64d3b425f06eacbd";');
|
|
1814
|
+
const Nn = "4.4.2", vg = "undefined", W0 = "Thu Apr 24 2025 21:36:18 GMT+0700 (Indochina Time)";
|
|
1815
1815
|
$0 && console.log(`Engine version: ${Nn} (generator: ${vg})
|
|
1816
1816
|
Project built at ${W0}`);
|
|
1817
|
-
const fd = "
|
|
1817
|
+
const fd = "npk_ad8e492e31253a2800d563522e42a7311d0d7b766ac4ec1f64d3b425f06eacbd", yo = "needle_isActiveInHierarchy", sa = "builtin_components", pd = "needle_editor_guid";
|
|
1818
1818
|
function Mo(s) {
|
|
1819
1819
|
try {
|
|
1820
1820
|
(0, eval)(s);
|
|
@@ -7549,11 +7549,9 @@ Object.getOwnPropertyDescriptor(L.prototype, "worldUp") || Object.defineProperty
|
|
|
7549
7549
|
aO(L);
|
|
7550
7550
|
class le extends ce {
|
|
7551
7551
|
constructor(e, i, n, o) {
|
|
7552
|
-
|
|
7553
|
-
|
|
7554
|
-
|
|
7555
|
-
};
|
|
7556
|
-
i != null && n != null ? (t(e, i, n), this.alpha = o) : (t(e), this.alpha = 1);
|
|
7552
|
+
super();
|
|
7553
|
+
r(this, "alpha", 1);
|
|
7554
|
+
typeof e == "number" && typeof i == "number" && typeof n == "number" ? (this.set(e, i, n), this.alpha = typeof o == "number" ? o : 1) : e !== void 0 && (this.set(e), this.alpha = 1);
|
|
7557
7555
|
}
|
|
7558
7556
|
get isRGBAColor() {
|
|
7559
7557
|
return !0;
|
|
@@ -10692,21 +10690,61 @@ const ke = class {
|
|
|
10692
10690
|
r(this, "xr", null);
|
|
10693
10691
|
r(this, "_xrFrame", null);
|
|
10694
10692
|
r(this, "_currentFrameEvent", -1);
|
|
10693
|
+
/**
|
|
10694
|
+
* The scene contains all objects in the hierarchy and is automatically rendered by the context every frane.
|
|
10695
|
+
*/
|
|
10695
10696
|
r(this, "scene");
|
|
10697
|
+
/**
|
|
10698
|
+
* The renderer is used to render the scene. It is automatically created when the context is created.
|
|
10699
|
+
*/
|
|
10696
10700
|
r(this, "renderer");
|
|
10701
|
+
/**
|
|
10702
|
+
* The effect composer can be used to render postprocessing effects. If assigned then it will automatically render the scene every frame.
|
|
10703
|
+
*/
|
|
10697
10704
|
r(this, "composer", null);
|
|
10698
|
-
|
|
10705
|
+
/**
|
|
10706
|
+
* @internal All known components. Don't use directly
|
|
10707
|
+
*/
|
|
10699
10708
|
r(this, "scripts", []);
|
|
10709
|
+
/**
|
|
10710
|
+
* @internal All paused components. Don't use directly
|
|
10711
|
+
*/
|
|
10700
10712
|
r(this, "scripts_pausedChanged", []);
|
|
10701
|
-
|
|
10713
|
+
/**
|
|
10714
|
+
* @internal All components that have a early update event. Don't use directly
|
|
10715
|
+
*/
|
|
10702
10716
|
r(this, "scripts_earlyUpdate", []);
|
|
10717
|
+
/**
|
|
10718
|
+
* @internal All components that have a update event. Don't use directly
|
|
10719
|
+
*/
|
|
10703
10720
|
r(this, "scripts_update", []);
|
|
10721
|
+
/**
|
|
10722
|
+
* @internal All components that have a late update event. Don't use directly
|
|
10723
|
+
*/
|
|
10704
10724
|
r(this, "scripts_lateUpdate", []);
|
|
10725
|
+
/**
|
|
10726
|
+
* @internal All components that have a onBeforeRender event. Don't use directly
|
|
10727
|
+
*/
|
|
10705
10728
|
r(this, "scripts_onBeforeRender", []);
|
|
10729
|
+
/**
|
|
10730
|
+
* @internal All components that have a onAfterRender event. Don't use directly
|
|
10731
|
+
*/
|
|
10706
10732
|
r(this, "scripts_onAfterRender", []);
|
|
10733
|
+
/**
|
|
10734
|
+
* @internal All components that have coroutines. Don't use directly
|
|
10735
|
+
*/
|
|
10707
10736
|
r(this, "scripts_WithCorroutines", []);
|
|
10737
|
+
/**
|
|
10738
|
+
* @internal Components with immersive-vr event methods. Don't use directly
|
|
10739
|
+
*/
|
|
10708
10740
|
r(this, "scripts_immersive_vr", []);
|
|
10741
|
+
/**
|
|
10742
|
+
* @internal Components with immersive-ar event methods. Don't use directly
|
|
10743
|
+
*/
|
|
10709
10744
|
r(this, "scripts_immersive_ar", []);
|
|
10745
|
+
/**
|
|
10746
|
+
* @internal Coroutine data
|
|
10747
|
+
*/
|
|
10710
10748
|
r(this, "coroutines", {});
|
|
10711
10749
|
/** callbacks called once after the context has been created */
|
|
10712
10750
|
r(this, "post_setup_callbacks", []);
|
|
@@ -10718,20 +10756,30 @@ const ke = class {
|
|
|
10718
10756
|
r(this, "post_render_callbacks", []);
|
|
10719
10757
|
/** called every frame befroe update (this list is emptied every frame) */
|
|
10720
10758
|
r(this, "pre_update_oneshot_callbacks", []);
|
|
10759
|
+
/** @internal */
|
|
10721
10760
|
r(this, "new_scripts", []);
|
|
10761
|
+
/** @internal */
|
|
10722
10762
|
r(this, "new_script_start", []);
|
|
10763
|
+
/** @internal */
|
|
10723
10764
|
r(this, "new_scripts_pre_setup_callbacks", []);
|
|
10765
|
+
/** @internal */
|
|
10724
10766
|
r(this, "new_scripts_post_setup_callbacks", []);
|
|
10767
|
+
/** @internal */
|
|
10725
10768
|
r(this, "new_scripts_xr", []);
|
|
10726
|
-
/**
|
|
10769
|
+
/**
|
|
10770
|
+
* The **main camera component** of the scene - this camera is used for rendering.
|
|
10771
|
+
* Use `setCurrentCamera` for updating the main camera.
|
|
10772
|
+
*/
|
|
10727
10773
|
r(this, "mainCameraComponent");
|
|
10728
10774
|
r(this, "_mainCamera", null);
|
|
10729
10775
|
r(this, "_fallbackCamera", null);
|
|
10776
|
+
/** access application state (e.g. if all audio should be muted) */
|
|
10730
10777
|
r(this, "application");
|
|
10731
10778
|
/** access animation mixer used by components in the scene */
|
|
10732
10779
|
r(this, "animations");
|
|
10733
10780
|
/** access timings (current frame number, deltaTime, timeScale, ...) */
|
|
10734
10781
|
r(this, "time");
|
|
10782
|
+
/** access input data (e.g. click or touch events) */
|
|
10735
10783
|
r(this, "input");
|
|
10736
10784
|
/** access physics related methods (e.g. raycasting). To access the phyiscs engine use `context.physics.engine` */
|
|
10737
10785
|
r(this, "physics");
|
|
@@ -10741,12 +10789,14 @@ const ke = class {
|
|
|
10741
10789
|
* @deprecated AssetDataBase is deprecated
|
|
10742
10790
|
*/
|
|
10743
10791
|
r(this, "assets");
|
|
10792
|
+
/** The main light in the scene */
|
|
10744
10793
|
r(this, "mainLight", null);
|
|
10745
10794
|
r(this, "sceneLighting");
|
|
10746
10795
|
r(this, "addressables");
|
|
10747
10796
|
r(this, "lightmaps");
|
|
10748
10797
|
r(this, "players");
|
|
10749
10798
|
r(this, "lodsManager");
|
|
10799
|
+
/** Access the needle menu to add or remove buttons to the menu element */
|
|
10750
10800
|
r(this, "menu");
|
|
10751
10801
|
r(this, "_needsUpdateSize", !1);
|
|
10752
10802
|
r(this, "_isCreated", !1);
|
|
@@ -10854,29 +10904,46 @@ const ke = class {
|
|
|
10854
10904
|
get domHeight() {
|
|
10855
10905
|
return this.isInAR ? window.innerHeight : this.domElement.clientHeight;
|
|
10856
10906
|
}
|
|
10857
|
-
/** the X position of the
|
|
10907
|
+
/** the X position of the `<needle-engine>` element on the website */
|
|
10858
10908
|
get domX() {
|
|
10859
10909
|
return this.calculateBoundingClientRect(), this._domX;
|
|
10860
10910
|
}
|
|
10861
|
-
/** the Y position of the
|
|
10911
|
+
/** the Y position of the `<needle-engine>` element on the website */
|
|
10862
10912
|
get domY() {
|
|
10863
10913
|
return this.calculateBoundingClientRect(), this._domY;
|
|
10864
10914
|
}
|
|
10915
|
+
/**
|
|
10916
|
+
* Is a XR session currently active and presenting?
|
|
10917
|
+
* @returns true if the xr renderer is currently presenting
|
|
10918
|
+
*/
|
|
10865
10919
|
get isInXR() {
|
|
10866
10920
|
var t, e;
|
|
10867
10921
|
return ((e = (t = this.renderer) == null ? void 0 : t.xr) == null ? void 0 : e.isPresenting) || !1;
|
|
10868
10922
|
}
|
|
10923
|
+
/**
|
|
10924
|
+
* Shorthand for `this.xr?.mode`. AR or VR
|
|
10925
|
+
* @returns the current XR session mode (immersive-vr or immersive-ar)
|
|
10926
|
+
*/
|
|
10869
10927
|
get xrSessionMode() {
|
|
10870
10928
|
var t;
|
|
10871
10929
|
return (t = this.xr) == null ? void 0 : t.mode;
|
|
10872
10930
|
}
|
|
10931
|
+
/** Shorthand for `this.xrSessionMode === "immersive-vr"`
|
|
10932
|
+
* @returns true if a webxr VR session is currently active.
|
|
10933
|
+
*/
|
|
10873
10934
|
get isInVR() {
|
|
10874
10935
|
return this.xrSessionMode === "immersive-vr";
|
|
10875
10936
|
}
|
|
10937
|
+
/**
|
|
10938
|
+
* Shorthand for `this.xrSessionMode === "immersive-ar"`
|
|
10939
|
+
* @returns true if a webxr AR session is currently active.
|
|
10940
|
+
*/
|
|
10876
10941
|
get isInAR() {
|
|
10877
10942
|
return this.xrSessionMode === "immersive-ar";
|
|
10878
10943
|
}
|
|
10879
|
-
/** If a XR session is active and in pass through mode (immersive-ar on e.g. Quest)
|
|
10944
|
+
/** If a XR session is active and in pass through mode (immersive-ar on e.g. Quest)
|
|
10945
|
+
* @returns true if the XR session is in pass through mode
|
|
10946
|
+
*/
|
|
10880
10947
|
get isInPassThrough() {
|
|
10881
10948
|
return this.xr ? this.xr.isPassThrough : !1;
|
|
10882
10949
|
}
|
|
@@ -10896,15 +10963,23 @@ const ke = class {
|
|
|
10896
10963
|
var t, e;
|
|
10897
10964
|
return this.renderer.xr.isPresenting ? (e = (t = this.renderer) == null ? void 0 : t.xr) == null ? void 0 : e.getCamera() : void 0;
|
|
10898
10965
|
}
|
|
10966
|
+
/**
|
|
10967
|
+
* The AR overlay element is used to display 2D HTML elements while a AR session is active.
|
|
10968
|
+
*/
|
|
10899
10969
|
get arOverlayElement() {
|
|
10900
10970
|
const t = this.domElement;
|
|
10901
10971
|
return typeof t.getAROverlayContainer == "function" ? t.getAROverlayContainer() : this.domElement;
|
|
10902
10972
|
}
|
|
10903
|
-
/**
|
|
10973
|
+
/**
|
|
10974
|
+
* Current event of the update cycle (e.g. `FrameEvent.EarlyUpdate` or `FrameEvent.OnBeforeRender`)
|
|
10975
|
+
*/
|
|
10904
10976
|
get currentFrameEvent() {
|
|
10905
10977
|
return this._currentFrameEvent;
|
|
10906
10978
|
}
|
|
10907
|
-
/**
|
|
10979
|
+
/**
|
|
10980
|
+
* The main camera of the scene - this camera is used for rendering
|
|
10981
|
+
* Use `setCurrentCamera` for updating the main camera.
|
|
10982
|
+
*/
|
|
10908
10983
|
get mainCamera() {
|
|
10909
10984
|
if (this._mainCamera)
|
|
10910
10985
|
return this._mainCamera;
|
|
@@ -10922,21 +10997,27 @@ const ke = class {
|
|
|
10922
10997
|
get rendererData() {
|
|
10923
10998
|
return this.sceneLighting;
|
|
10924
10999
|
}
|
|
11000
|
+
/** @returns true if the context is fully created and ready */
|
|
10925
11001
|
get isCreated() {
|
|
10926
11002
|
return this._isCreated;
|
|
10927
11003
|
}
|
|
10928
|
-
/**
|
|
11004
|
+
/**
|
|
11005
|
+
* Calling this function will dispose the current renderer and create a new one which will then be assigned to the context. It can be used to create a new renderer with custom WebGLRendererParameters.
|
|
11006
|
+
* **Note**: Instead you can also modify the static `Context.DefaultWebGlRendererParameters` before the context is created.
|
|
11007
|
+
* **Note**: This method is recommended because it re-uses an potentially already existing canvas element. This is necessary to keep input event handlers from working (e.g. components like OrbitControls subscribe to input events on the canvas)
|
|
11008
|
+
* @returns {WebGLRenderer} the newly created renderer
|
|
11009
|
+
*/
|
|
10929
11010
|
createNewRenderer(t) {
|
|
10930
11011
|
var e, i, n;
|
|
10931
11012
|
if ((e = this.renderer) == null || e.dispose(), t = { ...ke.DefaultWebGLRendererParameters, ...t }, !t.canvas) {
|
|
10932
11013
|
const o = (n = (i = this.domElement) == null ? void 0 : i.shadowRoot) == null ? void 0 : n.querySelector("canvas");
|
|
10933
11014
|
o && (t.canvas = o, st && console.log("Using canvas from shadow root", o));
|
|
10934
11015
|
}
|
|
10935
|
-
st && console.log("Using Renderer Parameters:", t, this.domElement), this.renderer = new kr(t), this.renderer.debug.checkShaderErrors = z() || x("checkshadererrors") === !0, this.renderer.toneMappingExposure = 1, this.renderer.toneMapping = ja, this.renderer.setClearColor(new ce("lightgrey"), 0), this.renderer.shadowMap.enabled = !0, this.renderer.shadowMap.type = Gx, this.renderer.setSize(this.domWidth, this.domHeight), this.renderer.outputColorSpace = Es, this.renderer.nodes = {
|
|
11016
|
+
return st && console.log("Using Renderer Parameters:", t, this.domElement), this.renderer = new kr(t), this.renderer.debug.checkShaderErrors = z() || x("checkshadererrors") === !0, this.renderer.toneMappingExposure = 1, this.renderer.toneMapping = ja, this.renderer.setClearColor(new ce("lightgrey"), 0), this.renderer.shadowMap.enabled = !0, this.renderer.shadowMap.type = Gx, this.renderer.setSize(this.domWidth, this.domHeight), this.renderer.outputColorSpace = Es, this.renderer.nodes = {
|
|
10936
11017
|
library: new qx(),
|
|
10937
11018
|
modelViewMatrix: null,
|
|
10938
11019
|
modelNormalViewMatrix: null
|
|
10939
|
-
}, this.lodsManager.setRenderer(this.renderer), this.input.bindEvents();
|
|
11020
|
+
}, this.lodsManager.setRenderer(this.renderer), this.input.bindEvents(), this.renderer;
|
|
10940
11021
|
}
|
|
10941
11022
|
internalOnUpdateVisible() {
|
|
10942
11023
|
var t, e;
|
|
@@ -10958,7 +11039,9 @@ const ke = class {
|
|
|
10958
11039
|
set devicePixelRatio(t) {
|
|
10959
11040
|
t !== this._devicePixelRatio && (this._devicePixelRatio = t, this._needsUpdateSize = !0);
|
|
10960
11041
|
}
|
|
10961
|
-
/**
|
|
11042
|
+
/**
|
|
11043
|
+
* Update the renderer and canvas size. This is also automatically called when a DOM size change is detected.
|
|
11044
|
+
*/
|
|
10962
11045
|
updateSize(t = !1) {
|
|
10963
11046
|
var e, i, n;
|
|
10964
11047
|
if (t || !this.isManagedExternally && ((e = this.renderer.xr) == null ? void 0 : e.isPresenting) === !1) {
|
|
@@ -10972,6 +11055,9 @@ const ke = class {
|
|
|
10972
11055
|
h !== void 0 && this.renderer.setPixelRatio(h), this.composer && ((i = this.composer.setSize) == null || i.call(this.composer, a, l), h !== void 0 && "setPixelRatio" in this.composer && typeof this.composer.setPixelRatio == "function" && ((n = this.composer.setPixelRatio) == null || n.call(this.composer, window.devicePixelRatio)));
|
|
10973
11056
|
}
|
|
10974
11057
|
}
|
|
11058
|
+
/**
|
|
11059
|
+
* Update the camera aspect ratio or orthorgraphic camera size. This is automatically called when a DOM size change is detected.
|
|
11060
|
+
*/
|
|
10975
11061
|
updateAspect(t, e, i) {
|
|
10976
11062
|
if (!t)
|
|
10977
11063
|
return;
|
|
@@ -10995,6 +11081,7 @@ const ke = class {
|
|
|
10995
11081
|
async onCreate(t) {
|
|
10996
11082
|
return this.create(t);
|
|
10997
11083
|
}
|
|
11084
|
+
/** @internal */
|
|
10998
11085
|
async create(t) {
|
|
10999
11086
|
try {
|
|
11000
11087
|
this._isCreating = !0, t !== this._originalCreationArgs && (this._originalCreationArgs = ku(t)), window.addEventListener("unhandledrejection", this.onUnhandledRejection);
|
|
@@ -11008,12 +11095,19 @@ const ke = class {
|
|
|
11008
11095
|
onError(t) {
|
|
11009
11096
|
this.domElement.dispatchEvent(new CustomEvent("error", { detail: t }));
|
|
11010
11097
|
}
|
|
11011
|
-
/**
|
|
11098
|
+
/**
|
|
11099
|
+
* Clears the context and destroys all scenes and objects in the scene.
|
|
11100
|
+
* The ContextCleared event is called at the end.
|
|
11101
|
+
* This is automatically called when e.g. the `src` attribute changes on `<needle-engine>`
|
|
11102
|
+
* or when the web component is removed from the DOM
|
|
11012
11103
|
*/
|
|
11013
11104
|
clear() {
|
|
11014
11105
|
var t, e, i, n;
|
|
11015
11106
|
pe.dispatchCallback(me.ContextClearing, this), On(this, me.ContextClearing), nn(this.scene, !0, !0), this.scene = new Ri(), (t = this.addressables) == null || t.dispose(), (e = this.lightmaps) == null || e.clear(), (n = (i = this.physics) == null ? void 0 : i.engine) == null || n.clearCaches(), this.lodsManager.disable(), this.isManagedExternally || this.renderer && (this.renderer.renderLists.dispose(), this.renderer.state.reset(), this.renderer.resetState()), pe.dispatchCallback(me.ContextCleared, this);
|
|
11016
11107
|
}
|
|
11108
|
+
/**
|
|
11109
|
+
* Dispose all allocated resources and clears the scene. This is automatically called e.g. when the `<needle-engine>` component is removed from the DOM.
|
|
11110
|
+
*/
|
|
11017
11111
|
dispose() {
|
|
11018
11112
|
this.internalOnDestroy();
|
|
11019
11113
|
}
|
|
@@ -11032,17 +11126,20 @@ const ke = class {
|
|
|
11032
11126
|
}
|
|
11033
11127
|
(e = this.domElement) != null && e.parentElement && this.domElement.parentElement.removeChild(this.domElement), this._isCreated = !1, pe.dispatchCallback(me.ContextDestroyed, this), On(this, me.ContextDestroyed), pe.unregister(this), ke.Current === this && (ke.Current = null);
|
|
11034
11128
|
}
|
|
11129
|
+
/** @internal Automatically called by components when you call `startCoroutine`. Use `startCoroutine` instead */
|
|
11035
11130
|
registerCoroutineUpdate(t, e, i) {
|
|
11036
11131
|
return typeof (e == null ? void 0 : e.next) != "function" ? (console.error("Registered invalid coroutine function from " + t.name + `
|
|
11037
11132
|
Coroutine functions must be generators: "*myCoroutine() {...}"
|
|
11038
11133
|
Start a coroutine from a component by calling "this.startCoroutine(myCoroutine())"`), e) : (this.coroutines[i] || (this.coroutines[i] = []), this.coroutines[i].push({ comp: t, main: e }), e);
|
|
11039
11134
|
}
|
|
11135
|
+
/** @internal Automatically called by components. */
|
|
11040
11136
|
unregisterCoroutineUpdate(t, e) {
|
|
11041
11137
|
if (!this.coroutines[e])
|
|
11042
11138
|
return;
|
|
11043
11139
|
const i = this.coroutines[e].findIndex((n) => n.main === t);
|
|
11044
11140
|
i >= 0 && this.coroutines[e].splice(i, 1);
|
|
11045
11141
|
}
|
|
11142
|
+
/** @internal Automatically called */
|
|
11046
11143
|
stopAllCoroutinesFrom(t) {
|
|
11047
11144
|
for (const e in this.coroutines) {
|
|
11048
11145
|
const i = this.coroutines[e];
|
|
@@ -11050,6 +11147,7 @@ Start a coroutine from a component by calling "this.startCoroutine(myCoroutine()
|
|
|
11050
11147
|
i[n].comp === t && i.splice(n, 1);
|
|
11051
11148
|
}
|
|
11052
11149
|
}
|
|
11150
|
+
/** Change the main camera */
|
|
11053
11151
|
setCurrentCamera(t) {
|
|
11054
11152
|
var n;
|
|
11055
11153
|
if (!t)
|
|
@@ -11063,6 +11161,9 @@ Start a coroutine from a component by calling "this.startCoroutine(myCoroutine()
|
|
|
11063
11161
|
const i = t.threeCamera;
|
|
11064
11162
|
i.isPerspectiveCamera && this.updateAspect(i), (n = this.mainCameraComponent) == null || n.applyClearFlagsIfIsActiveCamera();
|
|
11065
11163
|
}
|
|
11164
|
+
/**
|
|
11165
|
+
* Remove the camera from the mainCamera stack (if it has been set before with `setCurrentCamera`)
|
|
11166
|
+
*/
|
|
11066
11167
|
removeCamera(t) {
|
|
11067
11168
|
if (!t)
|
|
11068
11169
|
return;
|
|
@@ -11072,21 +11173,33 @@ Start a coroutine from a component by calling "this.startCoroutine(myCoroutine()
|
|
|
11072
11173
|
this.setCurrentCamera(i);
|
|
11073
11174
|
}
|
|
11074
11175
|
}
|
|
11075
|
-
/**
|
|
11176
|
+
/** Use to subscribe to onBeforeRender events on threejs objects.
|
|
11177
|
+
* @link https://threejs.org/docs/#api/en/core/Object3D.onBeforeRender
|
|
11178
|
+
*/
|
|
11076
11179
|
addBeforeRenderListener(t, e) {
|
|
11077
11180
|
this._onBeforeRenderListeners.has(t.uuid) || (this._onBeforeRenderListeners.set(t.uuid, []), t.onBeforeRender = this._createRenderCallbackWrapper(t, this._onBeforeRenderListeners)), this._onBeforeRenderListeners.get(t.uuid).push(e);
|
|
11078
11181
|
}
|
|
11182
|
+
/** Remove callback from three `onBeforeRender` event (if it has been added with `addBeforeRenderListener(...)`)
|
|
11183
|
+
* @link https://threejs.org/docs/#api/en/core/Object3D.onBeforeRender
|
|
11184
|
+
*/
|
|
11079
11185
|
removeBeforeRenderListener(t, e) {
|
|
11080
11186
|
if (this._onBeforeRenderListeners.has(t.uuid)) {
|
|
11081
11187
|
const i = this._onBeforeRenderListeners.get(t.uuid), n = i.indexOf(e);
|
|
11082
11188
|
n >= 0 && i.splice(n, 1);
|
|
11083
11189
|
}
|
|
11084
11190
|
}
|
|
11085
|
-
/**
|
|
11191
|
+
/**
|
|
11192
|
+
* Subscribe to onAfterRender events on threejs objects
|
|
11193
|
+
* @link https://threejs.org/docs/#api/en/core/Object3D.onAfterRender
|
|
11194
|
+
*/
|
|
11086
11195
|
addAfterRenderListener(t, e) {
|
|
11087
11196
|
var i;
|
|
11088
11197
|
this._onAfterRenderListeners.has(t.uuid) || (this._onAfterRenderListeners.set(t.uuid, []), t.onAfterRender = this._createRenderCallbackWrapper(t, this._onAfterRenderListeners)), (i = this._onAfterRenderListeners.get(t.uuid)) == null || i.push(e);
|
|
11089
11198
|
}
|
|
11199
|
+
/**
|
|
11200
|
+
* Remove from onAfterRender events on threejs objects
|
|
11201
|
+
* @link https://threejs.org/docs/#api/en/core/Object3D.onAfterRender
|
|
11202
|
+
*/
|
|
11090
11203
|
removeAfterRenderListener(t, e) {
|
|
11091
11204
|
if (this._onAfterRenderListeners.has(t.uuid)) {
|
|
11092
11205
|
const i = this._onAfterRenderListeners.get(t.uuid), n = i.indexOf(e);
|
|
@@ -11103,6 +11216,7 @@ Start a coroutine from a component by calling "this.startCoroutine(myCoroutine()
|
|
|
11103
11216
|
}
|
|
11104
11217
|
};
|
|
11105
11218
|
}
|
|
11219
|
+
/** @returns true while the WebGL renderer is rendering (between onBeforeRender and onAfterRender events) */
|
|
11106
11220
|
get isRendering() {
|
|
11107
11221
|
return this._isRendering;
|
|
11108
11222
|
}
|
|
@@ -11120,7 +11234,7 @@ Start a coroutine from a component by calling "this.startCoroutine(myCoroutine()
|
|
|
11120
11234
|
var t;
|
|
11121
11235
|
return ((t = this._renderTarget) == null ? void 0 : t.texture) || null;
|
|
11122
11236
|
}
|
|
11123
|
-
/** returns true if the
|
|
11237
|
+
/** @returns true if the `<needle-engine>` DOM element is visible on screen (`context.domElement`) */
|
|
11124
11238
|
get isVisibleToUser() {
|
|
11125
11239
|
if (this.isInXR)
|
|
11126
11240
|
return !0;
|
|
@@ -20745,13 +20859,13 @@ typeof window < "u" && window.addEventListener("unhandledrejection", (s) => {
|
|
|
20745
20859
|
});
|
|
20746
20860
|
const ss = gt, Hh = "$___Export_Components", JR = "NEEDLE_components";
|
|
20747
20861
|
var jI;
|
|
20748
|
-
class
|
|
20862
|
+
class e2 {
|
|
20749
20863
|
constructor() {
|
|
20750
20864
|
r(this, jI);
|
|
20751
20865
|
}
|
|
20752
20866
|
}
|
|
20753
20867
|
jI = sa;
|
|
20754
|
-
class
|
|
20868
|
+
class t2 {
|
|
20755
20869
|
constructor(t, e, i) {
|
|
20756
20870
|
r(this, "node");
|
|
20757
20871
|
r(this, "nodeIndex");
|
|
@@ -20808,7 +20922,7 @@ class tw {
|
|
|
20808
20922
|
writeNode(t, e) {
|
|
20809
20923
|
const i = this.writer.json.nodes.length;
|
|
20810
20924
|
ss && console.log(t.name, i, t.uuid);
|
|
20811
|
-
const n = new
|
|
20925
|
+
const n = new t2(t, i, e);
|
|
20812
20926
|
this.exportContext[i] = n, this.objectToNodeMap[t.uuid] = i;
|
|
20813
20927
|
}
|
|
20814
20928
|
afterParse(t) {
|
|
@@ -20818,7 +20932,7 @@ class tw {
|
|
|
20818
20932
|
const n = this.exportContext[i], o = n.node, a = n.nodeDef, l = n.nodeIndex, c = (e = o.userData) == null ? void 0 : e.components;
|
|
20819
20933
|
if (!c || c.length <= 0)
|
|
20820
20934
|
continue;
|
|
20821
|
-
const h = new
|
|
20935
|
+
const h = new e2();
|
|
20822
20936
|
a.extensions = a.extensions || {}, a.extensions[this.name] = h, this.context.object = o, this.context.nodeId = l, this.context.objectToNode = this.objectToNodeMap;
|
|
20823
20937
|
const d = [];
|
|
20824
20938
|
for (const u of c) {
|
|
@@ -20913,7 +21027,7 @@ class tw {
|
|
|
20913
21027
|
// }
|
|
20914
21028
|
}
|
|
20915
21029
|
const ub = "NEEDLE_gameobject_data";
|
|
20916
|
-
class
|
|
21030
|
+
class i2 {
|
|
20917
21031
|
constructor(t) {
|
|
20918
21032
|
r(this, "parser");
|
|
20919
21033
|
this.parser = t;
|
|
@@ -20958,7 +21072,7 @@ class ik {
|
|
|
20958
21072
|
}
|
|
20959
21073
|
}
|
|
20960
21074
|
const fb = "NEEDLE_lighting_settings", la = x("debugenvlight");
|
|
20961
|
-
class
|
|
21075
|
+
class n2 {
|
|
20962
21076
|
constructor(t, e, i) {
|
|
20963
21077
|
r(this, "parser");
|
|
20964
21078
|
r(this, "sourceId");
|
|
@@ -21052,10 +21166,10 @@ class Dm extends I {
|
|
|
21052
21166
|
}
|
|
21053
21167
|
}
|
|
21054
21168
|
const lp = x("debugstencil");
|
|
21055
|
-
function
|
|
21169
|
+
function s2(s, t) {
|
|
21056
21170
|
return (s & 1 << t.layer) != 0;
|
|
21057
21171
|
}
|
|
21058
|
-
const
|
|
21172
|
+
const o2 = Symbol("stencils"), nr = class {
|
|
21059
21173
|
constructor(t, e) {
|
|
21060
21174
|
r(this, "parser");
|
|
21061
21175
|
r(this, "source");
|
|
@@ -21074,13 +21188,13 @@ const ok = Symbol("stencils"), nr = class {
|
|
|
21074
21188
|
if (i)
|
|
21075
21189
|
for (let n = i.length - 1; n >= 0; n--) {
|
|
21076
21190
|
const o = i[n];
|
|
21077
|
-
if (
|
|
21191
|
+
if (s2(o.layer, t)) {
|
|
21078
21192
|
lp && console.log(o), setTimeout(() => {
|
|
21079
21193
|
ui() && Ig(t.gameObject) && (ve("Stencil not supported on instanced objects"), console.warn("Stencil not supported on instanced objects", t));
|
|
21080
21194
|
}, 500);
|
|
21081
21195
|
for (let a = 0; a < t.sharedMaterials.length; a++) {
|
|
21082
21196
|
let l = t.sharedMaterials[a];
|
|
21083
|
-
l && (l = l.clone(), l[
|
|
21197
|
+
l && (l = l.clone(), l[o2] = !0, l.stencilWrite = !0, l.stencilWriteMask = 255, l.stencilFuncMask = 255, l.stencilRef = o.value, l.stencilFunc = o.compareFunc, l.stencilZPass = o.passOp, l.stencilFail = o.failOp, l.stencilZFail = o.zFailOp, t.sharedMaterials[a] = l);
|
|
21084
21198
|
}
|
|
21085
21199
|
t.gameObject.renderOrder = o.event * 1e3 + o.index * 50;
|
|
21086
21200
|
break;
|
|
@@ -21090,14 +21204,14 @@ const ok = Symbol("stencils"), nr = class {
|
|
|
21090
21204
|
afterRoot(t) {
|
|
21091
21205
|
const e = this.parser.json.extensions;
|
|
21092
21206
|
if (e) {
|
|
21093
|
-
const i = e[
|
|
21207
|
+
const i = e[a2];
|
|
21094
21208
|
if (i) {
|
|
21095
21209
|
lp && console.log(i);
|
|
21096
21210
|
const n = i.stencil;
|
|
21097
21211
|
if (n && Array.isArray(n))
|
|
21098
21212
|
for (const o of n) {
|
|
21099
21213
|
const a = { ...o };
|
|
21100
|
-
a.compareFunc =
|
|
21214
|
+
a.compareFunc = r2(a.compareFunc), a.passOp = cp(a.passOp), a.failOp = cp(a.failOp), a.zFailOp = cp(a.zFailOp), nr.stencils[this.source] || (nr.stencils[this.source] = []), nr.stencils[this.source].push(a);
|
|
21101
21215
|
}
|
|
21102
21216
|
}
|
|
21103
21217
|
}
|
|
@@ -21127,7 +21241,7 @@ function cp(s) {
|
|
|
21127
21241
|
}
|
|
21128
21242
|
return 0;
|
|
21129
21243
|
}
|
|
21130
|
-
function
|
|
21244
|
+
function r2(s) {
|
|
21131
21245
|
switch (s) {
|
|
21132
21246
|
case 1:
|
|
21133
21247
|
return Uy;
|
|
@@ -21148,10 +21262,10 @@ function rk(s) {
|
|
|
21148
21262
|
}
|
|
21149
21263
|
return Uy;
|
|
21150
21264
|
}
|
|
21151
|
-
const
|
|
21265
|
+
const a2 = "NEEDLE_render_objects";
|
|
21152
21266
|
var iw = /* @__PURE__ */ ((s) => (s[s.INT = 5124] = "INT", s[s.FLOAT = 5126] = "FLOAT", s[s.FLOAT_VEC2 = 35664] = "FLOAT_VEC2", s[s.FLOAT_VEC3 = 35665] = "FLOAT_VEC3", s[s.FLOAT_VEC4 = 35666] = "FLOAT_VEC4", s[s.INT_VEC2 = 35667] = "INT_VEC2", s[s.INT_VEC3 = 35668] = "INT_VEC3", s[s.INT_VEC4 = 35669] = "INT_VEC4", s[s.BOOL = 35670] = "BOOL", s[s.BOOL_VEC2 = 35671] = "BOOL_VEC2", s[s.BOOL_VEC3 = 35672] = "BOOL_VEC3", s[s.BOOL_VEC4 = 35673] = "BOOL_VEC4", s[s.FLOAT_MAT2 = 35674] = "FLOAT_MAT2", s[s.FLOAT_MAT3 = 35675] = "FLOAT_MAT3", s[s.FLOAT_MAT4 = 35676] = "FLOAT_MAT4", s[s.SAMPLER_2D = 35678] = "SAMPLER_2D", s[s.SAMPLER_3D = 35680] = "SAMPLER_3D", s[s.SAMPLER_CUBE = 35681] = "SAMPLER_CUBE", s[s.UNKNOWN = 0] = "UNKNOWN", s))(iw || {});
|
|
21153
21267
|
const Tn = x("debugcustomshader"), qr = "NEEDLE_techniques_webgl";
|
|
21154
|
-
class
|
|
21268
|
+
class l2 {
|
|
21155
21269
|
constructor() {
|
|
21156
21270
|
r(this, "objectToWorldMatrix", new se());
|
|
21157
21271
|
r(this, "worldToObjectMatrix", new se());
|
|
@@ -21198,7 +21312,7 @@ const Be = class extends a0 {
|
|
|
21198
21312
|
r(this, "_worldToObjectName", "hlslcc_mtx4x4unity_WorldToObject");
|
|
21199
21313
|
r(this, "_viewProjectionName", "hlslcc_mtx4x4unity_MatrixVP");
|
|
21200
21314
|
r(this, "_viewMatrixName", "hlslcc_mtx4x4unity_MatrixV");
|
|
21201
|
-
r(this, "_rendererData", new
|
|
21315
|
+
r(this, "_rendererData", new l2());
|
|
21202
21316
|
this.identifier = e, Tn && console.log(this), this.type = "NEEDLE_CUSTOM_SHADER", this.uniforms[this._objToWorldName] || (this.uniforms[this._objToWorldName] = { value: [] }), this.uniforms[this._worldToObjectName] || (this.uniforms[this._worldToObjectName] = { value: [] }), this.uniforms[this._viewProjectionName] || (this.uniforms[this._viewProjectionName] = { value: [] }), this.uniforms[this._sphericalHarmonicsName], (this.depthTextureUniform || this.opaqueTextureUniform) && ee.Current.pre_render_callbacks.push(this.onBeforeRenderSceneCallback);
|
|
21203
21317
|
}
|
|
21204
21318
|
clone() {
|
|
@@ -21279,7 +21393,7 @@ const Be = class extends a0 {
|
|
|
21279
21393
|
};
|
|
21280
21394
|
let Vi = Be;
|
|
21281
21395
|
r(Vi, "viewProjection", new se()), r(Vi, "_viewProjectionValues", []), r(Vi, "viewMatrix", new se()), r(Vi, "_viewMatrixValues", []), r(Vi, "_worldSpaceCameraPosName", "_WorldSpaceCameraPos"), r(Vi, "_worldSpaceCameraPos", new v()), r(Vi, "_mainLightColor", new ge()), r(Vi, "_mainLightPosition", new v()), r(Vi, "_lightData", new ge());
|
|
21282
|
-
class
|
|
21396
|
+
class c2 {
|
|
21283
21397
|
constructor(t, e) {
|
|
21284
21398
|
r(this, "parser");
|
|
21285
21399
|
r(this, "identifier");
|
|
@@ -21460,9 +21574,9 @@ function nw(s) {
|
|
|
21460
21574
|
});
|
|
21461
21575
|
}
|
|
21462
21576
|
}
|
|
21463
|
-
const
|
|
21577
|
+
const h2 = x("debugextensions");
|
|
21464
21578
|
let iu;
|
|
21465
|
-
const
|
|
21579
|
+
const d2 = import("./three-examples.js").then((s) => s.GLTFLoaderAnimationPointer).then(async (s) => (iu = s.GLTFAnimationPointerExtension, iu)).catch((s) => {
|
|
21466
21580
|
console.warn("Failed to import GLTFLoaderAnimationPointer. Please use @needle-tools/three for full KHR_animation support", s);
|
|
21467
21581
|
}), Sr = new Array();
|
|
21468
21582
|
function KL(s) {
|
|
@@ -21476,20 +21590,20 @@ function Zg(s) {
|
|
|
21476
21590
|
const t = new tw();
|
|
21477
21591
|
return s.register((e) => (t.parser = e, t)), t;
|
|
21478
21592
|
}
|
|
21479
|
-
class
|
|
21593
|
+
class u2 {
|
|
21480
21594
|
resolvePath(t) {
|
|
21481
21595
|
return t.includes("/extensions/builtin_components/") ? t.replace("/extensions/builtin_components/", "/userData/components/") : t.includes("extensions/builtin_components/") ? t.replace("extensions/builtin_components/", "/userData/components/") : t;
|
|
21482
21596
|
}
|
|
21483
21597
|
}
|
|
21484
21598
|
async function jm(s, t, e) {
|
|
21485
21599
|
const i = e.indexOf("?");
|
|
21486
|
-
i >= 0 && (e = e.substring(0, i)), s.register((n) => new
|
|
21600
|
+
i >= 0 && (e = e.substring(0, i)), s.register((n) => new i2(n)), s.register((n) => new QP(n)), s.register((n) => new OO(n, t.lightmaps, e)), s.register((n) => new n2(n, e, t)), s.register((n) => new c2(n, e)), s.register((n) => new _c(n, e)), s.register((n) => new Ze(n, e)), s.register((n) => new ZR(n)), SP() && s.register((n) => new dc(n)), await d2.catch((n) => {
|
|
21487
21601
|
}), s.register((n) => {
|
|
21488
21602
|
if (iu) {
|
|
21489
21603
|
const o = new iu(n);
|
|
21490
|
-
return o.setAnimationPointerResolver.bind(o)(new
|
|
21604
|
+
return o.setAnimationPointerResolver.bind(o)(new u2()), o;
|
|
21491
21605
|
} else
|
|
21492
|
-
return (
|
|
21606
|
+
return (h2 || z()) && console.error("Missing KHR_animation_pointer extension..."), {
|
|
21493
21607
|
name: "KHR_animation_pointer_NOT_AVAILABLE"
|
|
21494
21608
|
};
|
|
21495
21609
|
});
|
|
@@ -21528,12 +21642,12 @@ class rw {
|
|
|
21528
21642
|
}, n[this.name] = !0;
|
|
21529
21643
|
}
|
|
21530
21644
|
}
|
|
21531
|
-
var
|
|
21532
|
-
for (var n = i > 1 ? void 0 : i ?
|
|
21645
|
+
var f2 = Object.defineProperty, p2 = Object.getOwnPropertyDescriptor, aw = (s, t, e, i) => {
|
|
21646
|
+
for (var n = i > 1 ? void 0 : i ? p2(t, e) : t, o = s.length - 1, a; o >= 0; o--)
|
|
21533
21647
|
(a = s[o]) && (n = (i ? a(t, e, n) : a(n)) || n);
|
|
21534
|
-
return i && n &&
|
|
21648
|
+
return i && n && f2(t, e, n), n;
|
|
21535
21649
|
};
|
|
21536
|
-
const Ll = x("debugreflectionprobe"), pb = x("noreflectionprobe"),
|
|
21650
|
+
const Ll = x("debugreflectionprobe"), pb = x("noreflectionprobe"), m2 = Symbol("reflectionProbeKey"), g2 = Symbol("original material");
|
|
21537
21651
|
var ad;
|
|
21538
21652
|
const cs = (ad = class extends I {
|
|
21539
21653
|
constructor() {
|
|
@@ -21613,7 +21727,7 @@ const cs = (ad = class extends I {
|
|
|
21613
21727
|
d.version = o.version, a ? (a.copy = d, a.material = o) : (a = {
|
|
21614
21728
|
material: o,
|
|
21615
21729
|
copy: d
|
|
21616
|
-
}, e.push(a)), d[
|
|
21730
|
+
}, e.push(a)), d[m2] = this, d[g2] = o, Ll && console.log("Set reflection", t.name, t.guid);
|
|
21617
21731
|
}
|
|
21618
21732
|
a && a.copy && (a.copy.onBeforeCompile = o.onBeforeCompile);
|
|
21619
21733
|
const h = a == null ? void 0 : a.copy;
|
|
@@ -22122,20 +22236,20 @@ Texture:`, i), this.setLightmapDebugMaterial()) : Xr && console.log("Use debugli
|
|
|
22122
22236
|
});
|
|
22123
22237
|
}
|
|
22124
22238
|
}
|
|
22125
|
-
var
|
|
22126
|
-
for (var n = i > 1 ? void 0 : i ?
|
|
22239
|
+
var y2 = Object.defineProperty, _2 = Object.getOwnPropertyDescriptor, Ns = (s, t, e, i) => {
|
|
22240
|
+
for (var n = i > 1 ? void 0 : i ? _2(t, e) : t, o = s.length - 1, a; o >= 0; o--)
|
|
22127
22241
|
(a = s[o]) && (n = (i ? a(t, e, n) : a(n)) || n);
|
|
22128
|
-
return i && n &&
|
|
22242
|
+
return i && n && y2(t, e, n), n;
|
|
22129
22243
|
};
|
|
22130
|
-
const Jl = x("debugrenderer"), gb = x("debugskinnedmesh"), yb = x("noinstancing"),
|
|
22131
|
-
class
|
|
22244
|
+
const Jl = x("debugrenderer"), gb = x("debugskinnedmesh"), yb = x("noinstancing"), b2 = x("wireframe");
|
|
22245
|
+
class v2 {
|
|
22132
22246
|
constructor() {
|
|
22133
22247
|
r(this, "path", null);
|
|
22134
22248
|
r(this, "asset", null);
|
|
22135
22249
|
r(this, "default");
|
|
22136
22250
|
}
|
|
22137
22251
|
}
|
|
22138
|
-
class
|
|
22252
|
+
class w2 {
|
|
22139
22253
|
constructor(t, e) {
|
|
22140
22254
|
r(this, "_renderer");
|
|
22141
22255
|
r(this, "_targets", []);
|
|
@@ -22348,7 +22462,7 @@ const Od = class extends I {
|
|
|
22348
22462
|
}
|
|
22349
22463
|
//@ts-ignore
|
|
22350
22464
|
get sharedMaterials() {
|
|
22351
|
-
return (!this._sharedMaterials || !this._sharedMaterials.is(this)) && (this._originalMaterials || (this._originalMaterials = []), this._sharedMaterials = new
|
|
22465
|
+
return (!this._sharedMaterials || !this._sharedMaterials.is(this)) && (this._originalMaterials || (this._originalMaterials = []), this._sharedMaterials = new w2(this, this._originalMaterials)), this._sharedMaterials;
|
|
22352
22466
|
}
|
|
22353
22467
|
static get shouldSuppressInstancing() {
|
|
22354
22468
|
return yb;
|
|
@@ -22390,7 +22504,7 @@ const Od = class extends I {
|
|
|
22390
22504
|
}
|
|
22391
22505
|
} else
|
|
22392
22506
|
this.isMeshOrSkinnedMesh(this.gameObject) ? (this.context.addBeforeRenderListener(this.gameObject, this.onBeforeRenderThree), this.renderOrder !== void 0 && this.renderOrder.length > 0 && (this.gameObject.renderOrder = this.renderOrder[0])) : this.context.addBeforeRenderListener(this.gameObject, this.onBeforeRenderThree);
|
|
22393
|
-
if (this.applyLightmapping(),
|
|
22507
|
+
if (this.applyLightmapping(), b2)
|
|
22394
22508
|
for (let t = 0; t < this.sharedMaterials.length; t++) {
|
|
22395
22509
|
const e = this.sharedMaterials[t];
|
|
22396
22510
|
e && (e.wireframe = !0);
|
|
@@ -22624,10 +22738,10 @@ class cw extends Ku {
|
|
|
22624
22738
|
this._needUpdateBoundingSphere = !0;
|
|
22625
22739
|
}
|
|
22626
22740
|
}
|
|
22627
|
-
var
|
|
22628
|
-
for (var n = i > 1 ? void 0 : i ?
|
|
22741
|
+
var x2 = Object.defineProperty, S2 = Object.getOwnPropertyDescriptor, hw = (s, t, e, i) => {
|
|
22742
|
+
for (var n = i > 1 ? void 0 : i ? S2(t, e) : t, o = s.length - 1, a; o >= 0; o--)
|
|
22629
22743
|
(a = s[o]) && (n = (i ? a(t, e, n) : a(n)) || n);
|
|
22630
|
-
return i && n &&
|
|
22744
|
+
return i && n && x2(t, e, n), n;
|
|
22631
22745
|
};
|
|
22632
22746
|
const Gh = x("debuggltfexport");
|
|
22633
22747
|
class dw extends wi {
|
|
@@ -22770,8 +22884,8 @@ typeof globalThis !== void 0 && !("OffscreenCanvas" in globalThis) && (globalThi
|
|
|
22770
22884
|
}), this.canvas;
|
|
22771
22885
|
}
|
|
22772
22886
|
});
|
|
22773
|
-
const
|
|
22774
|
-
function
|
|
22887
|
+
const C2 = x("debugprogress");
|
|
22888
|
+
function P2(s) {
|
|
22775
22889
|
s = s || /* @__PURE__ */ new Date();
|
|
22776
22890
|
const t = s.getMonth() + 1, e = s.getDate(), i = s.getHours(), n = s.getMinutes(), o = s.getSeconds(), a = (t < 10 ? "0" : "") + t, l = (e < 10 ? "0" : "") + e, c = (i < 10 ? "0" : "") + i, h = (n < 10 ? "0" : "") + n, d = (o < 10 ? "0" : "") + o;
|
|
22777
22891
|
return s.getFullYear() + a + l + "-" + c + h + d;
|
|
@@ -22819,7 +22933,7 @@ class de {
|
|
|
22819
22933
|
*/
|
|
22820
22934
|
static start(t, e) {
|
|
22821
22935
|
typeof e == "string" && (e = { parentScope: e });
|
|
22822
|
-
const i = new
|
|
22936
|
+
const i = new O2(t, e);
|
|
22823
22937
|
ec.set(t, i);
|
|
22824
22938
|
}
|
|
22825
22939
|
/** Report progress for a formerly started scope.
|
|
@@ -22858,7 +22972,7 @@ class de {
|
|
|
22858
22972
|
}
|
|
22859
22973
|
}
|
|
22860
22974
|
const ec = /* @__PURE__ */ new Map();
|
|
22861
|
-
class
|
|
22975
|
+
class O2 {
|
|
22862
22976
|
constructor(t, e) {
|
|
22863
22977
|
r(this, "scopeLabel");
|
|
22864
22978
|
r(this, "parentScope");
|
|
@@ -22873,7 +22987,7 @@ class Ok {
|
|
|
22873
22987
|
r(this, "totalProgress", 0);
|
|
22874
22988
|
r(this, "selfReports", 0);
|
|
22875
22989
|
r(this, "totalReports", 0);
|
|
22876
|
-
this.parentScope = e != null && e.parentScope ? ec.get(e.parentScope) : void 0, this.parentScope && (this.parentScope.childScopes.push(this), this.parentDepth = this.parentScope.parentDepth + 1), this.scopeLabel = " ".repeat(this.parentDepth * 2) + t, this.showLogs = (e == null ? void 0 : e.logTimings) ?? !!
|
|
22990
|
+
this.parentScope = e != null && e.parentScope ? ec.get(e.parentScope) : void 0, this.parentScope && (this.parentScope.childScopes.push(this), this.parentDepth = this.parentScope.parentDepth + 1), this.scopeLabel = " ".repeat(this.parentDepth * 2) + t, this.showLogs = (e == null ? void 0 : e.logTimings) ?? !!C2, this.showLogs && console.time(this.scopeLabel), this.onProgress = e == null ? void 0 : e.onProgress;
|
|
22877
22991
|
}
|
|
22878
22992
|
report(t, e = !1) {
|
|
22879
22993
|
if (t) {
|
|
@@ -22937,7 +23051,7 @@ function pw(s) {
|
|
|
22937
23051
|
}
|
|
22938
23052
|
return e;
|
|
22939
23053
|
}
|
|
22940
|
-
const
|
|
23054
|
+
const M2 = new v(), R2 = new W(), k2 = new v(1, 1, 1), sr = class {
|
|
22941
23055
|
constructor(t, e, i = null, n = null, o = null, a = null, l = null, c = null) {
|
|
22942
23056
|
r(this, "uuid");
|
|
22943
23057
|
r(this, "name");
|
|
@@ -22973,7 +23087,7 @@ const Mk = new v(), Rk = new W(), kk = new v(1, 1, 1), sr = class {
|
|
|
22973
23087
|
if (!this.transform)
|
|
22974
23088
|
return new se();
|
|
22975
23089
|
const { position: t, quaternion: e, scale: i } = this.transform, n = new se();
|
|
22976
|
-
return n.compose(t ||
|
|
23090
|
+
return n.compose(t || M2, e || R2, i || k2), n;
|
|
22977
23091
|
}
|
|
22978
23092
|
setMatrix(t) {
|
|
22979
23093
|
if (!t || !(t instanceof se)) {
|
|
@@ -23128,7 +23242,7 @@ ${d}
|
|
|
23128
23242
|
}
|
|
23129
23243
|
const Qr = `
|
|
23130
23244
|
`, Ht = "</StageRoot/Materials";
|
|
23131
|
-
class
|
|
23245
|
+
class T2 {
|
|
23132
23246
|
constructor() {
|
|
23133
23247
|
r(this, "str");
|
|
23134
23248
|
r(this, "indent");
|
|
@@ -23162,7 +23276,7 @@ class Tk {
|
|
|
23162
23276
|
return e + t;
|
|
23163
23277
|
}
|
|
23164
23278
|
}
|
|
23165
|
-
class
|
|
23279
|
+
class A2 {
|
|
23166
23280
|
constructor(t, e, i) {
|
|
23167
23281
|
r(this, "root");
|
|
23168
23282
|
r(this, "exporter");
|
|
@@ -23190,7 +23304,7 @@ class hp {
|
|
|
23190
23304
|
r(this, "exportInvisible", !1);
|
|
23191
23305
|
}
|
|
23192
23306
|
}
|
|
23193
|
-
let
|
|
23307
|
+
let E2 = class {
|
|
23194
23308
|
constructor() {
|
|
23195
23309
|
r(this, "debug");
|
|
23196
23310
|
r(this, "pruneUnusedNodes");
|
|
@@ -23203,7 +23317,7 @@ let Ek = class {
|
|
|
23203
23317
|
async parse(t, e = new hp()) {
|
|
23204
23318
|
var w, P;
|
|
23205
23319
|
e = Object.assign(new hp(), e), this.sceneAnchoringOptions = e;
|
|
23206
|
-
const i = new
|
|
23320
|
+
const i = new A2(t, this, e);
|
|
23207
23321
|
this.extensions = i.extensions;
|
|
23208
23322
|
const n = i.files, o = "model.usda";
|
|
23209
23323
|
n[o] = null;
|
|
@@ -23235,7 +23349,7 @@ let Ek = class {
|
|
|
23235
23349
|
this.debug && _b(i.document, "Hierarchy BEFORE pruning", k), yw(i.document, k), this.debug && _b(i.document, "Hierarchy AFTER pruning");
|
|
23236
23350
|
} else
|
|
23237
23351
|
this.debug && console.log("Pruning of empty nodes is disabled. This may result in a larger USDZ file.");
|
|
23238
|
-
de.report("export-usdz", { message: "Parsing document", autoStep: 10 }), await
|
|
23352
|
+
de.report("export-usdz", { message: "Parsing document", autoStep: 10 }), await I2(i, () => (de.report("export-usdz", "Building materials"), W2(a, l, e.quickLookCompatible))), de.report("export-usdz", "Invoking onAfterSerialize"), await Md(i, "onAfterSerialize");
|
|
23239
23353
|
for (const k of c) {
|
|
23240
23354
|
const { object: O, originalParent: R, newParent: E } = k;
|
|
23241
23355
|
R && R.add(O);
|
|
@@ -23258,8 +23372,8 @@ let Ek = class {
|
|
|
23258
23372
|
};
|
|
23259
23373
|
de.report("export-usdz-textures", { message: "read back texture", autoStep: !0 });
|
|
23260
23374
|
const A = O.scale !== void 0 && O.scale.x !== 1 && O.scale.y !== 1 && O.scale.z !== 1 && O.scale.w !== 1;
|
|
23261
|
-
(R.isCompressedTexture || R.isRenderTargetTexture || A) && (B = await
|
|
23262
|
-
const F = await
|
|
23375
|
+
(R.isCompressedTexture || R.isRenderTargetTexture || A) && (B = await L2(R, e.maxTextureSize, g, O.scale)), de.report("export-usdz-textures", { message: "convert texture to canvas", autoStep: !0 });
|
|
23376
|
+
const F = await j2(B.imageBitmap || B.imageData, e.maxTextureSize).catch((U) => {
|
|
23263
23377
|
console.error("Error converting texture to canvas", R, U);
|
|
23264
23378
|
});
|
|
23265
23379
|
if (F) {
|
|
@@ -23360,7 +23474,7 @@ function yw(s, t) {
|
|
|
23360
23474
|
keptChilds: n
|
|
23361
23475
|
}), c;
|
|
23362
23476
|
}
|
|
23363
|
-
async function
|
|
23477
|
+
async function I2(s, t) {
|
|
23364
23478
|
de.start("export-usdz-resources", "export-usdz");
|
|
23365
23479
|
const e = [];
|
|
23366
23480
|
for (const c of s.document.children)
|
|
@@ -23371,7 +23485,7 @@ async function Ik(s, t) {
|
|
|
23371
23485
|
e[c](), h();
|
|
23372
23486
|
});
|
|
23373
23487
|
de.end("export-usdz-resources");
|
|
23374
|
-
const n = new
|
|
23488
|
+
const n = new T2(), o = s.exporter.sceneAnchoringOptions.ar;
|
|
23375
23489
|
n.beginBlock(`def Xform "${s.document.name}"`), n.beginBlock(`def Scope "Scenes" (
|
|
23376
23490
|
kind = "sceneLibrary"
|
|
23377
23491
|
)`), n.beginBlock('def Xform "Scene"', "(", !1), n.appendLine('apiSchemas = ["Preliminary_AnchoringAPI"]'), n.appendLine("customData = {"), n.appendLine(" bool preliminary_collidesWithEnvironment = 0"), n.appendLine(' string sceneName = "Scene"'), n.appendLine("}"), n.appendLine('sceneName = "Scene"'), n.closeBlock(")"), n.beginBlock(), n.appendLine(`token preliminary:anchoring:type = "${o.anchoring.type}"`), o.anchoring.type === "plane" && n.appendLine(`token preliminary:planeAnchoring:alignment = "${o.planeAnchoring.alignment}"`), o.anchoring.type === "image" && n.appendLine(`rel preliminary:imageAnchoring:referenceImage = </${s.document.name}/Scenes/Scene/AnchoringReferenceImage>`), n.appendLine();
|
|
@@ -23398,8 +23512,8 @@ function _w(s, t, e) {
|
|
|
23398
23512
|
if (!(o in t.files)) {
|
|
23399
23513
|
const a = () => {
|
|
23400
23514
|
var c, h;
|
|
23401
|
-
const l =
|
|
23402
|
-
t.files[o] =
|
|
23515
|
+
const l = U2(i, (h = (c = s.skinnedMesh) == null ? void 0 : c.skeleton) == null ? void 0 : h.bones, t.quickLookCompatible);
|
|
23516
|
+
t.files[o] = z2(l);
|
|
23403
23517
|
};
|
|
23404
23518
|
e.push(a);
|
|
23405
23519
|
}
|
|
@@ -23419,7 +23533,7 @@ async function Md(s, t, e = null) {
|
|
|
23419
23533
|
}
|
|
23420
23534
|
}
|
|
23421
23535
|
let qh = null, Gt = null, dp, Yr, Xh;
|
|
23422
|
-
async function
|
|
23536
|
+
async function L2(s, t = 1 / 0, e = null, i = void 0) {
|
|
23423
23537
|
dp || (dp = new Gn(2, 2, 1, 1)), Yr || (Yr = new bn({
|
|
23424
23538
|
uniforms: {
|
|
23425
23539
|
blitTexture: new fo(s),
|
|
@@ -23466,17 +23580,17 @@ async function Lk(s, t = 1 / 0, e = null, i = void 0) {
|
|
|
23466
23580
|
imageBitmap: u
|
|
23467
23581
|
};
|
|
23468
23582
|
}
|
|
23469
|
-
function
|
|
23583
|
+
function D2(s) {
|
|
23470
23584
|
return typeof HTMLImageElement < "u" && s instanceof HTMLImageElement || typeof HTMLCanvasElement < "u" && s instanceof HTMLCanvasElement || typeof OffscreenCanvas < "u" && s instanceof OffscreenCanvas || typeof ImageBitmap < "u" && s instanceof ImageBitmap;
|
|
23471
23585
|
}
|
|
23472
|
-
async function
|
|
23586
|
+
async function j2(s, t = 4096) {
|
|
23473
23587
|
const e = t / Math.max(s.width, s.height), i = s.width * Math.min(1, e), n = s.height * Math.min(1, e), o = new OffscreenCanvas(i, n), a = { premultiplyAlpha: "none" };
|
|
23474
23588
|
s.width !== i && (a.resizeWidth = i), s.height !== n && (a.resizeHeight = n);
|
|
23475
23589
|
const l = await createImageBitmap(s, a), c = o.getContext("bitmaprenderer");
|
|
23476
23590
|
return c && c.transferFromImageBitmap(l), o;
|
|
23477
23591
|
}
|
|
23478
|
-
async function
|
|
23479
|
-
if (
|
|
23592
|
+
async function B2(s, t = void 0, e = !1, i = 4096) {
|
|
23593
|
+
if (D2(s)) {
|
|
23480
23594
|
const n = i / Math.max(s.width, s.height), o = new OffscreenCanvas(s.width * Math.min(1, n), s.height * Math.min(1, n)), a = o.getContext("2d", { alpha: !0, premultipliedAlpha: !1 });
|
|
23481
23595
|
if (!a)
|
|
23482
23596
|
throw new Error("Could not get canvas 2D context");
|
|
@@ -23491,7 +23605,7 @@ async function Bk(s, t = void 0, e = !1, i = 4096) {
|
|
|
23491
23605
|
throw new Error("NeedleUSDZExporter: No valid image data found. Unable to process texture.");
|
|
23492
23606
|
}
|
|
23493
23607
|
const Le = 7;
|
|
23494
|
-
function
|
|
23608
|
+
function F2() {
|
|
23495
23609
|
return `#usda 1.0
|
|
23496
23610
|
(
|
|
23497
23611
|
customLayerData = {
|
|
@@ -23502,8 +23616,8 @@ function Fk() {
|
|
|
23502
23616
|
)
|
|
23503
23617
|
`;
|
|
23504
23618
|
}
|
|
23505
|
-
function
|
|
23506
|
-
let e =
|
|
23619
|
+
function z2(s, t) {
|
|
23620
|
+
let e = F2();
|
|
23507
23621
|
return e += s, p0(e);
|
|
23508
23622
|
}
|
|
23509
23623
|
function Qh(s) {
|
|
@@ -23563,13 +23677,13 @@ function vb(s) {
|
|
|
23563
23677
|
function Yh(s, t) {
|
|
23564
23678
|
return `(${he(s[t + 0])}, ${he(s[t + 1])}, ${he(s[t + 2])}, ${he(s[t + 3])})`;
|
|
23565
23679
|
}
|
|
23566
|
-
function
|
|
23680
|
+
function U2(s, t = [], e = !0) {
|
|
23567
23681
|
return `
|
|
23568
23682
|
def "Geometry"
|
|
23569
|
-
${
|
|
23683
|
+
${N2(s, t, e)}
|
|
23570
23684
|
`;
|
|
23571
23685
|
}
|
|
23572
|
-
function
|
|
23686
|
+
function N2(s, t = [], e = !0) {
|
|
23573
23687
|
const i = "Geometry", n = s.attributes, o = n.position.count, a = t && t.length > 0, l = [], c = [];
|
|
23574
23688
|
let h = new Array(), d = n.skinIndex;
|
|
23575
23689
|
if (a) {
|
|
@@ -23686,7 +23800,7 @@ function pp(s, t) {
|
|
|
23686
23800
|
interpolation = "vertex"
|
|
23687
23801
|
)`;
|
|
23688
23802
|
case 4:
|
|
23689
|
-
return `double4[] primvars:${s} = [${$
|
|
23803
|
+
return `double4[] primvars:${s} = [${$2(t, e)}] (
|
|
23690
23804
|
interpolation = "vertex"
|
|
23691
23805
|
)`;
|
|
23692
23806
|
default:
|
|
@@ -23703,7 +23817,7 @@ function Rd(s, t) {
|
|
|
23703
23817
|
}
|
|
23704
23818
|
return e.join(", ");
|
|
23705
23819
|
}
|
|
23706
|
-
function $
|
|
23820
|
+
function $2(s, t) {
|
|
23707
23821
|
if (s === void 0)
|
|
23708
23822
|
return console.warn("USDZExporter: Attribute is missing. Results may be undefined."), Array(t).fill("(0, 0, 0, 0)").join(", ");
|
|
23709
23823
|
const e = [];
|
|
@@ -23732,11 +23846,11 @@ function vw(s, t, e = !1) {
|
|
|
23732
23846
|
}
|
|
23733
23847
|
return i.join(", ");
|
|
23734
23848
|
}
|
|
23735
|
-
function
|
|
23849
|
+
function W2(s, t, e = !1) {
|
|
23736
23850
|
const i = [];
|
|
23737
23851
|
for (const n in s) {
|
|
23738
23852
|
const o = s[n];
|
|
23739
|
-
i.push(
|
|
23853
|
+
i.push(V2(o, t, e));
|
|
23740
23854
|
}
|
|
23741
23855
|
return `
|
|
23742
23856
|
def "Materials"
|
|
@@ -23744,7 +23858,7 @@ function Wk(s, t, e = !1) {
|
|
|
23744
23858
|
${i.join("")}
|
|
23745
23859
|
}`;
|
|
23746
23860
|
}
|
|
23747
|
-
function
|
|
23861
|
+
function V2(s, t, e = !1) {
|
|
23748
23862
|
var g, y, _;
|
|
23749
23863
|
const i = Jg(s);
|
|
23750
23864
|
if (s.colorWrite === !1 || ((g = s.userData) == null ? void 0 : g.isShadowCatcherMaterial) || ((y = s.userData) == null ? void 0 : y.isLightBlendMaterial)) {
|
|
@@ -24216,7 +24330,7 @@ class ye {
|
|
|
24216
24330
|
}
|
|
24217
24331
|
*/
|
|
24218
24332
|
}
|
|
24219
|
-
class
|
|
24333
|
+
class H2 {
|
|
24220
24334
|
constructor(t) {
|
|
24221
24335
|
r(this, "object");
|
|
24222
24336
|
r(this, "model");
|
|
@@ -24233,7 +24347,7 @@ class Hk {
|
|
|
24233
24347
|
this.onApply(t);
|
|
24234
24348
|
}
|
|
24235
24349
|
}
|
|
24236
|
-
class xw extends
|
|
24350
|
+
class xw extends H2 {
|
|
24237
24351
|
constructor(e, i, n, o) {
|
|
24238
24352
|
super(e);
|
|
24239
24353
|
r(this, "matrix");
|
|
@@ -24259,7 +24373,7 @@ class xw extends Hk {
|
|
|
24259
24373
|
return this._disableAction ? this._disableAction : (this._disableAction = ye.fadeAction(this.object, 0, !1), this._disableAction);
|
|
24260
24374
|
}
|
|
24261
24375
|
}
|
|
24262
|
-
class
|
|
24376
|
+
class G2 {
|
|
24263
24377
|
constructor(t) {
|
|
24264
24378
|
r(this, "actions");
|
|
24265
24379
|
r(this, "sortedActions");
|
|
@@ -24640,11 +24754,11 @@ class ey {
|
|
|
24640
24754
|
const a = o;
|
|
24641
24755
|
typeof a.createAnimation == "function" && a.createAnimation(this, e, i);
|
|
24642
24756
|
}, !1);
|
|
24643
|
-
const n = new
|
|
24757
|
+
const n = new q2(t, this);
|
|
24644
24758
|
this.serializers.push(n), n.registerCallback(e);
|
|
24645
24759
|
}
|
|
24646
24760
|
}
|
|
24647
|
-
class
|
|
24761
|
+
class q2 {
|
|
24648
24762
|
constructor(t, e) {
|
|
24649
24763
|
r(this, "model");
|
|
24650
24764
|
r(this, "object");
|
|
@@ -24896,7 +25010,7 @@ class qk {
|
|
|
24896
25010
|
h(l, "position"), h(l, "rotation"), h(l, "scale");
|
|
24897
25011
|
}
|
|
24898
25012
|
}
|
|
24899
|
-
const
|
|
25013
|
+
const X2 = x("debugusdz");
|
|
24900
25014
|
class nl {
|
|
24901
25015
|
constructor() {
|
|
24902
25016
|
r(this, "files", new Array());
|
|
@@ -24931,7 +25045,7 @@ class nl {
|
|
|
24931
25045
|
for (const e of this.files) {
|
|
24932
25046
|
const i = "audio/" + e.name;
|
|
24933
25047
|
if (t.files[i]) {
|
|
24934
|
-
|
|
25048
|
+
X2 && console.warn("Audio file with name " + i + " already exists in the context. Skipping.");
|
|
24935
25049
|
continue;
|
|
24936
25050
|
}
|
|
24937
25051
|
const a = await (await (await fetch(e.path)).blob()).arrayBuffer(), l = new Uint8Array(a);
|
|
@@ -24939,10 +25053,10 @@ class nl {
|
|
|
24939
25053
|
}
|
|
24940
25054
|
}
|
|
24941
25055
|
}
|
|
24942
|
-
var
|
|
24943
|
-
for (var n = i > 1 ? void 0 : i ?
|
|
25056
|
+
var Q2 = Object.defineProperty, Y2 = Object.getOwnPropertyDescriptor, Ve = (s, t, e, i) => {
|
|
25057
|
+
for (var n = i > 1 ? void 0 : i ? Y2(t, e) : t, o = s.length - 1, a; o >= 0; o--)
|
|
24944
25058
|
(a = s[o]) && (n = (i ? a(t, e, n) : a(n)) || n);
|
|
24945
|
-
return i && n &&
|
|
25059
|
+
return i && n && Q2(t, e, n), n;
|
|
24946
25060
|
};
|
|
24947
25061
|
const Pb = x("debugusdzbehaviours");
|
|
24948
25062
|
function rh(s) {
|
|
@@ -25740,12 +25854,12 @@ const By = class {
|
|
|
25740
25854
|
};
|
|
25741
25855
|
let wo = By;
|
|
25742
25856
|
r(wo, "_instance");
|
|
25743
|
-
var
|
|
25744
|
-
for (var n = i > 1 ? void 0 : i ?
|
|
25857
|
+
var K2 = Object.defineProperty, Z2 = Object.getOwnPropertyDescriptor, vt = (s, t, e, i) => {
|
|
25858
|
+
for (var n = i > 1 ? void 0 : i ? Z2(t, e) : t, o = s.length - 1, a; o >= 0; o--)
|
|
25745
25859
|
(a = s[o]) && (n = (i ? a(t, e, n) : a(n)) || n);
|
|
25746
|
-
return i && n &&
|
|
25860
|
+
return i && n && K2(t, e, n), n;
|
|
25747
25861
|
};
|
|
25748
|
-
const nu = x("debugspriterenderer"),
|
|
25862
|
+
const nu = x("debugspriterenderer"), J2 = x("wireframe"), gu = class {
|
|
25749
25863
|
static getOrCreateGeometry(t) {
|
|
25750
25864
|
if (t.__cached_geometry)
|
|
25751
25865
|
return t.__cached_geometry;
|
|
@@ -25765,7 +25879,7 @@ const nu = x("debugspriterenderer"), Jk = x("wireframe"), gu = class {
|
|
|
25765
25879
|
};
|
|
25766
25880
|
let br = gu;
|
|
25767
25881
|
r(br, "cache", {});
|
|
25768
|
-
class
|
|
25882
|
+
class ek {
|
|
25769
25883
|
constructor() {
|
|
25770
25884
|
r(this, "x");
|
|
25771
25885
|
r(this, "y");
|
|
@@ -25990,7 +26104,7 @@ class Ii extends I {
|
|
|
25990
26104
|
this._currentSprite.geometry = br.getOrCreateGeometry(n), this._currentSprite.material.map = n.texture;
|
|
25991
26105
|
else {
|
|
25992
26106
|
const a = new Me({ color: 16777215, side: ki });
|
|
25993
|
-
if (
|
|
26107
|
+
if (J2 && (a.wireframe = !0), this.color && (a.color || (a.color = new ce()), a.color.copy(this.color), a.opacity = this.color.alpha), a.transparent = !0, a.toneMapped = this.toneMapped, a.depthWrite = !1, n.texture && !a.wireframe) {
|
|
25994
26108
|
let l = n.texture;
|
|
25995
26109
|
l[mp] !== void 0 && l[mp] !== this && this.spriteFrames > 1 && (l = n.texture = l.clone()), l[mp] = this, a.map = l;
|
|
25996
26110
|
}
|
|
@@ -26003,7 +26117,7 @@ vt([
|
|
|
26003
26117
|
f()
|
|
26004
26118
|
], Ii.prototype, "drawMode", 2);
|
|
26005
26119
|
vt([
|
|
26006
|
-
f(
|
|
26120
|
+
f(ek)
|
|
26007
26121
|
], Ii.prototype, "size", 2);
|
|
26008
26122
|
vt([
|
|
26009
26123
|
f(le)
|
|
@@ -26029,7 +26143,7 @@ vt([
|
|
|
26029
26143
|
vt([
|
|
26030
26144
|
f(vr)
|
|
26031
26145
|
], Ii.prototype, "sprite", 1);
|
|
26032
|
-
const Ob = x("debugwebxr"),
|
|
26146
|
+
const Ob = x("debugwebxr"), tk = new se().makeRotationY(Math.PI), ba = class extends I {
|
|
26033
26147
|
constructor() {
|
|
26034
26148
|
super(...arguments);
|
|
26035
26149
|
r(this, "_arScale", 1);
|
|
@@ -26278,7 +26392,7 @@ const Ob = x("debugwebxr"), t2 = new se().makeRotationY(Math.PI), ba = class ext
|
|
|
26278
26392
|
return;
|
|
26279
26393
|
}
|
|
26280
26394
|
const n = i.parent || this.context.scene;
|
|
26281
|
-
this._rigPlacementMatrix ? (l = this._rigPlacementMatrix) == null || l.decompose(i.position, i.quaternion, i.scale) : this._rigPlacementMatrix = i.matrix.clone(), this.applyViewBasedTransform(e), e.updateMatrix(), this.context.scene.add(e), e.attach(i), e.removeFromParent(), i.scale.set(this.arScale, this.arScale, this.arScale), i.position.multiplyScalar(this.arScale), i.updateMatrix(), this.invertForward && i.matrix.premultiply(
|
|
26395
|
+
this._rigPlacementMatrix ? (l = this._rigPlacementMatrix) == null || l.decompose(i.position, i.quaternion, i.scale) : this._rigPlacementMatrix = i.matrix.clone(), this.applyViewBasedTransform(e), e.updateMatrix(), this.context.scene.add(e), e.attach(i), e.removeFromParent(), i.scale.set(this.arScale, this.arScale, this.arScale), i.position.multiplyScalar(this.arScale), i.updateMatrix(), this.invertForward && i.matrix.premultiply(tk), i.matrix.premultiply(this._startOffset), i.matrix.decompose(i.position, i.quaternion, i.scale), n.add(i);
|
|
26282
26396
|
}
|
|
26283
26397
|
};
|
|
26284
26398
|
let gn = ba;
|
|
@@ -26430,7 +26544,7 @@ const yu = class {
|
|
|
26430
26544
|
let ha = yu;
|
|
26431
26545
|
r(ha, "up", new v(0, 1, 0)), r(ha, "zero", new v(0, 0, 0)), r(ha, "one", new v(1, 1, 1));
|
|
26432
26546
|
const ao = x("debugautosync"), gp = Symbol("syncerId");
|
|
26433
|
-
class
|
|
26547
|
+
class ik {
|
|
26434
26548
|
constructor() {
|
|
26435
26549
|
r(this, "_syncers", {});
|
|
26436
26550
|
}
|
|
@@ -26439,15 +26553,15 @@ class i2 {
|
|
|
26439
26553
|
return null;
|
|
26440
26554
|
if (this._syncers[t.guid])
|
|
26441
26555
|
return this._syncers[t.guid];
|
|
26442
|
-
const e = new
|
|
26556
|
+
const e = new nk(t);
|
|
26443
26557
|
return e[gp] = t.guid, this._syncers[e[gp]] = e, e;
|
|
26444
26558
|
}
|
|
26445
26559
|
removeSyncer(t) {
|
|
26446
26560
|
delete this._syncers[t[gp]];
|
|
26447
26561
|
}
|
|
26448
26562
|
}
|
|
26449
|
-
const ty = new
|
|
26450
|
-
class
|
|
26563
|
+
const ty = new ik();
|
|
26564
|
+
class nk {
|
|
26451
26565
|
constructor(t) {
|
|
26452
26566
|
r(this, "comp");
|
|
26453
26567
|
// private getters: { [key: string]: Function } = {};
|
|
@@ -26500,18 +26614,18 @@ class n2 {
|
|
|
26500
26614
|
this._isReceiving || (ao && console.log("Property changed: " + t, e), this.hasChanges = !0, this.changedProperties[t] = e);
|
|
26501
26615
|
}
|
|
26502
26616
|
}
|
|
26503
|
-
function
|
|
26617
|
+
function sk(s, t) {
|
|
26504
26618
|
let e = t !== s;
|
|
26505
26619
|
return !e && s && t && (Array.isArray(s) && Array.isArray(t) || typeof s == "object" && typeof t == "object") && (e = !0), e;
|
|
26506
26620
|
}
|
|
26507
26621
|
const vc = Symbol("AutoSyncHandler");
|
|
26508
|
-
function
|
|
26622
|
+
function ok(s) {
|
|
26509
26623
|
if (s[vc])
|
|
26510
26624
|
return s[vc];
|
|
26511
26625
|
const t = ty.getOrCreateSyncer(s);
|
|
26512
26626
|
return t == null || t.init(s), s[vc] = t, t;
|
|
26513
26627
|
}
|
|
26514
|
-
function
|
|
26628
|
+
function rk(s) {
|
|
26515
26629
|
const t = s[vc];
|
|
26516
26630
|
t && (ty.removeSyncer(t), t.destroy(), delete s[vc]);
|
|
26517
26631
|
}
|
|
@@ -26546,8 +26660,8 @@ const Pw = function(s = null) {
|
|
|
26546
26660
|
}
|
|
26547
26661
|
p = !0;
|
|
26548
26662
|
try {
|
|
26549
|
-
const _ =
|
|
26550
|
-
ao && console.log("SyncField assignment", i, "changed?", _, m, o), _ && (o == null ? void 0 : o.call(this, m, g)) !== !1 && ((y =
|
|
26663
|
+
const _ = sk(m, g);
|
|
26664
|
+
ao && console.log("SyncField assignment", i, "changed?", _, m, o), _ && (o == null ? void 0 : o.call(this, m, g)) !== !1 && ((y = ok(this)) == null || y.notifyChanged(i, m));
|
|
26551
26665
|
} finally {
|
|
26552
26666
|
p = !1;
|
|
26553
26667
|
}
|
|
@@ -26563,14 +26677,14 @@ const Pw = function(s = null) {
|
|
|
26563
26677
|
};
|
|
26564
26678
|
const h = a.__internalDestroy;
|
|
26565
26679
|
a.__internalDestroy = function() {
|
|
26566
|
-
|
|
26680
|
+
rk(this), h.call(this);
|
|
26567
26681
|
};
|
|
26568
26682
|
};
|
|
26569
26683
|
};
|
|
26570
|
-
var
|
|
26571
|
-
for (var n = i > 1 ? void 0 : i ?
|
|
26684
|
+
var ak = Object.defineProperty, lk = Object.getOwnPropertyDescriptor, tf = (s, t, e, i) => {
|
|
26685
|
+
for (var n = i > 1 ? void 0 : i ? lk(t, e) : t, o = s.length - 1, a; o >= 0; o--)
|
|
26572
26686
|
(a = s[o]) && (n = (i ? a(t, e, n) : a(n)) || n);
|
|
26573
|
-
return i && n &&
|
|
26687
|
+
return i && n && ak(t, e, n), n;
|
|
26574
26688
|
};
|
|
26575
26689
|
const Yt = x("debugplayersync"), Ow = class extends I {
|
|
26576
26690
|
constructor() {
|
|
@@ -26673,7 +26787,7 @@ tf([
|
|
|
26673
26787
|
tf([
|
|
26674
26788
|
f(xe)
|
|
26675
26789
|
], hh.prototype, "onPlayerSpawned", 2);
|
|
26676
|
-
var
|
|
26790
|
+
var ck = /* @__PURE__ */ ((s) => (s.OwnerChanged = "ownerChanged", s))(ck || {}), Hl;
|
|
26677
26791
|
const Rt = (Hl = class extends I {
|
|
26678
26792
|
constructor() {
|
|
26679
26793
|
super(...arguments);
|
|
@@ -26807,10 +26921,10 @@ let Ji = Rt;
|
|
|
26807
26921
|
tf([
|
|
26808
26922
|
Pw(Ji.prototype.onOwnerChange)
|
|
26809
26923
|
], Ji.prototype, "owner", 2);
|
|
26810
|
-
var
|
|
26811
|
-
for (var n = i > 1 ? void 0 : i ?
|
|
26924
|
+
var hk = Object.defineProperty, dk = Object.getOwnPropertyDescriptor, rl = (s, t, e, i) => {
|
|
26925
|
+
for (var n = i > 1 ? void 0 : i ? dk(t, e) : t, o = s.length - 1, a; o >= 0; o--)
|
|
26812
26926
|
(a = s[o]) && (n = (i ? a(t, e, n) : a(n)) || n);
|
|
26813
|
-
return i && n &&
|
|
26927
|
+
return i && n && hk(t, e, n), n;
|
|
26814
26928
|
};
|
|
26815
26929
|
class $s extends I {
|
|
26816
26930
|
constructor() {
|
|
@@ -26854,10 +26968,10 @@ rl([
|
|
|
26854
26968
|
rl([
|
|
26855
26969
|
f()
|
|
26856
26970
|
], $s.prototype, "createQRCodeButton", 2);
|
|
26857
|
-
var
|
|
26858
|
-
for (var n = i > 1 ? void 0 : i ?
|
|
26971
|
+
var uk = Object.defineProperty, fk = Object.getOwnPropertyDescriptor, iy = (s, t, e, i) => {
|
|
26972
|
+
for (var n = i > 1 ? void 0 : i ? fk(t, e) : t, o = s.length - 1, a; o >= 0; o--)
|
|
26859
26973
|
(a = s[o]) && (n = (i ? a(t, e, n) : a(n)) || n);
|
|
26860
|
-
return i && n &&
|
|
26974
|
+
return i && n && uk(t, e, n), n;
|
|
26861
26975
|
};
|
|
26862
26976
|
const Dl = x("debugwebxr"), Mb = new W().setFromAxisAngle(new v(0, 1, 0), Math.PI);
|
|
26863
26977
|
class Pr extends I {
|
|
@@ -26991,10 +27105,10 @@ iy([
|
|
|
26991
27105
|
iy([
|
|
26992
27106
|
f(re)
|
|
26993
27107
|
], Pr.prototype, "rightHand", 2);
|
|
26994
|
-
var
|
|
26995
|
-
for (var n = i > 1 ? void 0 : i ?
|
|
27108
|
+
var pk = Object.defineProperty, mk = Object.getOwnPropertyDescriptor, nf = (s, t, e, i) => {
|
|
27109
|
+
for (var n = i > 1 ? void 0 : i ? mk(t, e) : t, o = s.length - 1, a; o >= 0; o--)
|
|
26996
27110
|
(a = s[o]) && (n = (i ? a(t, e, n) : a(n)) || n);
|
|
26997
|
-
return i && n &&
|
|
27111
|
+
return i && n && pk(t, e, n), n;
|
|
26998
27112
|
};
|
|
26999
27113
|
const os = x("debugwebxr"), Xs = new Array();
|
|
27000
27114
|
class js extends I {
|
|
@@ -27150,10 +27264,10 @@ nf([
|
|
|
27150
27264
|
], js.prototype, "customRightHand", 2);
|
|
27151
27265
|
class ny extends I {
|
|
27152
27266
|
}
|
|
27153
|
-
var
|
|
27154
|
-
for (var n = i > 1 ? void 0 : i ?
|
|
27267
|
+
var gk = Object.defineProperty, yk = Object.getOwnPropertyDescriptor, Eo = (s, t, e, i) => {
|
|
27268
|
+
for (var n = i > 1 ? void 0 : i ? yk(t, e) : t, o = s.length - 1, a; o >= 0; o--)
|
|
27155
27269
|
(a = s[o]) && (n = (i ? a(t, e, n) : a(n)) || n);
|
|
27156
|
-
return i && n &&
|
|
27270
|
+
return i && n && gk(t, e, n), n;
|
|
27157
27271
|
};
|
|
27158
27272
|
const yp = x("debugwebxr");
|
|
27159
27273
|
class on extends I {
|
|
@@ -27327,7 +27441,7 @@ class on extends I {
|
|
|
27327
27441
|
if (u.normal) {
|
|
27328
27442
|
this.updateHitPointerPosition(o, a, u.distance);
|
|
27329
27443
|
const _ = u.normal.applyQuaternion(Ce(u.object));
|
|
27330
|
-
a.quaternion.setFromUnitVectors(
|
|
27444
|
+
a.quaternion.setFromUnitVectors(_k, _);
|
|
27331
27445
|
} else
|
|
27332
27446
|
this.updateHitPointerPosition(o, a, u.distance);
|
|
27333
27447
|
a.parent !== this.context.scene && this.context.scene.add(a);
|
|
@@ -27408,13 +27522,13 @@ Eo([
|
|
|
27408
27522
|
Eo([
|
|
27409
27523
|
f()
|
|
27410
27524
|
], on.prototype, "showHits", 2);
|
|
27411
|
-
const
|
|
27412
|
-
var
|
|
27413
|
-
for (var n = i > 1 ? void 0 : i ?
|
|
27525
|
+
const _k = new v(0, 1, 0);
|
|
27526
|
+
var bk = Object.defineProperty, vk = Object.getOwnPropertyDescriptor, wt = (s, t, e, i) => {
|
|
27527
|
+
for (var n = i > 1 ? void 0 : i ? vk(t, e) : t, o = s.length - 1, a; o >= 0; o--)
|
|
27414
27528
|
(a = s[o]) && (n = (i ? a(t, e, n) : a(n)) || n);
|
|
27415
|
-
return i && n &&
|
|
27529
|
+
return i && n && bk(t, e, n), n;
|
|
27416
27530
|
};
|
|
27417
|
-
const jl = x("debugwebxr"),
|
|
27531
|
+
const jl = x("debugwebxr"), wk = x("debugusdz");
|
|
27418
27532
|
var $p;
|
|
27419
27533
|
const da = ($p = class extends I {
|
|
27420
27534
|
constructor() {
|
|
@@ -27637,7 +27751,7 @@ const da = ($p = class extends I {
|
|
|
27637
27751
|
*/
|
|
27638
27752
|
handleCreatingHTML() {
|
|
27639
27753
|
if (this.createARButton || this.createVRButton || this.useQuicklookExport) {
|
|
27640
|
-
if ((X.isiOS() && X.isSafari() ||
|
|
27754
|
+
if ((X.isiOS() && X.isSafari() || wk) && this.useQuicklookExport) {
|
|
27641
27755
|
const e = S.findObjectOfType(Ge);
|
|
27642
27756
|
if (!e || e && e.allowCreateQuicklookButton) {
|
|
27643
27757
|
const i = this.getButtonsFactory().createQuicklookButton();
|
|
@@ -27955,7 +28069,7 @@ class Rw {
|
|
|
27955
28069
|
}), o.length > 1 && console.log("WARNING: Multiple colliders detected. visionOS / iOS can only support objects with a single collider, only exporting the first collider: ", l));
|
|
27956
28070
|
}
|
|
27957
28071
|
}
|
|
27958
|
-
const
|
|
28072
|
+
const xk = x("debugshadowcomponents");
|
|
27959
28073
|
_0.prototype.interactable = {
|
|
27960
28074
|
get() {
|
|
27961
28075
|
return this.interactive;
|
|
@@ -28035,7 +28149,7 @@ class wn extends I {
|
|
|
28035
28149
|
const l = this._parentComponent.shadowComponent;
|
|
28036
28150
|
l && (l == null || l.add(e), o = !0);
|
|
28037
28151
|
}
|
|
28038
|
-
this.shadowComponent = e, i && i.shadowComponent && this.shadowComponent && i.shadowComponent.add(this.shadowComponent), Qc && e.add(new Mi(0.5)), this.onAfterAddedToScene(), o && kS(),
|
|
28152
|
+
this.shadowComponent = e, i && i.shadowComponent && this.shadowComponent && i.shadowComponent.add(this.shadowComponent), Qc && e.add(new Mi(0.5)), this.onAfterAddedToScene(), o && kS(), xk && console.warn("Added shadow component", this.shadowComponent);
|
|
28039
28153
|
}
|
|
28040
28154
|
setShadowComponentOwner(e) {
|
|
28041
28155
|
if (e && (e[xi] === void 0 || e[xi] === this) && (e[xi] = this, e.children))
|
|
@@ -28064,19 +28178,19 @@ class sf extends wn {
|
|
|
28064
28178
|
super.awake();
|
|
28065
28179
|
}
|
|
28066
28180
|
}
|
|
28067
|
-
var
|
|
28068
|
-
for (var n = i > 1 ? void 0 : i ?
|
|
28181
|
+
var Sk = Object.defineProperty, Ck = Object.getOwnPropertyDescriptor, dh = (s, t, e, i) => {
|
|
28182
|
+
for (var n = i > 1 ? void 0 : i ? Ck(t, e) : t, o = s.length - 1, a; o >= 0; o--)
|
|
28069
28183
|
(a = s[o]) && (n = (i ? a(t, e, n) : a(n)) || n);
|
|
28070
|
-
return i && n &&
|
|
28184
|
+
return i && n && Sk(t, e, n), n;
|
|
28071
28185
|
};
|
|
28072
28186
|
const _p = x("debugui"), bp = x("debuguilayout");
|
|
28073
|
-
class
|
|
28187
|
+
class Pk {
|
|
28074
28188
|
constructor() {
|
|
28075
28189
|
r(this, "width");
|
|
28076
28190
|
r(this, "height");
|
|
28077
28191
|
}
|
|
28078
28192
|
}
|
|
28079
|
-
class
|
|
28193
|
+
class Ok {
|
|
28080
28194
|
constructor() {
|
|
28081
28195
|
r(this, "x");
|
|
28082
28196
|
r(this, "y");
|
|
@@ -28288,10 +28402,10 @@ dh([
|
|
|
28288
28402
|
dh([
|
|
28289
28403
|
f(oe)
|
|
28290
28404
|
], ii.prototype, "anchorMax", 2);
|
|
28291
|
-
var
|
|
28292
|
-
for (var n = i > 1 ? void 0 : i ?
|
|
28405
|
+
var Mk = Object.defineProperty, Rk = Object.getOwnPropertyDescriptor, Tw = (s, t, e, i) => {
|
|
28406
|
+
for (var n = i > 1 ? void 0 : i ? Rk(t, e) : t, o = s.length - 1, a; o >= 0; o--)
|
|
28293
28407
|
(a = s[o]) && (n = (i ? a(t, e, n) : a(n)) || n);
|
|
28294
|
-
return i && n &&
|
|
28408
|
+
return i && n && Mk(t, e, n), n;
|
|
28295
28409
|
};
|
|
28296
28410
|
class uh extends I {
|
|
28297
28411
|
constructor() {
|
|
@@ -28306,10 +28420,10 @@ Tw([
|
|
|
28306
28420
|
Tw([
|
|
28307
28421
|
f(oe)
|
|
28308
28422
|
], uh.prototype, "effectDistance", 2);
|
|
28309
|
-
var
|
|
28310
|
-
for (var n = i > 1 ? void 0 : i ?
|
|
28423
|
+
var kk = Object.defineProperty, Tk = Object.getOwnPropertyDescriptor, Aw = (s, t, e, i) => {
|
|
28424
|
+
for (var n = i > 1 ? void 0 : i ? Tk(t, e) : t, o = s.length - 1, a; o >= 0; o--)
|
|
28311
28425
|
(a = s[o]) && (n = (i ? a(t, e, n) : a(n)) || n);
|
|
28312
|
-
return i && n &&
|
|
28426
|
+
return i && n && kk(t, e, n), n;
|
|
28313
28427
|
};
|
|
28314
28428
|
const Jh = {
|
|
28315
28429
|
backgroundColor: new ce(1, 1, 1),
|
|
@@ -28443,10 +28557,10 @@ class of extends al {
|
|
|
28443
28557
|
this.uiObject && !this._flippedObject && (this._flippedObject = !0, this.uiObject.scale.y *= -1);
|
|
28444
28558
|
}
|
|
28445
28559
|
}
|
|
28446
|
-
var
|
|
28447
|
-
for (var n = i > 1 ? void 0 : i ?
|
|
28560
|
+
var Ak = Object.defineProperty, Ek = Object.getOwnPropertyDescriptor, Ws = (s, t, e, i) => {
|
|
28561
|
+
for (var n = i > 1 ? void 0 : i ? Ek(t, e) : t, o = s.length - 1, a; o >= 0; o--)
|
|
28448
28562
|
(a = s[o]) && (n = (i ? a(t, e, n) : a(n)) || n);
|
|
28449
|
-
return i && n &&
|
|
28563
|
+
return i && n && Ak(t, e, n), n;
|
|
28450
28564
|
};
|
|
28451
28565
|
const Ho = x("debugtext");
|
|
28452
28566
|
var ct = /* @__PURE__ */ ((s) => (s[s.UpperLeft = 0] = "UpperLeft", s[s.UpperCenter = 1] = "UpperCenter", s[s.UpperRight = 2] = "UpperRight", s[s.MiddleLeft = 3] = "MiddleLeft", s[s.MiddleCenter = 4] = "MiddleCenter", s[s.MiddleRight = 5] = "MiddleRight", s[s.LowerLeft = 6] = "LowerLeft", s[s.LowerCenter = 7] = "LowerCenter", s[s.LowerRight = 8] = "LowerRight", s))(ct || {}), Ew = /* @__PURE__ */ ((s) => (s[s.Normal = 0] = "Normal", s[s.Bold = 1] = "Bold", s[s.Italic = 2] = "Italic", s[s.BoldAndItalic = 3] = "BoldAndItalic", s))(Ew || {});
|
|
@@ -28729,7 +28843,7 @@ class si extends al {
|
|
|
28729
28843
|
if (n < 0)
|
|
28730
28844
|
return e;
|
|
28731
28845
|
const o = (d = e.substring(n + 1)) == null ? void 0 : d.toLowerCase();
|
|
28732
|
-
if (
|
|
28846
|
+
if (Ik.includes(o))
|
|
28733
28847
|
return Ho && console.warn("Unsupported font style: " + o), e;
|
|
28734
28848
|
const a = e.lastIndexOf("/");
|
|
28735
28849
|
let l = e;
|
|
@@ -28783,7 +28897,7 @@ class vp {
|
|
|
28783
28897
|
this.tag = t, this.previousValues = e;
|
|
28784
28898
|
}
|
|
28785
28899
|
}
|
|
28786
|
-
const
|
|
28900
|
+
const Ik = [
|
|
28787
28901
|
"medium",
|
|
28788
28902
|
"mediumitalic",
|
|
28789
28903
|
"black",
|
|
@@ -28843,7 +28957,7 @@ class Iw {
|
|
|
28843
28957
|
return l.content = t, l.width = e, l.height = i, l.horizontalAlignment = n, l.verticalAlignment = o, a !== void 0 && (l.wrapMode = a), l;
|
|
28844
28958
|
}
|
|
28845
28959
|
}
|
|
28846
|
-
const
|
|
28960
|
+
const Lk = new se().makeRotationY(Math.PI), Dk = new se().makeScale(-1, 1, -1);
|
|
28847
28961
|
class sy {
|
|
28848
28962
|
get extensionName() {
|
|
28849
28963
|
return "text";
|
|
@@ -28855,8 +28969,8 @@ class sy {
|
|
|
28855
28969
|
const o = S.getComponent(t, ii);
|
|
28856
28970
|
let a = 100, l = 100;
|
|
28857
28971
|
o && (a = o.width, l = o.height);
|
|
28858
|
-
const c =
|
|
28859
|
-
o && c.premultiply(
|
|
28972
|
+
const c = Lk.clone();
|
|
28973
|
+
o && c.premultiply(Dk), e.setMatrix(c);
|
|
28860
28974
|
const h = n.color.clone();
|
|
28861
28975
|
e.material = new Lt({ color: h, emissive: h }), e.addEventListener("serialize", (d, u) => {
|
|
28862
28976
|
let p = n.text;
|
|
@@ -28916,10 +29030,10 @@ class sy {
|
|
|
28916
29030
|
}
|
|
28917
29031
|
}
|
|
28918
29032
|
}
|
|
28919
|
-
var
|
|
28920
|
-
for (var n = i > 1 ? void 0 : i ?
|
|
29033
|
+
var jk = Object.defineProperty, Bk = Object.getOwnPropertyDescriptor, ot = (s, t, e, i) => {
|
|
29034
|
+
for (var n = i > 1 ? void 0 : i ? Bk(t, e) : t, o = s.length - 1, a; o >= 0; o--)
|
|
28921
29035
|
(a = s[o]) && (n = (i ? a(t, e, n) : a(n)) || n);
|
|
28922
|
-
return i && n &&
|
|
29036
|
+
return i && n && jk(t, e, n), n;
|
|
28923
29037
|
};
|
|
28924
29038
|
const Rb = x("debuguilayout");
|
|
28925
29039
|
class ll {
|
|
@@ -29114,10 +29228,10 @@ class jw extends Li {
|
|
|
29114
29228
|
onCalculateLayout() {
|
|
29115
29229
|
}
|
|
29116
29230
|
}
|
|
29117
|
-
var
|
|
29118
|
-
for (var n = i > 1 ? void 0 : i ?
|
|
29231
|
+
var Fk = Object.defineProperty, zk = Object.getOwnPropertyDescriptor, Qn = (s, t, e, i) => {
|
|
29232
|
+
for (var n = i > 1 ? void 0 : i ? zk(t, e) : t, o = s.length - 1, a; o >= 0; o--)
|
|
29119
29233
|
(a = s[o]) && (n = (i ? a(t, e, n) : a(n)) || n);
|
|
29120
|
-
return i && n &&
|
|
29234
|
+
return i && n && Fk(t, e, n), n;
|
|
29121
29235
|
}, Bw = /* @__PURE__ */ ((s) => (s[s.ScreenSpaceOverlay = 0] = "ScreenSpaceOverlay", s[s.ScreenSpaceCamera = 1] = "ScreenSpaceCamera", s[s.WorldSpace = 2] = "WorldSpace", s[s.Undefined = -1] = "Undefined", s))(Bw || {});
|
|
29122
29236
|
const wp = x("debuguilayout"), Fw = class extends sf {
|
|
29123
29237
|
constructor() {
|
|
@@ -29353,10 +29467,10 @@ Qn([
|
|
|
29353
29467
|
Qn([
|
|
29354
29468
|
f()
|
|
29355
29469
|
], Nt.prototype, "planeDistance", 2);
|
|
29356
|
-
var
|
|
29357
|
-
for (var n = i > 1 ? void 0 : i ?
|
|
29470
|
+
var Uk = Object.defineProperty, Nk = Object.getOwnPropertyDescriptor, oy = (s, t, e, i) => {
|
|
29471
|
+
for (var n = i > 1 ? void 0 : i ? Nk(t, e) : t, o = s.length - 1, a; o >= 0; o--)
|
|
29358
29472
|
(a = s[o]) && (n = (i ? a(t, e, n) : a(n)) || n);
|
|
29359
|
-
return i && n &&
|
|
29473
|
+
return i && n && Uk(t, e, n), n;
|
|
29360
29474
|
};
|
|
29361
29475
|
class Or extends I {
|
|
29362
29476
|
constructor() {
|
|
@@ -29488,7 +29602,7 @@ class zw {
|
|
|
29488
29602
|
}
|
|
29489
29603
|
}
|
|
29490
29604
|
const ic = x("debugusdz");
|
|
29491
|
-
function $
|
|
29605
|
+
function $k(s, t) {
|
|
29492
29606
|
var l;
|
|
29493
29607
|
const e = [], i = S.getComponentsInChildren(s, Ut), n = S.getComponentsInChildren(s, ti), o = new Array(), a = new Array();
|
|
29494
29608
|
if (t.injectImplicitBehaviours)
|
|
@@ -29539,7 +29653,7 @@ function $2(s, t) {
|
|
|
29539
29653
|
t.registerAnimation(c.root, h);
|
|
29540
29654
|
return a;
|
|
29541
29655
|
}
|
|
29542
|
-
function
|
|
29656
|
+
function Wk(s, t) {
|
|
29543
29657
|
const e = S.getComponentsInChildren(s, qe), i = S.getComponentsInChildren(s, Cr), n = new Array(), o = new Array();
|
|
29544
29658
|
ic && console.log({ audioSources: e, playAudioOnClicks: i });
|
|
29545
29659
|
for (const a of i) {
|
|
@@ -29558,7 +29672,7 @@ function W2(s, t) {
|
|
|
29558
29672
|
}
|
|
29559
29673
|
return o;
|
|
29560
29674
|
}
|
|
29561
|
-
function
|
|
29675
|
+
function Vk(s) {
|
|
29562
29676
|
return new Tt(
|
|
29563
29677
|
"DisableAtStart",
|
|
29564
29678
|
zt.sceneStartTrigger(),
|
|
@@ -29578,12 +29692,12 @@ function kb(s, t) {
|
|
|
29578
29692
|
const a = document.createElement("img");
|
|
29579
29693
|
return a.id = "button", o.appendChild(a), s.domElement.shadowRoot.appendChild(i), o;
|
|
29580
29694
|
}
|
|
29581
|
-
var
|
|
29582
|
-
for (var n = i > 1 ? void 0 : i ?
|
|
29695
|
+
var Hk = Object.defineProperty, Gk = Object.getOwnPropertyDescriptor, At = (s, t, e, i) => {
|
|
29696
|
+
for (var n = i > 1 ? void 0 : i ? Gk(t, e) : t, o = s.length - 1, a; o >= 0; o--)
|
|
29583
29697
|
(a = s[o]) && (n = (i ? a(t, e, n) : a(n)) || n);
|
|
29584
|
-
return i && n &&
|
|
29698
|
+
return i && n && Hk(t, e, n), n;
|
|
29585
29699
|
};
|
|
29586
|
-
const pi = x("debugusdz"),
|
|
29700
|
+
const pi = x("debugusdz"), qk = x("debugusdzpruning");
|
|
29587
29701
|
class cl {
|
|
29588
29702
|
constructor() {
|
|
29589
29703
|
r(this, "callToAction");
|
|
@@ -29676,7 +29790,7 @@ const $m = (cd = class extends I {
|
|
|
29676
29790
|
async exportAndOpen() {
|
|
29677
29791
|
var i;
|
|
29678
29792
|
let t = this.exportFileName ?? ((i = this.objectToExport) == null ? void 0 : i.name) ?? this.name;
|
|
29679
|
-
if (t += "-" +
|
|
29793
|
+
if (t += "-" + P2(), Rs() || (t !== "" && (t += "-"), t += "MadeWithNeedle"), this.link || (this.link = kb(this.context, X.supportsQuickLookAR())), this.customUsdzFile)
|
|
29680
29794
|
return pi && console.log("Exporting custom usdz", this.customUsdzFile), this.openInQuickLook(this.customUsdzFile, t), null;
|
|
29681
29795
|
if (!this.objectToExport)
|
|
29682
29796
|
return console.warn("No object to export", this), null;
|
|
@@ -29730,14 +29844,14 @@ const $m = (cd = class extends I {
|
|
|
29730
29844
|
pi && We("Progressive Loading: " + n.length), await Promise.all(n), pi && We("Progressive Loading: done"), de.end("export-usdz-textures");
|
|
29731
29845
|
const a = ei.Global.Mask;
|
|
29732
29846
|
ei.Global.Set(vs.AR);
|
|
29733
|
-
const l = new
|
|
29847
|
+
const l = new E2(), c = new ey(this.quickLookCompatible);
|
|
29734
29848
|
let h;
|
|
29735
29849
|
const d = [];
|
|
29736
29850
|
this.interactive && (d.push(new Mw()), d.push(new nl()), globalThis.true && S.getComponentsInChildren(t, _e).length > 0 && (this.physics ? (h = new Rw(), d.push(h)) : z() && console.warn("USDZExporter: Physics export is disabled, but there are active Rigidbody components in the scene. They will not be exported.")), d.push(new sy()), d.push(new zw()));
|
|
29737
29851
|
const u = [c, ...d, ...this.extensions], p = { self: this, exporter: l, extensions: u, object: t };
|
|
29738
29852
|
de.report("export-usdz", "Invoking before-export"), this.dispatchEvent(new CustomEvent("before-export", { detail: p })), this.applyWebARSessionRoot(), this._previousTimeScale = this.context.time.timeScale, this.context.time.timeScale = 0, de.report("export-usdz", "auto export animations and audio sources");
|
|
29739
29853
|
const m = new Array();
|
|
29740
|
-
this.autoExportAnimations && m.push(...$
|
|
29854
|
+
this.autoExportAnimations && m.push(...$k(t, c)), u.find((O) => O.extensionName === "Audio") && this.autoExportAudioSources && m.push(...Wk(t)), l.debug = pi, l.pruneUnusedNodes = !qk;
|
|
29741
29855
|
const y = or.instance.objs.map((O) => O.batchedMesh);
|
|
29742
29856
|
l.keepObject = (O) => {
|
|
29743
29857
|
let R = !0;
|
|
@@ -29757,7 +29871,7 @@ const $m = (cd = class extends I {
|
|
|
29757
29871
|
O.visible || _.push(O);
|
|
29758
29872
|
});
|
|
29759
29873
|
const b = u.find((O) => O.extensionName === "Behaviour");
|
|
29760
|
-
this.interactive && b && _.length > 0 && b.addBehavior(
|
|
29874
|
+
this.interactive && b && _.length > 0 && b.addBehavior(Vk(_));
|
|
29761
29875
|
let w = !0;
|
|
29762
29876
|
this.quickLookCompatible && !this.interactive && (w = !1), this.anchoringType !== "plane" && this.anchoringType !== "none" && this.anchoringType !== "image" && this.anchoringType !== "face" && (this.anchoringType = "plane"), this.planeAnchoringAlignment !== "horizontal" && this.planeAnchoringAlignment !== "vertical" && this.planeAnchoringAlignment !== "any" && (this.planeAnchoringAlignment = "horizontal"), de.report("export-usdz", "Invoking exporter.parse");
|
|
29763
29877
|
const P = await l.parse(this.objectToExport, {
|
|
@@ -29886,10 +30000,10 @@ At([
|
|
|
29886
30000
|
At([
|
|
29887
30001
|
f()
|
|
29888
30002
|
], Ge.prototype, "quickLookCompatible", 2);
|
|
29889
|
-
var
|
|
29890
|
-
for (var n = i > 1 ? void 0 : i ?
|
|
30003
|
+
var Xk = Object.defineProperty, Qk = Object.getOwnPropertyDescriptor, ry = (s, t, e, i) => {
|
|
30004
|
+
for (var n = i > 1 ? void 0 : i ? Qk(t, e) : t, o = s.length - 1, a; o >= 0; o--)
|
|
29891
30005
|
(a = s[o]) && (n = (i ? a(t, e, n) : a(n)) || n);
|
|
29892
|
-
return i && n &&
|
|
30006
|
+
return i && n && Xk(t, e, n), n;
|
|
29893
30007
|
};
|
|
29894
30008
|
class fh extends I {
|
|
29895
30009
|
constructor() {
|
|
@@ -29936,10 +30050,10 @@ ry([
|
|
|
29936
30050
|
ry([
|
|
29937
30051
|
f(ce)
|
|
29938
30052
|
], fh.prototype, "color", 1);
|
|
29939
|
-
var
|
|
29940
|
-
for (var n = i > 1 ? void 0 : i ?
|
|
30053
|
+
var Yk = Object.defineProperty, Kk = Object.getOwnPropertyDescriptor, ay = (s, t, e, i) => {
|
|
30054
|
+
for (var n = i > 1 ? void 0 : i ? Kk(t, e) : t, o = s.length - 1, a; o >= 0; o--)
|
|
29941
30055
|
(a = s[o]) && (n = (i ? a(t, e, n) : a(n)) || n);
|
|
29942
|
-
return i && n &&
|
|
30056
|
+
return i && n && Yk(t, e, n), n;
|
|
29943
30057
|
};
|
|
29944
30058
|
class hl extends I {
|
|
29945
30059
|
constructor() {
|
|
@@ -29971,10 +30085,10 @@ ay([
|
|
|
29971
30085
|
ay([
|
|
29972
30086
|
f()
|
|
29973
30087
|
], hl.prototype, "isGizmo", 2);
|
|
29974
|
-
var
|
|
29975
|
-
for (var n = i > 1 ? void 0 : i ?
|
|
30088
|
+
var Zk = Object.defineProperty, Jk = Object.getOwnPropertyDescriptor, ly = (s, t, e, i) => {
|
|
30089
|
+
for (var n = i > 1 ? void 0 : i ? Jk(t, e) : t, o = s.length - 1, a; o >= 0; o--)
|
|
29976
30090
|
(a = s[o]) && (n = (i ? a(t, e, n) : a(n)) || n);
|
|
29977
|
-
return i && n &&
|
|
30091
|
+
return i && n && Zk(t, e, n), n;
|
|
29978
30092
|
};
|
|
29979
30093
|
class ph extends I {
|
|
29980
30094
|
constructor() {
|
|
@@ -39958,7 +40072,7 @@ const rc = (Kp = class extends I {
|
|
|
39958
40072
|
i.src = e, i.addEventListener("load", async () => {
|
|
39959
40073
|
const n = await createImageBitmap(i);
|
|
39960
40074
|
rc._imageElements.set(e, n);
|
|
39961
|
-
const o = await
|
|
40075
|
+
const o = await B2(n);
|
|
39962
40076
|
if (o) {
|
|
39963
40077
|
const l = await (await o.convertToBlob({ type: "image/png" })).arrayBuffer(), c = S.findObjectOfType(Ge);
|
|
39964
40078
|
c && this.trackedImages && (c.extensions.push(
|
|
@@ -42723,7 +42837,7 @@ class II {
|
|
|
42723
42837
|
const fD = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
42724
42838
|
__proto__: null,
|
|
42725
42839
|
ActionBuilder: ye,
|
|
42726
|
-
ActionCollection:
|
|
42840
|
+
ActionCollection: G2,
|
|
42727
42841
|
ActionModel: bi,
|
|
42728
42842
|
AlignmentConstraint: Vu,
|
|
42729
42843
|
Animation: ti,
|
|
@@ -42791,7 +42905,7 @@ const fD = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
42791
42905
|
EventListEvent: Ug,
|
|
42792
42906
|
EventSystem: di,
|
|
42793
42907
|
EventTrigger: Kg,
|
|
42794
|
-
FieldWithDefault:
|
|
42908
|
+
FieldWithDefault: v2,
|
|
42795
42909
|
FixedJoint: Uw,
|
|
42796
42910
|
Fog: fh,
|
|
42797
42911
|
GltfExport: Zu,
|
|
@@ -42851,7 +42965,7 @@ const fD = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
42851
42965
|
PreliminaryAction: ch,
|
|
42852
42966
|
PreliminaryTrigger: Ju,
|
|
42853
42967
|
RawImage: Py,
|
|
42854
|
-
Rect:
|
|
42968
|
+
Rect: Ok,
|
|
42855
42969
|
RectTransform: ii,
|
|
42856
42970
|
ReflectionProbe: oh,
|
|
42857
42971
|
RegisteredAnimationInfo: ar,
|
|
@@ -42873,7 +42987,7 @@ const fD = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
42873
42987
|
SignalReceiver: Ph,
|
|
42874
42988
|
SignalReceiverEvent: _f,
|
|
42875
42989
|
SignalTrackHandler: au,
|
|
42876
|
-
Size:
|
|
42990
|
+
Size: Pk,
|
|
42877
42991
|
SizeBySpeedModule: Bi,
|
|
42878
42992
|
SizeOverLifetimeModule: fl,
|
|
42879
42993
|
SkinnedMeshRenderer: cw,
|
|
@@ -43061,7 +43175,7 @@ const DI = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
43061
43175
|
export {
|
|
43062
43176
|
QL as $physicsKey,
|
|
43063
43177
|
ye as ActionBuilder,
|
|
43064
|
-
|
|
43178
|
+
G2 as ActionCollection,
|
|
43065
43179
|
bi as ActionModel,
|
|
43066
43180
|
bO as Addressables,
|
|
43067
43181
|
Vu as AlignmentConstraint,
|
|
@@ -43164,7 +43278,7 @@ export {
|
|
|
43164
43278
|
Ug as EventListEvent,
|
|
43165
43279
|
di as EventSystem,
|
|
43166
43280
|
Kg as EventTrigger,
|
|
43167
|
-
|
|
43281
|
+
v2 as FieldWithDefault,
|
|
43168
43282
|
pc as FileReference,
|
|
43169
43283
|
SO as FileReferenceSerializer,
|
|
43170
43284
|
YL as FileSpawnModel,
|
|
@@ -43278,7 +43392,7 @@ export {
|
|
|
43278
43392
|
Rr as PlayableDirector,
|
|
43279
43393
|
Vc as PlayerColor,
|
|
43280
43394
|
Ji as PlayerState,
|
|
43281
|
-
|
|
43395
|
+
ck as PlayerStateEvent,
|
|
43282
43396
|
hh as PlayerSync,
|
|
43283
43397
|
TO as PlayerView,
|
|
43284
43398
|
AO as PlayerViewManager,
|
|
@@ -43297,7 +43411,7 @@ export {
|
|
|
43297
43411
|
Yo as RapierPhysics,
|
|
43298
43412
|
Py as RawImage,
|
|
43299
43413
|
Ls as RaycastOptions,
|
|
43300
|
-
|
|
43414
|
+
Ok as Rect,
|
|
43301
43415
|
ii as RectTransform,
|
|
43302
43416
|
oh as ReflectionProbe,
|
|
43303
43417
|
ar as RegisteredAnimationInfo,
|
|
@@ -43327,7 +43441,7 @@ export {
|
|
|
43327
43441
|
Ph as SignalReceiver,
|
|
43328
43442
|
_f as SignalReceiverEvent,
|
|
43329
43443
|
au as SignalTrackHandler,
|
|
43330
|
-
|
|
43444
|
+
Pk as Size,
|
|
43331
43445
|
Bi as SizeBySpeedModule,
|
|
43332
43446
|
fl as SizeOverLifetimeModule,
|
|
43333
43447
|
cw as SkinnedMeshRenderer,
|
|
@@ -43375,9 +43489,9 @@ export {
|
|
|
43375
43489
|
sf as UIRootComponent,
|
|
43376
43490
|
mw as USDDocument,
|
|
43377
43491
|
jt as USDObject,
|
|
43378
|
-
|
|
43492
|
+
T2 as USDWriter,
|
|
43379
43493
|
Ge as USDZExporter,
|
|
43380
|
-
|
|
43494
|
+
E2 as USDZExporter$1,
|
|
43381
43495
|
pa as USDZText,
|
|
43382
43496
|
zw as USDZUIExtension,
|
|
43383
43497
|
zM as UriSerializer,
|
|
@@ -43441,7 +43555,7 @@ export {
|
|
|
43441
43555
|
uM as createMotion,
|
|
43442
43556
|
gi as debugNet,
|
|
43443
43557
|
Ih as debugOwner,
|
|
43444
|
-
|
|
43558
|
+
L2 as decompressGpuTexture,
|
|
43445
43559
|
ku as deepClone,
|
|
43446
43560
|
Vn as delay,
|
|
43447
43561
|
Tu as delayForFrames,
|
|
@@ -43473,7 +43587,7 @@ export {
|
|
|
43473
43587
|
zu as getComponents,
|
|
43474
43588
|
Yc as getComponentsInChildren,
|
|
43475
43589
|
Ag as getComponentsInParent,
|
|
43476
|
-
|
|
43590
|
+
P2 as getFormattedDate,
|
|
43477
43591
|
Dt as getIconElement,
|
|
43478
43592
|
q_ as getIconTexture,
|
|
43479
43593
|
aL as getIp,
|
|
@@ -43503,7 +43617,7 @@ export {
|
|
|
43503
43617
|
Em as hasPointerEventComponent,
|
|
43504
43618
|
Rs as hasProLicense,
|
|
43505
43619
|
CC as hideDebugConsole,
|
|
43506
|
-
|
|
43620
|
+
B2 as imageToCanvas,
|
|
43507
43621
|
Ha as instantiate,
|
|
43508
43622
|
ow as invokeAfterImportPluginHooks,
|
|
43509
43623
|
VC as invokeXRSessionEnd,
|