@needle-tools/engine 4.4.0-beta.2 → 4.4.0-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +3614 -3607
- package/LICENSE.md +10 -10
- package/README.md +64 -64
- package/components.needle.json +1 -1
- package/dist/needle-engine.bundle.js +503 -460
- package/dist/needle-engine.bundle.light.js +502 -459
- package/dist/needle-engine.bundle.light.min.js +69 -69
- package/dist/needle-engine.bundle.light.umd.cjs +76 -76
- package/dist/needle-engine.bundle.min.js +69 -69
- package/dist/needle-engine.bundle.umd.cjs +67 -67
- package/dist/needle-engine.d.ts +138 -130
- package/dist/needle-engine.light.d.ts +138 -130
- package/dist/postprocessing.js +1513 -1659
- package/dist/postprocessing.light.js +1513 -1659
- package/dist/postprocessing.light.min.js +66 -80
- package/dist/postprocessing.light.umd.cjs +69 -83
- package/dist/postprocessing.min.js +66 -80
- package/dist/postprocessing.umd.cjs +69 -83
- package/dist/vendor.js +1 -1
- package/dist/vendor.light.js +1 -1
- 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.d.ts +4 -0
- package/lib/engine/engine.js +12 -0
- package/lib/engine/engine.js.map +1 -0
- 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 +380 -380
- 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 +345 -345
- package/lib/engine/engine_context.js +1515 -1515
- 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 +829 -830
- package/lib/engine/engine_element.js.map +1 -1
- 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 +591 -591
- 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 +9 -9
- package/lib/engine/engine_license.js +320 -320
- 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 +212 -212
- 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 +1432 -1432
- 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 +602 -602
- 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_web_api.d.ts +12 -0
- package/lib/engine/engine_web_api.js +113 -0
- package/lib/engine/engine_web_api.js.map +1 -0
- 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 -22
- package/lib/engine/js-extensions/RGBAColor.js +110 -62
- 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 +75 -75
- 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 +151 -151
- package/lib/engine/webcomponents/needle menu/needle-menu.js +1018 -1018
- 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 +1008 -1008
- 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 +627 -627
- 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 -694
- package/lib/engine-components/Camera.js.map +1 -1
- package/lib/engine-components/CameraUtils.d.ts +1 -1
- package/lib/engine-components/CameraUtils.js +118 -127
- package/lib/engine-components/CameraUtils.js.map +1 -1
- 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/FlyControls.d.ts +10 -0
- package/lib/engine-components/FlyControls.js +29 -0
- package/lib/engine-components/FlyControls.js.map +1 -0
- 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 +1009 -1009
- package/lib/engine-components/PlayerColor.d.ts +19 -19
- package/lib/engine-components/PlayerColor.js +94 -94
- package/lib/engine-components/ReflectionProbe.d.ts +26 -26
- package/lib/engine-components/ReflectionProbe.js +194 -194
- 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 +951 -951
- 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 -88
- package/lib/engine-components/SyncedTransform.js +331 -326
- package/lib/engine-components/SyncedTransform.js.map +1 -1
- 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 +157 -157
- 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 +49 -49
- 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 +254 -254
- 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 +353 -353
- package/lib/engine-components/ui/SpatialHtml.d.ts +8 -8
- package/lib/engine-components/ui/SpatialHtml.js +79 -79
- 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 +341 -317
- 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 +105 -105
- 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 +66 -66
- package/plugins/vite/dependencies.js +216 -213
- 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 +99 -99
- 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 +55 -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 +302 -302
- 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 +679 -679
- 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 +373 -373
- package/src/engine/engine_components_internal.ts +40 -40
- package/src/engine/engine_constants.ts +52 -52
- package/src/engine/engine_context.ts +1662 -1662
- 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 +869 -871
- 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 +684 -684
- 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 +329 -329
- 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 +254 -254
- 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 +1579 -1579
- 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 +705 -705
- 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 +125 -75
- 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 +1107 -1107
- package/src/engine/webcomponents/needle-button.ts +181 -181
- package/src/engine/xr/NeedleXRController.ts +1126 -1126
- 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 +639 -639
- 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 -707
- package/src/engine-components/CameraUtils.ts +133 -142
- 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 +1068 -1068
- package/src/engine-components/PlayerColor.ts +103 -103
- package/src/engine-components/ReflectionProbe.ts +209 -209
- 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 +1013 -1013
- 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 -378
- 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 +372 -372
- package/src/engine-components/ui/SpatialHtml.ts +79 -79
- package/src/engine-components/ui/Text.ts +578 -578
- package/src/engine-components/ui/Utils.ts +112 -112
- 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/dist/api.js +17 -0
- package/src/engine-schemes/dist/api.js.meta +7 -0
- package/src/engine-schemes/dist/schemes.js +25 -0
- package/src/engine-schemes/dist/schemes.js.meta +7 -0
- package/src/engine-schemes/dist/synced-camera-model.js +74 -0
- package/src/engine-schemes/dist/synced-camera-model.js.meta +7 -0
- package/src/engine-schemes/dist/synced-transform-model.js +73 -0
- package/src/engine-schemes/dist/synced-transform-model.js.meta +7 -0
- package/src/engine-schemes/dist/transform.js +46 -0
- package/src/engine-schemes/dist/transform.js.meta +7 -0
- package/src/engine-schemes/dist/vec2.js +32 -0
- package/src/engine-schemes/dist/vec2.js.meta +7 -0
- package/src/engine-schemes/dist/vec3.js +36 -0
- package/src/engine-schemes/dist/vec3.js.meta +7 -0
- package/src/engine-schemes/dist/vec4.js +40 -0
- package/src/engine-schemes/dist/vec4.js.meta +7 -0
- package/src/engine-schemes/dist/vr-user-state-buffer.js +110 -0
- package/src/engine-schemes/dist/vr-user-state-buffer.js.meta +7 -0
- 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
|
@@ -4,13 +4,13 @@ var r = (s, t, e) => (kx(s, typeof t != "symbol" ? t + "" : t, e), e), Cf = (s,
|
|
|
4
4
|
if (!t.has(s))
|
|
5
5
|
throw TypeError("Cannot " + e);
|
|
6
6
|
};
|
|
7
|
-
var
|
|
7
|
+
var fe = (s, t, e) => (Cf(s, t, "read from private field"), e ? e.call(s) : t.get(s)), zi = (s, t, e) => {
|
|
8
8
|
if (t.has(s))
|
|
9
9
|
throw TypeError("Cannot add the same private member more than once");
|
|
10
10
|
t instanceof WeakSet ? t.add(s) : t.set(s, e);
|
|
11
11
|
}, ln = (s, t, e, i) => (Cf(s, t, "write to private field"), i ? i.call(s, e) : t.set(s, e), e);
|
|
12
12
|
var Pl = (s, t, e) => (Cf(s, t, "access private method"), e);
|
|
13
|
-
import { Vector2 as oe, Vector3 as v, Vector4 as
|
|
13
|
+
import { Vector2 as oe, Vector3 as v, Vector4 as ge, Quaternion as W, PlaneGeometry as Xn, PerspectiveCamera as be, Scene as Mi, ShaderMaterial as bn, Uniform$1 as co, Mesh as q, WebGLRenderer as Rr, Texture as Fe, Euler as jt, Box3 as Pi, MeshStandardMaterial as It, Color as ce, ShadowMaterial as Kb, Box3Helper as Zb, GridHelper as ig, Material as Se, Matrix3 as Jb, Matrix4 as se, Layers as vo, Object3D as D, Ray as wo, MathUtils as Ps, AxesHelper as Oi, MeshBasicMaterial as Me, DoubleSide as Ri, BufferGeometry as Os, Group as ho, SphereGeometry as vu, BoxGeometry as Da, SpriteMaterial as Tx, Sprite as Ax, Shape as Ex, ExtrudeGeometry as Ix, Fog as e0, DirectionalLight as Yp, PointLight as ng, Line as Ac, BufferAttribute as pt, CylinderGeometry as Dx, EdgesGeometry as Lx, LineSegments as t0, LineBasicMaterial as i0, Sphere as wu, Plane as br, Raycaster as xu, ArrayCamera as jx, SkinnedMesh as Ms, InterleavedBufferAttribute as n0, Skeleton as Bx, Bone as Fx, Source as zx, WebGLCubeRenderTarget as Ux, CubeCamera as Nx, AnimationClip as uo, TextureLoader as wa, PropertyBinding as La, LinearSRGBColorSpace as vr, ShaderChunk as Jt, UniformsLib as $x, FileLoader as s0, DataTexture as sg, RGBAFormat as Su, EquirectangularReflectionMapping as Rs, SRGBColorSpace as vn, Clock as Wx, NoToneMapping as ja, PCFSoftShadowMap$1 as Vx, BasicNodeLibrary as Hx, WebGLRenderTarget as Ts, DepthTexture as Gx, NearestFilter as Id, LoopRepeat as qx, LoopOnce as Kp, AnimationMixer as og, CompressedTexture as Xx, FrontSide as xo, Frustum as D_, OrthographicCamera as rg, AudioListener as Qx, PositionalAudio as Yx, AudioLoader as Zp, EventDispatcher as ag, BackSide as Cu, MeshDepthMaterial as Kx, CustomBlending as Zx, MaxEquation as Jx, AmbientLight as e1, HemisphereLight as t1, InvertStencilOp as i1, DecrementWrapStencilOp as n1, IncrementWrapStencilOp as s1, DecrementStencilOp as o1, IncrementStencilOp as r1, ReplaceStencilOp as a1, ZeroStencilOp as l1, KeepStencilOp as c1, AlwaysStencilFunc as h1, GreaterEqualStencilFunc as d1, NotEqualStencilFunc as u1, GreaterStencilFunc as f1, LessEqualStencilFunc as p1, EqualStencilFunc as m1, LessStencilFunc as g1, NeverStencilFunc as L_, RawShaderMaterial as o0, GLSL3 as _1, AlwaysDepth as y1, GreaterEqualDepth as b1, GreaterDepth as v1, LessEqualDepth as w1, LessDepth as x1, NotEqualDepth as S1, EqualDepth as C1, BatchedMesh as j_, MeshPhysicalMaterial as Jp, UnsignedByteType as P1, LinearFilter as B_, RingGeometry as O1, Line3 as M1, AdditiveBlending as r0, BoxHelper as R1, SpotLight as k1, DirectionalLightHelper as T1, CameraHelper as A1, LOD as E1, Triangle as I1, NormalBlending as D1, NeutralToneMapping as Ec, AgXToneMapping as Pu, ACESFilmicToneMapping as lg, ReinhardToneMapping as cg, LinearToneMapping as Ou, HalfFloatType as L1, VideoTexture as j1, CubeTexture as B1, CompressedCubeTexture as F1, EquirectangularRefractionMapping as z1, VectorKeyframeTrack as U1, QuaternionKeyframeTrack as N1, Audio as $1, MirroredRepeatWrapping as F_, UniformsUtils as a0, ShaderLib as Dd, MeshNormalMaterial as W1, AudioContext as V1, PMREMGenerator$1 as H1 } from "./three.light.js";
|
|
14
14
|
import { createLoaders as hg, getRaycastMesh as l0, LODsManager as Vr, NEEDLE_progressive as Ke, addDracoAndKTX2Loaders as G1, configureLoader as q1, setDracoDecoderLocation as X1, setKTX2TranscoderLocation as Q1 } from "./gltf-progressive.light.js";
|
|
15
15
|
import { GroundedSkybox as Ba, Font as Y1, TextGeometry as K1, FontLoader as Z1, GLTFLoader as wr, TransformControlsGizmo as c0, EXRLoader as Ld, RGBELoader as em, Stats as J1, nodeFrame as eS, OrbitControls as h0, PositionalAudioHelper as tS, HorizontalBlurShader as iS, VerticalBlurShader as nS, GLTFExporter as d0, strToU8 as u0, zipSync as sS, XRControllerModelFactory as oS, XRHandMeshModel as rS, Line2 as aS, LineGeometry as lS, LineMaterial as cS, KTX2Loader as hS, TransformControls as dS, InteractiveGroup as uS, HTMLMesh as fS, VertexNormalsHelper as pS, OBJLoader as dg, FBXLoader as f0, mergeVertices as mS } from "./three-examples.light.js";
|
|
16
16
|
import { fetchProfile as gS, MotionController as _S, $70d766613f57b014$export$2e2bcd8739ae039 as z_, ByteBuffer as yS, v5 as U_, md5 as N_, SIZE_PREFIX_LENGTH as p0, Builder as ug, createNoise4D as bS, Matrix4 as Pf, BatchedParticleRenderer as vS, ParticleSystem as wS, RenderMode as ps, TrailParticle as $_, ConstantColor as xS, Vector4 as SS, ConstantValue as CS, WorkerBase as PS, WorkerWrapper as OS, MeshBVH as MS } from "./vendor.light.js";
|
|
@@ -37,8 +37,8 @@ function TS() {
|
|
|
37
37
|
return window.location.hostname.includes("glitch.me");
|
|
38
38
|
}
|
|
39
39
|
const G_ = typeof window !== void 0 ? window.location.search.includes("debugcontext") : !1;
|
|
40
|
-
var
|
|
41
|
-
class
|
|
40
|
+
var me = /* @__PURE__ */ ((s) => (s.ContextRegistered = "ContextRegistered", s.ContextCreationStart = "ContextCreationStart", s.ContextCreated = "ContextCreated", s.ContextFirstFrameRendered = "ContextFirstFrameRendered", s.ContextDestroying = "ContextDestroying", s.ContextDestroyed = "ContextDestroyed", s.MissingCamera = "MissingCamera", s.ContextClearing = "ContextClearing", s.ContextCleared = "ContextCleared", s))(me || {});
|
|
41
|
+
class pe {
|
|
42
42
|
/** The currently active (rendering) Needle Engine context */
|
|
43
43
|
static get Current() {
|
|
44
44
|
return globalThis["NeedleEngine.Context.Current"];
|
|
@@ -101,7 +101,7 @@ class fe {
|
|
|
101
101
|
}
|
|
102
102
|
}
|
|
103
103
|
/** All currently registered Needle Engine contexts. Do not modify */
|
|
104
|
-
r(
|
|
104
|
+
r(pe, "Registered", []), r(pe, "_callbacks", {});
|
|
105
105
|
const AS = () => (s) => s;
|
|
106
106
|
function WI(s) {
|
|
107
107
|
return AS()(s);
|
|
@@ -244,7 +244,7 @@ function Gn(s) {
|
|
|
244
244
|
function ku(s, t) {
|
|
245
245
|
if (s <= 0)
|
|
246
246
|
return Promise.resolve();
|
|
247
|
-
if (t || (t =
|
|
247
|
+
if (t || (t = pe.Current), !t)
|
|
248
248
|
return Promise.reject("No context");
|
|
249
249
|
const e = t.time.frameCount + s;
|
|
250
250
|
return new Promise((i, n) => {
|
|
@@ -367,7 +367,7 @@ function fg(s, t) {
|
|
|
367
367
|
s[na] = new fo(s, ["x", "y"]);
|
|
368
368
|
else if (s instanceof v)
|
|
369
369
|
s[na] = new fo(s, ["x", "y", "z"]);
|
|
370
|
-
else if (s instanceof
|
|
370
|
+
else if (s instanceof ge || s instanceof W)
|
|
371
371
|
s[na] = new fo(s, ["x", "y", "z", "w"]);
|
|
372
372
|
else
|
|
373
373
|
return !1;
|
|
@@ -662,7 +662,7 @@ function GS(s) {
|
|
|
662
662
|
function Bn(s, t, e, i) {
|
|
663
663
|
if (Dc)
|
|
664
664
|
return;
|
|
665
|
-
const n =
|
|
665
|
+
const n = pe.Current, o = (n == null ? void 0 : n.domElement) ?? document.querySelector("needle-engine");
|
|
666
666
|
if (o) {
|
|
667
667
|
if (Array.isArray(t)) {
|
|
668
668
|
let a = "";
|
|
@@ -1028,7 +1028,7 @@ function G(s, t, e) {
|
|
|
1028
1028
|
const i = tC.get();
|
|
1029
1029
|
return i.set(0, 0, 0), s instanceof v ? i.copy(s) : Array.isArray(s) ? i.set(s[0], s[1], s[2]) : s instanceof DOMPointReadOnly ? i.set(s.x, s.y, s.z) : typeof s == "number" ? (i.x = s, i.y = t !== void 0 ? t : i.x, i.z = e !== void 0 ? e : i.x) : typeof s == "object" && (i.x = s.x, i.y = s.y, i.z = s.z), i;
|
|
1030
1030
|
}
|
|
1031
|
-
const iC = new tn(() => new
|
|
1031
|
+
const iC = new tn(() => new ce(), 30);
|
|
1032
1032
|
function nC(s) {
|
|
1033
1033
|
const t = iC.get();
|
|
1034
1034
|
return s ? t.copy(s) : t.set(0, 0, 0), t;
|
|
@@ -1203,7 +1203,7 @@ class pn {
|
|
|
1203
1203
|
return null;
|
|
1204
1204
|
}
|
|
1205
1205
|
}
|
|
1206
|
-
r(pn, "planeGeometry", new Xn(2, 2, 1, 1)), r(pn, "renderer"), r(pn, "perspectiveCam", new
|
|
1206
|
+
r(pn, "planeGeometry", new Xn(2, 2, 1, 1)), r(pn, "renderer"), r(pn, "perspectiveCam", new be()), r(pn, "scene", new Mi()), r(pn, "vertex", `
|
|
1207
1207
|
varying vec2 vUv;
|
|
1208
1208
|
void main(){
|
|
1209
1209
|
vUv = uv;
|
|
@@ -1330,7 +1330,7 @@ function D0(s, t, e, i) {
|
|
|
1330
1330
|
let Rh = !1;
|
|
1331
1331
|
$S((...s) => {
|
|
1332
1332
|
var t;
|
|
1333
|
-
z() && ((t =
|
|
1333
|
+
z() && ((t = pe.Current) != null && t.isInXR) && (xa(!0), L0("error", ...s));
|
|
1334
1334
|
});
|
|
1335
1335
|
function xa(s) {
|
|
1336
1336
|
if (s) {
|
|
@@ -1362,7 +1362,7 @@ class yC {
|
|
|
1362
1362
|
r(this, "onBeforeRender", () => {
|
|
1363
1363
|
var e, i;
|
|
1364
1364
|
const t = (e = this.context) == null ? void 0 : e.mainCamera;
|
|
1365
|
-
if (this.context && t instanceof
|
|
1365
|
+
if (this.context && t instanceof be) {
|
|
1366
1366
|
const n = this.getRoot();
|
|
1367
1367
|
Number.isNaN(n.position.x) && n.position.set(0, 0, 0), Number.isNaN(n.quaternion.x) && n.quaternion.set(0, 0, 0, 1), this.context.scene.add(this.targetObject);
|
|
1368
1368
|
const o = ((i = this.context.xr) == null ? void 0 : i.rigScale) ?? 1, a = 3.5 * o, l = t.worldForward;
|
|
@@ -1397,7 +1397,7 @@ class yC {
|
|
|
1397
1397
|
this.ensureFont();
|
|
1398
1398
|
}
|
|
1399
1399
|
onEnable() {
|
|
1400
|
-
this.context =
|
|
1400
|
+
this.context = pe.Current || pe.All[0], this.context.pre_render_callbacks.push(this.onBeforeRender);
|
|
1401
1401
|
}
|
|
1402
1402
|
onDisable() {
|
|
1403
1403
|
var t, e, i;
|
|
@@ -1556,7 +1556,7 @@ function L0(s, ...t) {
|
|
|
1556
1556
|
return `(${i(o.x)}, ${i(o.y)})`;
|
|
1557
1557
|
if (o instanceof v)
|
|
1558
1558
|
return `(${i(o.x)}, ${i(o.y)}, ${i(o.z)})`;
|
|
1559
|
-
if (o instanceof
|
|
1559
|
+
if (o instanceof ge)
|
|
1560
1560
|
return `(${i(o.x)}, ${i(o.y)}, ${i(o.z)}, ${i(o.w)})`;
|
|
1561
1561
|
if (o instanceof W)
|
|
1562
1562
|
return `(${i(o.x)}, ${i(o.y)}, ${i(o.z)}, ${i(o.w)})`;
|
|
@@ -1601,7 +1601,7 @@ const wC = x("nodevlogs");
|
|
|
1601
1601
|
function We(s, t = Zi.Log) {
|
|
1602
1602
|
Bn(t, s);
|
|
1603
1603
|
}
|
|
1604
|
-
function
|
|
1604
|
+
function we(s) {
|
|
1605
1605
|
We(s, Zi.Warn);
|
|
1606
1606
|
}
|
|
1607
1607
|
function Iu(s) {
|
|
@@ -1803,18 +1803,18 @@ function TC() {
|
|
|
1803
1803
|
return s || null;
|
|
1804
1804
|
}
|
|
1805
1805
|
const U0 = x("debugdefines");
|
|
1806
|
-
Co('if(!globalThis[""4.4.0-beta.
|
|
1806
|
+
Co('if(!globalThis[""4.4.0-beta.4""]) globalThis[""4.4.0-beta.4""] = "0.0.0";');
|
|
1807
1807
|
Co('if(!globalThis[""undefined""]) globalThis[""undefined""] = "unknown";');
|
|
1808
|
-
Co('if(!globalThis[""
|
|
1809
|
-
Co('if(!globalThis[""
|
|
1810
|
-
Co('globalThis["__NEEDLE_ENGINE_VERSION__"] = "4.4.0-beta.
|
|
1808
|
+
Co('if(!globalThis[""Mon Apr 07 2025 14:35:42 GMT+0200 (Central European Summer Time)""]) globalThis[""Mon Apr 07 2025 14:35:42 GMT+0200 (Central European Summer Time)""] = "unknown";');
|
|
1809
|
+
Co('if(!globalThis[""npk_74222a9fbd1b42572cdd3bf7f639eeb17a07d07f40a6185fac5f722e8fd34df9""]) globalThis[""npk_74222a9fbd1b42572cdd3bf7f639eeb17a07d07f40a6185fac5f722e8fd34df9""] = "unknown";');
|
|
1810
|
+
Co('globalThis["__NEEDLE_ENGINE_VERSION__"] = "4.4.0-beta.4";');
|
|
1811
1811
|
Co('globalThis["__NEEDLE_ENGINE_GENERATOR__"] = "undefined";');
|
|
1812
|
-
Co('globalThis["__NEEDLE_PROJECT_BUILD_TIME__"] = "
|
|
1813
|
-
Co('globalThis["__NEEDLE_PUBLIC_KEY__"] = "
|
|
1814
|
-
const $n = "4.4.0-beta.
|
|
1812
|
+
Co('globalThis["__NEEDLE_PROJECT_BUILD_TIME__"] = "Mon Apr 07 2025 14:35:42 GMT+0200 (Central European Summer Time)";');
|
|
1813
|
+
Co('globalThis["__NEEDLE_PUBLIC_KEY__"] = "npk_74222a9fbd1b42572cdd3bf7f639eeb17a07d07f40a6185fac5f722e8fd34df9";');
|
|
1814
|
+
const $n = "4.4.0-beta.4", gg = "undefined", N0 = "Mon Apr 07 2025 14:35:42 GMT+0200 (Central European Summer Time)";
|
|
1815
1815
|
U0 && console.log(`Engine version: ${$n} (generator: ${gg})
|
|
1816
1816
|
Project built at ${N0}`);
|
|
1817
|
-
const ud = "
|
|
1817
|
+
const ud = "npk_74222a9fbd1b42572cdd3bf7f639eeb17a07d07f40a6185fac5f722e8fd34df9", po = "needle_isActiveInHierarchy", sa = "builtin_components", fd = "needle_editor_guid";
|
|
1818
1818
|
function Co(s) {
|
|
1819
1819
|
try {
|
|
1820
1820
|
(0, eval)(s);
|
|
@@ -2652,7 +2652,7 @@ class VC {
|
|
|
2652
2652
|
break;
|
|
2653
2653
|
}
|
|
2654
2654
|
if (!this._pointerPositionDown[e]) {
|
|
2655
|
-
at &&
|
|
2655
|
+
at && we("Received pointer up event without matching down event for button: " + e), console.warn("Received pointer up event without matching down event for button: " + e);
|
|
2656
2656
|
return;
|
|
2657
2657
|
}
|
|
2658
2658
|
const n = this._pointerUpTime[e], o = this._pointerDownTime[e], a = this.context.time.realtimeSinceStartup, l = a - o;
|
|
@@ -3402,11 +3402,11 @@ function Po(s, t) {
|
|
|
3402
3402
|
}
|
|
3403
3403
|
}
|
|
3404
3404
|
function Mn(s, t) {
|
|
3405
|
-
t ===
|
|
3405
|
+
t === me.ContextCreated && hm.delete(s), G0(s, t);
|
|
3406
3406
|
}
|
|
3407
3407
|
function G0(s, t) {
|
|
3408
|
-
t === Re.Start && Ca.get(
|
|
3409
|
-
const e = t === Re.Start || t ===
|
|
3408
|
+
t === Re.Start && Ca.get(me.ContextCreated) && G0(s, me.ContextCreated);
|
|
3409
|
+
const e = t === Re.Start || t === me.ContextCreated, i = ua.get(t);
|
|
3410
3410
|
i && i.length > 0 && fy(s, i, e);
|
|
3411
3411
|
const n = Ca.get(t);
|
|
3412
3412
|
if (n && n.length > 0) {
|
|
@@ -4358,7 +4358,7 @@ function _y(s, t) {
|
|
|
4358
4358
|
var i;
|
|
4359
4359
|
if ((t == null ? void 0 : t.color) || (t == null ? void 0 : t.material) || (t == null ? void 0 : t.texture)) {
|
|
4360
4360
|
const n = (t == null ? void 0 : t.material) ?? ((i = s.material) == null ? void 0 : i.clone()) ?? new It();
|
|
4361
|
-
t.color && "color" in n && n.color instanceof
|
|
4361
|
+
t.color && "color" in n && n.color instanceof ce && n.color.set(t.color), t != null && t.texture && "map" in n && (n.map = t.texture), s.material = n;
|
|
4362
4362
|
}
|
|
4363
4363
|
}
|
|
4364
4364
|
function yy() {
|
|
@@ -4382,7 +4382,7 @@ const C_ = class {
|
|
|
4382
4382
|
this.update(t, i), this._camera.parent !== this._scene && this._scene.add(this._camera), this._renderer.render(this._scene, this._camera);
|
|
4383
4383
|
});
|
|
4384
4384
|
r(this, "_objects", []);
|
|
4385
|
-
this._mode = t, this._init = e, this._session = i, this._session.addEventListener("end", this.onEnd), this._renderer = new Rr({ alpha: !0 }), this._renderer.setAnimationLoop(this.onFrame), this._renderer.xr.setSession(i), this._renderer.xr.enabled = !0, this._camera = new
|
|
4385
|
+
this._mode = t, this._init = e, this._session = i, this._session.addEventListener("end", this.onEnd), this._renderer = new Rr({ alpha: !0 }), this._renderer.setAnimationLoop(this.onFrame), this._renderer.xr.setSession(i), this._renderer.xr.enabled = !0, this._camera = new be(), this._scene = new Mi(), this._scene.fog = new e0(4473924, 10, 250), this._scene.add(this._camera), this.setupScene();
|
|
4386
4386
|
}
|
|
4387
4387
|
static get active() {
|
|
4388
4388
|
return this._active;
|
|
@@ -4431,7 +4431,7 @@ const C_ = class {
|
|
|
4431
4431
|
await Gn(1e3), this._scene.clear();
|
|
4432
4432
|
}
|
|
4433
4433
|
setupScene() {
|
|
4434
|
-
this._scene.background = new
|
|
4434
|
+
this._scene.background = new ce(0), this._scene.add(new ig(5, 10, 1118481, 1118481));
|
|
4435
4435
|
const t = new Yp(16777215, 1);
|
|
4436
4436
|
t.position.set(0, 20, 0), t.castShadow = !1, this._scene.add(t);
|
|
4437
4437
|
const e = new Yp(16777215, 1);
|
|
@@ -4445,7 +4445,7 @@ const C_ = class {
|
|
|
4445
4445
|
metalness: 1,
|
|
4446
4446
|
roughness: 0.8
|
|
4447
4447
|
});
|
|
4448
|
-
this.isAR && (a.emissive = new
|
|
4448
|
+
this.isAR && (a.emissive = new ce(Math.random(), Math.random(), Math.random()), a.emissiveIntensity = Math.random());
|
|
4449
4449
|
const l = $.random(0, 1) > 0.5 ? Na.Sphere : Na.Cube, c = Tr.createPrimitive(l, {
|
|
4450
4450
|
material: a
|
|
4451
4451
|
});
|
|
@@ -4500,7 +4500,7 @@ async function dP() {
|
|
|
4500
4500
|
if (x("debugasap")) {
|
|
4501
4501
|
let t = globalThis["needle:XRSession"];
|
|
4502
4502
|
if (t instanceof Promise) {
|
|
4503
|
-
delete globalThis["needle:XRSession"],
|
|
4503
|
+
delete globalThis["needle:XRSession"], pe.addContextCreatedCallback(async (e) => {
|
|
4504
4504
|
if (!t)
|
|
4505
4505
|
return;
|
|
4506
4506
|
xa(!0);
|
|
@@ -4542,10 +4542,10 @@ function fP() {
|
|
|
4542
4542
|
sessionStorage.removeItem("needle_xr_session_mode"), sessionStorage.removeItem("needle_xr_session_init");
|
|
4543
4543
|
}
|
|
4544
4544
|
const xg = /* @__PURE__ */ new Set();
|
|
4545
|
-
|
|
4545
|
+
pe.registerCallback(me.ContextCreationStart, async (s) => {
|
|
4546
4546
|
xg.add(s.context);
|
|
4547
4547
|
});
|
|
4548
|
-
|
|
4548
|
+
pe.registerCallback(me.ContextCreated, async (s) => {
|
|
4549
4549
|
xg.delete(s.context);
|
|
4550
4550
|
});
|
|
4551
4551
|
function Y0() {
|
|
@@ -4950,10 +4950,10 @@ const ms = class {
|
|
|
4950
4950
|
if (z() && x("debugxrpreroom"))
|
|
4951
4951
|
return console.warn("Debug: Starting temporary XR session"), await ro.start(t, e || ms.getDefaultSessionInit(t)), null;
|
|
4952
4952
|
if (this._currentSessionRequest)
|
|
4953
|
-
return console.warn("A XRSession is already being requested"), (ut || z()) &&
|
|
4953
|
+
return console.warn("A XRSession is already being requested"), (ut || z()) && we("A XRSession is already being requested"), this._currentSessionRequest.then(() => this._activeSession);
|
|
4954
4954
|
if (this._activeSession)
|
|
4955
4955
|
return console.error("A XRSession is already running"), this._activeSession;
|
|
4956
|
-
if (i || (i = ee.Current), i || (i =
|
|
4956
|
+
if (i || (i = ee.Current), i || (i = pe.All[0]), !i)
|
|
4957
4957
|
throw new Error("No Needle Engine Context found");
|
|
4958
4958
|
switch (performance.mark("NeedleXRSession start"), e || (e = {}), t) {
|
|
4959
4959
|
case "immersive-ar":
|
|
@@ -4990,7 +4990,7 @@ const ms = class {
|
|
|
4990
4990
|
u({ mode: t, init: e });
|
|
4991
4991
|
ut && We("Requesting " + t + " session (" + Date.now() + ")"), this._currentSessionRequest = (h = navigator.xr) == null ? void 0 : h.requestSession(t, e), this._currentSessionRequestMode = t;
|
|
4992
4992
|
const o = await ((d = this._currentSessionRequest) == null ? void 0 : d.catch((u) => {
|
|
4993
|
-
console.error(u, "Code: " + u.code), u.code === 9 &&
|
|
4993
|
+
console.error(u, "Code: " + u.code), u.code === 9 && we("Make sure your device has the required permissions (e.g. camera access)"), console.log("If the specified XR configuration is not supported (e.g. entering AR doesnt work) - make sure you access the website on a secure connection (HTTPS) and your device has the required permissions (e.g. camera access)"), location.protocol === "http:" && we("XR requires a secure connection (HTTPS)");
|
|
4994
4994
|
}));
|
|
4995
4995
|
this._currentSessionRequest = void 0, this._currentSessionRequestMode = null;
|
|
4996
4996
|
for (const u of this._sessionRequestEndListeners)
|
|
@@ -5351,11 +5351,11 @@ ${o.hand ? "hand" : "ctrl"} ${o.inputSource.handedness}[${o.index}] con:${o.conn
|
|
|
5351
5351
|
const i = Ye(this.rig.gameObject);
|
|
5352
5352
|
e *= i.x;
|
|
5353
5353
|
}
|
|
5354
|
-
this._camera instanceof
|
|
5354
|
+
this._camera instanceof be && this._camera.near > e && (this.originalCameraNearPlane = this._camera.near, this._camera.near = e);
|
|
5355
5355
|
}
|
|
5356
5356
|
}
|
|
5357
5357
|
revertCustomForward() {
|
|
5358
|
-
this._camera && this._previousCameraParent && this._previousCameraParent.add(this._camera), this._previousCameraParent = null, this._camera instanceof
|
|
5358
|
+
this._camera && this._previousCameraParent && this._previousCameraParent.add(this._camera), this._previousCameraParent = null, this._camera instanceof be && this.originalCameraNearPlane != null && (this._camera.near = this.originalCameraNearPlane);
|
|
5359
5359
|
}
|
|
5360
5360
|
internalUpdateState() {
|
|
5361
5361
|
const t = this.context.renderer.xr.getReferenceSpace();
|
|
@@ -5381,7 +5381,7 @@ ${o.hand ? "hand" : "ctrl"} ${o.inputSource.handedness}[${o.index}] con:${o.conn
|
|
|
5381
5381
|
}
|
|
5382
5382
|
/** e.g. FadeToBlack */
|
|
5383
5383
|
updateFade(t) {
|
|
5384
|
-
this._transition && t instanceof
|
|
5384
|
+
this._transition && t instanceof be && this._transition.update(t, this.context.time.deltaTime);
|
|
5385
5385
|
}
|
|
5386
5386
|
onUpdateFade_PostRender() {
|
|
5387
5387
|
var t;
|
|
@@ -5419,7 +5419,7 @@ const At = new v(), xy = new v(), Sy = new W(), gP = x("debuggizmos"), cn = 8947
|
|
|
5419
5419
|
}
|
|
5420
5420
|
/** Set visibility of all currently rendered gizmos */
|
|
5421
5421
|
static setVisible(t) {
|
|
5422
|
-
for (const e of
|
|
5422
|
+
for (const e of Ie.timedObjectsBuffer)
|
|
5423
5423
|
e.visible = t;
|
|
5424
5424
|
}
|
|
5425
5425
|
/**
|
|
@@ -5438,7 +5438,7 @@ const At = new v(), xy = new v(), Sy = new W(), gP = x("debuggizmos"), cn = 8947
|
|
|
5438
5438
|
if (!Hi.enabled)
|
|
5439
5439
|
return null;
|
|
5440
5440
|
o || (o = cn);
|
|
5441
|
-
const c = ((d = J.active) == null ? void 0 : d.rigScale) ?? 1, h =
|
|
5441
|
+
const c = ((d = J.active) == null ? void 0 : d.rigScale) ?? 1, h = Ie.getTextLabel(n, e, i * c, o, a);
|
|
5442
5442
|
return l instanceof D && l.add(h), h.position.x = t.x, h.position.y = t.y, h.position.z = t.z, h;
|
|
5443
5443
|
}
|
|
5444
5444
|
/**
|
|
@@ -5452,7 +5452,7 @@ const At = new v(), xy = new v(), Sy = new W(), gP = x("debuggizmos"), cn = 8947
|
|
|
5452
5452
|
static DrawRay(t, e, i = cn, n = 0, o = !0) {
|
|
5453
5453
|
if (!Hi.enabled)
|
|
5454
5454
|
return;
|
|
5455
|
-
const a =
|
|
5455
|
+
const a = Ie.getLine(n), l = a.geometry.getAttribute("position");
|
|
5456
5456
|
l.setXYZ(0, t.x, t.y, t.z), At.set(e.x, e.y, e.z).multiplyScalar(999999999), l.setXYZ(1, t.x + At.x, t.y + At.y, t.z + At.z), l.needsUpdate = !0, a.material.color.set(i), a.material.depthTest = o, a.material.depthWrite = !1;
|
|
5457
5457
|
}
|
|
5458
5458
|
/**
|
|
@@ -5467,7 +5467,7 @@ const At = new v(), xy = new v(), Sy = new W(), gP = x("debuggizmos"), cn = 8947
|
|
|
5467
5467
|
static DrawDirection(t, e, i = cn, n = 0, o = !0, a = 1) {
|
|
5468
5468
|
if (!Hi.enabled)
|
|
5469
5469
|
return;
|
|
5470
|
-
const l =
|
|
5470
|
+
const l = Ie.getLine(n), c = l.geometry.getAttribute("position");
|
|
5471
5471
|
c.setXYZ(0, t.x, t.y, t.z), e.w !== void 0 ? (At.set(0, 0, -a), Sy.set(e.x, e.y, e.z, e.w), At.applyQuaternion(Sy)) : (At.set(e.x, e.y, e.z), At.multiplyScalar(a)), c.setXYZ(1, t.x + At.x, t.y + At.y, t.z + At.z), c.needsUpdate = !0, l.material.color.set(i), l.material.depthTest = o, l.material.depthWrite = !1;
|
|
5472
5472
|
}
|
|
5473
5473
|
/**
|
|
@@ -5481,7 +5481,7 @@ const At = new v(), xy = new v(), Sy = new W(), gP = x("debuggizmos"), cn = 8947
|
|
|
5481
5481
|
static DrawLine(t, e, i = cn, n = 0, o = !0) {
|
|
5482
5482
|
if (!Hi.enabled)
|
|
5483
5483
|
return;
|
|
5484
|
-
const a =
|
|
5484
|
+
const a = Ie.getLine(n), l = a.geometry.getAttribute("position");
|
|
5485
5485
|
l.setXYZ(0, t.x, t.y, t.z), l.setXYZ(1, e.x, e.y, e.z), l.needsUpdate = !0, a.material.color.set(i), a.material.depthTest = o, a.material.depthWrite = !1, a.material.fog = !1;
|
|
5486
5486
|
}
|
|
5487
5487
|
/**
|
|
@@ -5496,7 +5496,7 @@ const At = new v(), xy = new v(), Sy = new W(), gP = x("debuggizmos"), cn = 8947
|
|
|
5496
5496
|
static DrawCircle(t, e, i, n = cn, o = 0, a = !0) {
|
|
5497
5497
|
if (!Hi.enabled)
|
|
5498
5498
|
return;
|
|
5499
|
-
const l =
|
|
5499
|
+
const l = Ie.getCircle(o);
|
|
5500
5500
|
l.position.set(t.x, t.y, t.z), l.scale.set(i, i, i), l.quaternion.setFromUnitVectors(this._up, At.set(e.x, e.y, e.z).normalize()), l.material.color.set(n), l.material.depthTest = a, l.material.depthWrite = !1, l.material.fog = !1;
|
|
5501
5501
|
}
|
|
5502
5502
|
/**
|
|
@@ -5510,7 +5510,7 @@ const At = new v(), xy = new v(), Sy = new W(), gP = x("debuggizmos"), cn = 8947
|
|
|
5510
5510
|
static DrawWireSphere(t, e, i = cn, n = 0, o = !0) {
|
|
5511
5511
|
if (!Hi.enabled)
|
|
5512
5512
|
return;
|
|
5513
|
-
const a =
|
|
5513
|
+
const a = Ie.getSphere(e, n, !0);
|
|
5514
5514
|
Fa(a, t.x, t.y, t.z), a.material.color.set(i), a.material.depthTest = o, a.material.depthWrite = !1, a.material.fog = !1;
|
|
5515
5515
|
}
|
|
5516
5516
|
/**
|
|
@@ -5524,7 +5524,7 @@ const At = new v(), xy = new v(), Sy = new W(), gP = x("debuggizmos"), cn = 8947
|
|
|
5524
5524
|
static DrawSphere(t, e, i = cn, n = 0, o = !0) {
|
|
5525
5525
|
if (!Hi.enabled)
|
|
5526
5526
|
return;
|
|
5527
|
-
const a =
|
|
5527
|
+
const a = Ie.getSphere(e, n, !1);
|
|
5528
5528
|
Fa(a, t.x, t.y, t.z), a.material.color.set(i), a.material.depthTest = o, a.material.depthWrite = !1;
|
|
5529
5529
|
}
|
|
5530
5530
|
/**
|
|
@@ -5538,7 +5538,7 @@ const At = new v(), xy = new v(), Sy = new W(), gP = x("debuggizmos"), cn = 8947
|
|
|
5538
5538
|
static DrawWireBox(t, e, i = cn, n = 0, o = !0) {
|
|
5539
5539
|
if (!Hi.enabled)
|
|
5540
5540
|
return;
|
|
5541
|
-
const a =
|
|
5541
|
+
const a = Ie.getBox(n);
|
|
5542
5542
|
a.position.set(t.x, t.y, t.z), a.scale.set(e.x, e.y, e.z), a.material.color.set(i), a.material.depthTest = o, a.material.wireframe = !0, a.material.depthWrite = !1, a.material.fog = !1;
|
|
5543
5543
|
}
|
|
5544
5544
|
/**
|
|
@@ -5551,7 +5551,7 @@ const At = new v(), xy = new v(), Sy = new W(), gP = x("debuggizmos"), cn = 8947
|
|
|
5551
5551
|
static DrawWireBox3(t, e = cn, i = 0, n = !0) {
|
|
5552
5552
|
if (!Hi.enabled)
|
|
5553
5553
|
return;
|
|
5554
|
-
const o =
|
|
5554
|
+
const o = Ie.getBox(i);
|
|
5555
5555
|
o.position.copy(t.getCenter(At)), o.scale.copy(t.getSize(At)), o.material.color.set(e), o.material.depthTest = n, o.material.wireframe = !0, o.material.depthWrite = !1, o.material.fog = !1;
|
|
5556
5556
|
}
|
|
5557
5557
|
/**
|
|
@@ -5566,7 +5566,7 @@ const At = new v(), xy = new v(), Sy = new W(), gP = x("debuggizmos"), cn = 8947
|
|
|
5566
5566
|
static DrawArrow(t, e, i = cn, n = 0, o = !0, a = !1) {
|
|
5567
5567
|
if (!Hi.enabled)
|
|
5568
5568
|
return;
|
|
5569
|
-
const l =
|
|
5569
|
+
const l = Ie.getArrowHead(n);
|
|
5570
5570
|
l.position.set(e.x, e.y, e.z), l.quaternion.setFromUnitVectors(this._up.set(0, 1, 0), At.set(e.x, e.y, e.z).sub(xy.set(t.x, t.y, t.z)).normalize());
|
|
5571
5571
|
const h = At.set(e.x, e.y, e.z).sub(xy.set(t.x, t.y, t.z)).length() * 0.1;
|
|
5572
5572
|
l.scale.set(h, h, h), l.material.color.set(i), l.material.depthTest = o, l.material.wireframe = a, this.DrawLine(t, e, i, n, o);
|
|
@@ -5587,7 +5587,7 @@ const At = new v(), xy = new v(), Sy = new W(), gP = x("debuggizmos"), cn = 8947
|
|
|
5587
5587
|
* ```
|
|
5588
5588
|
*/
|
|
5589
5589
|
static DrawWireMesh(t) {
|
|
5590
|
-
const e =
|
|
5590
|
+
const e = Ie.getMesh(t.duration ?? 0);
|
|
5591
5591
|
"mesh" in t ? (e.geometry = t.mesh.geometry, e.matrix.copy(t.mesh.matrixWorld)) : (e.geometry = t.geometry, e.matrix.copy(t.matrix)), e.matrixAutoUpdate = !1, e.matrixWorldAutoUpdate = !1, e.material.color.set(t.color ?? cn), e.material.depthTest = t.depthTest ?? !0, e.material.wireframe = !0;
|
|
5592
5592
|
}
|
|
5593
5593
|
};
|
|
@@ -5599,11 +5599,11 @@ let V = Hi;
|
|
|
5599
5599
|
r(V, "enabled", !0), r(V, "_up", new v(0, 1, 0));
|
|
5600
5600
|
const _P = new Da(1, 1, 1);
|
|
5601
5601
|
function Sg(s = null) {
|
|
5602
|
-
const t = new
|
|
5602
|
+
const t = new ce(s ?? 14540253), e = new Lx(_P);
|
|
5603
5603
|
return new t0(e, new i0({ color: t }));
|
|
5604
5604
|
}
|
|
5605
5605
|
const um = Symbol("GizmoCache");
|
|
5606
|
-
class
|
|
5606
|
+
class Ie {
|
|
5607
5607
|
static ensureFont() {
|
|
5608
5608
|
let t = Te.FontLibrary.getFontFamily(this.familyName);
|
|
5609
5609
|
if (!t) {
|
|
@@ -5746,7 +5746,7 @@ class Ee {
|
|
|
5746
5746
|
}
|
|
5747
5747
|
}
|
|
5748
5748
|
// private static createdLines: number = 0;
|
|
5749
|
-
r(
|
|
5749
|
+
r(Ie, "familyName", "needle-gizmos"), r(Ie, "linesCache", []), r(Ie, "circlesCache", []), r(Ie, "spheresCache", []), r(Ie, "boxesCache", []), r(Ie, "arrowHeadsCache", []), r(Ie, "mesh", []), r(Ie, "textLabelCache", []), r(Ie, "timedObjectsBuffer", new Array()), r(Ie, "timesBuffer", new Array()), r(Ie, "contextPostRenderCallbacks", /* @__PURE__ */ new Map()), r(Ie, "contextBeforeRenderCallbacks", /* @__PURE__ */ new Map()), r(Ie, "tmuiNeedsUpdate", !1);
|
|
5750
5750
|
const yi = x("debugphysics"), Cy = new vo();
|
|
5751
5751
|
class As {
|
|
5752
5752
|
constructor() {
|
|
@@ -6143,7 +6143,7 @@ const tv = Symbol("disposed");
|
|
|
6143
6143
|
function RD(s) {
|
|
6144
6144
|
return s[tv] === !0;
|
|
6145
6145
|
}
|
|
6146
|
-
function
|
|
6146
|
+
function Ee(s) {
|
|
6147
6147
|
var t;
|
|
6148
6148
|
if (s) {
|
|
6149
6149
|
if (s[J0] === !1) {
|
|
@@ -6151,33 +6151,33 @@ function Ae(s) {
|
|
|
6151
6151
|
return;
|
|
6152
6152
|
}
|
|
6153
6153
|
if (s[tv] = !0, s instanceof Mi)
|
|
6154
|
-
|
|
6154
|
+
Ee(s.environment), Ee(s.background), Ee(s.customDepthMaterial), Ee(s.customDistanceMaterial);
|
|
6155
6155
|
else if (s instanceof Ms)
|
|
6156
|
-
|
|
6156
|
+
Ee(s.geometry), Ee(s.material), Ee(s.skeleton), Ee(s.bindMatrix), Ee(s.bindMatrixInverse), Ee(s.customDepthMaterial), Ee(s.customDistanceMaterial), s.geometry = null, s.material = null, s.visible = !1;
|
|
6157
6157
|
else if (s instanceof q)
|
|
6158
|
-
|
|
6158
|
+
Ee(s.geometry), Ee(s.material), Ee(s.customDepthMaterial), Ee(s.customDistanceMaterial), s.geometry = null, s.material = null, s.visible = !1;
|
|
6159
6159
|
else if (s instanceof Os) {
|
|
6160
6160
|
Hr(s);
|
|
6161
6161
|
for (const e of Object.keys(s.attributes)) {
|
|
6162
6162
|
const i = s.attributes[e];
|
|
6163
|
-
|
|
6163
|
+
Ee(i);
|
|
6164
6164
|
}
|
|
6165
6165
|
} else if (s instanceof pt || s instanceof n0)
|
|
6166
6166
|
cr && console.warn("BufferAttribute dispose not supported", s.count);
|
|
6167
6167
|
else if (s instanceof Array)
|
|
6168
6168
|
for (const e of s)
|
|
6169
|
-
e instanceof Se &&
|
|
6169
|
+
e instanceof Se && Ee(e);
|
|
6170
6170
|
else if (s instanceof Se) {
|
|
6171
6171
|
Hr(s);
|
|
6172
6172
|
for (const i of Object.keys(s)) {
|
|
6173
6173
|
const n = s[i];
|
|
6174
|
-
n instanceof Fe && (
|
|
6174
|
+
n instanceof Fe && (Ee(n), s[i] = null);
|
|
6175
6175
|
}
|
|
6176
6176
|
const e = s.uniforms;
|
|
6177
6177
|
if (e)
|
|
6178
6178
|
for (const i of Object.keys(e)) {
|
|
6179
6179
|
const n = e[i];
|
|
6180
|
-
n instanceof Fe ? (
|
|
6180
|
+
n instanceof Fe ? (Ee(n), e[i] = null) : n instanceof co && (Ee(n.value), n.value = null);
|
|
6181
6181
|
}
|
|
6182
6182
|
} else
|
|
6183
6183
|
s instanceof Fe ? (Hr(s), Hr(s.source), ((t = s.source) == null ? void 0 : t.data) instanceof ImageBitmap && Hr(s.source.data)) : s instanceof Bx ? (Hr(s.boneTexture), s.boneTexture = null) : s instanceof Fx || !(s instanceof D) && cr && console.warn("Unknown object type", s);
|
|
@@ -6241,7 +6241,7 @@ function Ud(s, t, e, i) {
|
|
|
6241
6241
|
} else if (t && n.has(t)) {
|
|
6242
6242
|
n.delete(t);
|
|
6243
6243
|
let o = e[Gl] || 0;
|
|
6244
|
-
o > 0 && (o -= 1, e[Gl] = o), cr && console.warn(`🔴 Removed user of "${e.type}"`, t, e, o, "users:", n), o <= 0 && (hc.isLoading(e) || (Du && console.warn(`🔴 Removed all user of "${e.type}"`, e), Z0() &&
|
|
6244
|
+
o > 0 && (o -= 1, e[Gl] = o), cr && console.warn(`🔴 Removed user of "${e.type}"`, t, e, o, "users:", n), o <= 0 && (hc.isLoading(e) || (Du && console.warn(`🔴 Removed all user of "${e.type}"`, e), Z0() && Ee(e)));
|
|
6245
6245
|
}
|
|
6246
6246
|
e[s] = n;
|
|
6247
6247
|
}
|
|
@@ -6420,7 +6420,7 @@ function $f(s, t) {
|
|
|
6420
6420
|
return !1;
|
|
6421
6421
|
}
|
|
6422
6422
|
function pd(s) {
|
|
6423
|
-
if (s || (s =
|
|
6423
|
+
if (s || (s = pe.Current.scene), !s) {
|
|
6424
6424
|
console.trace("Invalid call - no current context.");
|
|
6425
6425
|
return;
|
|
6426
6426
|
}
|
|
@@ -6493,7 +6493,7 @@ function AP(s) {
|
|
|
6493
6493
|
}
|
|
6494
6494
|
}
|
|
6495
6495
|
}
|
|
6496
|
-
|
|
6496
|
+
pe.registerCallback(me.ContextCreated, (s) => {
|
|
6497
6497
|
const t = s.context;
|
|
6498
6498
|
BP(t), DP(t);
|
|
6499
6499
|
});
|
|
@@ -7222,7 +7222,7 @@ function sO() {
|
|
|
7222
7222
|
};
|
|
7223
7223
|
}
|
|
7224
7224
|
sO();
|
|
7225
|
-
Object.defineProperty(
|
|
7225
|
+
Object.defineProperty(be.prototype, "fov", {
|
|
7226
7226
|
get: function() {
|
|
7227
7227
|
return this._fov;
|
|
7228
7228
|
},
|
|
@@ -7232,7 +7232,7 @@ Object.defineProperty(ye.prototype, "fov", {
|
|
|
7232
7232
|
},
|
|
7233
7233
|
configurable: !0
|
|
7234
7234
|
});
|
|
7235
|
-
Object.defineProperty(
|
|
7235
|
+
Object.defineProperty(be.prototype, "near", {
|
|
7236
7236
|
get: function() {
|
|
7237
7237
|
return this._near;
|
|
7238
7238
|
},
|
|
@@ -7242,7 +7242,7 @@ Object.defineProperty(ye.prototype, "near", {
|
|
|
7242
7242
|
},
|
|
7243
7243
|
configurable: !0
|
|
7244
7244
|
});
|
|
7245
|
-
Object.defineProperty(
|
|
7245
|
+
Object.defineProperty(be.prototype, "far", {
|
|
7246
7246
|
get: function() {
|
|
7247
7247
|
return this._far;
|
|
7248
7248
|
},
|
|
@@ -7547,7 +7547,7 @@ Object.getOwnPropertyDescriptor(D.prototype, "worldUp") || Object.defineProperty
|
|
|
7547
7547
|
}
|
|
7548
7548
|
});
|
|
7549
7549
|
rO(D);
|
|
7550
|
-
class
|
|
7550
|
+
class le extends ce {
|
|
7551
7551
|
constructor(e, i, n, o) {
|
|
7552
7552
|
var t = (...args) => {
|
|
7553
7553
|
super(...args);
|
|
@@ -7586,6 +7586,32 @@ class we extends ae {
|
|
|
7586
7586
|
fromArray(e, i = 0) {
|
|
7587
7587
|
return this.alpha = e[i + 3], super.fromArray(e, i);
|
|
7588
7588
|
}
|
|
7589
|
+
static fromColorRepresentation(e) {
|
|
7590
|
+
if (typeof e == "string") {
|
|
7591
|
+
if (e.trim() === "transparent")
|
|
7592
|
+
return new le(0, 0, 0, 0);
|
|
7593
|
+
if (e.startsWith("#") && e.length === 9) {
|
|
7594
|
+
const i = parseInt(e.slice(1, 9), 16), n = i >> 24 & 255, o = i >> 16 & 255, a = i >> 8 & 255, l = i >> 0 & 255;
|
|
7595
|
+
return new le(n / 255, o / 255, a / 255, l / 255);
|
|
7596
|
+
} else if (e.startsWith("#")) {
|
|
7597
|
+
const i = parseInt(e.slice(1), 16), n = i >> 16 & 255, o = i >> 8 & 255, a = i >> 0 & 255;
|
|
7598
|
+
return new le(n / 255, o / 255, a / 255, 1);
|
|
7599
|
+
} else if (e.startsWith("rgba")) {
|
|
7600
|
+
const i = e.slice(5, -1).split(",").map(Number);
|
|
7601
|
+
return new le(i[0] / 255, i[1] / 255, i[2] / 255, i[3]);
|
|
7602
|
+
} else if (e.startsWith("rgb")) {
|
|
7603
|
+
const i = e.slice(4, -1).split(",").map(Number);
|
|
7604
|
+
return new le(i[0] / 255, i[1] / 255, i[2] / 255, 1);
|
|
7605
|
+
}
|
|
7606
|
+
} else if (Array.isArray(e)) {
|
|
7607
|
+
if (e.length === 4)
|
|
7608
|
+
return new le(e[0], e[1], e[2], e[3]);
|
|
7609
|
+
if (e.length === 3)
|
|
7610
|
+
return new le(e[0], e[1], e[2], 1);
|
|
7611
|
+
console.error("Invalid color array length. Expected 3 or 4, got " + e.length);
|
|
7612
|
+
}
|
|
7613
|
+
return new le(e);
|
|
7614
|
+
}
|
|
7589
7615
|
}
|
|
7590
7616
|
const _d = x("debuggetcomponent"), yd = x("debuginstantiate");
|
|
7591
7617
|
class Qn {
|
|
@@ -7646,7 +7672,7 @@ function nn(s, t = !0, e = !1) {
|
|
|
7646
7672
|
for (const i of vd)
|
|
7647
7673
|
i.gameObject = null, i.context = null;
|
|
7648
7674
|
for (const i of wd)
|
|
7649
|
-
mO(i, !0), e &&
|
|
7675
|
+
mO(i, !0), e && Ee(i), SP(i);
|
|
7650
7676
|
wd.length = 0, vd.length = 0;
|
|
7651
7677
|
}
|
|
7652
7678
|
function xm(s, t = !0, e = !0) {
|
|
@@ -7900,9 +7926,9 @@ var Ga;
|
|
|
7900
7926
|
d instanceof File ? m = await d.arrayBuffer() : m = d.data;
|
|
7901
7927
|
const g = m.byteLength, _ = g / 1024 / 1024;
|
|
7902
7928
|
if (_ > 50)
|
|
7903
|
-
return (u == null ? void 0 : u.silent) !== !0 &&
|
|
7929
|
+
return (u == null ? void 0 : u.silent) !== !0 && we(`File (${_.toFixed(1)}MB) is too large for uploading (see console for details)`), console.warn(`Your file is too large for uploading (${_.toFixed(1)}MB). Max allowed size is 50MB`), null;
|
|
7904
7930
|
if (!Vn() && _ > 5)
|
|
7905
|
-
return (u == null ? void 0 : u.silent) !== !0 &&
|
|
7931
|
+
return (u == null ? void 0 : u.silent) !== !0 && we('File is too large for uploading. Please get a <a href="https://needle.tools/pricing" target="_blank">commercial license</a> to upload files larger than 5MB'), console.warn(`Your file is too large for uploading (${_.toFixed(1)}MB). Max size is 5MB for non-commercial users. Please get a commercial license at https://needle.tools/pricing for larger files (up to 50MB)`), null;
|
|
7906
7932
|
if (g < 1)
|
|
7907
7933
|
return console.warn(`Your file is too small for uploading (${_.toFixed(1)}MB). Min size is 1 byte`), null;
|
|
7908
7934
|
const y = n(m), b = {
|
|
@@ -8671,7 +8697,7 @@ irradiance += 0.;
|
|
|
8671
8697
|
irradiance += getLightProbeIrradiance( lightProbe, geometry.normal );
|
|
8672
8698
|
#endif`
|
|
8673
8699
|
);
|
|
8674
|
-
$x.lightmap.lightmapScaleOffset = { value: new
|
|
8700
|
+
$x.lightmap.lightmapScaleOffset = { value: new ge(1, 1, 0, 0) };
|
|
8675
8701
|
const Gf = x("debugprogressive"), Lh = new Pi(), jh = new wu();
|
|
8676
8702
|
class MO {
|
|
8677
8703
|
constructor(t) {
|
|
@@ -8812,7 +8838,7 @@ function Ag(s, t = 1) {
|
|
|
8812
8838
|
return c.needsUpdate = !0, c;
|
|
8813
8839
|
}
|
|
8814
8840
|
function EO(s, t, e, i = 1, n = 3) {
|
|
8815
|
-
const a = i * n, l = [s, t, e], c = l.length, h = new Uint8Array(4 * c * a), d = new
|
|
8841
|
+
const a = i * n, l = [s, t, e], c = l.length, h = new Uint8Array(4 * c * a), d = new ce();
|
|
8816
8842
|
for (let p = 0; p < n; p++) {
|
|
8817
8843
|
const m = Math.floor(p / n * c), g = $.clamp(m + 1, 0, c - 1), _ = l[m], y = l[g], b = p / n * c % 1;
|
|
8818
8844
|
d.lerpColors(_, y, b);
|
|
@@ -8829,7 +8855,7 @@ function Gd(s, t) {
|
|
|
8829
8855
|
const e = s.elements;
|
|
8830
8856
|
t || (t = []), t.length = 0;
|
|
8831
8857
|
for (let i = 0; i < 16; i += 4) {
|
|
8832
|
-
const n = e[i], o = e[i + 1], a = e[i + 2], l = e[i + 3], c = new
|
|
8858
|
+
const n = e[i], o = e[i + 1], a = e[i + 2], l = e[i + 3], c = new ge(n, o, a, l);
|
|
8833
8859
|
t.push(c);
|
|
8834
8860
|
}
|
|
8835
8861
|
return t;
|
|
@@ -8842,7 +8868,7 @@ function IO(s, t) {
|
|
|
8842
8868
|
t || (t = qf);
|
|
8843
8869
|
for (let e = 0; e < 27; e++)
|
|
8844
8870
|
Uy[e] = t[e];
|
|
8845
|
-
t = Uy, s.unity_SHAr = { value: new
|
|
8871
|
+
t = Uy, s.unity_SHAr = { value: new ge(t[9], t[3], t[6], t[0]) }, s.unity_SHBr = { value: new ge(t[12], t[15], t[18], t[21]) }, s.unity_SHAg = { value: new ge(t[10], t[4], t[7], t[1]) }, s.unity_SHBg = { value: new ge(t[13], t[16], t[19], t[22]) }, s.unity_SHAb = { value: new ge(t[11], t[5], t[8], t[2]) }, s.unity_SHBb = { value: new ge(t[14], t[17], t[20], t[23]) }, s.unity_SHC = { value: new ge(t[24], t[25], t[26], 1) };
|
|
8846
8872
|
}
|
|
8847
8873
|
class DO {
|
|
8848
8874
|
constructor(t, e, i) {
|
|
@@ -8888,7 +8914,7 @@ class BO {
|
|
|
8888
8914
|
r(this, "context");
|
|
8889
8915
|
r(this, "_currentLightSettingsId");
|
|
8890
8916
|
r(this, "_sceneLightSettings");
|
|
8891
|
-
r(this, "_timevec4", new
|
|
8917
|
+
r(this, "_timevec4", new ge());
|
|
8892
8918
|
r(this, "__currentReflectionId", null);
|
|
8893
8919
|
r(this, "_lighting", {});
|
|
8894
8920
|
this.context = t, this.context.pre_update_callbacks.push(this.preUpdate.bind(this));
|
|
@@ -9421,7 +9447,7 @@ const du = class {
|
|
|
9421
9447
|
i.classList.add("qr-code-container"), e.appendChild(i), t.addEventListener("click", () => {
|
|
9422
9448
|
if (e.parentNode)
|
|
9423
9449
|
return o();
|
|
9424
|
-
window.location.href.includes("://localhost") &&
|
|
9450
|
+
window.location.href.includes("://localhost") && we("To access your website from another device in the same local network you have to use the IP address instead of localhost."), n();
|
|
9425
9451
|
});
|
|
9426
9452
|
async function n() {
|
|
9427
9453
|
await a(), document.body.appendChild(e);
|
|
@@ -9658,7 +9684,7 @@ class WO {
|
|
|
9658
9684
|
whiteSpace: "pre-wrap",
|
|
9659
9685
|
flexDirection: "row",
|
|
9660
9686
|
alignItems: "center",
|
|
9661
|
-
padding: new
|
|
9687
|
+
padding: new ge(0, 0.05, 0, 0.05),
|
|
9662
9688
|
borderColor: 0,
|
|
9663
9689
|
borderOpacity: 0.05,
|
|
9664
9690
|
borderWidth: 5e-3
|
|
@@ -9694,7 +9720,7 @@ class WO {
|
|
|
9694
9720
|
width: "auto",
|
|
9695
9721
|
height: "auto",
|
|
9696
9722
|
fontSize: 0.07,
|
|
9697
|
-
margin: new
|
|
9723
|
+
margin: new ge(0, 0, 0, 0.02)
|
|
9698
9724
|
});
|
|
9699
9725
|
this._poweredByNeedleElement.add(i), this._poweredByNeedleElement.add(n), (t = this.menu) == null || t.add(this._poweredByNeedleElement), this.markDirty(), new wa().load("./include/needle/poweredbyneedle.webp", (a) => {
|
|
9700
9726
|
var c;
|
|
@@ -9803,7 +9829,7 @@ class VO {
|
|
|
9803
9829
|
backgroundColor: 16777215,
|
|
9804
9830
|
backgroundImage: n,
|
|
9805
9831
|
backgroundOpacity: 1,
|
|
9806
|
-
margin: new
|
|
9832
|
+
margin: new ge(0, 5e-3, 0, 0)
|
|
9807
9833
|
});
|
|
9808
9834
|
this.spatialIcon = a, this.spatialContainer.add(a), this.menu.markDirty();
|
|
9809
9835
|
}
|
|
@@ -10454,12 +10480,12 @@ const O_ = class extends HTMLElement {
|
|
|
10454
10480
|
connectedCallback() {
|
|
10455
10481
|
window.addEventListener("resize", this.handleSizeChange), this.handleMenuVisible(), this._sizeChangeInterval = setInterval(() => this.handleSizeChange(void 0, !0), 5e3), setTimeout(() => {
|
|
10456
10482
|
var e, i;
|
|
10457
|
-
(e = this._domElement) == null || e.addEventListener("resize", this.handleSizeChange), (i = this._domElement) == null || i.addEventListener("click",
|
|
10483
|
+
(e = this._domElement) == null || e.addEventListener("resize", this.handleSizeChange), (i = this._domElement) == null || i.addEventListener("click", fe(this, Gc));
|
|
10458
10484
|
}, 1);
|
|
10459
10485
|
}
|
|
10460
10486
|
disconnectedCallback() {
|
|
10461
10487
|
var e, i;
|
|
10462
|
-
window.removeEventListener("resize", this.handleSizeChange), clearInterval(this._sizeChangeInterval), (e = this._domElement) == null || e.removeEventListener("resize", this.handleSizeChange), (i = this._context) == null || i.domElement.removeEventListener("click",
|
|
10488
|
+
window.removeEventListener("resize", this.handleSizeChange), clearInterval(this._sizeChangeInterval), (e = this._domElement) == null || e.removeEventListener("resize", this.handleSizeChange), (i = this._context) == null || i.domElement.removeEventListener("click", fe(this, Gc));
|
|
10463
10489
|
}
|
|
10464
10490
|
showNeedleLogo(e) {
|
|
10465
10491
|
this._userRequestedLogoVisible = e, !(!e && (!Vn() || Gy) && (console.warn("Needle Menu: You need a PRO license to hide the Needle Engine logo."), !ui())) && this.___onSetLogoVisible(e);
|
|
@@ -10761,7 +10787,7 @@ const ke = class {
|
|
|
10761
10787
|
}), this._disposeCallbacks.push(() => {
|
|
10762
10788
|
var n;
|
|
10763
10789
|
return (n = this._intersectionObserver) == null ? void 0 : n.disconnect();
|
|
10764
|
-
}),
|
|
10790
|
+
}), pe.register(this);
|
|
10765
10791
|
}
|
|
10766
10792
|
/** When a new context is created this is the framerate that will be used by default */
|
|
10767
10793
|
static get DefaultTargetFrameRate() {
|
|
@@ -10788,14 +10814,14 @@ const ke = class {
|
|
|
10788
10814
|
}
|
|
10789
10815
|
/** The currently active context. Only set during the update loops */
|
|
10790
10816
|
static get Current() {
|
|
10791
|
-
return
|
|
10817
|
+
return pe.Current;
|
|
10792
10818
|
}
|
|
10793
10819
|
/** @internal this property should not be set by user code */
|
|
10794
10820
|
static set Current(t) {
|
|
10795
|
-
|
|
10821
|
+
pe.Current = t;
|
|
10796
10822
|
}
|
|
10797
10823
|
static get All() {
|
|
10798
|
-
return
|
|
10824
|
+
return pe.All;
|
|
10799
10825
|
}
|
|
10800
10826
|
appendHTMLElement(t) {
|
|
10801
10827
|
return this.domElement.shadowRoot ? this.domElement.shadowRoot.appendChild(t) : this.domElement.appendChild(t);
|
|
@@ -10887,7 +10913,7 @@ const ke = class {
|
|
|
10887
10913
|
const t = this.mainCameraComponent;
|
|
10888
10914
|
return t.threeCamera || t.buildCamera(), t.threeCamera;
|
|
10889
10915
|
}
|
|
10890
|
-
return this._fallbackCamera || (this._fallbackCamera = new
|
|
10916
|
+
return this._fallbackCamera || (this._fallbackCamera = new be(75, this.domWidth / this.domHeight, 0.1, 1e3)), this._fallbackCamera;
|
|
10891
10917
|
}
|
|
10892
10918
|
/** Set the main camera of the scene. If set to null the camera of the {@link mainCameraComponent} will be used - this camera is used for rendering */
|
|
10893
10919
|
set mainCamera(t) {
|
|
@@ -10907,7 +10933,7 @@ const ke = class {
|
|
|
10907
10933
|
const o = (n = (i = this.domElement) == null ? void 0 : i.shadowRoot) == null ? void 0 : n.querySelector("canvas");
|
|
10908
10934
|
o && (t.canvas = o, nt && console.log("Using canvas from shadow root", o));
|
|
10909
10935
|
}
|
|
10910
|
-
nt && console.log("Using Renderer Parameters:", t, this.domElement), this.renderer = new Rr(t), this.renderer.debug.checkShaderErrors = z() || x("checkshadererrors") === !0, this.renderer.toneMappingExposure = 1, this.renderer.toneMapping = ja, this.renderer.setClearColor(new
|
|
10936
|
+
nt && console.log("Using Renderer Parameters:", t, this.domElement), this.renderer = new Rr(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 = Vx, this.renderer.setSize(this.domWidth, this.domHeight), this.renderer.outputColorSpace = vn, this.renderer.nodes = {
|
|
10911
10937
|
library: new Hx(),
|
|
10912
10938
|
modelViewMatrix: null,
|
|
10913
10939
|
modelNormalViewMatrix: null
|
|
@@ -10973,7 +10999,7 @@ const ke = class {
|
|
|
10973
10999
|
*/
|
|
10974
11000
|
clear() {
|
|
10975
11001
|
var t, e, i, n;
|
|
10976
|
-
|
|
11002
|
+
pe.dispatchCallback(me.ContextClearing, this), Mn(this, me.ContextClearing), nn(this.scene, !0, !0), this.scene = new Mi(), (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);
|
|
10977
11003
|
}
|
|
10978
11004
|
dispose() {
|
|
10979
11005
|
this.internalOnDestroy();
|
|
@@ -10984,14 +11010,14 @@ const ke = class {
|
|
|
10984
11010
|
}
|
|
10985
11011
|
internalOnDestroy() {
|
|
10986
11012
|
var t, e;
|
|
10987
|
-
ke.Current = this,
|
|
11013
|
+
ke.Current = this, pe.dispatchCallback(me.ContextDestroying, this), Mn(this, me.ContextDestroying), this.clear(), (t = this.renderer) == null || t.setAnimationLoop(null), this.renderer && (this.renderer.setClearAlpha(0), this.renderer.clear(), this.isManagedExternally || (nt && console.log("Disposing renderer"), this.renderer.dispose())), this.scene = null, this.renderer = null, this.input.dispose(), this.menu.onDestroy(), this.animations.onDestroy();
|
|
10988
11014
|
for (const i of this._disposeCallbacks)
|
|
10989
11015
|
try {
|
|
10990
11016
|
i();
|
|
10991
11017
|
} catch (n) {
|
|
10992
11018
|
console.error("Error in on dispose callback:", n, i);
|
|
10993
11019
|
}
|
|
10994
|
-
(e = this.domElement) != null && e.parentElement && this.domElement.parentElement.removeChild(this.domElement), this._isCreated = !1,
|
|
11020
|
+
(e = this.domElement) != null && e.parentElement && this.domElement.parentElement.removeChild(this.domElement), this._isCreated = !1, pe.dispatchCallback(me.ContextDestroyed, this), Mn(this, me.ContextDestroyed), pe.unregister(this), ke.Current === this && (ke.Current = null);
|
|
10995
11021
|
}
|
|
10996
11022
|
registerCoroutineUpdate(t, e, i) {
|
|
10997
11023
|
return typeof (e == null ? void 0 : e.next) != "function" ? (console.error("Registered invalid coroutine function from " + t.name + `
|
|
@@ -11122,7 +11148,7 @@ Possible solutions:
|
|
|
11122
11148
|
}
|
|
11123
11149
|
}).then(() => {
|
|
11124
11150
|
nt && console.log("Needle Engine dependencies are ready");
|
|
11125
|
-
})), this.clear(), this.isManagedExternally === !1 && (this.createNewRenderer(), (l = this.renderer) == null || l.setAnimationLoop(null)), await Gn(1), ke.Current = this, await
|
|
11151
|
+
})), this.clear(), this.isManagedExternally === !1 && (this.createNewRenderer(), (l = this.renderer) == null || l.setAnimationLoop(null)), await Gn(1), ke.Current = this, await pe.dispatchCallback(me.ContextCreationStart, this);
|
|
11126
11152
|
let n = !0, o;
|
|
11127
11153
|
try {
|
|
11128
11154
|
ke.Current = this, t ? o = await this.internalLoadInitialContent(e, t) : o = [];
|
|
@@ -11159,11 +11185,11 @@ Possible solutions:
|
|
|
11159
11185
|
return _ = b, !0;
|
|
11160
11186
|
_ = b;
|
|
11161
11187
|
}
|
|
11162
|
-
}), _ ? this.setCurrentCamera(_) : !
|
|
11188
|
+
}), _ ? this.setCurrentCamera(_) : !pe.dispatchCallback(me.MissingCamera, this, { files: o }) && !this.mainCamera && !this.isManagedExternally && console.warn("Missing camera in main scene", this);
|
|
11163
11189
|
}
|
|
11164
11190
|
this.input.bindEvents(), ke.Current = this, Nd(this), this.physics.engine && ((h = this.physics.engine) == null || h.step(0), (d = this.physics.engine) == null || d.postStep()), !this.isManagedExternally && this.composer && this.mainCamera, this._sizeChanged = !0, this._stats && (this._stats.showPanel(0), this._stats.dom.style.position = "absolute", (u = this.domElement.shadowRoot) == null || u.appendChild(this._stats.dom)), nt && rm(this.scene, !0), this.targetFrameRate === void 0 ? (nt && console.warn("No target framerate set, using default", ke.DefaultTargetFrameRate), this.targetFrameRate = ke._defaultTargetFramerate) : nt && console.log("Target framerate set to", this.targetFrameRate), this._dispatchReadyAfterFrame = !0;
|
|
11165
|
-
const a =
|
|
11166
|
-
return a && ("internalSetLoadingMessage" in this.domElement && typeof this.domElement.internalSetLoadingMessage == "function" && ((p = this.domElement) == null || p.internalSetLoadingMessage("finish loading")), await a), (m = t == null ? void 0 : t.abortSignal) != null && m.aborted ? !1 : (Mn(this,
|
|
11191
|
+
const a = pe.dispatchCallback(me.ContextCreated, this, { files: o });
|
|
11192
|
+
return a && ("internalSetLoadingMessage" in this.domElement && typeof this.domElement.internalSetLoadingMessage == "function" && ((p = this.domElement) == null || p.internalSetLoadingMessage("finish loading")), await a), (m = t == null ? void 0 : t.abortSignal) != null && m.aborted ? !1 : (Mn(this, me.ContextCreated), nt && console.log("Context Created...", this.renderer, this.renderer.domElement), this._isCreating = !1, !this.isManagedExternally && !((g = t == null ? void 0 : t.abortSignal) != null && g.aborted) && this.restartRenderLoop(), !0);
|
|
11167
11193
|
}
|
|
11168
11194
|
async internalLoadInitialContent(t, e) {
|
|
11169
11195
|
var c, h, d, u;
|
|
@@ -11384,7 +11410,7 @@ Possible solutions:
|
|
|
11384
11410
|
this._currentFrameEvent = -1, this.connection.sendBufferedMessagesNow(), this._stats && (this._stats.end(), this.time.frameCount % 150 === 0 && console.log(this.renderer.info.render.calls + " DrawCalls", `
|
|
11385
11411
|
Render:`, { ...this.renderer.info.render }, `
|
|
11386
11412
|
Memory:`, { ...this.renderer.info.memory }, `
|
|
11387
|
-
Target Framerate: ` + this.targetFrameRate)), this._dispatchReadyAfterFrame && (this._dispatchReadyAfterFrame = !1, this.domElement.dispatchEvent(new CustomEvent("ready")),
|
|
11413
|
+
Target Framerate: ` + this.targetFrameRate)), this._dispatchReadyAfterFrame && (this._dispatchReadyAfterFrame = !1, this.domElement.dispatchEvent(new CustomEvent("ready")), pe.dispatchCallback(me.ContextFirstFrameRendered, this));
|
|
11388
11414
|
}
|
|
11389
11415
|
renderNow(t) {
|
|
11390
11416
|
var e;
|
|
@@ -11510,7 +11536,7 @@ function KO(s) {
|
|
|
11510
11536
|
} catch {
|
|
11511
11537
|
}
|
|
11512
11538
|
}
|
|
11513
|
-
|
|
11539
|
+
pe.registerCallback(me.ContextRegistered, (s) => {
|
|
11514
11540
|
eM(s.context), iM(), JO(s.context);
|
|
11515
11541
|
});
|
|
11516
11542
|
let mo, Mm = !1, Xl = "";
|
|
@@ -11658,7 +11684,7 @@ let Al = 0, Qy;
|
|
|
11658
11684
|
function Tv(s) {
|
|
11659
11685
|
Qo && console.log(s.progress.loaded.toFixed(0) + "/" + s.progress.total.toFixed(0), s);
|
|
11660
11686
|
const t = s.count, e = s.progress.total;
|
|
11661
|
-
e === 0 || e === void 0 ? (Qy !== s.name && (Al = 0), Qy = s.name, Al += (1 - Al) * 1e-3, Qo &&
|
|
11687
|
+
e === 0 || e === void 0 ? (Qy !== s.name && (Al = 0), Qy = s.name, Al += (1 - Al) * 1e-3, Qo && we("Loading " + s.name + " did not report total size")) : Al = s.progress.loaded / e;
|
|
11662
11688
|
const i = s.index / t + Al / t;
|
|
11663
11689
|
return $.clamp01(i);
|
|
11664
11690
|
}
|
|
@@ -14376,13 +14402,13 @@ Ig([
|
|
|
14376
14402
|
f(D)
|
|
14377
14403
|
], Za.prototype, "sources", 2);
|
|
14378
14404
|
function SM(s, t) {
|
|
14379
|
-
return Ls(s,
|
|
14405
|
+
return Ls(s, me.ContextCreated, t), () => Po(s, me.ContextCreated);
|
|
14380
14406
|
}
|
|
14381
14407
|
function UD(s, t) {
|
|
14382
|
-
return Ls(s,
|
|
14408
|
+
return Ls(s, me.ContextClearing, t), () => Po(s, me.ContextClearing);
|
|
14383
14409
|
}
|
|
14384
14410
|
function ND(s, t) {
|
|
14385
|
-
return Ls(s,
|
|
14411
|
+
return Ls(s, me.ContextDestroying, t), () => Po(s, me.ContextDestroying);
|
|
14386
14412
|
}
|
|
14387
14413
|
function CM(s, t) {
|
|
14388
14414
|
return Ls(s, Re.Start, t), () => Po(s, Re.Start);
|
|
@@ -14582,7 +14608,7 @@ function OM(s, t, e, i, n) {
|
|
|
14582
14608
|
if (this[a] === void 0) {
|
|
14583
14609
|
this[a] = this[o];
|
|
14584
14610
|
const h = this[o];
|
|
14585
|
-
if (h instanceof oe || h instanceof v || h instanceof
|
|
14611
|
+
if (h instanceof oe || h instanceof v || h instanceof ge || h instanceof W) {
|
|
14586
14612
|
const d = this[o];
|
|
14587
14613
|
fg(d, () => {
|
|
14588
14614
|
this.onValidate(o);
|
|
@@ -14943,54 +14969,54 @@ const Cd = (Bp = class extends I {
|
|
|
14943
14969
|
this._lastPosition.copy(Cd.tempPosition), this._smoothedVelocity.lerp(e, this.context.time.deltaTime / 0.1);
|
|
14944
14970
|
}
|
|
14945
14971
|
}, r(Bp, "tempPosition", new v()), Bp);
|
|
14946
|
-
let
|
|
14972
|
+
let ye = Cd;
|
|
14947
14973
|
Ti([
|
|
14948
14974
|
Nt()
|
|
14949
|
-
],
|
|
14975
|
+
], ye.prototype, "autoMass", 2);
|
|
14950
14976
|
Ti([
|
|
14951
14977
|
f()
|
|
14952
|
-
],
|
|
14978
|
+
], ye.prototype, "mass", 1);
|
|
14953
14979
|
Ti([
|
|
14954
14980
|
Nt(),
|
|
14955
14981
|
f()
|
|
14956
|
-
],
|
|
14982
|
+
], ye.prototype, "useGravity", 2);
|
|
14957
14983
|
Ti([
|
|
14958
14984
|
f(v)
|
|
14959
|
-
],
|
|
14985
|
+
], ye.prototype, "centerOfMass", 2);
|
|
14960
14986
|
Ti([
|
|
14961
14987
|
Nt(),
|
|
14962
14988
|
f()
|
|
14963
|
-
],
|
|
14989
|
+
], ye.prototype, "constraints", 2);
|
|
14964
14990
|
Ti([
|
|
14965
14991
|
Nt(),
|
|
14966
14992
|
f()
|
|
14967
|
-
],
|
|
14993
|
+
], ye.prototype, "isKinematic", 2);
|
|
14968
14994
|
Ti([
|
|
14969
14995
|
Nt(),
|
|
14970
14996
|
f()
|
|
14971
|
-
],
|
|
14997
|
+
], ye.prototype, "drag", 2);
|
|
14972
14998
|
Ti([
|
|
14973
14999
|
Nt(),
|
|
14974
15000
|
f()
|
|
14975
|
-
],
|
|
15001
|
+
], ye.prototype, "angularDrag", 2);
|
|
14976
15002
|
Ti([
|
|
14977
15003
|
Nt(),
|
|
14978
15004
|
f()
|
|
14979
|
-
],
|
|
15005
|
+
], ye.prototype, "detectCollisions", 2);
|
|
14980
15006
|
Ti([
|
|
14981
15007
|
Nt(),
|
|
14982
15008
|
f()
|
|
14983
|
-
],
|
|
15009
|
+
], ye.prototype, "sleepThreshold", 2);
|
|
14984
15010
|
Ti([
|
|
14985
15011
|
Nt(),
|
|
14986
15012
|
f()
|
|
14987
|
-
],
|
|
15013
|
+
], ye.prototype, "collisionDetectionMode", 2);
|
|
14988
15014
|
Ti([
|
|
14989
15015
|
Nt()
|
|
14990
|
-
],
|
|
15016
|
+
], ye.prototype, "_gravityScale", 2);
|
|
14991
15017
|
Ti([
|
|
14992
15018
|
Nt()
|
|
14993
|
-
],
|
|
15019
|
+
], ye.prototype, "dominanceGroup", 2);
|
|
14994
15020
|
new v();
|
|
14995
15021
|
new v();
|
|
14996
15022
|
const Ks = x("debugsync"), Uc = "STRS";
|
|
@@ -15050,6 +15076,15 @@ class Es extends I {
|
|
|
15050
15076
|
requestOwnership() {
|
|
15051
15077
|
Ks && console.log("Request ownership"), this._model ? this._model.requestOwnership() : (this._shouldRequestOwnership = !0, this._needsUpdate = !0);
|
|
15052
15078
|
}
|
|
15079
|
+
/**
|
|
15080
|
+
* Free ownership of this object on the network.
|
|
15081
|
+
* You need to be connected to a room for this to work.
|
|
15082
|
+
* This will also be called automatically when the component is disabled.
|
|
15083
|
+
*/
|
|
15084
|
+
freeOwnership() {
|
|
15085
|
+
var e;
|
|
15086
|
+
(e = this._model) == null || e.freeOwnership();
|
|
15087
|
+
}
|
|
15053
15088
|
/**
|
|
15054
15089
|
* Checks if this client has ownership of the object
|
|
15055
15090
|
* @returns true if this client has ownership, false if not, undefined if ownership state is unknown
|
|
@@ -15068,7 +15103,7 @@ class Es extends I {
|
|
|
15068
15103
|
}
|
|
15069
15104
|
/** @internal */
|
|
15070
15105
|
awake() {
|
|
15071
|
-
Ks && console.log("new instance", this.guid, this), this._receivedDataBefore = !1, this._targetPosition = new v(), this._targetRotation = new W(), this.lastPosition = new v(), this.lastRotation = new W(), this.lastScale = new v(), this.rb = S.getComponentInChildren(this.gameObject,
|
|
15106
|
+
Ks && console.log("new instance", this.guid, this), this._receivedDataBefore = !1, this._targetPosition = new v(), this._targetRotation = new W(), this.lastPosition = new v(), this.lastRotation = new W(), this.lastScale = new v(), this.rb = S.getComponentInChildren(this.gameObject, ye), this.rb && (this._wasKinematic = this.rb.isKinematic), this.receivedUpdate = !0, this._model = new Q0(this.context.connection, this.guid), this.context.connection.isConnected && this.tryGetLastState(), this.joinedRoomCallback = this.tryGetLastState.bind(this), this.context.connection.beginListen(ne.JoinedRoom, this.joinedRoomCallback), this.receivedDataCallback = this.onReceivedData.bind(this), this.context.connection.beginListenBinary(Uc, this.receivedDataCallback);
|
|
15072
15107
|
}
|
|
15073
15108
|
/** @internal */
|
|
15074
15109
|
onDestroy() {
|
|
@@ -15135,17 +15170,17 @@ class Es extends I {
|
|
|
15135
15170
|
(e.distanceTo(this.lastPosition) > l || i.angleTo(this.lastRotation) > l || n.distanceTo(this.lastScale) > l) && (this._model.hasOwnership ? this._needsUpdate = !0 : (Ks && console.log(this.guid, "reset because not owned but", this.gameObject.name, this.lastPosition), this.worldPosition = this.lastPosition, e.copy(this.lastPosition), this.worldQuaternion = this.lastRotation, i.copy(this.lastRotation), this.gameObject.scale.copy(this.lastScale), _n.markDirty(this.gameObject, !0), this._needsUpdate = !1));
|
|
15136
15171
|
}
|
|
15137
15172
|
if (this._model && !this._model.hasOwnership && this._model.isOwned && this._receivedDataBefore) {
|
|
15138
|
-
const
|
|
15139
|
-
let
|
|
15173
|
+
const l = this._receivedFastUpdate || this.fastMode ? 0.05 : 0.3;
|
|
15174
|
+
let c = !1;
|
|
15140
15175
|
if (this.interpolatePosition && this._targetPosition) {
|
|
15141
|
-
const
|
|
15142
|
-
|
|
15176
|
+
const h = this.worldPosition;
|
|
15177
|
+
h.lerp(this._targetPosition, l), this.worldPosition = h, c = !0;
|
|
15143
15178
|
}
|
|
15144
15179
|
if (this.interpolateRotation && this._targetRotation) {
|
|
15145
|
-
const
|
|
15146
|
-
|
|
15180
|
+
const h = this.worldQuaternion;
|
|
15181
|
+
h.slerp(this._targetRotation, l), this.worldQuaternion = h, c = !0;
|
|
15147
15182
|
}
|
|
15148
|
-
|
|
15183
|
+
c && _n.markDirty(this.gameObject, !0);
|
|
15149
15184
|
}
|
|
15150
15185
|
if (this.receivedUpdate = !1, this.lastPosition.copy(e), this.lastRotation.copy(i), this.lastScale.copy(n), !this._model || !this._model || this._model.hasOwnership === void 0 || !this._model.hasOwnership)
|
|
15151
15186
|
return;
|
|
@@ -15154,7 +15189,7 @@ class Es extends I {
|
|
|
15154
15189
|
if (this._needsUpdate && (this.context.time.frameCount % o === 0 || a)) {
|
|
15155
15190
|
if (Rm++, a && gc > 0 && this.context.time.frameCount % gc !== 0)
|
|
15156
15191
|
return;
|
|
15157
|
-
Ks && console.
|
|
15192
|
+
Ks && console.debug("[SyncedTransform] Send update", this.context.connection.connectionId, this.guid, this.gameObject.name, this.gameObject.guid), this._needsUpdate = !1;
|
|
15158
15193
|
const l = Bv(this.guid, this, !!a);
|
|
15159
15194
|
this.context.connection.sendBinary(l);
|
|
15160
15195
|
}
|
|
@@ -15536,11 +15571,11 @@ class xe {
|
|
|
15536
15571
|
}
|
|
15537
15572
|
class EM extends rn {
|
|
15538
15573
|
constructor() {
|
|
15539
|
-
super([
|
|
15574
|
+
super([ce, le], "ColorSerializer");
|
|
15540
15575
|
}
|
|
15541
15576
|
onDeserialize(t) {
|
|
15542
15577
|
if (t != null)
|
|
15543
|
-
return t.a !== void 0 ? new
|
|
15578
|
+
return t.a !== void 0 ? new le(t.r, t.g, t.b, t.a) : t.alpha !== void 0 ? new le(t.r, t.g, t.b, t.alpha) : new ce(t.r, t.g, t.b);
|
|
15544
15579
|
}
|
|
15545
15580
|
onSerialize(t) {
|
|
15546
15581
|
if (t != null)
|
|
@@ -15581,7 +15616,7 @@ class DM extends rn {
|
|
|
15581
15616
|
if (t.endsWith(".glb") || t.endsWith(".gltf")) {
|
|
15582
15617
|
if (e.serializable instanceof Array && e.serializable.includes(re))
|
|
15583
15618
|
return;
|
|
15584
|
-
z() &&
|
|
15619
|
+
z() && we("Detected wrong usage of @serializable with Object3D or GameObject. Instead you should use AssetReference here! Please see the console for details.");
|
|
15585
15620
|
const a = (n = (i = e.target) == null ? void 0 : i.constructor) == null ? void 0 : n.name;
|
|
15586
15621
|
console.warn(`Wrong usage of @serializable detected in your script "${a}"
|
|
15587
15622
|
|
|
@@ -15688,7 +15723,7 @@ class BM extends rn {
|
|
|
15688
15723
|
console.warn(`EventList method:
|
|
15689
15724
|
Could not find method ${h.method} on object ${u.name}. Please rename ${h.method} to ${_}?
|
|
15690
15725
|
`, u[_], `
|
|
15691
|
-
in script: `, u),
|
|
15726
|
+
in script: `, u), we("EventList methods must start with lowercase letter, see console for details");
|
|
15692
15727
|
return;
|
|
15693
15728
|
} else
|
|
15694
15729
|
console.warn(`EventList method:
|
|
@@ -16347,7 +16382,7 @@ class Zd extends CustomEvent {
|
|
|
16347
16382
|
});
|
|
16348
16383
|
}
|
|
16349
16384
|
}
|
|
16350
|
-
class
|
|
16385
|
+
class ve extends I {
|
|
16351
16386
|
constructor() {
|
|
16352
16387
|
super(...arguments);
|
|
16353
16388
|
r(this, "autoTarget", !0);
|
|
@@ -16516,7 +16551,7 @@ class be extends I {
|
|
|
16516
16551
|
const e = S.getComponent(this.gameObject, Pe);
|
|
16517
16552
|
this._camera = e;
|
|
16518
16553
|
let i = e == null ? void 0 : e.threeCamera;
|
|
16519
|
-
if (!i && this.gameObject instanceof
|
|
16554
|
+
if (!i && this.gameObject instanceof be && (i = this.gameObject), i && J_(i, this, !0), !this._controls && i instanceof D) {
|
|
16520
16555
|
this._cameraObject = i;
|
|
16521
16556
|
const n = this.targetElement ?? this.context.renderer.domElement, o = i == null ? void 0 : i.quaternion.clone();
|
|
16522
16557
|
this._controls = new h0(i, n), i == null || i.quaternion.copy(o), Jf === void 0 && (Jf = { ...this._controls.keys });
|
|
@@ -16776,9 +16811,9 @@ class be extends I {
|
|
|
16776
16811
|
}, 1e4), V.DrawWireBox3(_, 65280, 10), this._haveAttachedKeyboardEvents || (this._haveAttachedKeyboardEvents = !0, document.body.addEventListener("keydown", (H) => {
|
|
16777
16812
|
if (H.code === "KeyF") {
|
|
16778
16813
|
let Y;
|
|
16779
|
-
this._cameraObject instanceof
|
|
16814
|
+
this._cameraObject instanceof be && (Y = Math.random() * Math.random() * 170 + 10), this.fitCamera({ objects: n, fitOffset: d, immediate: !1, fov: Y });
|
|
16780
16815
|
}
|
|
16781
|
-
H.code === "KeyV" && this._cameraObject instanceof
|
|
16816
|
+
H.code === "KeyV" && this._cameraObject instanceof be && (this._cameraObject.fov = 60);
|
|
16782
16817
|
}));
|
|
16783
16818
|
}
|
|
16784
16819
|
a.update();
|
|
@@ -16786,76 +16821,76 @@ class be extends I {
|
|
|
16786
16821
|
}
|
|
16787
16822
|
ze([
|
|
16788
16823
|
f()
|
|
16789
|
-
],
|
|
16824
|
+
], ve.prototype, "autoTarget", 2);
|
|
16790
16825
|
ze([
|
|
16791
16826
|
f()
|
|
16792
|
-
],
|
|
16827
|
+
], ve.prototype, "autoFit", 2);
|
|
16793
16828
|
ze([
|
|
16794
16829
|
f()
|
|
16795
|
-
],
|
|
16830
|
+
], ve.prototype, "enableRotate", 2);
|
|
16796
16831
|
ze([
|
|
16797
16832
|
f()
|
|
16798
|
-
],
|
|
16833
|
+
], ve.prototype, "autoRotate", 2);
|
|
16799
16834
|
ze([
|
|
16800
16835
|
f()
|
|
16801
|
-
],
|
|
16836
|
+
], ve.prototype, "autoRotateSpeed", 2);
|
|
16802
16837
|
ze([
|
|
16803
16838
|
f()
|
|
16804
|
-
],
|
|
16839
|
+
], ve.prototype, "minAzimuthAngle", 2);
|
|
16805
16840
|
ze([
|
|
16806
16841
|
f()
|
|
16807
|
-
],
|
|
16842
|
+
], ve.prototype, "maxAzimuthAngle", 2);
|
|
16808
16843
|
ze([
|
|
16809
16844
|
f()
|
|
16810
|
-
],
|
|
16845
|
+
], ve.prototype, "minPolarAngle", 2);
|
|
16811
16846
|
ze([
|
|
16812
16847
|
f()
|
|
16813
|
-
],
|
|
16848
|
+
], ve.prototype, "maxPolarAngle", 2);
|
|
16814
16849
|
ze([
|
|
16815
16850
|
f()
|
|
16816
|
-
],
|
|
16851
|
+
], ve.prototype, "enableKeys", 2);
|
|
16817
16852
|
ze([
|
|
16818
16853
|
f()
|
|
16819
|
-
],
|
|
16854
|
+
], ve.prototype, "enableDamping", 2);
|
|
16820
16855
|
ze([
|
|
16821
16856
|
f()
|
|
16822
|
-
],
|
|
16857
|
+
], ve.prototype, "dampingFactor", 2);
|
|
16823
16858
|
ze([
|
|
16824
16859
|
f()
|
|
16825
|
-
],
|
|
16860
|
+
], ve.prototype, "enableZoom", 2);
|
|
16826
16861
|
ze([
|
|
16827
16862
|
f()
|
|
16828
|
-
],
|
|
16863
|
+
], ve.prototype, "minZoom", 2);
|
|
16829
16864
|
ze([
|
|
16830
16865
|
f()
|
|
16831
|
-
],
|
|
16866
|
+
], ve.prototype, "maxZoom", 2);
|
|
16832
16867
|
ze([
|
|
16833
16868
|
f()
|
|
16834
|
-
],
|
|
16869
|
+
], ve.prototype, "zoomSpeed", 2);
|
|
16835
16870
|
ze([
|
|
16836
16871
|
f()
|
|
16837
|
-
],
|
|
16872
|
+
], ve.prototype, "enablePan", 2);
|
|
16838
16873
|
ze([
|
|
16839
16874
|
f(Za)
|
|
16840
|
-
],
|
|
16875
|
+
], ve.prototype, "lookAtConstraint", 2);
|
|
16841
16876
|
ze([
|
|
16842
16877
|
f()
|
|
16843
|
-
],
|
|
16878
|
+
], ve.prototype, "lookAtConstraint01", 2);
|
|
16844
16879
|
ze([
|
|
16845
16880
|
f()
|
|
16846
|
-
],
|
|
16881
|
+
], ve.prototype, "allowInterrupt", 2);
|
|
16847
16882
|
ze([
|
|
16848
16883
|
f()
|
|
16849
|
-
],
|
|
16884
|
+
], ve.prototype, "middleClickToFocus", 2);
|
|
16850
16885
|
ze([
|
|
16851
16886
|
f()
|
|
16852
|
-
],
|
|
16887
|
+
], ve.prototype, "doubleClickToFocus", 2);
|
|
16853
16888
|
ze([
|
|
16854
16889
|
f()
|
|
16855
|
-
],
|
|
16890
|
+
], ve.prototype, "clickBackgroundToFitScene", 2);
|
|
16856
16891
|
ze([
|
|
16857
16892
|
f()
|
|
16858
|
-
],
|
|
16893
|
+
], ve.prototype, "targetLerpDuration", 2);
|
|
16859
16894
|
var QM = Object.defineProperty, YM = Object.getOwnPropertyDescriptor, ni = (s, t, e, i) => {
|
|
16860
16895
|
for (var n = i > 1 ? void 0 : i ? YM(t, e) : t, o = s.length - 1, a; o >= 0; o--)
|
|
16861
16896
|
(a = s[o]) && (n = (i ? a(t, e, n) : a(n)) || n);
|
|
@@ -16898,21 +16933,21 @@ const Yl = (od = class extends I {
|
|
|
16898
16933
|
* When set, automatically updates the projection matrix.
|
|
16899
16934
|
*/
|
|
16900
16935
|
get aspect() {
|
|
16901
|
-
return this._cam instanceof
|
|
16936
|
+
return this._cam instanceof be ? this._cam.aspect : this.context.domWidth / this.context.domHeight;
|
|
16902
16937
|
}
|
|
16903
16938
|
set aspect(t) {
|
|
16904
|
-
this._cam instanceof
|
|
16939
|
+
this._cam instanceof be && this._cam.aspect !== t && (this._cam.aspect = t, this._cam.updateProjectionMatrix());
|
|
16905
16940
|
}
|
|
16906
16941
|
/**
|
|
16907
16942
|
* Gets or sets the camera's field of view in degrees for perspective cameras.
|
|
16908
16943
|
* When set, automatically updates the projection matrix.
|
|
16909
16944
|
*/
|
|
16910
16945
|
get fieldOfView() {
|
|
16911
|
-
return this._cam instanceof
|
|
16946
|
+
return this._cam instanceof be ? this._cam.fov : this._fov;
|
|
16912
16947
|
}
|
|
16913
16948
|
set fieldOfView(t) {
|
|
16914
16949
|
const e = this.fieldOfView != t;
|
|
16915
|
-
if (this._fov = t, e && this._cam && this._cam instanceof
|
|
16950
|
+
if (this._fov = t, e && this._cam && this._cam instanceof be) {
|
|
16916
16951
|
if (this._fov === void 0) {
|
|
16917
16952
|
console.warn("Can not set undefined fov on PerspectiveCamera");
|
|
16918
16953
|
return;
|
|
@@ -17011,7 +17046,7 @@ const Yl = (od = class extends I {
|
|
|
17011
17046
|
return this._backgroundColor ?? null;
|
|
17012
17047
|
}
|
|
17013
17048
|
set backgroundColor(t) {
|
|
17014
|
-
t && (this._backgroundColor || (this._backgroundColor = new
|
|
17049
|
+
t && (this._backgroundColor || (this._backgroundColor = new le(1, 1, 1, 1)), this._backgroundColor.copy(t), (!("alpha" in t) || t.alpha === void 0) && (this._backgroundColor.alpha = 1), this.applyClearFlagsIfIsActiveCamera());
|
|
17015
17050
|
}
|
|
17016
17051
|
set targetTexture(t) {
|
|
17017
17052
|
this._targetTexture = t;
|
|
@@ -17112,10 +17147,10 @@ const Yl = (od = class extends I {
|
|
|
17112
17147
|
return;
|
|
17113
17148
|
const t = this.gameObject.isCamera;
|
|
17114
17149
|
let e = null;
|
|
17115
|
-
if (t ? (e = this.gameObject, e == null || e.layers.enableAll(), e instanceof
|
|
17116
|
-
e instanceof
|
|
17150
|
+
if (t ? (e = this.gameObject, e == null || e.layers.enableAll(), e instanceof be && (this._fov = e.fov)) : e = this.gameObject.children[0], e && e.isCamera)
|
|
17151
|
+
e instanceof be && (this._fov && (e.fov = this._fov), e.near = this._nearClipPlane, e.far = this._farClipPlane, e.updateProjectionMatrix());
|
|
17117
17152
|
else if (!this.orthographic)
|
|
17118
|
-
e = new
|
|
17153
|
+
e = new be(this.fieldOfView, window.innerWidth / window.innerHeight, this._nearClipPlane, this._farClipPlane), this.fieldOfView && (e.fov = this.fieldOfView), this.gameObject.add(e);
|
|
17119
17154
|
else {
|
|
17120
17155
|
const i = this.orthographicSize * 100;
|
|
17121
17156
|
e = new rg(window.innerWidth / -i, window.innerWidth / i, window.innerHeight / i, window.innerHeight / -i, this._nearClipPlane, this._farClipPlane), this.gameObject.add(e);
|
|
@@ -17135,15 +17170,16 @@ const Yl = (od = class extends I {
|
|
|
17135
17170
|
* @param opts Options for applying clear flags
|
|
17136
17171
|
*/
|
|
17137
17172
|
applyClearFlags(t) {
|
|
17138
|
-
var
|
|
17173
|
+
var i;
|
|
17139
17174
|
if (!this._cam) {
|
|
17140
17175
|
Js && console.log("Camera does not exist (apply clear flags)");
|
|
17141
17176
|
return;
|
|
17142
17177
|
}
|
|
17143
17178
|
if (this.fieldOfView = this._fov, Js) {
|
|
17144
|
-
const
|
|
17145
|
-
console.debug(
|
|
17179
|
+
const n = `[Camera] Apply ClearFlags: ${gr[this._clearFlags]} - "${this.name}"`;
|
|
17180
|
+
console.debug(n);
|
|
17146
17181
|
}
|
|
17182
|
+
const e = this.context.domElement.getAttribute("background-image") || this.context.domElement.getAttribute("background-color") || this.context.domElement.getAttribute("skybox-image");
|
|
17147
17183
|
switch (this._clearFlags) {
|
|
17148
17184
|
case 0:
|
|
17149
17185
|
return;
|
|
@@ -17152,17 +17188,17 @@ const Yl = (od = class extends I {
|
|
|
17152
17188
|
this.context.scene.background = null, this.context.renderer.setClearColor(0, 0);
|
|
17153
17189
|
return;
|
|
17154
17190
|
}
|
|
17155
|
-
(!this.scene.background || !this._skybox || (t == null ? void 0 : t.applySkybox) === !0) && this.applySceneSkybox(), this._backgroundBlurriness !== void 0 ? this.context.scene.backgroundBlurriness = this._backgroundBlurriness : Js && console.warn(`Camera "${this.name}" has no background blurriness`), this._backgroundIntensity !== void 0 && (this.context.scene.backgroundIntensity = this._backgroundIntensity), this._backgroundRotation !== void 0 ? this.context.scene.backgroundRotation = this._backgroundRotation : Js && console.warn(`Camera "${this.name}" has no background intensity`);
|
|
17191
|
+
(!this.scene.background || !this._skybox || (t == null ? void 0 : t.applySkybox) === !0) && this.applySceneSkybox(), this._backgroundBlurriness !== void 0 && !this.context.domElement.getAttribute("background-blurriness") ? this.context.scene.backgroundBlurriness = this._backgroundBlurriness : Js && console.warn(`Camera "${this.name}" has no background blurriness`), this._backgroundIntensity !== void 0 && !this.context.domElement.getAttribute("background-intensity") && (this.context.scene.backgroundIntensity = this._backgroundIntensity), this._backgroundRotation !== void 0 && !this.context.domElement.getAttribute("background-rotation") ? this.context.scene.backgroundRotation = this._backgroundRotation : Js && console.warn(`Camera "${this.name}" has no background intensity`);
|
|
17156
17192
|
break;
|
|
17157
17193
|
case 2:
|
|
17158
|
-
if (this._backgroundColor) {
|
|
17159
|
-
let
|
|
17160
|
-
Yl.backgroundShouldBeTransparent(this.context) && (
|
|
17194
|
+
if (this._backgroundColor && !e) {
|
|
17195
|
+
let n = this._backgroundColor.alpha;
|
|
17196
|
+
Yl.backgroundShouldBeTransparent(this.context) && (n = this.ARBackgroundAlpha ?? 0), this.context.scene.background = null, (i = this.context.xr) != null && i.isVR ? this.context.renderer.setClearColor(nC(this._backgroundColor).convertLinearToSRGB()) : this.context.renderer.setClearColor(this._backgroundColor, n);
|
|
17161
17197
|
} else
|
|
17162
|
-
Js && console.warn(`Camera "${this.name}"
|
|
17198
|
+
this._backgroundColor || Js && console.warn(`[Camera] has no background color "${this.name}" `);
|
|
17163
17199
|
break;
|
|
17164
17200
|
case 4:
|
|
17165
|
-
this.context.scene.background = null, this.context.renderer.setClearColor(0, 0);
|
|
17201
|
+
e || (this.context.scene.background = null, this.context.renderer.setClearColor(0, 0));
|
|
17166
17202
|
break;
|
|
17167
17203
|
}
|
|
17168
17204
|
}
|
|
@@ -17232,7 +17268,7 @@ ni([
|
|
|
17232
17268
|
f()
|
|
17233
17269
|
], Pe.prototype, "environmentIntensity", 1);
|
|
17234
17270
|
ni([
|
|
17235
|
-
f(
|
|
17271
|
+
f(le)
|
|
17236
17272
|
], Pe.prototype, "backgroundColor", 1);
|
|
17237
17273
|
ni([
|
|
17238
17274
|
f(fr)
|
|
@@ -17252,11 +17288,17 @@ class KM {
|
|
|
17252
17288
|
* Retrieves the texture based on the camera's source ID.
|
|
17253
17289
|
*/
|
|
17254
17290
|
apply() {
|
|
17255
|
-
|
|
17291
|
+
var t;
|
|
17292
|
+
if (this._skybox = this.context.lightmaps.tryGetSkybox(this._camera.sourceId), !this._skybox)
|
|
17293
|
+
this._did_log_failed_to_find_skybox || (this._did_log_failed_to_find_skybox = !0, console.warn(`Camera "${this._camera.name}" has no skybox texture. ${this._camera.sourceId}`));
|
|
17294
|
+
else if (this.context.scene.background !== this._skybox) {
|
|
17295
|
+
const e = this.context.domElement.getAttribute("background-image") || this.context.domElement.getAttribute("background-color") || this.context.domElement.getAttribute("skybox-image");
|
|
17296
|
+
Js && console.debug(`[Camera] Apply Skybox ${(t = this._skybox) == null ? void 0 : t.name} ${e} - "${this._camera.name}"`), e != null && e.length || (this._skybox.mapping = Rs, this.context.scene.background = this._skybox);
|
|
17297
|
+
}
|
|
17256
17298
|
}
|
|
17257
17299
|
}
|
|
17258
17300
|
function ZM(s) {
|
|
17259
|
-
x("freecam") && s.context.mainCameraComponent === s && S.getOrAddComponent(s.gameObject,
|
|
17301
|
+
x("freecam") && s.context.mainCameraComponent === s && S.getOrAddComponent(s.gameObject, ve);
|
|
17260
17302
|
}
|
|
17261
17303
|
class lo extends I {
|
|
17262
17304
|
constructor() {
|
|
@@ -18356,7 +18398,7 @@ class Dr extends I {
|
|
|
18356
18398
|
if (this.createMenuButton) {
|
|
18357
18399
|
if (this._menubutton || (this._menubutton = document.createElement("button"), this._menubutton.addEventListener("click", () => {
|
|
18358
18400
|
this.isSending ? this.disconnect({ remember: !0 }) : this.connect(), X.microphonePermissionsGranted().then((i) => {
|
|
18359
|
-
i ||
|
|
18401
|
+
i || we("<strong>Microphone permissions not granted</strong>. Please allow your browser to use the microphone to be able to talk. Click on the button on the left side of your browser's address bar to allow microphone permissions.");
|
|
18360
18402
|
});
|
|
18361
18403
|
})), this._menubutton) {
|
|
18362
18404
|
this.context.menu.appendChild(this._menubutton), this.activeAndEnabled ? this._menubutton.style.display = "" : this._menubutton.style.display = "none", this._menubutton.title = this.isSending ? "Click to disable your microphone" : "Click to enable your microphone";
|
|
@@ -18369,7 +18411,7 @@ class Dr extends I {
|
|
|
18369
18411
|
// private _analyzer?: AudioAnalyser;
|
|
18370
18412
|
/** @deprecated */
|
|
18371
18413
|
getFrequency(e) {
|
|
18372
|
-
return this.unsupported_getfrequency || (this.unsupported_getfrequency = !0, z() &&
|
|
18414
|
+
return this.unsupported_getfrequency || (this.unsupported_getfrequency = !0, z() && we("VOIP: getFrequency is currently not supported"), console.warn("VOIP: getFrequency is currently not supported")), null;
|
|
18373
18415
|
}
|
|
18374
18416
|
async getAudioStream(e) {
|
|
18375
18417
|
if (!navigator.mediaDevices.getUserMedia)
|
|
@@ -18822,15 +18864,15 @@ class Ai extends I {
|
|
|
18822
18864
|
}
|
|
18823
18865
|
/** @internal */
|
|
18824
18866
|
awake() {
|
|
18825
|
-
super.awake(), this.attachedRigidbody || (this.attachedRigidbody = this.gameObject.getComponentInParent(
|
|
18867
|
+
super.awake(), this.attachedRigidbody || (this.attachedRigidbody = this.gameObject.getComponentInParent(ye));
|
|
18826
18868
|
}
|
|
18827
18869
|
/** @internal */
|
|
18828
18870
|
start() {
|
|
18829
|
-
this.attachedRigidbody || (this.attachedRigidbody = this.gameObject.getComponentInParent(
|
|
18871
|
+
this.attachedRigidbody || (this.attachedRigidbody = this.gameObject.getComponentInParent(ye));
|
|
18830
18872
|
}
|
|
18831
18873
|
/** @internal */
|
|
18832
18874
|
onEnable() {
|
|
18833
|
-
this.attachedRigidbody || (this.attachedRigidbody = this.gameObject.getComponentInParent(
|
|
18875
|
+
this.attachedRigidbody || (this.attachedRigidbody = this.gameObject.getComponentInParent(ye));
|
|
18834
18876
|
}
|
|
18835
18877
|
/** @internal */
|
|
18836
18878
|
onDisable() {
|
|
@@ -18855,7 +18897,7 @@ class Ai extends I {
|
|
|
18855
18897
|
}
|
|
18856
18898
|
}
|
|
18857
18899
|
fi([
|
|
18858
|
-
f(
|
|
18900
|
+
f(ye)
|
|
18859
18901
|
], Ai.prototype, "attachedRigidbody", 2);
|
|
18860
18902
|
fi([
|
|
18861
18903
|
f()
|
|
@@ -18916,7 +18958,7 @@ const Hv = class extends Ai {
|
|
|
18916
18958
|
*/
|
|
18917
18959
|
static add(t, e) {
|
|
18918
18960
|
const i = en(t, Hv);
|
|
18919
|
-
return i.autoFit(), (e == null ? void 0 : e.rigidbody) === !0 && en(t,
|
|
18961
|
+
return i.autoFit(), (e == null ? void 0 : e.rigidbody) === !0 && en(t, ye, { isKinematic: !1 }), i;
|
|
18920
18962
|
}
|
|
18921
18963
|
/**
|
|
18922
18964
|
* Registers the box collider with the physics engine and sets up scale change monitoring.
|
|
@@ -19050,7 +19092,7 @@ class el extends I {
|
|
|
19050
19092
|
r(this, "_contactVelocity", new v());
|
|
19051
19093
|
}
|
|
19052
19094
|
get rigidbody() {
|
|
19053
|
-
return this._rigidbody ? this._rigidbody : (this._rigidbody = this.gameObject.getComponent(
|
|
19095
|
+
return this._rigidbody ? this._rigidbody : (this._rigidbody = this.gameObject.getComponent(ye), this._rigidbody || (this._rigidbody = this.gameObject.addComponent(ye)), this.rigidbody);
|
|
19054
19096
|
}
|
|
19055
19097
|
awake() {
|
|
19056
19098
|
this._activeGroundCollisions = /* @__PURE__ */ new Set();
|
|
@@ -19511,7 +19553,7 @@ const $i = (Wl = class extends I {
|
|
|
19511
19553
|
for (const o of this._dragHandlers.values())
|
|
19512
19554
|
o.setTargetObject(t);
|
|
19513
19555
|
const e = "_rigidbody-was-kinematic";
|
|
19514
|
-
((i = this._rigidbody) == null ? void 0 : i[e]) === !1 && (this._rigidbody.isKinematic = !1, this._rigidbody[e] = void 0), this._rigidbody = null, t && (this._rigidbody = S.getComponentInChildren(t,
|
|
19556
|
+
((i = this._rigidbody) == null ? void 0 : i[e]) === !1 && (this._rigidbody.isKinematic = !1, this._rigidbody[e] = void 0), this._rigidbody = null, t && (this._rigidbody = S.getComponentInChildren(t, ye), ((n = this._rigidbody) == null ? void 0 : n.isKinematic) === !1 && (this._rigidbody.isKinematic = !0, this._rigidbody[e] = !1));
|
|
19515
19557
|
}
|
|
19516
19558
|
/** @internal */
|
|
19517
19559
|
awake() {
|
|
@@ -19635,7 +19677,7 @@ const $i = (Wl = class extends I {
|
|
|
19635
19677
|
this._isDragging = !0;
|
|
19636
19678
|
const n = S.getComponentInChildren(i, Es);
|
|
19637
19679
|
Un && console.log("DRAG START", n, i), n && (n.fastMode = !0, n == null || n.requestOwnership()), this._marker = S.addComponent(i, Qu), this._draggingRigidbodies.length = 0;
|
|
19638
|
-
const o = S.getComponentsInChildren(i,
|
|
19680
|
+
const o = S.getComponentsInChildren(i, ye);
|
|
19639
19681
|
o && this._draggingRigidbodies.push(...o);
|
|
19640
19682
|
}
|
|
19641
19683
|
/**
|
|
@@ -20043,7 +20085,7 @@ const k_ = class {
|
|
|
20043
20085
|
r(this, "_didDragOnGroundPlaneLastFrame", !1);
|
|
20044
20086
|
this._camera = t;
|
|
20045
20087
|
const e = new Ac(k_.geometry), i = e.material;
|
|
20046
|
-
i.color = new
|
|
20088
|
+
i.color = new ce(0.4, 0.4, 0.4), e.layers.set(2), e.name = "line", e.scale.y = 1, this._groundLine = e;
|
|
20047
20089
|
const n = new vu(0.5, 22, 22), o = new Me({ color: i.color }), a = new q(n, o);
|
|
20048
20090
|
a.visible = !1, a.layers.set(2), this._groundMarker = a;
|
|
20049
20091
|
}
|
|
@@ -20699,7 +20741,7 @@ class ZR extends Kv {
|
|
|
20699
20741
|
}
|
|
20700
20742
|
class Zv extends Kv {
|
|
20701
20743
|
beforeWriteTexture(t, e) {
|
|
20702
|
-
t.isRenderTargetTexture && (e.newTexture = Ag(new
|
|
20744
|
+
t.isRenderTargetTexture && (e.newTexture = Ag(new le(1, 1, 1, 0)));
|
|
20703
20745
|
}
|
|
20704
20746
|
}
|
|
20705
20747
|
function Am(s) {
|
|
@@ -20964,13 +21006,13 @@ class sk {
|
|
|
20964
21006
|
const o = new D();
|
|
20965
21007
|
o.name = "LightSettings " + this.sourceId, t.scene.add(o), n = S.addComponent(o, Em, {}, { callAwake: !1 });
|
|
20966
21008
|
}
|
|
20967
|
-
n.sourceId = this.sourceId, n.ambientIntensity = i.ambientIntensity, n.ambientLight = new
|
|
21009
|
+
n.sourceId = this.sourceId, n.ambientIntensity = i.ambientIntensity, n.ambientLight = new ce().fromArray(i.ambientLight), Array.isArray(i.ambientTrilight) && (n.ambientTrilight = i.ambientTrilight.map((o) => new ce().fromArray(o))), n.ambientMode = i.ambientMode, n.environmentReflectionSource = i.environmentReflectionSource;
|
|
20968
21010
|
}
|
|
20969
21011
|
}
|
|
20970
21012
|
return null;
|
|
20971
21013
|
}
|
|
20972
21014
|
}
|
|
20973
|
-
|
|
21015
|
+
pe.registerCallback(me.ContextCreated, (s) => {
|
|
20974
21016
|
const t = s.context, e = S.findObjectOfType(Em, t);
|
|
20975
21017
|
e != null && e.sourceId && (e.enabled = !0);
|
|
20976
21018
|
});
|
|
@@ -21058,7 +21100,7 @@ const rk = Symbol("stencils"), Jo = class {
|
|
|
21058
21100
|
const o = i[n];
|
|
21059
21101
|
if (ok(o.layer, t)) {
|
|
21060
21102
|
rp && console.log(o), setTimeout(() => {
|
|
21061
|
-
ui() && kg(t.gameObject) && (
|
|
21103
|
+
ui() && kg(t.gameObject) && (we("Stencil not supported on instanced objects"), console.warn("Stencil not supported on instanced objects", t));
|
|
21062
21104
|
}, 500);
|
|
21063
21105
|
for (let a = 0; a < t.sharedMaterials.length; a++) {
|
|
21064
21106
|
let l = t.sharedMaterials[a];
|
|
@@ -21260,7 +21302,7 @@ const Be = class extends o0 {
|
|
|
21260
21302
|
}
|
|
21261
21303
|
};
|
|
21262
21304
|
let Wi = Be;
|
|
21263
|
-
r(Wi, "viewProjection", new se()), r(Wi, "_viewProjectionValues", []), r(Wi, "viewMatrix", new se()), r(Wi, "_viewMatrixValues", []), r(Wi, "_worldSpaceCameraPosName", "_WorldSpaceCameraPos"), r(Wi, "_worldSpaceCameraPos", new v()), r(Wi, "_mainLightColor", new
|
|
21305
|
+
r(Wi, "viewProjection", new se()), r(Wi, "_viewProjectionValues", []), r(Wi, "viewMatrix", new se()), r(Wi, "_viewMatrixValues", []), r(Wi, "_worldSpaceCameraPosName", "_WorldSpaceCameraPos"), r(Wi, "_worldSpaceCameraPos", new v()), r(Wi, "_mainLightColor", new ge()), r(Wi, "_mainLightPosition", new v()), r(Wi, "_lightData", new ge());
|
|
21264
21306
|
class hk {
|
|
21265
21307
|
constructor(t, e) {
|
|
21266
21308
|
r(this, "parser");
|
|
@@ -21292,12 +21334,12 @@ class hk {
|
|
|
21292
21334
|
return l();
|
|
21293
21335
|
An && console.log("loadMaterial", e, c);
|
|
21294
21336
|
const u = {}, p = o.uniforms;
|
|
21295
|
-
(d.includes("_Time") || h.includes("_Time")) && (u._Time = { value: new
|
|
21337
|
+
(d.includes("_Time") || h.includes("_Time")) && (u._Time = { value: new ge(0, 0, 0, 0) }), (d.includes("_SinTime") || h.includes("_SinTime")) && (u._SinTime = { value: new ge(0, 0, 0, 0) }), (d.includes("_CosTime") || h.includes("_CosTime")) && (u._CosTime = { value: new ge(0, 0, 0, 0) }), (d.includes("unity_DeltaTime") || h.includes("unity_DeltaTime")) && (u.unity_DeltaTime = { value: new ge(0, 0, 0, 0) });
|
|
21296
21338
|
for (const k in p) {
|
|
21297
21339
|
const O = k;
|
|
21298
21340
|
switch (O) {
|
|
21299
21341
|
case "_TimeParameters":
|
|
21300
|
-
const M = new
|
|
21342
|
+
const M = new ge();
|
|
21301
21343
|
u[O] = { value: M };
|
|
21302
21344
|
break;
|
|
21303
21345
|
case "hlslcc_mtx4x4unity_MatrixV":
|
|
@@ -21349,7 +21391,7 @@ class hk {
|
|
|
21349
21391
|
}
|
|
21350
21392
|
}
|
|
21351
21393
|
if (Array.isArray(M) && M.length === 4) {
|
|
21352
|
-
u[O] = { value: new
|
|
21394
|
+
u[O] = { value: new ge(M[0], M[1], M[2], M[3]) };
|
|
21353
21395
|
continue;
|
|
21354
21396
|
}
|
|
21355
21397
|
u[O] = { value: M };
|
|
@@ -21988,18 +22030,18 @@ function Ko(s) {
|
|
|
21988
22030
|
return t = Math.ceil(t), e = Math.ceil(e), { vertexCount: t, indexCount: e };
|
|
21989
22031
|
}
|
|
21990
22032
|
function ub() {
|
|
21991
|
-
const s = new It({ color: new
|
|
22033
|
+
const s = new It({ color: new ce(Math.random(), Math.random(), Math.random()) });
|
|
21992
22034
|
return s.emissive = s.color, s.emissiveIntensity = 0.3, x("wireframe") && (s.wireframe = !0), s;
|
|
21993
22035
|
}
|
|
21994
22036
|
const qr = x("debuglightmaps");
|
|
21995
22037
|
class Dm {
|
|
21996
22038
|
constructor(t, e) {
|
|
21997
22039
|
r(this, "lightmapIndex", -1);
|
|
21998
|
-
r(this, "lightmapScaleOffset", new
|
|
22040
|
+
r(this, "lightmapScaleOffset", new ge(1, 1, 0, 0));
|
|
21999
22041
|
r(this, "context");
|
|
22000
22042
|
r(this, "gameObject");
|
|
22001
22043
|
r(this, "lightmapTexture", null);
|
|
22002
|
-
r(this, "lightmapScaleOffsetUniform", { value: new
|
|
22044
|
+
r(this, "lightmapScaleOffsetUniform", { value: new ge(1, 1, 0, 0) });
|
|
22003
22045
|
r(this, "lightmapUniform", { value: null });
|
|
22004
22046
|
r(this, "onBeforeCompile", (t, e) => {
|
|
22005
22047
|
qr && console.log(`Lightmaps, before compile
|
|
@@ -22151,7 +22193,7 @@ class xk {
|
|
|
22151
22193
|
if (a) {
|
|
22152
22194
|
this._indexMapMaxIndex = c, this._indexMap = l;
|
|
22153
22195
|
const h = `Renderer ${t.name} was initialized with missing materials - this may lead to unexpected behaviour when trying to access sharedMaterials by index.`;
|
|
22154
|
-
console.warn(h), ui() &&
|
|
22196
|
+
console.warn(h), ui() && we("Found renderer with missing materials: please check the console for details.");
|
|
22155
22197
|
}
|
|
22156
22198
|
return new Proxy(this, {
|
|
22157
22199
|
get(h, d) {
|
|
@@ -22210,7 +22252,7 @@ const Pd = class extends I {
|
|
|
22210
22252
|
r(this, "receiveShadows", !1);
|
|
22211
22253
|
r(this, "shadowCastingMode", 0);
|
|
22212
22254
|
r(this, "lightmapIndex", -1);
|
|
22213
|
-
r(this, "lightmapScaleOffset", new
|
|
22255
|
+
r(this, "lightmapScaleOffset", new ge(1, 1, 0, 0));
|
|
22214
22256
|
r(this, "enableInstancing");
|
|
22215
22257
|
r(this, "renderOrder");
|
|
22216
22258
|
r(this, "allowOcclusionWhenDynamic", !0);
|
|
@@ -22541,7 +22583,7 @@ Fs([
|
|
|
22541
22583
|
f()
|
|
22542
22584
|
], Ze.prototype, "lightmapIndex", 2);
|
|
22543
22585
|
Fs([
|
|
22544
|
-
f(
|
|
22586
|
+
f(ge)
|
|
22545
22587
|
], Ze.prototype, "lightmapScaleOffset", 2);
|
|
22546
22588
|
Fs([
|
|
22547
22589
|
f()
|
|
@@ -22749,7 +22791,7 @@ function Ok(s) {
|
|
|
22749
22791
|
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;
|
|
22750
22792
|
return s.getFullYear() + a + l + "-" + c + h + d;
|
|
22751
22793
|
}
|
|
22752
|
-
class
|
|
22794
|
+
class de {
|
|
22753
22795
|
/** Start a new progress reporting scope. Make sure to close it with Progress.end.
|
|
22754
22796
|
* @param scope The scope to start progress reporting for.
|
|
22755
22797
|
* @param options Parent scope, onProgress callback and logging. If only a string is provided, it's used as parentScope.
|
|
@@ -23181,7 +23223,7 @@ let Ik = class {
|
|
|
23181
23223
|
const n = i.files, o = "model.usda";
|
|
23182
23224
|
n[o] = null;
|
|
23183
23225
|
const a = i.materials, l = i.textures;
|
|
23184
|
-
|
|
23226
|
+
de.report("export-usdz", "Invoking onBeforeBuildDocument"), await Od(i, "onBeforeBuildDocument"), de.report("export-usdz", "Done onBeforeBuildDocument"), de.report("export-usdz", "Reparent bones to common ancestor");
|
|
23185
23227
|
const c = [], h = /* @__PURE__ */ new Set();
|
|
23186
23228
|
t == null || t.traverse((k) => {
|
|
23187
23229
|
if (!(!e.exportInvisible && !k.visible) && k instanceof Ms) {
|
|
@@ -23196,7 +23238,7 @@ let Ik = class {
|
|
|
23196
23238
|
const { object: O, originalParent: M, newParent: E } = k;
|
|
23197
23239
|
E.add(O);
|
|
23198
23240
|
}
|
|
23199
|
-
|
|
23241
|
+
de.report("export-usdz", "Traversing hierarchy"), t && pw(t, i.document, i, this.keepObject), de.report("export-usdz", "Invoking onAfterBuildDocument"), await Od(i, "onAfterBuildDocument");
|
|
23200
23242
|
const d = i.extensions.find((k) => k.extensionName === "Behaviour"), u = (d == null ? void 0 : d.getAllTargetUuids()) ?? /* @__PURE__ */ new Set();
|
|
23201
23243
|
if (this.pruneUnusedNodes) {
|
|
23202
23244
|
const k = {
|
|
@@ -23208,7 +23250,7 @@ let Ik = class {
|
|
|
23208
23250
|
this.debug && mb(i.document, "Hierarchy BEFORE pruning", k), mw(i.document, k), this.debug && mb(i.document, "Hierarchy AFTER pruning");
|
|
23209
23251
|
} else
|
|
23210
23252
|
this.debug && console.log("Pruning of empty nodes is disabled. This may result in a larger USDZ file.");
|
|
23211
|
-
|
|
23253
|
+
de.report("export-usdz", { message: "Parsing document", autoStep: 10 }), await Dk(i, () => (de.report("export-usdz", "Building materials"), Vk(a, l, e.quickLookCompatible))), de.report("export-usdz", "Invoking onAfterSerialize"), await Od(i, "onAfterSerialize");
|
|
23212
23254
|
for (const k of c) {
|
|
23213
23255
|
const { object: O, originalParent: M, newParent: E } = k;
|
|
23214
23256
|
M && M.add(O);
|
|
@@ -23216,27 +23258,27 @@ let Ik = class {
|
|
|
23216
23258
|
(P = (w = i.exporter) == null ? void 0 : w.beforeWritingDocument) == null || P.call(w);
|
|
23217
23259
|
const m = i.document.buildHeader(i) + `
|
|
23218
23260
|
` + i.output;
|
|
23219
|
-
this.debug && console.log(m), n[o] = u0(m), i.output = "",
|
|
23261
|
+
this.debug && console.log(m), n[o] = u0(m), i.output = "", de.report("export-usdz", { message: "Exporting textures", autoStep: 10 }), de.start("export-usdz-textures", { parentScope: "export-usdz", logTimings: !1 });
|
|
23220
23262
|
const g = new Rr({
|
|
23221
23263
|
antialias: !1,
|
|
23222
23264
|
alpha: !0,
|
|
23223
23265
|
premultipliedAlpha: !1,
|
|
23224
23266
|
preserveDrawingBuffer: !0
|
|
23225
23267
|
}), _ = Object.keys(l).length;
|
|
23226
|
-
|
|
23268
|
+
de.report("export-usdz-textures", { totalSteps: _ * 3, currentStep: 0 });
|
|
23227
23269
|
const y = async (k) => {
|
|
23228
23270
|
const O = l[k], M = O.texture, E = bw.includes(M.format);
|
|
23229
23271
|
let B = {
|
|
23230
23272
|
imageData: M.image
|
|
23231
23273
|
};
|
|
23232
|
-
|
|
23274
|
+
de.report("export-usdz-textures", { message: "read back texture", autoStep: !0 });
|
|
23233
23275
|
const A = O.scale !== void 0 && O.scale.x !== 1 && O.scale.y !== 1 && O.scale.z !== 1 && O.scale.w !== 1;
|
|
23234
|
-
(M.isCompressedTexture || M.isRenderTargetTexture || A) && (B = await Lk(M, e.maxTextureSize, g, O.scale)),
|
|
23276
|
+
(M.isCompressedTexture || M.isRenderTargetTexture || A) && (B = await Lk(M, e.maxTextureSize, g, O.scale)), de.report("export-usdz-textures", { message: "convert texture to canvas", autoStep: !0 });
|
|
23235
23277
|
const F = await Bk(B.imageBitmap || B.imageData, e.maxTextureSize).catch((U) => {
|
|
23236
23278
|
console.error("Error converting texture to canvas", M, U);
|
|
23237
23279
|
});
|
|
23238
23280
|
if (F) {
|
|
23239
|
-
|
|
23281
|
+
de.report("export-usdz-textures", { message: "convert canvas to blob", autoStep: !0 });
|
|
23240
23282
|
const U = await F.convertToBlob({ type: E ? "image/png" : "image/jpeg", quality: 0.95 });
|
|
23241
23283
|
n[`textures/${k}.${E ? "png" : "jpg"}`] = new Uint8Array(await U.arrayBuffer());
|
|
23242
23284
|
} else
|
|
@@ -23244,7 +23286,7 @@ let Ik = class {
|
|
|
23244
23286
|
};
|
|
23245
23287
|
for (const k in l)
|
|
23246
23288
|
await y(k);
|
|
23247
|
-
g.dispose(),
|
|
23289
|
+
g.dispose(), de.end("export-usdz-textures");
|
|
23248
23290
|
let b = 0;
|
|
23249
23291
|
for (const k in n) {
|
|
23250
23292
|
const O = n[k], M = 34 + k.length;
|
|
@@ -23256,7 +23298,7 @@ let Ik = class {
|
|
|
23256
23298
|
}
|
|
23257
23299
|
b = O.length;
|
|
23258
23300
|
}
|
|
23259
|
-
return
|
|
23301
|
+
return de.report("export-usdz", "zip archive"), sS(n, { level: 0 });
|
|
23260
23302
|
}
|
|
23261
23303
|
};
|
|
23262
23304
|
function pw(s, t, e, i) {
|
|
@@ -23268,7 +23310,7 @@ function pw(s, t, e, i) {
|
|
|
23268
23310
|
if (s.position.x === 0 && s.position.y === 0 && s.position.z === 0 && (l.position = null), s.quaternion.x === 0 && s.quaternion.y === 0 && s.quaternion.z === 0 && s.quaternion.w === 1 && (l.quaternion = null), s.scale.x === 1 && s.scale.y === 1 && s.scale.z === 1 && (l.scale = null), (s instanceof q || s instanceof Ms) && (o = s.geometry, a = s.material), i && !i(s) && (o = void 0, a = void 0), (s instanceof q || s instanceof Ms) && a && (a instanceof It || a instanceof Me || a instanceof Se && a.type === "MeshLineMaterial")) {
|
|
23269
23311
|
const h = Xh(s), d = s instanceof Ms ? s : null;
|
|
23270
23312
|
n = new Lt(s.uuid, h, l, o, a, void 0, d, s.animations);
|
|
23271
|
-
} else if (s instanceof
|
|
23313
|
+
} else if (s instanceof be || s instanceof rg) {
|
|
23272
23314
|
const h = Xh(s);
|
|
23273
23315
|
n = new Lt(s.uuid, h, l, void 0, void 0, s);
|
|
23274
23316
|
} else {
|
|
@@ -23334,16 +23376,16 @@ function mw(s, t) {
|
|
|
23334
23376
|
}), c;
|
|
23335
23377
|
}
|
|
23336
23378
|
async function Dk(s, t) {
|
|
23337
|
-
|
|
23379
|
+
de.start("export-usdz-resources", "export-usdz");
|
|
23338
23380
|
const e = [];
|
|
23339
23381
|
for (const c of s.document.children)
|
|
23340
23382
|
gw(c, s, e);
|
|
23341
23383
|
const i = e.length;
|
|
23342
23384
|
for (let c = 0; c < i; c++)
|
|
23343
|
-
|
|
23385
|
+
de.report("export-usdz-resources", { totalSteps: i, currentStep: c }), await new Promise((h, d) => {
|
|
23344
23386
|
e[c](), h();
|
|
23345
23387
|
});
|
|
23346
|
-
|
|
23388
|
+
de.end("export-usdz-resources");
|
|
23347
23389
|
const n = new Ak(), o = s.exporter.sceneAnchoringOptions.ar;
|
|
23348
23390
|
n.beginBlock(`def Xform "${s.document.name}"`), n.beginBlock(`def Scope "Scenes" (
|
|
23349
23391
|
kind = "sceneLibrary"
|
|
@@ -23356,10 +23398,10 @@ async function Dk(s, t) {
|
|
|
23356
23398
|
h += a(d);
|
|
23357
23399
|
return h;
|
|
23358
23400
|
}, l = a(s.document);
|
|
23359
|
-
|
|
23401
|
+
de.start("export-usdz-xforms", "export-usdz"), de.report("export-usdz-xforms", { totalSteps: l, currentStep: 1 });
|
|
23360
23402
|
for (const c of s.document.children)
|
|
23361
23403
|
_w(c, n, s);
|
|
23362
|
-
|
|
23404
|
+
de.end("export-usdz-xforms"), de.report("export-usdz", "invoke onAfterHierarchy"), Od(s, "onAfterHierarchy", n), n.closeBlock(), n.closeBlock(), n.appendLine(t()), n.closeBlock(), de.report("export-usdz", "write to string"), s.output += n.toString();
|
|
23363
23405
|
}
|
|
23364
23406
|
function gw(s, t, e) {
|
|
23365
23407
|
if (!s)
|
|
@@ -23397,7 +23439,7 @@ async function Lk(s, t = 1 / 0, e = null, i = void 0) {
|
|
|
23397
23439
|
uniforms: {
|
|
23398
23440
|
blitTexture: new co(s),
|
|
23399
23441
|
flipY: new co(!1),
|
|
23400
|
-
scale: new co(new
|
|
23442
|
+
scale: new co(new ge(1, 1, 1, 1))
|
|
23401
23443
|
},
|
|
23402
23444
|
vertexShader: `
|
|
23403
23445
|
varying vec2 vUv;
|
|
@@ -23426,8 +23468,8 @@ async function Lk(s, t = 1 / 0, e = null, i = void 0) {
|
|
|
23426
23468
|
}`
|
|
23427
23469
|
}));
|
|
23428
23470
|
const n = Qr.uniforms;
|
|
23429
|
-
n.blitTexture.value = s, n.flipY.value = !1, n.scale.value = new
|
|
23430
|
-
const o = new
|
|
23471
|
+
n.blitTexture.value = s, n.flipY.value = !1, n.scale.value = new ge(1, 1, 1, 1), i !== void 0 && n.scale.value.copy(i), Qr.defines.IS_SRGB = s.colorSpace == vn, Qr.needsUpdate = !0, qh || (qh = new q(cp, Qr), qh.frustumCulled = !1);
|
|
23472
|
+
const o = new be(), a = new Mi();
|
|
23431
23473
|
a.add(qh), e || (e = Gh = new Rr({ antialias: !1, alpha: !0, premultipliedAlpha: !1, preserveDrawingBuffer: !0 }));
|
|
23432
23474
|
const l = Math.min(s.image.width, t), c = Math.min(s.image.height, t);
|
|
23433
23475
|
Ht && (Ht.width !== l || Ht.height !== c) && (Ht.dispose(), Ht = null), Ht || (Ht = new Ts(l, c, { format: Su, type: P1, minFilter: B_, magFilter: B_ })), e.setRenderTarget(Ht), e.setSize(l, c), e.clear(), e.render(a, o), Gh && (Gh.dispose(), Gh = null);
|
|
@@ -23463,7 +23505,7 @@ async function Fk(s, t = void 0, e = !1, i = 4096) {
|
|
|
23463
23505
|
} else
|
|
23464
23506
|
throw new Error("NeedleUSDZExporter: No valid image data found. Unable to process texture.");
|
|
23465
23507
|
}
|
|
23466
|
-
const
|
|
23508
|
+
const De = 7;
|
|
23467
23509
|
function zk() {
|
|
23468
23510
|
return `#usda 1.0
|
|
23469
23511
|
(
|
|
@@ -23501,7 +23543,7 @@ function _w(s, t, e) {
|
|
|
23501
23543
|
var m;
|
|
23502
23544
|
if (s == null)
|
|
23503
23545
|
return;
|
|
23504
|
-
|
|
23546
|
+
de.report("export-usdz-xforms", { message: "buildXform " + s.displayName || s.name, autoStep: !0 });
|
|
23505
23547
|
const i = s.transform, n = s.geometry, o = s.material, a = s.camera, l = s.name;
|
|
23506
23548
|
if (s.animations)
|
|
23507
23549
|
for (const g of s.animations)
|
|
@@ -23515,7 +23557,7 @@ function _w(s, t, e) {
|
|
|
23515
23557
|
!e.quickLookCompatible && o.side === Ri && (t.beginBlock('over "Geometry" '), t.appendLine("uniform bool doubleSided = 1"), t.closeBlock());
|
|
23516
23558
|
}
|
|
23517
23559
|
let p = !1;
|
|
23518
|
-
if (c ? (t.appendLine("rel skel:skeleton = <Rig>"), t.appendLine("rel skel:animationSource = <Rig/_anim>"), p = !1) : s.type === void 0 && i && (p = p || i.position !== null || i.quaternion !== null || i.scale !== null, i.position && (s.needsTranslate = !0, t.appendLine(`double3 xformOp:translate = (${
|
|
23560
|
+
if (c ? (t.appendLine("rel skel:skeleton = <Rig>"), t.appendLine("rel skel:animationSource = <Rig/_anim>"), p = !1) : s.type === void 0 && i && (p = p || i.position !== null || i.quaternion !== null || i.scale !== null, i.position && (s.needsTranslate = !0, t.appendLine(`double3 xformOp:translate = (${he(i.position.x)}, ${he(i.position.y)}, ${he(i.position.z)})`)), i.quaternion && (s.needsOrient = !0, t.appendLine(`quatf xformOp:orient = (${he(i.quaternion.w)}, ${he(i.quaternion.x)}, ${he(i.quaternion.y)}, ${he(i.quaternion.z)})`)), i.scale && (s.needsScale = !0, t.appendLine(`double3 xformOp:scale = (${he(i.scale.x)}, ${he(i.scale.y)}, ${he(i.scale.z)})`))), s.visibility !== void 0 && t.appendLine(`token visibility = "${s.visibility}"`), a && !e.quickLookCompatible && ("isOrthographicCamera" in a && a.isOrthographicCamera ? (t.appendLine(`float2 clippingRange = (${a.near}, ${a.far})`), t.appendLine(`float horizontalAperture = ${((Math.abs(a.left) + Math.abs(a.right)) * 10).toPrecision(De)}`), t.appendLine(`float verticalAperture = ${((Math.abs(a.top) + Math.abs(a.bottom)) * 10).toPrecision(De)}`), t.appendLine('token projection = "orthographic"')) : "isPerspectiveCamera" in a && a.isPerspectiveCamera && (t.appendLine(`float2 clippingRange = (${a.near.toPrecision(De)}, ${a.far.toPrecision(De)})`), t.appendLine(`float focalLength = ${a.getFocalLength().toPrecision(De)}`), t.appendLine(`float focusDistance = ${a.focus.toPrecision(De)}`), t.appendLine(`float horizontalAperture = ${a.getFilmWidth().toPrecision(De)}`), t.appendLine('token projection = "perspective"'), t.appendLine(`float verticalAperture = ${a.getFilmHeight().toPrecision(De)}`))), s.onSerialize && s.onSerialize(t, e), s.type === void 0) {
|
|
23519
23561
|
const g = new Array();
|
|
23520
23562
|
s.needsTranslate && g.push('"xformOp:translate"'), s.needsOrient && g.push('"xformOp:orient"'), s.needsScale && g.push('"xformOp:scale"'), g.length && t.appendLine(`uniform token[] xformOpOrder = [${g.join(", ")}]`);
|
|
23521
23563
|
}
|
|
@@ -23526,7 +23568,7 @@ function _w(s, t, e) {
|
|
|
23526
23568
|
}
|
|
23527
23569
|
t.closeBlock();
|
|
23528
23570
|
}
|
|
23529
|
-
function
|
|
23571
|
+
function he(s) {
|
|
23530
23572
|
return Number.isInteger(s) ? s.toString() : s.toFixed(10);
|
|
23531
23573
|
}
|
|
23532
23574
|
function _b(s) {
|
|
@@ -23534,7 +23576,7 @@ function _b(s) {
|
|
|
23534
23576
|
return `( ${Qh(t, 0)}, ${Qh(t, 4)}, ${Qh(t, 8)}, ${Qh(t, 12)} )`;
|
|
23535
23577
|
}
|
|
23536
23578
|
function Qh(s, t) {
|
|
23537
|
-
return `(${
|
|
23579
|
+
return `(${he(s[t + 0])}, ${he(s[t + 1])}, ${he(s[t + 2])}, ${he(s[t + 3])})`;
|
|
23538
23580
|
}
|
|
23539
23581
|
function Nk(s, t = [], e = !0) {
|
|
23540
23582
|
return `
|
|
@@ -23672,7 +23714,7 @@ function Md(s, t) {
|
|
|
23672
23714
|
const e = [];
|
|
23673
23715
|
for (let i = 0; i < s.count; i++) {
|
|
23674
23716
|
const n = s.getX(i), o = s.getY(i), a = s.getZ(i);
|
|
23675
|
-
e.push(`(${n.toPrecision(
|
|
23717
|
+
e.push(`(${n.toPrecision(De)}, ${o.toPrecision(De)}, ${a.toPrecision(De)})`);
|
|
23676
23718
|
}
|
|
23677
23719
|
return e.join(", ");
|
|
23678
23720
|
}
|
|
@@ -23682,7 +23724,7 @@ function Wk(s, t) {
|
|
|
23682
23724
|
const e = [];
|
|
23683
23725
|
for (let i = 0; i < s.count; i++) {
|
|
23684
23726
|
const n = s.getX(i), o = s.getY(i), a = s.getZ(i) || 0, l = s.getW(i) || 0;
|
|
23685
|
-
e.push(`(${n.toPrecision(
|
|
23727
|
+
e.push(`(${n.toPrecision(De)}, ${o.toPrecision(De)}, ${a.toPrecision(De)}, ${l.toPrecision(De)})`);
|
|
23686
23728
|
}
|
|
23687
23729
|
return e.join(", ");
|
|
23688
23730
|
}
|
|
@@ -23690,7 +23732,7 @@ function yb(s, t = !1) {
|
|
|
23690
23732
|
const e = [];
|
|
23691
23733
|
for (let i = 0; i < s.count; i++) {
|
|
23692
23734
|
const n = s.getX(i), o = s.getY(i), a = s.getZ(i), l = s.getW(i);
|
|
23693
|
-
e.push(`${t ? n : n.toPrecision(
|
|
23735
|
+
e.push(`${t ? n : n.toPrecision(De)}`), e.push(`${t ? o : o.toPrecision(De)}`), e.push(`${t ? a : a.toPrecision(De)}`), e.push(`${t ? l : l.toPrecision(De)}`);
|
|
23694
23736
|
}
|
|
23695
23737
|
return e.join(", ");
|
|
23696
23738
|
}
|
|
@@ -23701,7 +23743,7 @@ function yw(s, t, e = !1) {
|
|
|
23701
23743
|
for (let n = 0; n < s.count; n++) {
|
|
23702
23744
|
const o = s.getX(n);
|
|
23703
23745
|
let a = s.getY(n);
|
|
23704
|
-
e && (a = 1 - a), i.push(`(${o.toPrecision(
|
|
23746
|
+
e && (a = 1 - a), i.push(`(${o.toPrecision(De)}, ${a.toPrecision(De)})`);
|
|
23705
23747
|
}
|
|
23706
23748
|
return i.join(", ");
|
|
23707
23749
|
}
|
|
@@ -23743,7 +23785,7 @@ function Hk(s, t, e = !1) {
|
|
|
23743
23785
|
return qn(b.name) + "_" + (((w = b.source) == null ? void 0 : w.id) ?? b.id);
|
|
23744
23786
|
}
|
|
23745
23787
|
function d(b, w, P = void 0, k = void 0) {
|
|
23746
|
-
const O = h(b), M = O + (k !== void 0 && k !== 1 ? "_" + k : ""), E = e && k !== void 0 && k !== 1, B = E ? new
|
|
23788
|
+
const O = h(b), M = O + (k !== void 0 && k !== 1 ? "_" + k : ""), E = e && k !== void 0 && k !== 1, B = E ? new ge(1, 1, 1, k) : void 0;
|
|
23747
23789
|
k === void 0 && (k = 1), E && (k = 1), B && B.w <= 0.05 && (B.w = 0.05), t[M] = { texture: b, scale: B };
|
|
23748
23790
|
const A = b.channel > 0 ? "st" + b.channel : "st";
|
|
23749
23791
|
c.add(b.channel);
|
|
@@ -23756,7 +23798,7 @@ function Hk(s, t, e = !1) {
|
|
|
23756
23798
|
// MirroredRepeatWrapping
|
|
23757
23799
|
}, Z = b.repeat.clone(), T = b.offset.clone(), L = b.rotation, H = Math.sin(L), Y = Math.cos(L);
|
|
23758
23800
|
T.y = 1 - T.y - Z.y, e ? (Z.x === 0 && (Z.x = 1e-4), Z.y === 0 && (Z.y = 1e-4), T.x = T.x / Z.x, T.y = T.y / Z.y, T.x += H / Z.x, T.y += Y - 1) : (T.x += H * Z.x, T.y += (1 - Y) * Z.y);
|
|
23759
|
-
const te = Z.x != 1 || Z.y != 1 || T.x != 0 || T.y != 0 || L != 0,
|
|
23801
|
+
const te = Z.x != 1 || Z.y != 1 || T.x != 0 || T.y != 0 || L != 0, ae = `${Vt}/${i}/${"uvReader_" + A}.outputs:result>`, ue = `${Vt}/${i}/Transform2d_${w}.outputs:result>`, Le = w !== "normal" && P && (P.r !== 1 || P.g !== 1 || P.b !== 1 || k !== 1) || !1, St = w === "normal", ai = s instanceof It && s.normalScale ? s.normalScale.x * 2 : 2, $t = ai.toFixed(De), Wr = (-1 * (ai / 2)).toFixed(De), $s = (1 - ai).toFixed(De);
|
|
23760
23802
|
return `
|
|
23761
23803
|
${te ? `def Shader "Transform2d_${w}" (
|
|
23762
23804
|
sdrMetadata = {
|
|
@@ -23765,10 +23807,10 @@ function Hk(s, t, e = !1) {
|
|
|
23765
23807
|
)
|
|
23766
23808
|
{
|
|
23767
23809
|
uniform token info:id = "UsdTransform2d"
|
|
23768
|
-
float2 inputs:in.connect = ${
|
|
23810
|
+
float2 inputs:in.connect = ${ae}
|
|
23769
23811
|
float2 inputs:scale = ${vb(Z)}
|
|
23770
23812
|
float2 inputs:translation = ${vb(T)}
|
|
23771
|
-
float inputs:rotation = ${(L / Math.PI * 180).toFixed(
|
|
23813
|
+
float inputs:rotation = ${(L / Math.PI * 180).toFixed(De)}
|
|
23772
23814
|
float2 outputs:result
|
|
23773
23815
|
}
|
|
23774
23816
|
` : ""}
|
|
@@ -23777,8 +23819,8 @@ function Hk(s, t, e = !1) {
|
|
|
23777
23819
|
uniform token info:id = "UsdUVTexture"
|
|
23778
23820
|
asset inputs:file = @textures/${M}.${F ? "png" : "jpg"}@
|
|
23779
23821
|
token inputs:sourceColorSpace = "${b.colorSpace === "srgb" ? "sRGB" : "raw"}"
|
|
23780
|
-
float2 inputs:st.connect = ${te ?
|
|
23781
|
-
${
|
|
23822
|
+
float2 inputs:st.connect = ${te ? ue : ae}
|
|
23823
|
+
${Le ? `
|
|
23782
23824
|
float4 inputs:scale = (${P ? P.r + ", " + P.g + ", " + P.b : "1, 1, 1"}, ${k})
|
|
23783
23825
|
` : ""}
|
|
23784
23826
|
${St ? `
|
|
@@ -23795,7 +23837,7 @@ function Hk(s, t, e = !1) {
|
|
|
23795
23837
|
}`;
|
|
23796
23838
|
}
|
|
23797
23839
|
let u = s.transparent || s.alphaTest ? s.opacity : 1, p = !1, m = !1;
|
|
23798
|
-
if (s instanceof Jp && s.transmission !== void 0 && (u *= 1 - s.transmission * (1 - s.roughness * 0.5)), s.map ? (a.push(`${o}color3f inputs:diffuseColor.connect = ${Vt}/${i}/${h(s.map)}_diffuse.outputs:rgb>`), s instanceof Me && s.transparent && s.alphaTest == 0 && e ? (a.push(`${o}float inputs:opacity.connect = ${Vt}/${i}/${h(s.map)}_diffuse.outputs:a>`), p = !0, a.push(`${o}float inputs:opacityThreshold = ${1e-10}`), m = !0) : s.transparent ? (a.push(`${o}float inputs:opacity.connect = ${Vt}/${i}/${h(s.map)}_diffuse.outputs:a>`), p = !0) : s.alphaTest > 0 && (a.push(`${o}float inputs:opacity.connect = ${Vt}/${i}/${h(s.map)}_diffuse.outputs:a>`), p = !0, a.push(`${o}float inputs:opacityThreshold = ${s.alphaTest}`), m = !0), l.push(d(s.map, "diffuse", s.color, u))) : a.push(`${o}color3f inputs:diffuseColor = ${bb(s.color)}`), s.alphaHash && e && (m ? console.warn("Opacity threshold for " + s.name + " was already connected. Skipping alphaHash opacity threshold.") : (a.push(`${o}float inputs:opacityThreshold = 0.0000000001`), m = !0)), s.aoMap && (a.push(`${o}float inputs:occlusion.connect = ${Vt}/${i}/${h(s.aoMap)}_occlusion.outputs:r>`), l.push(d(s.aoMap, "occlusion"))), s.alphaMap ? (a.push(`${o}float inputs:opacity.connect = ${Vt}/${i}/${h(s.alphaMap)}_opacity.outputs:r>`), a.push(`${o}float inputs:opacityThreshold = 0.0000000001`), p = !0, m = !0, l.push(d(s.alphaMap, "opacity", new
|
|
23840
|
+
if (s instanceof Jp && s.transmission !== void 0 && (u *= 1 - s.transmission * (1 - s.roughness * 0.5)), s.map ? (a.push(`${o}color3f inputs:diffuseColor.connect = ${Vt}/${i}/${h(s.map)}_diffuse.outputs:rgb>`), s instanceof Me && s.transparent && s.alphaTest == 0 && e ? (a.push(`${o}float inputs:opacity.connect = ${Vt}/${i}/${h(s.map)}_diffuse.outputs:a>`), p = !0, a.push(`${o}float inputs:opacityThreshold = ${1e-10}`), m = !0) : s.transparent ? (a.push(`${o}float inputs:opacity.connect = ${Vt}/${i}/${h(s.map)}_diffuse.outputs:a>`), p = !0) : s.alphaTest > 0 && (a.push(`${o}float inputs:opacity.connect = ${Vt}/${i}/${h(s.map)}_diffuse.outputs:a>`), p = !0, a.push(`${o}float inputs:opacityThreshold = ${s.alphaTest}`), m = !0), l.push(d(s.map, "diffuse", s.color, u))) : a.push(`${o}color3f inputs:diffuseColor = ${bb(s.color)}`), s.alphaHash && e && (m ? console.warn("Opacity threshold for " + s.name + " was already connected. Skipping alphaHash opacity threshold.") : (a.push(`${o}float inputs:opacityThreshold = 0.0000000001`), m = !0)), s.aoMap && (a.push(`${o}float inputs:occlusion.connect = ${Vt}/${i}/${h(s.aoMap)}_occlusion.outputs:r>`), l.push(d(s.aoMap, "occlusion"))), s.alphaMap ? (a.push(`${o}float inputs:opacity.connect = ${Vt}/${i}/${h(s.alphaMap)}_opacity.outputs:r>`), a.push(`${o}float inputs:opacityThreshold = 0.0000000001`), p = !0, m = !0, l.push(d(s.alphaMap, "opacity", new ce(1, 1, 1), u))) : (p ? console.warn("Opacity for " + s.name + " was already connected. Skipping default opacity.") : (a.push(`${o}float inputs:opacity = ${u}`), p = !0), s.alphaTest > 0 && (m ? console.warn("Opacity threshold for " + s.name + " was already connected. Skipping default opacity threshold.") : (a.push(`${o}float inputs:opacityThreshold = ${s.alphaTest}`), m = !0))), s instanceof It) {
|
|
23799
23841
|
if (s.emissiveMap) {
|
|
23800
23842
|
a.push(`${o}color3f inputs:emissiveColor.connect = ${Vt}/${i}/${h(s.emissiveMap)}_emissive.outputs:rgb>`);
|
|
23801
23843
|
const b = s.emissive.clone();
|
|
@@ -24127,7 +24169,7 @@ class Ki {
|
|
|
24127
24169
|
return new Ki(0, 0, 0);
|
|
24128
24170
|
}
|
|
24129
24171
|
}
|
|
24130
|
-
class
|
|
24172
|
+
class _e {
|
|
24131
24173
|
static sequence(...t) {
|
|
24132
24174
|
return new ir("Group_" + ir.getId(), t).makeSequence();
|
|
24133
24175
|
}
|
|
@@ -24150,7 +24192,7 @@ class ge {
|
|
|
24150
24192
|
if (o.comment = `Animation: ${h}, start=${a * 60}, length=${l * 60}, end=${(a + l) * 60}`, o.animationName = h, o.start = a, o.duration = l, o.animationSpeed = c, o.reversed = i, o.pingPong = n, o.multiplePerformOperation = "allow", i && (o.start -= l), n) {
|
|
24151
24193
|
o.pingPong = !1;
|
|
24152
24194
|
const d = o.clone();
|
|
24153
|
-
return d.reversed = !i, d.start = o.start, d.reversed && (d.start -= l),
|
|
24195
|
+
return d.reversed = !i, d.start = o.start, d.reversed && (d.start -= l), _e.sequence(o, d);
|
|
24154
24196
|
}
|
|
24155
24197
|
return o;
|
|
24156
24198
|
}
|
|
@@ -24226,10 +24268,10 @@ class vw extends Gk {
|
|
|
24226
24268
|
this.matrix && n.setMatrix(this.matrix), this.material && (n.material = this.material), this.geometry && (n.geometry = this.geometry), (a = i.parent) == null || a.add(n);
|
|
24227
24269
|
}
|
|
24228
24270
|
enable() {
|
|
24229
|
-
return this._enableAction ? this._enableAction : (this._enableAction =
|
|
24271
|
+
return this._enableAction ? this._enableAction : (this._enableAction = _e.fadeAction(this.object, 0, !0), this._enableAction);
|
|
24230
24272
|
}
|
|
24231
24273
|
disable() {
|
|
24232
|
-
return this._disableAction ? this._disableAction : (this._disableAction =
|
|
24274
|
+
return this._disableAction ? this._disableAction : (this._disableAction = _e.fadeAction(this.object, 0, !1), this._disableAction);
|
|
24233
24275
|
}
|
|
24234
24276
|
}
|
|
24235
24277
|
class qk {
|
|
@@ -24342,7 +24384,7 @@ const kc = class {
|
|
|
24342
24384
|
console.error("This is a rest clip but you're trying to add tracks to it – this is likely a bug");
|
|
24343
24385
|
return;
|
|
24344
24386
|
}
|
|
24345
|
-
t.name.endsWith("position") ? this.pos = t : t.name.endsWith("quaternion") ? this.rot = t : t.name.endsWith("scale") ? this.scale = t : (t.name.endsWith("activeSelf") ? console.warn("[USDZ] Animation of enabled/disabled state is not supported for USDZ export and will NOT be exported: " + t.name + " on " + (((e = this.root) == null ? void 0 : e.name) ?? this.target.name) + ". Animate scale 0/1 instead.") : console.warn("[USDZ] Animation track type not supported for USDZ export and will NOT be exported: " + t.name + " on " + (((i = this.root) == null ? void 0 : i.name) ?? this.target.name) + ". Only .position, .rotation, .scale are supported."), z() &&
|
|
24387
|
+
t.name.endsWith("position") ? this.pos = t : t.name.endsWith("quaternion") ? this.rot = t : t.name.endsWith("scale") ? this.scale = t : (t.name.endsWith("activeSelf") ? console.warn("[USDZ] Animation of enabled/disabled state is not supported for USDZ export and will NOT be exported: " + t.name + " on " + (((e = this.root) == null ? void 0 : e.name) ?? this.target.name) + ". Animate scale 0/1 instead.") : console.warn("[USDZ] Animation track type not supported for USDZ export and will NOT be exported: " + t.name + " on " + (((i = this.root) == null ? void 0 : i.name) ?? this.target.name) + ". Only .position, .rotation, .scale are supported."), z() && we("[USDZ] Some animations can't be exported. See console for details."));
|
|
24346
24388
|
}
|
|
24347
24389
|
getFrames() {
|
|
24348
24390
|
var t, e, i, n, o, a;
|
|
@@ -24637,50 +24679,50 @@ class Xk {
|
|
|
24637
24679
|
const L = [];
|
|
24638
24680
|
for (const [H, Y] of T) {
|
|
24639
24681
|
let te = `${H} : [`;
|
|
24640
|
-
const
|
|
24641
|
-
for (const
|
|
24642
|
-
|
|
24643
|
-
te = te.concat(
|
|
24682
|
+
const ae = [];
|
|
24683
|
+
for (const ue of Y)
|
|
24684
|
+
ae.push(`(${he(ue.x)}, ${he(ue.y)}, ${he(ue.z)})`);
|
|
24685
|
+
te = te.concat(ae.join(", ")), te = te.concat("],"), L.push(te);
|
|
24644
24686
|
}
|
|
24645
24687
|
return L;
|
|
24646
24688
|
}, c = function(T) {
|
|
24647
24689
|
const L = [];
|
|
24648
24690
|
for (const [H, Y] of T) {
|
|
24649
24691
|
let te = `${H} : [`;
|
|
24650
|
-
const
|
|
24651
|
-
for (const
|
|
24652
|
-
|
|
24653
|
-
te = te.concat(
|
|
24692
|
+
const ae = [];
|
|
24693
|
+
for (const ue of Y)
|
|
24694
|
+
ae.push(`(${he(ue.w)}, ${he(ue.x)}, ${he(ue.y)}, ${he(ue.z)})`);
|
|
24695
|
+
te = te.concat(ae.join(", ")), te = te.concat("],"), L.push(te);
|
|
24654
24696
|
}
|
|
24655
24697
|
return L;
|
|
24656
24698
|
}, h = function(T) {
|
|
24657
24699
|
let L, H = !0;
|
|
24658
24700
|
const Y = /* @__PURE__ */ new Map();
|
|
24659
|
-
for (const [
|
|
24660
|
-
L === void 0 && (L =
|
|
24661
|
-
let
|
|
24662
|
-
for (const St of
|
|
24663
|
-
|
|
24701
|
+
for (const [ae, ue] of T) {
|
|
24702
|
+
L === void 0 && (L = ue.length), L !== ue.length && (H = !1);
|
|
24703
|
+
let Le = 0;
|
|
24704
|
+
for (const St of ue)
|
|
24705
|
+
Le++, St || (Y.has(ae) || Y.set(ae, []), Y.get(ae).push(Le));
|
|
24664
24706
|
}
|
|
24665
24707
|
Ln && console.log("Bone count: ", T.size, "TransformData entries per bone: ", L, "Undefined bone entries: ", Y), console.assert(H, "All bones should have the same number of TransformData entries", T), console.assert(Y.size === 0, "All TransformData entries should be set", Y);
|
|
24666
24708
|
const te = [];
|
|
24667
|
-
for (const [
|
|
24668
|
-
for (let
|
|
24669
|
-
const St =
|
|
24670
|
-
te.length <=
|
|
24671
|
-
const $t = te[
|
|
24709
|
+
for (const [ae, ue] of T)
|
|
24710
|
+
for (let Le = 0; Le < ue.length; Le++) {
|
|
24711
|
+
const St = ue[Le], ai = i.getStartTimeByClip(St.clip);
|
|
24712
|
+
te.length <= Le && te.push({ pos: [], rot: [], scale: [], timeOffset: ai });
|
|
24713
|
+
const $t = te[Le];
|
|
24672
24714
|
$t.pos.push(...St.getSortedTimesArray(!0, !1, !1)), $t.rot.push(...St.getSortedTimesArray(!1, !0, !1)), $t.scale.push(...St.getSortedTimesArray(!1, !1, !0));
|
|
24673
24715
|
}
|
|
24674
|
-
for (const
|
|
24675
|
-
|
|
24716
|
+
for (const ae of te)
|
|
24717
|
+
ae.pos.sort((ue, Le) => ue - Le), ae.rot.sort((ue, Le) => ue - Le), ae.scale.sort((ue, Le) => ue - Le), ae.pos = [...new Set(ae.pos)], ae.rot = [...new Set(ae.rot)], ae.scale = [...new Set(ae.scale)];
|
|
24676
24718
|
return te;
|
|
24677
24719
|
}, d = function(T, L, H) {
|
|
24678
|
-
const Y = /* @__PURE__ */ new Map(), te = /* @__PURE__ */ new Map(),
|
|
24679
|
-
for (const
|
|
24680
|
-
const St = T.get(
|
|
24720
|
+
const Y = /* @__PURE__ */ new Map(), te = /* @__PURE__ */ new Map(), ae = /* @__PURE__ */ new Map(), ue = L.length;
|
|
24721
|
+
for (const Le of H) {
|
|
24722
|
+
const St = T.get(Le);
|
|
24681
24723
|
let ai;
|
|
24682
|
-
St ? console.assert(St.length ===
|
|
24683
|
-
for (let $t = 0; $t <
|
|
24724
|
+
St ? console.assert(St.length === ue, "We should have the same number of TransformData entries for each bone", St, L) : ai = new $e(null, Le, null);
|
|
24725
|
+
for (let $t = 0; $t < ue; $t++) {
|
|
24684
24726
|
const Wr = St ? St[$t] : ai, $s = L[$t];
|
|
24685
24727
|
for (const { time: Sl, translation: Cl } of Wr.getValues($s.pos, !0, !1, !1)) {
|
|
24686
24728
|
const an = (Sl + $s.timeOffset) * 60;
|
|
@@ -24692,33 +24734,33 @@ class Xk {
|
|
|
24692
24734
|
}
|
|
24693
24735
|
for (const { time: Sl, scale: Cl } of Wr.getValues($s.scale, !1, !1, !0)) {
|
|
24694
24736
|
const an = (Sl + $s.timeOffset) * 60;
|
|
24695
|
-
|
|
24737
|
+
ae.has(an) || ae.set(an, new Array()), ae.get(an).push(Cl.clone());
|
|
24696
24738
|
}
|
|
24697
24739
|
}
|
|
24698
24740
|
}
|
|
24699
24741
|
return {
|
|
24700
24742
|
position: Y.size == 0 ? void 0 : Y,
|
|
24701
24743
|
quaternion: te.size == 0 ? void 0 : te,
|
|
24702
|
-
scale:
|
|
24744
|
+
scale: ae.size == 0 ? void 0 : ae
|
|
24703
24745
|
};
|
|
24704
24746
|
}, u = function(T) {
|
|
24705
24747
|
const L = [];
|
|
24706
24748
|
for (const H of T)
|
|
24707
|
-
L.push(`(${
|
|
24749
|
+
L.push(`(${he(H.x)}, ${he(H.y)}, ${he(H.z)})`);
|
|
24708
24750
|
return L.join(", ");
|
|
24709
24751
|
}, p = function(T) {
|
|
24710
24752
|
const L = [];
|
|
24711
24753
|
for (const H of T)
|
|
24712
|
-
L.push(`(${
|
|
24754
|
+
L.push(`(${he(H.w)}, ${he(H.x)}, ${he(H.y)}, ${he(H.z)})`);
|
|
24713
24755
|
return L.join(", ");
|
|
24714
24756
|
}, m = function(T) {
|
|
24715
24757
|
const L = /* @__PURE__ */ new Map();
|
|
24716
24758
|
if (Ln) {
|
|
24717
24759
|
const H = new Array();
|
|
24718
24760
|
for (const [Y, te] of o)
|
|
24719
|
-
H.push(Y.uuid + ": " + te.length + " " + te.map((
|
|
24720
|
-
var
|
|
24721
|
-
return (
|
|
24761
|
+
H.push(Y.uuid + ": " + te.length + " " + te.map((ae) => {
|
|
24762
|
+
var ue;
|
|
24763
|
+
return (ue = ae.clip) == null ? void 0 : ue.uuid.substring(0, 6);
|
|
24722
24764
|
}).join(" "));
|
|
24723
24765
|
console.log(`getPerBoneTransformData
|
|
24724
24766
|
` + H.join(`
|
|
@@ -24849,17 +24891,17 @@ class Xk {
|
|
|
24849
24891
|
}
|
|
24850
24892
|
if (P)
|
|
24851
24893
|
for (const { time: M, translation: E } of _.getValues(b, !0, !1, !1)) {
|
|
24852
|
-
const A = `${c.format((y + M) * $e.frameRate)}: (${
|
|
24894
|
+
const A = `${c.format((y + M) * $e.frameRate)}: (${he(E.x)}, ${he(E.y)}, ${he(E.z)}),`;
|
|
24853
24895
|
t.appendLine(A);
|
|
24854
24896
|
}
|
|
24855
24897
|
if (k)
|
|
24856
24898
|
for (const { time: M, rotation: E } of _.getValues(b, !1, !0, !1)) {
|
|
24857
|
-
const A = `${c.format((y + M) * $e.frameRate)}: (${
|
|
24899
|
+
const A = `${c.format((y + M) * $e.frameRate)}: (${he(E.w)}, ${he(E.x)}, ${he(E.y)}, ${he(E.z)}),`;
|
|
24858
24900
|
t.appendLine(A);
|
|
24859
24901
|
}
|
|
24860
24902
|
if (O)
|
|
24861
24903
|
for (const { time: M, scale: E } of _.getValues(b, !1, !1, !0)) {
|
|
24862
|
-
const A = `${c.format((y + M) * $e.frameRate)}: (${
|
|
24904
|
+
const A = `${c.format((y + M) * $e.frameRate)}: (${he(E.x)}, ${he(E.y)}, ${he(E.z)}),`;
|
|
24863
24905
|
t.appendLine(A);
|
|
24864
24906
|
}
|
|
24865
24907
|
}
|
|
@@ -24968,7 +25010,7 @@ class sl extends I {
|
|
|
24968
25010
|
const n = new kt(
|
|
24969
25011
|
"Move to " + ((i = this.target) == null ? void 0 : i.name),
|
|
24970
25012
|
Ft.tapTrigger(this.gameObject),
|
|
24971
|
-
|
|
25013
|
+
_e.transformAction(this.object, this.target, this.duration, this.relativeMotion ? "relative" : "absolute")
|
|
24972
25014
|
);
|
|
24973
25015
|
e.addBehavior(n);
|
|
24974
25016
|
}
|
|
@@ -25055,16 +25097,16 @@ const qt = (ea = class extends I {
|
|
|
25055
25097
|
}
|
|
25056
25098
|
createAndAttachBehaviors(t, e, i) {
|
|
25057
25099
|
const n = [], o = Math.max(0, this.fadeDuration);
|
|
25058
|
-
n.push(
|
|
25100
|
+
n.push(_e.fadeAction([...this.targetModels, ...i], o, !1)), n.push(_e.fadeAction(e, o, !0)), t.addBehavior(
|
|
25059
25101
|
new kt(
|
|
25060
25102
|
"Select_" + this.selfModel.name,
|
|
25061
25103
|
Ft.tapTrigger(this.selfModel),
|
|
25062
|
-
|
|
25104
|
+
_e.parallel(...n)
|
|
25063
25105
|
)
|
|
25064
25106
|
), qt._parallelStartHiddenActions.push(...e), qt._startHiddenBehaviour || (qt._startHiddenBehaviour = new kt(
|
|
25065
25107
|
"StartHidden_" + this.selfModel.name,
|
|
25066
25108
|
Ft.sceneStartTrigger(),
|
|
25067
|
-
|
|
25109
|
+
_e.fadeAction(qt._parallelStartHiddenActions, o, !1)
|
|
25068
25110
|
), t.addBehavior(qt._startHiddenBehaviour));
|
|
25069
25111
|
}
|
|
25070
25112
|
static getMaterialName(t) {
|
|
@@ -25143,24 +25185,24 @@ const Ue = (ta = class extends I {
|
|
|
25143
25185
|
if (this.toggleModel) {
|
|
25144
25186
|
if (this.toggleOnClick) {
|
|
25145
25187
|
const l = [];
|
|
25146
|
-
l.push(
|
|
25188
|
+
l.push(_e.fadeAction(n, 0, !1)), l.push(_e.fadeAction(this.toggleModel, 0, !0)), l.push(_e.fadeAction(this.targetModel, 0, o)), t.addBehavior(new kt(
|
|
25147
25189
|
"Toggle_" + n.name + "_ToggleTo" + (o ? "On" : "Off"),
|
|
25148
25190
|
Ft.tapTrigger(n),
|
|
25149
|
-
|
|
25191
|
+
_e.parallel(...l)
|
|
25150
25192
|
));
|
|
25151
25193
|
const c = [];
|
|
25152
|
-
c.push(
|
|
25194
|
+
c.push(_e.fadeAction(this.toggleModel, 0, !1)), c.push(_e.fadeAction(n, 0, !0)), c.push(_e.fadeAction(this.targetModel, 0, !o)), t.addBehavior(new kt(
|
|
25153
25195
|
"Toggle_" + n.name + "_ToggleTo" + (o ? "Off" : "On"),
|
|
25154
25196
|
Ft.tapTrigger(this.toggleModel),
|
|
25155
|
-
|
|
25197
|
+
_e.parallel(...c)
|
|
25156
25198
|
));
|
|
25157
25199
|
}
|
|
25158
25200
|
} else {
|
|
25159
25201
|
const l = [];
|
|
25160
|
-
this.hideSelf && l.push(
|
|
25202
|
+
this.hideSelf && l.push(_e.fadeAction(n, 0, !1)), l.push(_e.fadeAction(this.targetModel, 0, o)), t.addBehavior(new kt(
|
|
25161
25203
|
"Toggle_" + n.name + "_ToggleTo" + (o ? "On" : "Off"),
|
|
25162
25204
|
Ft.tapTrigger(n),
|
|
25163
|
-
l.length > 1 ?
|
|
25205
|
+
l.length > 1 ? _e.parallel(...l) : l[0]
|
|
25164
25206
|
));
|
|
25165
25207
|
}
|
|
25166
25208
|
const a = new Array();
|
|
@@ -25197,7 +25239,7 @@ const gs = class extends I {
|
|
|
25197
25239
|
"HideOnStart",
|
|
25198
25240
|
Ft.sceneStartTrigger(),
|
|
25199
25241
|
//@ts-ignore
|
|
25200
|
-
|
|
25242
|
+
_e.fadeAction(gs._fadeObjects, 0, !1)
|
|
25201
25243
|
), i.addBehavior(gs._fadeBehaviour));
|
|
25202
25244
|
}
|
|
25203
25245
|
start() {
|
|
@@ -25226,7 +25268,7 @@ class ah extends I {
|
|
|
25226
25268
|
const o = new kt(
|
|
25227
25269
|
"emphasize " + this.name,
|
|
25228
25270
|
Ft.tapTrigger(this.gameObject),
|
|
25229
|
-
|
|
25271
|
+
_e.emphasize(this.target, this.duration, this.motionType, void 0, "basic")
|
|
25230
25272
|
);
|
|
25231
25273
|
e.addBehavior(o);
|
|
25232
25274
|
}
|
|
@@ -25278,8 +25320,8 @@ class Sr extends I {
|
|
|
25278
25320
|
m instanceof q && m.visible && (h = !0);
|
|
25279
25321
|
}), h = !0;
|
|
25280
25322
|
const d = e.addAudioClip(o);
|
|
25281
|
-
let u =
|
|
25282
|
-
this.target && this.target.loop && (u =
|
|
25323
|
+
let u = _e.playAudioAction(a, d, "play", l, c);
|
|
25324
|
+
this.target && this.target.loop && (u = _e.sequence(u).makeLooping());
|
|
25283
25325
|
const p = this.name ? "_" + this.name : "";
|
|
25284
25326
|
if (h && this.trigger === "tap") {
|
|
25285
25327
|
this.toggleOnClick && (u.multiplePerformOperation = "stop");
|
|
@@ -25349,7 +25391,7 @@ const Tn = (ad = class extends I {
|
|
|
25349
25391
|
afterSerialize() {
|
|
25350
25392
|
if (Tn.rootsWithExclusivePlayback.size > 1) {
|
|
25351
25393
|
const t = 'Multiple root objects targeted by more than one animation. To work around QuickLook bug FB13410767, animations will be set as "exclusive" and activating them will stop other animations being marked as exclusive.';
|
|
25352
|
-
z() &&
|
|
25394
|
+
z() && we(t), console.warn(t, ...Tn.rootsWithExclusivePlayback);
|
|
25353
25395
|
}
|
|
25354
25396
|
Tn.animationActions = [], Tn.rootsWithExclusivePlayback = /* @__PURE__ */ new Set();
|
|
25355
25397
|
}
|
|
@@ -25383,18 +25425,18 @@ const Tn = (ad = class extends I {
|
|
|
25383
25425
|
static getActionForSequences(t, e, i, n, o) {
|
|
25384
25426
|
const a = (c, h) => {
|
|
25385
25427
|
let d = Tn.animationActions.find((u) => u.affectedObjects == c && u.start == h.start && u.duration == h.duration && u.animationSpeed == h.speed);
|
|
25386
|
-
return d || (d =
|
|
25387
|
-
}, l =
|
|
25428
|
+
return d || (d = _e.startAnimationAction(c, h), Tn.animationActions.push(d)), d;
|
|
25429
|
+
}, l = _e.sequence();
|
|
25388
25430
|
if (i && i.length > 0)
|
|
25389
25431
|
for (const c of i)
|
|
25390
25432
|
l.addAction(a(e, c));
|
|
25391
25433
|
if (n && n.length > 0) {
|
|
25392
|
-
const c = l.actions.length == 0 ? l :
|
|
25434
|
+
const c = l.actions.length == 0 ? l : _e.sequence();
|
|
25393
25435
|
for (const h of n)
|
|
25394
25436
|
c.addAction(a(e, h));
|
|
25395
25437
|
c.makeLooping(), l !== c && l.addAction(c);
|
|
25396
25438
|
}
|
|
25397
|
-
return o && o > 0 && l.actions.unshift(
|
|
25439
|
+
return o && o > 0 && l.actions.unshift(_e.waitAction(o)), l;
|
|
25398
25440
|
}
|
|
25399
25441
|
static getAndRegisterAnimationSequences(t, e, i) {
|
|
25400
25442
|
var g, _, y, b, w, P, k, O;
|
|
@@ -25963,7 +26005,7 @@ class Ei extends I {
|
|
|
25963
26005
|
this._currentSprite.geometry = _r.getOrCreateGeometry(n), this._currentSprite.material.map = n.texture;
|
|
25964
26006
|
else {
|
|
25965
26007
|
const a = new Me({ color: 16777215, side: Ri });
|
|
25966
|
-
if (e2 && (a.wireframe = !0), this.color && (a.color || (a.color = new
|
|
26008
|
+
if (e2 && (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) {
|
|
25967
26009
|
let l = n.texture;
|
|
25968
26010
|
l[fp] !== void 0 && l[fp] !== this && this.spriteFrames > 1 && (l = n.texture = l.clone()), l[fp] = this, a.map = l;
|
|
25969
26011
|
}
|
|
@@ -25979,7 +26021,7 @@ bt([
|
|
|
25979
26021
|
f(t2)
|
|
25980
26022
|
], Ei.prototype, "size", 2);
|
|
25981
26023
|
bt([
|
|
25982
|
-
f(
|
|
26024
|
+
f(le)
|
|
25983
26025
|
], Ei.prototype, "color", 2);
|
|
25984
26026
|
bt([
|
|
25985
26027
|
f(Se)
|
|
@@ -26228,7 +26270,7 @@ const Sb = x("debugwebxr"), i2 = new se().makeRotationY(Math.PI), ba = class ext
|
|
|
26228
26270
|
}
|
|
26229
26271
|
async onCreateAnchor(e, i) {
|
|
26230
26272
|
if (i.createAnchor === void 0) {
|
|
26231
|
-
console.warn("Hit does not support creating an anchor", i), z() &&
|
|
26273
|
+
console.warn("Hit does not support creating an anchor", i), z() && we("Hit does not support creating an anchor");
|
|
26232
26274
|
return;
|
|
26233
26275
|
} else {
|
|
26234
26276
|
const n = await i.createAnchor(e.viewerPose.transform);
|
|
@@ -27449,7 +27491,7 @@ const da = (Up = class extends I {
|
|
|
27449
27491
|
*/
|
|
27450
27492
|
onEnable() {
|
|
27451
27493
|
var t, e;
|
|
27452
|
-
window.location.protocol !== "https:" &&
|
|
27494
|
+
window.location.protocol !== "https:" && we('<a href="https://developer.mozilla.org/en-US/docs/Web/API/WebXR_Device_API" target="_blank">WebXR</a> only works on secure connections (https).'), this.useQuicklookExport && (S.findObjectOfType(Ge) || (Ll && console.log("WebXR: Adding USDZExporter"), this._usdzExporter = S.addComponent(this.gameObject, Ge), this._usdzExporter.objectToExport = this.context.scene, this._usdzExporter.autoExportAnimations = !0, this._usdzExporter.autoExportAudioSources = !0)), this.handleCreatingHTML(), this.handleOfferSession(), this.defaultAvatar === !0 && (Ll && console.warn("WebXR: No default avatar set, using static default avatar"), this.defaultAvatar = new re("https://cdn.needle.tools/static/avatars/DefaultAvatar.glb")), this.defaultAvatar && (this._playerSync = this.gameObject.getOrAddComponent(ch), this._playerSync.autoSync = !1), this._playerSync && typeof this.defaultAvatar != "boolean" && (this._playerSync.asset = this.defaultAvatar, (t = this._playerSync.onPlayerSpawned) == null || t.removeEventListener(this.onAvatarSpawned), (e = this._playerSync.onPlayerSpawned) == null || e.addEventListener(this.onAvatarSpawned));
|
|
27453
27495
|
}
|
|
27454
27496
|
/**
|
|
27455
27497
|
* Cleans up resources when the component is disabled.
|
|
@@ -27890,10 +27932,10 @@ class Ow {
|
|
|
27890
27932
|
return "Physics";
|
|
27891
27933
|
}
|
|
27892
27934
|
onExportObject(t, e, i) {
|
|
27893
|
-
const n = S.getComponents(t,
|
|
27935
|
+
const n = S.getComponents(t, ye).filter((c) => c.enabled), o = S.getComponents(t, Ai).filter((c) => c.enabled && !c.isTrigger);
|
|
27894
27936
|
let a = n.length > 0 ? n[0] : null;
|
|
27895
27937
|
const l = o.length > 0 ? o[0] : null;
|
|
27896
|
-
l && !a && (a = new
|
|
27938
|
+
l && !a && (a = new ye(), a.isKinematic = !0), a && e.addEventListener("serialize", (c, h) => {
|
|
27897
27939
|
var d, u, p;
|
|
27898
27940
|
if (a) {
|
|
27899
27941
|
if (c.appendLine(), c.beginBlock('def RealityKitComponent "RigidBody"', "{", !0), a.useGravity || c.appendLine("bool gravityEnabled = 0"), c.appendLine('uniform token info:id = "RealityKit.RigidBody"'), a.isKinematic && c.appendLine('token motionType = "Kinematic"'), c.beginBlock('def RealityKitStruct "massFrame"', "{", !0), c.appendLine(`float m_mass = ${a.mass}`), c.beginBlock('def RealityKitStruct "m_pose"', "{", !0), c.appendLine(`float3 position = (${a.centerOfMass.x}, ${a.centerOfMass.y}, ${a.centerOfMass.z})`), c.closeBlock("}"), c.closeBlock("}"), o.length > 0) {
|
|
@@ -28165,7 +28207,7 @@ class dh extends I {
|
|
|
28165
28207
|
}
|
|
28166
28208
|
}
|
|
28167
28209
|
Rw([
|
|
28168
|
-
f(
|
|
28210
|
+
f(le)
|
|
28169
28211
|
], dh.prototype, "effectColor", 2);
|
|
28170
28212
|
Rw([
|
|
28171
28213
|
f(oe)
|
|
@@ -28176,9 +28218,9 @@ var k2 = Object.defineProperty, T2 = Object.getOwnPropertyDescriptor, kw = (s, t
|
|
|
28176
28218
|
return i && n && k2(t, e, n), n;
|
|
28177
28219
|
};
|
|
28178
28220
|
const Zh = {
|
|
28179
|
-
backgroundColor: new
|
|
28221
|
+
backgroundColor: new ce(1, 1, 1),
|
|
28180
28222
|
backgroundOpacity: 1,
|
|
28181
|
-
borderColor: new
|
|
28223
|
+
borderColor: new ce(1, 1, 1),
|
|
28182
28224
|
borderOpacity: 1
|
|
28183
28225
|
};
|
|
28184
28226
|
var Np;
|
|
@@ -28186,7 +28228,7 @@ const ec = (Np = class extends xn {
|
|
|
28186
28228
|
constructor() {
|
|
28187
28229
|
super(...arguments);
|
|
28188
28230
|
r(this, "_alphaFactor", 1);
|
|
28189
|
-
r(this, "sRGBColor", new
|
|
28231
|
+
r(this, "sRGBColor", new ce(1, 0, 1));
|
|
28190
28232
|
r(this, "raycastTarget", !0);
|
|
28191
28233
|
r(this, "uiObject", null);
|
|
28192
28234
|
r(this, "_color", null);
|
|
@@ -28198,10 +28240,10 @@ const ec = (Np = class extends xn {
|
|
|
28198
28240
|
return !0;
|
|
28199
28241
|
}
|
|
28200
28242
|
get color() {
|
|
28201
|
-
return this._color || (this._color = new
|
|
28243
|
+
return this._color || (this._color = new le(1, 1, 1, 1)), this._color;
|
|
28202
28244
|
}
|
|
28203
28245
|
set color(t) {
|
|
28204
|
-
(!this._color || this._color.r !== t.r || this._color.g !== t.g || this._color.b !== t.b || this._color.alpha !== t.alpha) && (this._color || (this._color = new
|
|
28246
|
+
(!this._color || this._color.r !== t.r || this._color.g !== t.g || this._color.b !== t.b || this._color.alpha !== t.alpha) && (this._color || (this._color = new le(1, 1, 1, 1)), this._color.copy(t), this.onColorChanged());
|
|
28205
28247
|
}
|
|
28206
28248
|
setAlphaFactor(t) {
|
|
28207
28249
|
this._alphaFactor = t, this.onColorChanged();
|
|
@@ -28293,7 +28335,7 @@ const ec = (Np = class extends xn {
|
|
|
28293
28335
|
r(Np, "textureCache", /* @__PURE__ */ new Map()), Np);
|
|
28294
28336
|
let al = ec;
|
|
28295
28337
|
kw([
|
|
28296
|
-
f(
|
|
28338
|
+
f(le)
|
|
28297
28339
|
], al.prototype, "color", 1);
|
|
28298
28340
|
kw([
|
|
28299
28341
|
f()
|
|
@@ -28324,7 +28366,7 @@ class si extends al {
|
|
|
28324
28366
|
r(this, "supportRichText", !1);
|
|
28325
28367
|
r(this, "font");
|
|
28326
28368
|
r(this, "fontStyle", 0);
|
|
28327
|
-
r(this, "sRGBTextColor", new
|
|
28369
|
+
r(this, "sRGBTextColor", new ce(1, 0, 1));
|
|
28328
28370
|
r(this, "_text", "");
|
|
28329
28371
|
r(this, "_fontSize", 12);
|
|
28330
28372
|
r(this, "_textMeshUi", null);
|
|
@@ -28514,7 +28556,7 @@ class si extends al {
|
|
|
28514
28556
|
const a = parseInt("0x" + e.type.substring(7));
|
|
28515
28557
|
i.color = a;
|
|
28516
28558
|
} else
|
|
28517
|
-
i.color = new
|
|
28559
|
+
i.color = new ce(1, 1, 1);
|
|
28518
28560
|
} else if (e.type == "b") {
|
|
28519
28561
|
this.setFont(
|
|
28520
28562
|
i,
|
|
@@ -29320,7 +29362,7 @@ class Bw {
|
|
|
29320
29362
|
if (g instanceof q && !b) {
|
|
29321
29363
|
const O = g.geometry.clone();
|
|
29322
29364
|
O.scale(1, 1, -1), this.flipWindingOrder(O), _.geometry = O;
|
|
29323
|
-
const M = new
|
|
29365
|
+
const M = new ce(), E = g.material.opacity;
|
|
29324
29366
|
M.copy(g.material.color), _.material = new Me({
|
|
29325
29367
|
color: M,
|
|
29326
29368
|
opacity: E * w,
|
|
@@ -29426,7 +29468,7 @@ function V2(s) {
|
|
|
29426
29468
|
return new kt(
|
|
29427
29469
|
"DisableAtStart",
|
|
29428
29470
|
Ft.sceneStartTrigger(),
|
|
29429
|
-
|
|
29471
|
+
_e.fadeAction(s, 0, !1)
|
|
29430
29472
|
);
|
|
29431
29473
|
}
|
|
29432
29474
|
function Ob(s, t) {
|
|
@@ -29561,11 +29603,11 @@ const zm = (ld = class extends I {
|
|
|
29561
29603
|
return i instanceof Promise ? (this._currentExportTasks.set(t, i), i.then((n) => (this._currentExportTasks.delete(t), n)).catch((n) => (this._currentExportTasks.delete(t), console.error("Error during USDZ export – please report a bug!", n), null))) : i;
|
|
29562
29604
|
}
|
|
29563
29605
|
async internalExport(t) {
|
|
29564
|
-
|
|
29606
|
+
de.start("export-usdz", {
|
|
29565
29607
|
onProgress: (O) => {
|
|
29566
29608
|
this.dispatchEvent(new CustomEvent("export-progress", { detail: { progress: O } }));
|
|
29567
29609
|
}
|
|
29568
|
-
}),
|
|
29610
|
+
}), de.report("export-usdz", { message: "Starting export", totalSteps: 40, currentStep: 0 }), de.report("export-usdz", { message: "Load progressive textures", autoStep: 5 }), de.start("export-usdz-textures", "export-usdz");
|
|
29569
29611
|
const e = S.getComponentsInChildren(t, Ei);
|
|
29570
29612
|
for (const O of e)
|
|
29571
29613
|
O && O.enabled && O.updateSprite(!0);
|
|
@@ -29577,7 +29619,7 @@ const zm = (ld = class extends I {
|
|
|
29577
29619
|
const E = Ke.assignMeshLOD(M, 0);
|
|
29578
29620
|
E instanceof Promise && n.push(new Promise((B, A) => {
|
|
29579
29621
|
E.then(() => {
|
|
29580
|
-
o++,
|
|
29622
|
+
o++, de.report("export-usdz-textures", { message: "Loaded progressive mesh", currentStep: o, totalSteps: n.length }), B();
|
|
29581
29623
|
}).catch((F) => A(F));
|
|
29582
29624
|
}));
|
|
29583
29625
|
}
|
|
@@ -29586,20 +29628,20 @@ const zm = (ld = class extends I {
|
|
|
29586
29628
|
const E = Ke.assignTextureLOD(M, 0);
|
|
29587
29629
|
E instanceof Promise && n.push(new Promise((B, A) => {
|
|
29588
29630
|
E.then(() => {
|
|
29589
|
-
o++,
|
|
29631
|
+
o++, de.report("export-usdz-textures", { message: "Loaded progressive texture", currentStep: o, totalSteps: n.length }), B();
|
|
29590
29632
|
}).catch((F) => A(F));
|
|
29591
29633
|
}));
|
|
29592
29634
|
}
|
|
29593
29635
|
}
|
|
29594
|
-
pi && We("Progressive Loading: " + n.length), await Promise.all(n), pi && We("Progressive Loading: done"),
|
|
29636
|
+
pi && We("Progressive Loading: " + n.length), await Promise.all(n), pi && We("Progressive Loading: done"), de.end("export-usdz-textures");
|
|
29595
29637
|
const a = ei.Global.Mask;
|
|
29596
29638
|
ei.Global.Set(xs.AR);
|
|
29597
29639
|
const l = new Ik(), c = new Qg(this.quickLookCompatible);
|
|
29598
29640
|
let h;
|
|
29599
29641
|
const d = [];
|
|
29600
|
-
this.interactive && (d.push(new Pw()), d.push(new nl()), globalThis.false && S.getComponentsInChildren(t,
|
|
29642
|
+
this.interactive && (d.push(new Pw()), d.push(new nl()), globalThis.false && S.getComponentsInChildren(t, ye).length > 0 && (this.physics ? (h = new Ow(), 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 Jg()), d.push(new Bw()));
|
|
29601
29643
|
const u = [c, ...d, ...this.extensions], p = { self: this, exporter: l, extensions: u, object: t };
|
|
29602
|
-
|
|
29644
|
+
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");
|
|
29603
29645
|
const m = new Array();
|
|
29604
29646
|
this.autoExportAnimations && m.push(...$2(t, c)), u.find((O) => O.extensionName === "Audio") && this.autoExportAudioSources && m.push(...W2(t)), l.debug = pi, l.pruneUnusedNodes = !q2;
|
|
29605
29647
|
const _ = tr.instance.objs.map((O) => O.batchedMesh);
|
|
@@ -29611,7 +29653,7 @@ const zm = (ld = class extends I {
|
|
|
29611
29653
|
if (z() && c && h) {
|
|
29612
29654
|
const O = c.animatedRoots;
|
|
29613
29655
|
for (const M of O) {
|
|
29614
|
-
const E = S.getComponentsInChildren(M,
|
|
29656
|
+
const E = S.getComponentsInChildren(M, ye).filter((A) => A.enabled), B = S.getComponents(M, Ai).filter((A) => A.enabled && !A.isTrigger);
|
|
29615
29657
|
(E.length > 0 || B.length > 0) && console.error("An animated object has physics components in its child hierarchy. This can lead to undefined behaviour due to a bug in Apple's QuickLook (FB15925487). Remove the physics components from child objects or verify that you get the expected results.", M);
|
|
29616
29658
|
}
|
|
29617
29659
|
}
|
|
@@ -29623,7 +29665,7 @@ const zm = (ld = class extends I {
|
|
|
29623
29665
|
const b = u.find((O) => O.extensionName === "Behaviour");
|
|
29624
29666
|
this.interactive && b && y.length > 0 && b.addBehavior(V2(y));
|
|
29625
29667
|
let w = !0;
|
|
29626
|
-
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"),
|
|
29668
|
+
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");
|
|
29627
29669
|
const P = await l.parse(this.objectToExport, {
|
|
29628
29670
|
ar: {
|
|
29629
29671
|
anchoring: {
|
|
@@ -29638,10 +29680,10 @@ const zm = (ld = class extends I {
|
|
|
29638
29680
|
maxTextureSize: this.maxTextureSize,
|
|
29639
29681
|
exportInvisible: w
|
|
29640
29682
|
}), k = new Blob([P], { type: "model/vnd.usdz+zip" });
|
|
29641
|
-
this.revertWebARSessionRoot(), this.context.time.timeScale = this._previousTimeScale,
|
|
29683
|
+
this.revertWebARSessionRoot(), this.context.time.timeScale = this._previousTimeScale, de.report("export-usdz", "Invoking after-export"), this.dispatchEvent(new CustomEvent("after-export", { detail: p }));
|
|
29642
29684
|
for (const O of m)
|
|
29643
29685
|
S.destroy(O);
|
|
29644
|
-
return ei.Global.Set(a),
|
|
29686
|
+
return ei.Global.Set(a), de.end("export-usdz"), k;
|
|
29645
29687
|
}
|
|
29646
29688
|
/**
|
|
29647
29689
|
* Opens QuickLook on iOS/iPadOS/visionOS with the given content in AR mode.
|
|
@@ -29667,7 +29709,7 @@ const zm = (ld = class extends I {
|
|
|
29667
29709
|
}
|
|
29668
29710
|
quicklookCallback(t) {
|
|
29669
29711
|
if ((t == null ? void 0 : t.data) == "_apple_ar_quicklook_button_tapped") {
|
|
29670
|
-
pi &&
|
|
29712
|
+
pi && we("Quicklook closed via call to action button");
|
|
29671
29713
|
var e = new CustomEvent("quicklook-button-tapped", { detail: this });
|
|
29672
29714
|
if (this.dispatchEvent(e), !e.defaultPrevented) {
|
|
29673
29715
|
const i = new URLSearchParams(this.link.href);
|
|
@@ -29798,7 +29840,7 @@ t_([
|
|
|
29798
29840
|
f()
|
|
29799
29841
|
], uh.prototype, "far", 1);
|
|
29800
29842
|
t_([
|
|
29801
|
-
f(
|
|
29843
|
+
f(ce)
|
|
29802
29844
|
], uh.prototype, "color", 1);
|
|
29803
29845
|
var Y2 = Object.defineProperty, K2 = Object.getOwnPropertyDescriptor, i_ = (s, t, e, i) => {
|
|
29804
29846
|
for (var n = i > 1 ? void 0 : i ? K2(t, e) : t, o = s.length - 1, a; o >= 0; o--)
|
|
@@ -29830,7 +29872,7 @@ i_([
|
|
|
29830
29872
|
f()
|
|
29831
29873
|
], hl.prototype, "objectBounds", 2);
|
|
29832
29874
|
i_([
|
|
29833
|
-
f(
|
|
29875
|
+
f(ce)
|
|
29834
29876
|
], hl.prototype, "color", 2);
|
|
29835
29877
|
i_([
|
|
29836
29878
|
f()
|
|
@@ -29856,7 +29898,7 @@ class fh extends I {
|
|
|
29856
29898
|
if (this.isGizmo && !Xc)
|
|
29857
29899
|
return;
|
|
29858
29900
|
const e = this.size, i = this.divisions;
|
|
29859
|
-
this.gridHelper || (this.gridHelper = new ig(e, i, this.color0 ?? new
|
|
29901
|
+
this.gridHelper || (this.gridHelper = new ig(e, i, this.color0 ?? new ce(0.4, 0.4, 0.4), this.color1 ?? new ce(0.6, 0.6, 0.6)), this.offset !== void 0 && (this.gridHelper.position.y += this.offset)), this.gridHelper && this.gameObject.add(this.gridHelper);
|
|
29860
29902
|
}
|
|
29861
29903
|
/** @internal */
|
|
29862
29904
|
onDisable() {
|
|
@@ -29867,10 +29909,10 @@ n_([
|
|
|
29867
29909
|
f()
|
|
29868
29910
|
], fh.prototype, "isGizmo", 2);
|
|
29869
29911
|
n_([
|
|
29870
|
-
f(
|
|
29912
|
+
f(ce)
|
|
29871
29913
|
], fh.prototype, "color0", 2);
|
|
29872
29914
|
n_([
|
|
29873
|
-
f(
|
|
29915
|
+
f(ce)
|
|
29874
29916
|
], fh.prototype, "color1", 2);
|
|
29875
29917
|
var eT = Object.defineProperty, tT = Object.getOwnPropertyDescriptor, s_ = (s, t, e, i) => {
|
|
29876
29918
|
for (var n = i > 1 ? void 0 : i ? tT(t, e) : t, o = s.length - 1, a; o >= 0; o--)
|
|
@@ -29887,14 +29929,14 @@ class o_ extends I {
|
|
|
29887
29929
|
return this._rigidBody;
|
|
29888
29930
|
}
|
|
29889
29931
|
onEnable() {
|
|
29890
|
-
this._rigidBody || (this._rigidBody = this.gameObject.getComponent(
|
|
29932
|
+
this._rigidBody || (this._rigidBody = this.gameObject.getComponent(ye)), this.rigidBody && this.connectedBody && this.startCoroutine(this.create());
|
|
29891
29933
|
}
|
|
29892
29934
|
*create() {
|
|
29893
29935
|
yield, this.rigidBody && this.connectedBody && this.activeAndEnabled && this.createJoint(this.rigidBody, this.connectedBody);
|
|
29894
29936
|
}
|
|
29895
29937
|
}
|
|
29896
29938
|
s_([
|
|
29897
|
-
f(
|
|
29939
|
+
f(ye)
|
|
29898
29940
|
], o_.prototype, "connectedBody", 2);
|
|
29899
29941
|
class Fw extends o_ {
|
|
29900
29942
|
createJoint(t, e) {
|
|
@@ -29944,7 +29986,7 @@ class Di extends I {
|
|
|
29944
29986
|
* The angle of the inner cone in degrees for soft-edge spotlights
|
|
29945
29987
|
*/
|
|
29946
29988
|
r(this, "innerSpotAngle", 1);
|
|
29947
|
-
r(this, "_color", new
|
|
29989
|
+
r(this, "_color", new ce(16777215));
|
|
29948
29990
|
r(this, "_shadowNearPlane", 0.1);
|
|
29949
29991
|
r(this, "_shadowBias", 0);
|
|
29950
29992
|
r(this, "_shadowNormalBias", 0);
|
|
@@ -30072,7 +30114,7 @@ class Di extends I {
|
|
|
30072
30114
|
// this.intensity = this._intensity;
|
|
30073
30115
|
// }
|
|
30074
30116
|
awake() {
|
|
30075
|
-
this.color = new
|
|
30117
|
+
this.color = new ce(this.color ?? 16777215), qs && console.log(this.name, this);
|
|
30076
30118
|
}
|
|
30077
30119
|
onEnable() {
|
|
30078
30120
|
qs && console.log("ENABLE LIGHT", this.name), this.createLight(), !this.isBaked && (this.light && (this.light.visible = !0, this.light.intensity = this._intensity, qs && console.log("Set light intensity to " + this.light.intensity, this.name), this.selfIsLight || this.light.parent !== this.gameObject && this.gameObject.add(this.light)), this.type === 1 && this.startCoroutine(this.updateMainLightRoutine(), Re.LateUpdate));
|
|
@@ -30177,7 +30219,7 @@ Zn([
|
|
|
30177
30219
|
f()
|
|
30178
30220
|
], Di.prototype, "type", 2);
|
|
30179
30221
|
Zn([
|
|
30180
|
-
f(
|
|
30222
|
+
f(ce)
|
|
30181
30223
|
], Di.prototype, "color", 1);
|
|
30182
30224
|
Zn([
|
|
30183
30225
|
f()
|
|
@@ -30807,19 +30849,19 @@ const Mt = (cd = class {
|
|
|
30807
30849
|
}
|
|
30808
30850
|
return Mt._temp.set(16777215), Mt._temp.alpha = 1, Mt._temp;
|
|
30809
30851
|
}
|
|
30810
|
-
}, r(cd, "_temp", new
|
|
30852
|
+
}, r(cd, "_temp", new le(0, 0, 0, 1)), r(cd, "_temp2", new le(0, 0, 0, 1)), cd);
|
|
30811
30853
|
let Li = Mt;
|
|
30812
30854
|
C([
|
|
30813
30855
|
f()
|
|
30814
30856
|
], Li.prototype, "mode", 2);
|
|
30815
30857
|
C([
|
|
30816
|
-
f(
|
|
30858
|
+
f(le)
|
|
30817
30859
|
], Li.prototype, "color", 2);
|
|
30818
30860
|
C([
|
|
30819
|
-
f(
|
|
30861
|
+
f(le)
|
|
30820
30862
|
], Li.prototype, "colorMin", 2);
|
|
30821
30863
|
C([
|
|
30822
|
-
f(
|
|
30864
|
+
f(le)
|
|
30823
30865
|
], Li.prototype, "colorMax", 2);
|
|
30824
30866
|
C([
|
|
30825
30867
|
f(ul)
|
|
@@ -32396,7 +32438,7 @@ class ET extends Br {
|
|
|
32396
32438
|
}
|
|
32397
32439
|
}
|
|
32398
32440
|
}
|
|
32399
|
-
const Eb = Symbol("colorLerpFactor"), Ib = new
|
|
32441
|
+
const Eb = Symbol("colorLerpFactor"), Ib = new le(1, 1, 1, 1), Wo = new le(1, 1, 1, 1);
|
|
32400
32442
|
class IT extends Br {
|
|
32401
32443
|
constructor() {
|
|
32402
32444
|
super(...arguments);
|
|
@@ -32517,7 +32559,7 @@ class DT {
|
|
|
32517
32559
|
}
|
|
32518
32560
|
return this.clonedTexture.clone;
|
|
32519
32561
|
}
|
|
32520
|
-
return this.flatWhiteTexture || (this.flatWhiteTexture = Ag(new
|
|
32562
|
+
return this.flatWhiteTexture || (this.flatWhiteTexture = Ag(new le(1, 1, 1, 1), 1)), this.flatWhiteTexture;
|
|
32521
32563
|
}
|
|
32522
32564
|
get startTileIndex() {
|
|
32523
32565
|
return new CT(this.system);
|
|
@@ -32925,7 +32967,7 @@ function Nw(s, t) {
|
|
|
32925
32967
|
if (!s.unsupported_scaling_mode) {
|
|
32926
32968
|
s.unsupported_scaling_mode = !0;
|
|
32927
32969
|
const e = "ParticleSystem scale mode " + $m[s.main.scalingMode] + " is not supported";
|
|
32928
|
-
z() &&
|
|
32970
|
+
z() && we(e), console.warn(e, s.name, s);
|
|
32929
32971
|
}
|
|
32930
32972
|
t = Ye(s.gameObject, t);
|
|
32931
32973
|
break;
|
|
@@ -32979,7 +33021,7 @@ class Wc extends I {
|
|
|
32979
33021
|
}
|
|
32980
33022
|
static colorFromHashCode(e) {
|
|
32981
33023
|
const i = (e & 16711680) >> 16, n = (e & 65280) >> 8, o = e & 255;
|
|
32982
|
-
return new
|
|
33024
|
+
return new ce(i / 255, n / 255, o / 255);
|
|
32983
33025
|
}
|
|
32984
33026
|
}
|
|
32985
33027
|
const jT = x("debugpost");
|
|
@@ -33598,7 +33640,7 @@ class Io extends ht {
|
|
|
33598
33640
|
r(this, "intensity", new N(2));
|
|
33599
33641
|
r(this, "falloff", new N(1));
|
|
33600
33642
|
r(this, "samples", new N(9));
|
|
33601
|
-
r(this, "color", new N(new
|
|
33643
|
+
r(this, "color", new N(new ce(0, 0, 0)));
|
|
33602
33644
|
r(this, "luminanceInfluence", new N(0.7));
|
|
33603
33645
|
r(this, "_ssao");
|
|
33604
33646
|
}
|
|
@@ -33606,7 +33648,7 @@ class Io extends ht {
|
|
|
33606
33648
|
return "ScreenSpaceAmbientOcclusion";
|
|
33607
33649
|
}
|
|
33608
33650
|
onBeforeRender() {
|
|
33609
|
-
if (this._ssao && this.context.mainCamera instanceof
|
|
33651
|
+
if (this._ssao && this.context.mainCamera instanceof be) {
|
|
33610
33652
|
const e = this.context.mainCamera.far - this.context.mainCamera.near;
|
|
33611
33653
|
this._ssao.ssaoMaterial.worldDistanceFalloff = e * 0.01, this._ssao.ssaoMaterial.worldDistanceThreshold = this.context.mainCamera.far;
|
|
33612
33654
|
}
|
|
@@ -33634,7 +33676,7 @@ class Io extends ht {
|
|
|
33634
33676
|
}, this.samples.onValueChanged = (l) => {
|
|
33635
33677
|
o.ssaoMaterial.samples = l;
|
|
33636
33678
|
}, this.color.onValueChanged = (l) => {
|
|
33637
|
-
o.color || (o.color = new
|
|
33679
|
+
o.color || (o.color = new ce()), o.color.copy(l);
|
|
33638
33680
|
}, this.luminanceInfluence.onValueChanged = (l) => {
|
|
33639
33681
|
o.luminanceInfluence = l;
|
|
33640
33682
|
};
|
|
@@ -33672,7 +33714,7 @@ class ts extends ht {
|
|
|
33672
33714
|
r(this, "aoRadius", new N(1));
|
|
33673
33715
|
r(this, "falloff", new N(1));
|
|
33674
33716
|
r(this, "intensity", new N(1));
|
|
33675
|
-
r(this, "color", new N(new
|
|
33717
|
+
r(this, "color", new N(new ce(0, 0, 0)));
|
|
33676
33718
|
r(this, "screenspaceRadius", !1);
|
|
33677
33719
|
r(this, "quality", 2);
|
|
33678
33720
|
r(this, "_ssao");
|
|
@@ -33706,7 +33748,7 @@ class ts extends ht {
|
|
|
33706
33748
|
}, this.aoRadius.onValueChanged = (c) => {
|
|
33707
33749
|
o.configuration.aoRadius = c;
|
|
33708
33750
|
}, this.color.onValueChanged = (c) => {
|
|
33709
|
-
o.color || (o.color = new
|
|
33751
|
+
o.color || (o.color = new ce()), o.configuration.color.copy(c);
|
|
33710
33752
|
}, o;
|
|
33711
33753
|
}
|
|
33712
33754
|
}
|
|
@@ -33999,7 +34041,7 @@ class Xw {
|
|
|
33999
34041
|
Array.isArray(a) ? this._effects.push(...a) : this._effects.push(a);
|
|
34000
34042
|
}
|
|
34001
34043
|
} else
|
|
34002
|
-
o.active &&
|
|
34044
|
+
o.active && we("Volume component is not a VolumeComponent: " + o.__type);
|
|
34003
34045
|
}
|
|
34004
34046
|
if (this.context.renderer.toneMapping != ja && !this._effects.find((n) => n instanceof j.POSTPROCESSING.MODULE.ToneMappingEffect)) {
|
|
34005
34047
|
const n = new j.POSTPROCESSING.MODULE.ToneMappingEffect();
|
|
@@ -35424,7 +35466,7 @@ class $A extends bn {
|
|
|
35424
35466
|
this.uniforms = {
|
|
35425
35467
|
map: { value: e },
|
|
35426
35468
|
screenAspect: { value: 1 },
|
|
35427
|
-
offsetScale: { value: new
|
|
35469
|
+
offsetScale: { value: new ge(0, 0, 1, 1) }
|
|
35428
35470
|
}, this.vertexShader = `
|
|
35429
35471
|
uniform sampler2D map;
|
|
35430
35472
|
uniform float screenAspect;
|
|
@@ -35642,7 +35684,7 @@ class Nr extends I {
|
|
|
35642
35684
|
}
|
|
35643
35685
|
async internalShare(e) {
|
|
35644
35686
|
if (this.context.connection.isInRoom === !1) {
|
|
35645
|
-
console.warn("Can not start screensharing: requires network connection"), z() &&
|
|
35687
|
+
console.warn("Can not start screensharing: requires network connection"), z() && we("Can not start screensharing: requires network connection. Add a SyncedRoom component or join a room first.");
|
|
35646
35688
|
return;
|
|
35647
35689
|
}
|
|
35648
35690
|
if (e != null && e.device && (this.device = e.device), !this.videoPlayer && this.requiresVideoPlayer && (this._videoPlayer || (this._videoPlayer = S.getComponent(this.gameObject, yt) ?? void 0), this.videoPlayer || this._ensureVideoPlayer(), !this.videoPlayer)) {
|
|
@@ -35777,12 +35819,12 @@ class Nr extends I {
|
|
|
35777
35819
|
break;
|
|
35778
35820
|
} catch (l) {
|
|
35779
35821
|
if (l.message === "Failed to allocate videosource" || l.message === "Could not start video source") {
|
|
35780
|
-
|
|
35822
|
+
we("Failed to start video: Try another camera (Code " + l.code + ")"), console.warn(l);
|
|
35781
35823
|
continue;
|
|
35782
35824
|
} else
|
|
35783
35825
|
console.error("Failed to get user media", l.message, l.code, l);
|
|
35784
35826
|
}
|
|
35785
|
-
!o && z() && (
|
|
35827
|
+
!o && z() && (we("No camera found for sharing. Please connect a camera (see console for more information)"), console.warn("No camera found for sharing. Please connect a camera", n, this.deviceName, "Using deviceFilter? " + this.deviceFilter != null, "Using options? " + i != null, "Using deviceName? " + this.deviceName != null, "Using options.deviceId? " + (i == null ? void 0 : i.deviceId) != null, "Using options.deviceFilter? " + (i == null ? void 0 : i.deviceFilter) != null));
|
|
35786
35828
|
}
|
|
35787
35829
|
// private _cameraSelectionWindow : Window | null = null;
|
|
35788
35830
|
// private openWindowToSelectCamera(){
|
|
@@ -35812,7 +35854,7 @@ class uf extends I {
|
|
|
35812
35854
|
constructor() {
|
|
35813
35855
|
super(...arguments);
|
|
35814
35856
|
r(this, "mode", 0);
|
|
35815
|
-
r(this, "shadowColor", new
|
|
35857
|
+
r(this, "shadowColor", new le(0, 0, 0, 1));
|
|
35816
35858
|
r(this, "targetMesh");
|
|
35817
35859
|
}
|
|
35818
35860
|
/** @internal */
|
|
@@ -35906,7 +35948,7 @@ ex([
|
|
|
35906
35948
|
f()
|
|
35907
35949
|
], uf.prototype, "mode", 2);
|
|
35908
35950
|
ex([
|
|
35909
|
-
f(
|
|
35951
|
+
f(le)
|
|
35910
35952
|
], uf.prototype, "shadowColor", 2);
|
|
35911
35953
|
var qA = Object.defineProperty, XA = Object.getOwnPropertyDescriptor, xh = (s, t, e, i) => {
|
|
35912
35954
|
for (var n = i > 1 ? void 0 : i ? XA(t, e) : t, o = s.length - 1, a; o >= 0; o--)
|
|
@@ -35927,7 +35969,7 @@ function Bb(s, t, e, i, n) {
|
|
|
35927
35969
|
}), o.setSkybox(t);
|
|
35928
35970
|
}
|
|
35929
35971
|
const su = new Array();
|
|
35930
|
-
|
|
35972
|
+
pe.registerCallback(me.ContextCreationStart, (s) => {
|
|
35931
35973
|
var n;
|
|
35932
35974
|
const t = s.context, e = t.domElement.getAttribute("skybox-image") || t.domElement.getAttribute("background-image"), i = t.domElement.getAttribute("environment-image");
|
|
35933
35975
|
if (e) {
|
|
@@ -35941,7 +35983,7 @@ fe.registerCallback(pe.ContextCreationStart, (s) => {
|
|
|
35941
35983
|
su.push(o);
|
|
35942
35984
|
}
|
|
35943
35985
|
});
|
|
35944
|
-
|
|
35986
|
+
pe.registerCallback(me.ContextCreationStart, () => Promise.all(su).finally(() => {
|
|
35945
35987
|
su.length = 0;
|
|
35946
35988
|
}));
|
|
35947
35989
|
function tx() {
|
|
@@ -35953,7 +35995,7 @@ function Fb(s) {
|
|
|
35953
35995
|
}
|
|
35954
35996
|
async function QA(s) {
|
|
35955
35997
|
const t = await s;
|
|
35956
|
-
ev(t, !0),
|
|
35998
|
+
ev(t, !0), Ee(t);
|
|
35957
35999
|
}
|
|
35958
36000
|
function YA(s, t) {
|
|
35959
36001
|
const e = tx();
|
|
@@ -36441,7 +36483,7 @@ class p_ extends I {
|
|
|
36441
36483
|
console.warn("SpectatorCamera: Spectator camera needs camera component on the same object.", this);
|
|
36442
36484
|
return;
|
|
36443
36485
|
}
|
|
36444
|
-
!this._handler && this.cam && (this._handler = new rE(this.context, this.cam, this)), this.orbit = S.getComponent(this.context.mainCamera,
|
|
36486
|
+
!this._handler && this.cam && (this._handler = new rE(this.context, this.cam, this)), this.orbit = S.getComponent(this.context.mainCamera, ve);
|
|
36445
36487
|
}
|
|
36446
36488
|
onDestroy() {
|
|
36447
36489
|
var e, i;
|
|
@@ -36511,7 +36553,7 @@ class p_ extends I {
|
|
|
36511
36553
|
const m = l.backgroundColor;
|
|
36512
36554
|
m && e.setClearColor(m, m.alpha), this.cam.backgroundColor = m, this.cam.clearFlags = l.clearFlags, this.cam.nearClipPlane = l.nearClipPlane, this.cam.farClipPlane = l.farClipPlane;
|
|
36513
36555
|
} else
|
|
36514
|
-
e.setClearColor(new
|
|
36556
|
+
e.setClearColor(new ce(1, 1, 1));
|
|
36515
36557
|
e.setRenderTarget(null), e.xr.enabled = !1;
|
|
36516
36558
|
const c = (p = this.cam) == null ? void 0 : p.threeCamera;
|
|
36517
36559
|
this.context.updateAspect(c);
|
|
@@ -36991,7 +37033,7 @@ class is extends I {
|
|
|
36991
37033
|
const i = this.getViewOnlyUrl();
|
|
36992
37034
|
i != null && i.length ? navigator.canShare({ url: i }) ? (n = navigator.share({ url: i })) == null || n.catch((o) => {
|
|
36993
37035
|
console.warn(o);
|
|
36994
|
-
}) : (navigator.clipboard.writeText(i), We("View only URL copied to clipboard")) :
|
|
37036
|
+
}) : (navigator.clipboard.writeText(i), We("View only URL copied to clipboard")) : we("Could not create view only URL");
|
|
36995
37037
|
}, e.title = "Copy the view only URL: A page accessed by the view only URL can not be modified by visiting users.", e.textContent = "Share View URL", e.prepend(Dt("visibility"));
|
|
36996
37038
|
}
|
|
36997
37039
|
this.context.menu.appendChild(this._viewOnlyButton);
|
|
@@ -37569,13 +37611,13 @@ class __ extends _f {
|
|
|
37569
37611
|
if (b.weight = L, l += L, b.clampWhenFinished = !1, b.isRunning() || b.play(), this._useclipOffsets) {
|
|
37570
37612
|
const H = i == 0 ? this._totalOffsetPosition : this._totalOffsetPosition2, Y = i == 0 ? this._totalOffsetRotation : this._totalOffsetRotation2;
|
|
37571
37613
|
i < 1 && (n = 1 - A), i += 1;
|
|
37572
|
-
const te = this._summedPos.set(0, 0, 0),
|
|
37614
|
+
const te = this._summedPos.set(0, 0, 0), ae = this._tempPos.set(0, 0, 0), ue = this._summedRot.identity(), Le = this._tempRot.identity(), St = w.rotation;
|
|
37573
37615
|
St && (this._clipRotQuat.identity(), this._clipRotQuat.slerp(St, A));
|
|
37574
37616
|
const ai = this._actionOffsets[_];
|
|
37575
37617
|
if (ai.hasOffsets)
|
|
37576
37618
|
for (let $t = 0; $t < Z; $t++)
|
|
37577
|
-
ai.rootPositionOffset ?
|
|
37578
|
-
this._clipRotQuat && Y.multiply(this._clipRotQuat), Y.multiply(
|
|
37619
|
+
ai.rootPositionOffset ? ae.copy(ai.rootPositionOffset) : ae.set(0, 0, 0), ae.applyQuaternion(ue), this._clipRotQuat && ae.applyQuaternion(this._clipRotQuat), ai.rootQuaternionOffset && (Le.copy(ai.rootQuaternionOffset), ue.multiply(Le)), te.add(ae);
|
|
37620
|
+
this._clipRotQuat && Y.multiply(this._clipRotQuat), Y.multiply(ue), w.position && te.add(w.position), H.add(te);
|
|
37579
37621
|
}
|
|
37580
37622
|
}
|
|
37581
37623
|
}
|
|
@@ -38377,7 +38419,7 @@ class yl extends I {
|
|
|
38377
38419
|
const a = o.material;
|
|
38378
38420
|
a && (a.opacity = 0.3);
|
|
38379
38421
|
}
|
|
38380
|
-
}), this.orbit = S.getComponentInParent(this.context.mainCamera,
|
|
38422
|
+
}), this.orbit = S.getComponentInParent(this.context.mainCamera, ve) ?? void 0), this._control)) {
|
|
38381
38423
|
const i = this._control.getHelper();
|
|
38382
38424
|
this.context.scene.add(i), this._control.attach(this.gameObject), (e = this._control) == null || e.addEventListener("dragging-changed", this.onControlChangedEvent), window.addEventListener("keydown", this.windowKeyDownListener), window.addEventListener("keyup", this.windowKeyUpListener);
|
|
38383
38425
|
}
|
|
@@ -38512,22 +38554,22 @@ Fi([
|
|
|
38512
38554
|
f()
|
|
38513
38555
|
], Lo.prototype, "colorMultiplier", 2);
|
|
38514
38556
|
Fi([
|
|
38515
|
-
f(
|
|
38557
|
+
f(le)
|
|
38516
38558
|
], Lo.prototype, "disabledColor", 2);
|
|
38517
38559
|
Fi([
|
|
38518
38560
|
f()
|
|
38519
38561
|
], Lo.prototype, "fadeDuration", 2);
|
|
38520
38562
|
Fi([
|
|
38521
|
-
f(
|
|
38563
|
+
f(le)
|
|
38522
38564
|
], Lo.prototype, "highlightedColor", 2);
|
|
38523
38565
|
Fi([
|
|
38524
|
-
f(
|
|
38566
|
+
f(le)
|
|
38525
38567
|
], Lo.prototype, "normalColor", 2);
|
|
38526
38568
|
Fi([
|
|
38527
|
-
f(
|
|
38569
|
+
f(le)
|
|
38528
38570
|
], Lo.prototype, "pressedColor", 2);
|
|
38529
38571
|
Fi([
|
|
38530
|
-
f(
|
|
38572
|
+
f(le)
|
|
38531
38573
|
], Lo.prototype, "selectedColor", 2);
|
|
38532
38574
|
class IE {
|
|
38533
38575
|
constructor() {
|
|
@@ -39124,7 +39166,7 @@ const cx = (Xp = class extends I {
|
|
|
39124
39166
|
const o = new kt(
|
|
39125
39167
|
"lookat " + this.name,
|
|
39126
39168
|
Ft.sceneStartTrigger(),
|
|
39127
|
-
|
|
39169
|
+
_e.lookAtCameraAction(
|
|
39128
39170
|
n,
|
|
39129
39171
|
void 0,
|
|
39130
39172
|
this.invertForward ? Ki.back : Ki.forward,
|
|
@@ -39321,7 +39363,7 @@ function GE(s, t) {
|
|
|
39321
39363
|
e.add(s), Nb.set(t, e), console.debug("Initialize texture for camera feed");
|
|
39322
39364
|
const i = new Me(), n = new Xn(), o = new Mi();
|
|
39323
39365
|
o.add(new q(n, i));
|
|
39324
|
-
const a = new
|
|
39366
|
+
const a = new be();
|
|
39325
39367
|
i.map = t, s.render(o, a);
|
|
39326
39368
|
}
|
|
39327
39369
|
function nL(s, t, e, i = "image/webp", n) {
|
|
@@ -39332,7 +39374,7 @@ function dx(s) {
|
|
|
39332
39374
|
s || (s = {});
|
|
39333
39375
|
const { transparent: t = !1 } = s;
|
|
39334
39376
|
let { mimeType: e, context: i, width: n, height: o, camera: a } = s;
|
|
39335
|
-
if (!i && (i =
|
|
39377
|
+
if (!i && (i = pe.Current, !i))
|
|
39336
39378
|
return console.error("Can not save screenshot: No needle-engine context found or provided."), null;
|
|
39337
39379
|
if (!a && (a = i.mainCamera, !a))
|
|
39338
39380
|
return console.error("No camera found"), null;
|
|
@@ -39350,7 +39392,7 @@ function dx(s) {
|
|
|
39350
39392
|
n /= g, o /= g, l.xr.isPresenting && l.xr.getFrame();
|
|
39351
39393
|
const _ = l.xr.enabled;
|
|
39352
39394
|
l.xr.enabled = !1, l.xr.isPresenting = !1, h.style.width = `${n}px`, h.style.height = `${o}px`;
|
|
39353
|
-
const y = l.getRenderTarget(), b = l.getClearColor(new
|
|
39395
|
+
const y = l.getRenderTarget(), b = l.getClearColor(new ce()), w = l.getClearAlpha(), P = i.scene.background, k = "aspect" in a ? a.aspect : null;
|
|
39354
39396
|
try {
|
|
39355
39397
|
const E = s.render_events !== !1, B = new Array();
|
|
39356
39398
|
E && (Qc(i.scene, Ze, B), B.forEach((T) => {
|
|
@@ -39360,7 +39402,7 @@ function dx(s) {
|
|
|
39360
39402
|
const Y = T.instances[H];
|
|
39361
39403
|
vs(Y.object, !0);
|
|
39362
39404
|
}
|
|
39363
|
-
})), t && (i.scene.background = null, l.setClearColor(0, 0)), s.background && (i.scene.background = null, l.setClearColor(s.background), s.background instanceof
|
|
39405
|
+
})), t && (i.scene.background = null, l.setClearColor(0, 0)), s.background && (i.scene.background = null, l.setClearColor(s.background), s.background instanceof le && l.setClearAlpha(s.background.a)), t && l.setClearAlpha(0), l.setSize(n, o, !1), "cam" in a && (a = a.threeCamera), a instanceof be && (a.aspect = n / o, a.updateProjectionMatrix());
|
|
39364
39406
|
const A = "type" in s && s.type === "texture";
|
|
39365
39407
|
let F = null;
|
|
39366
39408
|
A && (F = new Ts(n, o, {
|
|
@@ -39375,7 +39417,7 @@ function dx(s) {
|
|
|
39375
39417
|
scene: i.scene,
|
|
39376
39418
|
camera: a,
|
|
39377
39419
|
renderer: l
|
|
39378
|
-
})) : i.renderNow(a || null), a instanceof
|
|
39420
|
+
})) : i.renderNow(a || null), a instanceof be && k != null && (a.aspect = k, a.updateProjectionMatrix()), E && B.forEach((T) => T.onAfterRender()), !e && "download_filename" in s && s.download_filename)
|
|
39379
39421
|
switch ((O = s.download_filename.split(".").pop()) == null ? void 0 : O.toLowerCase()) {
|
|
39380
39422
|
case "png":
|
|
39381
39423
|
e = "image/png";
|
|
@@ -39407,14 +39449,14 @@ function dx(s) {
|
|
|
39407
39449
|
if (Y && "share" in navigator) {
|
|
39408
39450
|
let te = "file_type" in s && s.file_type || e;
|
|
39409
39451
|
e || (te = "image/png");
|
|
39410
|
-
const
|
|
39452
|
+
const ae = (te == null ? void 0 : te.split("/")[1]) || "png", ue = new File([Y], "filename" in s ? s.filename || `screenshot.${ae}` : `screenshot.${ae}`, { type: te });
|
|
39411
39453
|
return navigator.share({
|
|
39412
39454
|
title: "title" in s ? s.title : void 0,
|
|
39413
39455
|
text: "text" in s ? s.text : void 0,
|
|
39414
39456
|
url: "url" in s ? s.url : void 0,
|
|
39415
|
-
files: [
|
|
39416
|
-
}).catch((
|
|
39417
|
-
console.warn("User cancelled share",
|
|
39457
|
+
files: [ue]
|
|
39458
|
+
}).catch((Le) => {
|
|
39459
|
+
console.warn("User cancelled share", Le.message);
|
|
39418
39460
|
}).finally(() => {
|
|
39419
39461
|
L({ blob: Y, shared: !0 });
|
|
39420
39462
|
});
|
|
@@ -39438,7 +39480,7 @@ function dx(s) {
|
|
|
39438
39480
|
}
|
|
39439
39481
|
return Z;
|
|
39440
39482
|
} finally {
|
|
39441
|
-
l.setRenderTarget(y), i.scene.background = P, l.setSize(d, u, !1), l.setClearColor(b, w), k != null && a instanceof
|
|
39483
|
+
l.setRenderTarget(y), i.scene.background = P, l.setSize(d, u, !1), l.setClearColor(b, w), k != null && a instanceof be && (a.aspect = k, a.updateProjectionMatrix()), l.xr.enabled = _, l.xr.isPresenting = c, c || i.updateSize(!0);
|
|
39442
39484
|
}
|
|
39443
39485
|
return null;
|
|
39444
39486
|
}
|
|
@@ -39541,13 +39583,13 @@ const $b = x("debugarcamera");
|
|
|
39541
39583
|
class Sf extends I {
|
|
39542
39584
|
constructor() {
|
|
39543
39585
|
super(...arguments);
|
|
39544
|
-
r(this, "backgroundTint", new
|
|
39586
|
+
r(this, "backgroundTint", new le(1, 1, 1, 1));
|
|
39545
39587
|
r(this, "backgroundPlane");
|
|
39546
39588
|
r(this, "threeTexture");
|
|
39547
39589
|
r(this, "forceTextureInitialization", function() {
|
|
39548
39590
|
const e = new Me(), i = new Xn(), n = new Mi();
|
|
39549
39591
|
n.add(new q(i, e));
|
|
39550
|
-
const o = new
|
|
39592
|
+
const o = new be();
|
|
39551
39593
|
return function(l, c) {
|
|
39552
39594
|
e.map = c, l.render(n, o), $b && console.warn("Force texture initialization");
|
|
39553
39595
|
};
|
|
@@ -39564,7 +39606,7 @@ class Sf extends I {
|
|
|
39564
39606
|
name: "BackgroundMaterial",
|
|
39565
39607
|
uniforms: {
|
|
39566
39608
|
...a0.clone(Dd.background.uniforms),
|
|
39567
|
-
tint: { value: new
|
|
39609
|
+
tint: { value: new ge(n.r, n.g, n.b, n.a) }
|
|
39568
39610
|
},
|
|
39569
39611
|
vertexShader: Dd.background.vertexShader,
|
|
39570
39612
|
fragmentShader: ZE,
|
|
@@ -39609,7 +39651,7 @@ class Sf extends I {
|
|
|
39609
39651
|
}
|
|
39610
39652
|
}
|
|
39611
39653
|
KE([
|
|
39612
|
-
f(
|
|
39654
|
+
f(le)
|
|
39613
39655
|
], Sf.prototype, "backgroundTint", 2);
|
|
39614
39656
|
const ZE = (
|
|
39615
39657
|
/* glsl */
|
|
@@ -39730,7 +39772,7 @@ class tI {
|
|
|
39730
39772
|
}
|
|
39731
39773
|
onBeforeBuildDocument(t) {
|
|
39732
39774
|
const e = S.findObjectOfType(Qa);
|
|
39733
|
-
!e || !e.trackedImages || e.trackedImages.length > 1 && (z() &&
|
|
39775
|
+
!e || !e.trackedImages || e.trackedImages.length > 1 && (z() && we("USDZ: Only one tracked image is supported."), console.warn("USDZ: Only one tracked image is supported."));
|
|
39734
39776
|
}
|
|
39735
39777
|
onAfterSerialize(t) {
|
|
39736
39778
|
t.files["image_tracking/" + this.filename] = this.imageData;
|
|
@@ -39852,7 +39894,7 @@ const oc = (Qp = class extends I {
|
|
|
39852
39894
|
}
|
|
39853
39895
|
onLeaveXR(t) {
|
|
39854
39896
|
var e, i;
|
|
39855
|
-
if (!this.supported && X.isAndroidDevice() &&
|
|
39897
|
+
if (!this.supported && X.isAndroidDevice() && we(this.webXRIncubationsWarning), this.trackedImages) {
|
|
39856
39898
|
for (const n of this.trackedImages)
|
|
39857
39899
|
if ((e = n.object) != null && e.asset) {
|
|
39858
39900
|
const o = n.object.asset;
|
|
@@ -39895,7 +39937,7 @@ const oc = (Qp = class extends I {
|
|
|
39895
39937
|
}
|
|
39896
39938
|
}
|
|
39897
39939
|
} else {
|
|
39898
|
-
this.didPrintWarning || (this.didPrintWarning = !0, console.log(this.webXRIncubationsWarning)), this._supported = !1,
|
|
39940
|
+
this.didPrintWarning || (this.didPrintWarning = !0, console.log(this.webXRIncubationsWarning)), this._supported = !1, we(this.webXRIncubationsWarning);
|
|
39899
39941
|
return;
|
|
39900
39942
|
}
|
|
39901
39943
|
const i = 1e3;
|
|
@@ -40077,10 +40119,10 @@ class Uo extends I {
|
|
|
40077
40119
|
else {
|
|
40078
40120
|
const m = S.instantiate(this.dataTemplate.asset);
|
|
40079
40121
|
if (m.name = "xr-tracked-plane", p = m, I0(m, !1), m instanceof q)
|
|
40080
|
-
|
|
40122
|
+
Ee(m.geometry), m.geometry = this.createGeometry(h), this.makeOccluder(m, m.material, this.occluder && !this.dataTemplate);
|
|
40081
40123
|
else if (m instanceof ho)
|
|
40082
40124
|
for (const y of m.children)
|
|
40083
|
-
y instanceof q && (
|
|
40125
|
+
y instanceof q && (Ee(y.geometry), y.geometry = this.createGeometry(h), this.makeOccluder(y, y.material, this.occluder && !this.dataTemplate));
|
|
40084
40126
|
const g = m.getComponent(Lr);
|
|
40085
40127
|
if (g) {
|
|
40086
40128
|
const y = m;
|
|
@@ -40312,7 +40354,7 @@ R.add("NestedGltf", r_);
|
|
|
40312
40354
|
R.add("Networking", gh);
|
|
40313
40355
|
R.add("OffsetConstraint", dl);
|
|
40314
40356
|
R.add("CameraTargetReachedEvent", Zd);
|
|
40315
|
-
R.add("OrbitControls",
|
|
40357
|
+
R.add("OrbitControls", ve);
|
|
40316
40358
|
R.add("ParticleSystemRenderer", Pn);
|
|
40317
40359
|
R.add("ParticleSystem", dt);
|
|
40318
40360
|
R.add("PlayerColor", Wc);
|
|
@@ -40334,7 +40376,7 @@ R.add("ReflectionProbe", sh);
|
|
|
40334
40376
|
R.add("Renderer", Ze);
|
|
40335
40377
|
R.add("MeshRenderer", Yu);
|
|
40336
40378
|
R.add("SkinnedMeshRenderer", aw);
|
|
40337
|
-
R.add("Rigidbody",
|
|
40379
|
+
R.add("Rigidbody", ye);
|
|
40338
40380
|
R.add("SceneSwitcher", ot);
|
|
40339
40381
|
R.add("ScreenCapture", Nr);
|
|
40340
40382
|
R.add("ShadowCatcher", uf);
|
|
@@ -40779,7 +40821,7 @@ function bx(s, t) {
|
|
|
40779
40821
|
}
|
|
40780
40822
|
}
|
|
40781
40823
|
y0(ux);
|
|
40782
|
-
const
|
|
40824
|
+
const Ae = x("debugwebcomponent"), Hb = "needle-engine", vx = "vr", wx = "desktop", vI = [Av, vx, wx], zl = "ar-session-active", Ul = "desktop-session-active", wI = [
|
|
40783
40825
|
"public-key",
|
|
40784
40826
|
"version",
|
|
40785
40827
|
"hash",
|
|
@@ -40959,11 +41001,11 @@ class xx extends HTMLElement {
|
|
|
40959
41001
|
* @internal
|
|
40960
41002
|
*/
|
|
40961
41003
|
async connectedCallback() {
|
|
40962
|
-
if (
|
|
41004
|
+
if (Ae && console.log("<needle-engine> connected"), this.setPublicKey(), this.setVersion(), this.addEventListener("xr-session-started", this.onXRSessionStarted), this.onSetupDesktop(), !this.getAttribute("src")) {
|
|
40963
41005
|
const i = globalThis["needle:codegen_files"];
|
|
40964
|
-
|
|
41006
|
+
Ae && console.log('src is null, trying to load from globalThis["needle:codegen_files"]', i), i && (Ae && console.log('globalThis["needle:codegen_files"]', i), this.setAttribute("src", i));
|
|
40965
41007
|
}
|
|
40966
|
-
|
|
41008
|
+
Ae && console.log("src", this.getAttribute("src"));
|
|
40967
41009
|
const e = this._loadId;
|
|
40968
41010
|
setTimeout(() => {
|
|
40969
41011
|
this.isConnected !== !1 && e === this._loadId && this.onLoad();
|
|
@@ -40976,15 +41018,15 @@ class xx extends HTMLElement {
|
|
|
40976
41018
|
var n;
|
|
40977
41019
|
this.removeEventListener("xr-session-started", this.onXRSessionStarted), this._didFullyLoad = !1;
|
|
40978
41020
|
const e = this.getAttribute("keep-alive"), i = e == null || (e == null ? void 0 : e.length) > 0 && e !== "true" && e !== "1";
|
|
40979
|
-
|
|
41021
|
+
Ae && console.warn('<needle-engine> disconnected, keep-alive: "' + e + '"', typeof e, "Dispose=", i), i ? (Ae && console.warn("<needle-engine> dispose"), (n = this._context) == null || n.dispose(), this._context = null, this._lastSourceFiles = null, this._loadId += 1) : Ae && console.warn("<needle-engine> is not disposed because keep-alive is set");
|
|
40980
41022
|
}
|
|
40981
41023
|
/**
|
|
40982
41024
|
* @internal
|
|
40983
41025
|
*/
|
|
40984
41026
|
attributeChangedCallback(e, i, n) {
|
|
40985
|
-
switch (
|
|
41027
|
+
switch (Ae && console.log("attributeChangedCallback", e, i, n), e) {
|
|
40986
41028
|
case "src":
|
|
40987
|
-
|
|
41029
|
+
Ae && console.warn(`<needle-engine src>
|
|
40988
41030
|
changed from "`, i, '" to "', n, '"'), this.onLoad();
|
|
40989
41031
|
break;
|
|
40990
41032
|
case "hash":
|
|
@@ -40993,16 +41035,16 @@ changed from "`, i, '" to "', n, '"'), this.onLoad();
|
|
|
40993
41035
|
case "loadstart":
|
|
40994
41036
|
case "progress":
|
|
40995
41037
|
case "loadfinished":
|
|
40996
|
-
typeof n == "string" && n.length > 0 && (
|
|
41038
|
+
typeof n == "string" && n.length > 0 && (Ae && console.log(e + " attribute changed", n), this.registerEventFromAttribute(e, n));
|
|
40997
41039
|
break;
|
|
40998
41040
|
case "dracoDecoderPath":
|
|
40999
|
-
|
|
41041
|
+
Ae && console.log("dracoDecoderPath", n), Yy(n);
|
|
41000
41042
|
break;
|
|
41001
41043
|
case "dracoDecoderType":
|
|
41002
|
-
n === "wasm" || n === "js" ? (
|
|
41044
|
+
n === "wasm" || n === "js" ? (Ae && console.log("dracoDecoderType", n), Ky(n)) : console.error("Invalid dracoDecoderType", n, "expected js or wasm");
|
|
41003
41045
|
break;
|
|
41004
41046
|
case "ktx2DecoderPath":
|
|
41005
|
-
|
|
41047
|
+
Ae && console.log("ktx2DecoderPath", n), Zy(n);
|
|
41006
41048
|
break;
|
|
41007
41049
|
case "tone-mapping": {
|
|
41008
41050
|
this.applyAttributes();
|
|
@@ -41035,16 +41077,16 @@ changed from "`, i, '" to "', n, '"'), this.onLoad();
|
|
|
41035
41077
|
var _, y;
|
|
41036
41078
|
if (!this.isConnected)
|
|
41037
41079
|
return;
|
|
41038
|
-
if (this._context || (
|
|
41080
|
+
if (this._context || (Ae && console.warn("Create new context"), this._context = new ee({ domElement: this })), !this._context) {
|
|
41039
41081
|
console.error("Needle Engine: Context not initialized");
|
|
41040
41082
|
return;
|
|
41041
41083
|
}
|
|
41042
41084
|
const e = this.getSourceFiles();
|
|
41043
41085
|
if (!this.checkIfSourceHasChanged(e, this._lastSourceFiles))
|
|
41044
41086
|
return;
|
|
41045
|
-
this._abortController && (
|
|
41087
|
+
this._abortController && (Ae && console.warn("Abort previous loading process"), this._abortController.abort(), this._abortController = null), this._lastSourceFiles = e;
|
|
41046
41088
|
const i = ++this._loadId;
|
|
41047
|
-
if ((e == null || e.length <= 0) && (
|
|
41089
|
+
if ((e == null || e.length <= 0) && (Ae && console.warn("Clear scene", e), this._context.clear(), i !== this._loadId))
|
|
41048
41090
|
return;
|
|
41049
41091
|
const n = this.getAttribute("alias");
|
|
41050
41092
|
this.classList.add("loading");
|
|
@@ -41061,9 +41103,9 @@ changed from "`, i, '" to "', n, '"'), this.onLoad();
|
|
|
41061
41103
|
const b = this.getAttribute("hide-loading-overlay");
|
|
41062
41104
|
b != null && b !== "0" && (a = !1);
|
|
41063
41105
|
}
|
|
41064
|
-
a === !1 && !o && (z() || (a = !0), console.warn("Needle Engine: You need a commercial license to override the default loading view. Visit https://needle.tools/pricing"), z() &&
|
|
41106
|
+
a === !1 && !o && (z() || (a = !0), console.warn("Needle Engine: You need a commercial license to override the default loading view. Visit https://needle.tools/pricing"), z() && we('You need a <a target="_blank" href="https://needle.tools/pricing">commercial license</a> to override the default loading view. This will not work in production.')), !this._loadingView && a && (this._loadingView = new xd(this)), a && (this._didFullyLoad !== !0 ? (_ = this._loadingView) == null || _.onLoadingBegin("begin load") : setTimeout(() => {
|
|
41065
41107
|
this._loadingView && this._loadingProgress01 < 0.3 && this._loadId === i && this._loadingView.onLoadingBegin("begin load");
|
|
41066
|
-
}, 300)),
|
|
41108
|
+
}, 300)), Ae && console.warn(`--------------
|
|
41067
41109
|
Needle Engine: Begin loading ` + i + `
|
|
41068
41110
|
`, e), this.onBeforeBeginLoading();
|
|
41069
41111
|
const l = [], c = {
|
|
@@ -41080,13 +41122,13 @@ Needle Engine: Begin loading ` + i + `
|
|
|
41080
41122
|
abortSignal: u.signal,
|
|
41081
41123
|
onLoadingProgress: (b) => {
|
|
41082
41124
|
var P;
|
|
41083
|
-
if (
|
|
41125
|
+
if (Ae && console.debug("Loading progress: ", b), u.signal.aborted)
|
|
41084
41126
|
return;
|
|
41085
41127
|
const w = b.index;
|
|
41086
41128
|
!d[w] && b.name && (d[w] = xI(b.name)), b.name = d[w], a && ((P = this._loadingView) == null || P.onLoadingUpdate(b)), c.name = b.name, c.progress = b.progress, this._loadingProgress01 = Tv(b), c.totalProgress01 = this._loadingProgress01, this.dispatchEvent(h);
|
|
41087
41129
|
},
|
|
41088
41130
|
onLoadingFinished: (b, w, P) => {
|
|
41089
|
-
|
|
41131
|
+
Ae && console.debug(`Finished loading "${w}" (aborted? ${u.signal.aborted})`), !u.signal.aborted && P && l.push({
|
|
41090
41132
|
src: w,
|
|
41091
41133
|
file: P
|
|
41092
41134
|
});
|
|
@@ -41094,7 +41136,7 @@ Needle Engine: Begin loading ` + i + `
|
|
|
41094
41136
|
}, m = this.getAttribute("hash");
|
|
41095
41137
|
m != null && (this._context.hash = m), this._context.alias = n, this._createContextPromise = this._context.create(p);
|
|
41096
41138
|
const g = await this._createContextPromise;
|
|
41097
|
-
if (this.applyAttributes(),
|
|
41139
|
+
if (this.applyAttributes(), Ae && console.warn(`--------------
|
|
41098
41140
|
Needle Engine: finished loading ` + i + `
|
|
41099
41141
|
`, e, `Aborted? ${u.signal.aborted}`), u.signal.aborted) {
|
|
41100
41142
|
console.log("Loading finished but aborted...");
|
|
@@ -41113,9 +41155,10 @@ Needle Engine: finished loading ` + i + `
|
|
|
41113
41155
|
}));
|
|
41114
41156
|
}
|
|
41115
41157
|
applyAttributes() {
|
|
41158
|
+
var n;
|
|
41116
41159
|
if (this._context.renderer) {
|
|
41117
|
-
const
|
|
41118
|
-
switch (
|
|
41160
|
+
const o = this.getAttribute("tonemapping") || this.getAttribute("tone-mapping");
|
|
41161
|
+
switch (o == null ? void 0 : o.toLowerCase()) {
|
|
41119
41162
|
case "none":
|
|
41120
41163
|
this._context.renderer.toneMapping = ja;
|
|
41121
41164
|
break;
|
|
@@ -41129,23 +41172,23 @@ Needle Engine: finished loading ` + i + `
|
|
|
41129
41172
|
this._context.renderer.toneMapping = Pu;
|
|
41130
41173
|
break;
|
|
41131
41174
|
default:
|
|
41132
|
-
|
|
41175
|
+
o != null && console.warn("Invalid tone-mapping attribute: " + o);
|
|
41133
41176
|
}
|
|
41134
|
-
const
|
|
41135
|
-
if (
|
|
41136
|
-
const
|
|
41137
|
-
isNaN(
|
|
41177
|
+
const a = this.getAttribute("tone-mapping-exposure");
|
|
41178
|
+
if (a != null) {
|
|
41179
|
+
const l = parseFloat(a);
|
|
41180
|
+
isNaN(l) || (this._context.renderer.toneMappingExposure = l);
|
|
41138
41181
|
}
|
|
41139
41182
|
}
|
|
41140
41183
|
const e = this.getAttribute("background-blurriness");
|
|
41141
41184
|
if (e != null) {
|
|
41142
|
-
const
|
|
41143
|
-
|
|
41185
|
+
const o = parseFloat(e);
|
|
41186
|
+
o !== void 0 && this._context && (this._context.scene.backgroundBlurriness = o);
|
|
41144
41187
|
}
|
|
41145
41188
|
const i = this.getAttribute("background-color");
|
|
41146
|
-
if (this._context && typeof i == "string" && i.length > 0) {
|
|
41147
|
-
const
|
|
41148
|
-
|
|
41189
|
+
if ((n = this._context) != null && n.renderer && typeof i == "string" && i.length > 0) {
|
|
41190
|
+
const o = le.fromColorRepresentation(i);
|
|
41191
|
+
Ae && console.debug("<needle-engine> background-color changed, str:", i, "→", o), this._context.renderer.setClearColor(o, o.alpha), this.context.scene.background = null;
|
|
41149
41192
|
}
|
|
41150
41193
|
}
|
|
41151
41194
|
internalSetLoadingMessage(e) {
|
|
@@ -41243,7 +41286,7 @@ Needle Engine: finished loading ` + i + `
|
|
|
41243
41286
|
onSetupAR() {
|
|
41244
41287
|
this.classList.add(zl), this.classList.remove(Ul);
|
|
41245
41288
|
const e = this.getAROverlayContainer();
|
|
41246
|
-
|
|
41289
|
+
Ae && console.warn("onSetupAR:", e), e && (e.classList.add(zl), e.classList.remove(Ul)), this.foreachHtmlElement((i) => this.setupElementsForMode(i, Av));
|
|
41247
41290
|
}
|
|
41248
41291
|
onSetupVR() {
|
|
41249
41292
|
this.classList.remove(zl), this.classList.remove(Ul), this.foreachHtmlElement((e) => this.setupElementsForMode(e, vx));
|
|
@@ -41271,11 +41314,11 @@ Needle Engine: finished loading ` + i + `
|
|
|
41271
41314
|
}
|
|
41272
41315
|
onBeforeBeginLoading() {
|
|
41273
41316
|
const e = this.getAttribute("dracoDecoderPath");
|
|
41274
|
-
e && (
|
|
41317
|
+
e && (Ae && console.log("using custom draco decoder path", e), Yy(e));
|
|
41275
41318
|
const i = this.getAttribute("dracoDecoderType");
|
|
41276
|
-
i && (
|
|
41319
|
+
i && (Ae && console.log("using custom draco decoder type", i), Ky(i));
|
|
41277
41320
|
const n = this.getAttribute("ktx2DecoderPath");
|
|
41278
|
-
n && (
|
|
41321
|
+
n && (Ae && console.log("using custom ktx2 decoder path", n), Zy(n));
|
|
41279
41322
|
}
|
|
41280
41323
|
}
|
|
41281
41324
|
typeof window < "u" && !window.customElements.get(Hb) && window.customElements.define(Hb, xx);
|
|
@@ -42207,7 +42250,7 @@ class hL {
|
|
|
42207
42250
|
const b = ki([y]);
|
|
42208
42251
|
a += b.getSize(new v()).y, a += 0.1;
|
|
42209
42252
|
}
|
|
42210
|
-
const l = new
|
|
42253
|
+
const l = new be(20);
|
|
42211
42254
|
o.add(l);
|
|
42212
42255
|
const c = t.environment || "https://dl.polyhaven.org/file/ph-assets/HDRIs/exr/1k/studio_small_09_1k.exr";
|
|
42213
42256
|
if (c) {
|
|
@@ -42333,9 +42376,9 @@ class Sx extends HTMLElement {
|
|
|
42333
42376
|
zi(this, ys, void 0);
|
|
42334
42377
|
zi(this, Ia, void 0);
|
|
42335
42378
|
zi(this, qc, (e) => {
|
|
42336
|
-
jp && console.log("Needle Button clicked"), !e.defaultPrevented &&
|
|
42379
|
+
jp && console.log("Needle Button clicked"), !e.defaultPrevented && fe(this, Xt) && fe(this, Xt).click();
|
|
42337
42380
|
});
|
|
42338
|
-
this.removeEventListener("click",
|
|
42381
|
+
this.removeEventListener("click", fe(this, qc)), this.addEventListener("click", fe(this, qc));
|
|
42339
42382
|
}
|
|
42340
42383
|
attributeChangedCallback(e, i, n) {
|
|
42341
42384
|
Pl(this, yu, Cx).call(this);
|
|
@@ -42343,17 +42386,17 @@ class Sx extends HTMLElement {
|
|
|
42343
42386
|
}
|
|
42344
42387
|
or = new WeakMap(), rr = new WeakMap(), ar = new WeakMap(), Xt = new WeakMap(), ys = new WeakMap(), Ia = new WeakMap(), yu = new WeakSet(), Cx = function() {
|
|
42345
42388
|
var i, n;
|
|
42346
|
-
if ((i =
|
|
42347
|
-
|
|
42389
|
+
if ((i = fe(this, Xt)) == null || i.remove(), this.getAttribute("ar") != null)
|
|
42390
|
+
fe(this, ys) ?? ln(this, ys, new yo()), ln(this, Xt, fe(this, ys).createARButton());
|
|
42348
42391
|
else if (this.getAttribute("vr") != null)
|
|
42349
|
-
|
|
42392
|
+
fe(this, ys) ?? ln(this, ys, new yo()), ln(this, Xt, fe(this, ys).createVRButton());
|
|
42350
42393
|
else if (this.getAttribute("quicklook") != null)
|
|
42351
|
-
|
|
42394
|
+
fe(this, ys) ?? ln(this, ys, new yo()), ln(this, Xt, fe(this, ys).createQuicklookButton());
|
|
42352
42395
|
else {
|
|
42353
42396
|
jp ? console.warn("No button type specified for <needle-button>. Use either ar, vr or quicklook attribute.") : console.debug("No button type specified for <needle-button>. Use either ar, vr or quicklook attribute.");
|
|
42354
42397
|
return;
|
|
42355
42398
|
}
|
|
42356
|
-
|
|
42399
|
+
fe(this, or) ?? ln(this, or, this.attachShadow({ mode: "open" })), fe(this, rr) ?? ln(this, rr, document.createElement("slot")), fe(this, ar) ?? ln(this, ar, document.createElement("style")), fe(this, ar).innerHTML = `
|
|
42357
42400
|
button {
|
|
42358
42401
|
all: initial;
|
|
42359
42402
|
cursor: inherit;
|
|
@@ -42362,7 +42405,7 @@ or = new WeakMap(), rr = new WeakMap(), ar = new WeakMap(), Xt = new WeakMap(),
|
|
|
42362
42405
|
gap: inherit;
|
|
42363
42406
|
white-space: nowrap;
|
|
42364
42407
|
}
|
|
42365
|
-
`, this.getAttribute("unstyled") != null || (
|
|
42408
|
+
`, this.getAttribute("unstyled") != null || (fe(this, ar).innerHTML += `
|
|
42366
42409
|
:host {
|
|
42367
42410
|
display: inline-block;
|
|
42368
42411
|
background: rgba(255, 255, 255, .8);
|
|
@@ -42387,9 +42430,9 @@ or = new WeakMap(), rr = new WeakMap(), ar = new WeakMap(), Xt = new WeakMap(),
|
|
|
42387
42430
|
justify-content: center;
|
|
42388
42431
|
gap: .5rem;
|
|
42389
42432
|
}
|
|
42390
|
-
`),
|
|
42433
|
+
`), fe(this, rr).innerHTML = fe(this, Xt).innerHTML, fe(this, rr).style.cssText = "display: flex; align-items: center; justify-content: center;", fe(this, Xt).innerHTML = fe(this, rr).outerHTML, fe(this, or).innerHTML = fe(this, Xt).outerHTML, fe(this, or).prepend(fe(this, ar)), qd(Om, { element: fe(this, or) }), (n = fe(this, Ia)) == null || n.disconnect(), fe(this, Ia) ?? ln(this, Ia, new MutationObserver(() => Pl(this, bu, Px).call(this))), fe(this, Ia).observe(fe(this, Xt), { attributes: !0 }), jp && console.log("Needle Button updated");
|
|
42391
42434
|
}, bu = new WeakSet(), Px = function() {
|
|
42392
|
-
|
|
42435
|
+
fe(this, Xt) && (fe(this, Xt).style.display === "none" ? this.style.display = "none" : this.style.display === "none" && (this.style.display = ""));
|
|
42393
42436
|
}, qc = new WeakMap(), r(Sx, "observedAttributes", ["ar", "vr", "quicklook"]);
|
|
42394
42437
|
typeof window < "u" && !window.customElements.get(Yb) && window.customElements.define(Yb, Sx);
|
|
42395
42438
|
const Nl = x("debugavatar");
|
|
@@ -42562,7 +42605,7 @@ class II {
|
|
|
42562
42605
|
}
|
|
42563
42606
|
const fL = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
42564
42607
|
__proto__: null,
|
|
42565
|
-
ActionBuilder:
|
|
42608
|
+
ActionBuilder: _e,
|
|
42566
42609
|
ActionCollection: qk,
|
|
42567
42610
|
ActionModel: bi,
|
|
42568
42611
|
AlignmentConstraint: $u,
|
|
@@ -42673,7 +42716,7 @@ const fL = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
42673
42716
|
ObjectRaycaster: sn,
|
|
42674
42717
|
OffsetConstraint: dl,
|
|
42675
42718
|
OpenURL: Oh,
|
|
42676
|
-
OrbitControls:
|
|
42719
|
+
OrbitControls: ve,
|
|
42677
42720
|
Outline: dh,
|
|
42678
42721
|
Padding: ll,
|
|
42679
42722
|
ParticleBurst: Wm,
|
|
@@ -42698,7 +42741,7 @@ const fL = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
42698
42741
|
RemoteSkybox: Ds,
|
|
42699
42742
|
Renderer: Ze,
|
|
42700
42743
|
RendererLightmap: Dm,
|
|
42701
|
-
Rigidbody:
|
|
42744
|
+
Rigidbody: ye,
|
|
42702
42745
|
RotationBySpeedModule: Cn,
|
|
42703
42746
|
RotationOverLifetimeModule: Jn,
|
|
42704
42747
|
SceneSwitcher: ot,
|
|
@@ -42778,10 +42821,10 @@ const fL = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
42778
42821
|
XRState: ei,
|
|
42779
42822
|
__Ignore: II
|
|
42780
42823
|
}, Symbol.toStringTag, { value: "Module" })), cu = x("debugmissingcamera");
|
|
42781
|
-
|
|
42824
|
+
pe.registerCallback(me.MissingCamera, (s) => {
|
|
42782
42825
|
var l, c, h, d;
|
|
42783
42826
|
cu && console.warn("Creating missing camera");
|
|
42784
|
-
const t = s.context.scene, e = new
|
|
42827
|
+
const t = s.context.scene, e = new be();
|
|
42785
42828
|
e.name = "Default Fallback Camera", t.add(e);
|
|
42786
42829
|
const i = new Pe();
|
|
42787
42830
|
if (i.sourceId = ((c = (l = s.files) == null ? void 0 : l[0]) == null ? void 0 : c.src) ?? "unknown", i.fieldOfView = 35, s.context.domElement.getAttribute("transparent") != null)
|
|
@@ -42791,7 +42834,7 @@ fe.registerCallback(pe.MissingCamera, (s) => {
|
|
|
42791
42834
|
else {
|
|
42792
42835
|
i.clearFlags = gr.SolidColor;
|
|
42793
42836
|
let u = "#efefef";
|
|
42794
|
-
if (typeof window !== void 0 && window.matchMedia("(prefers-color-scheme: dark)").matches && (u = "#1f1f1f"), t.background = new
|
|
42837
|
+
if (typeof window !== void 0 && window.matchMedia("(prefers-color-scheme: dark)").matches && (u = "#1f1f1f"), t.background = new ce(u), !t.environment) {
|
|
42795
42838
|
const p = new H1(s.context.renderer), m = new w_("neutral");
|
|
42796
42839
|
t.environment = p.fromScene(m, 0.025).texture;
|
|
42797
42840
|
}
|
|
@@ -42801,7 +42844,7 @@ fe.registerCallback(pe.MissingCamera, (s) => {
|
|
|
42801
42844
|
const a = s.context.domElement;
|
|
42802
42845
|
return (a == null ? void 0 : a.cameraControls) != !1 && Mx(s.context, o), o;
|
|
42803
42846
|
});
|
|
42804
|
-
|
|
42847
|
+
pe.registerCallback(me.ContextCreated, (s) => {
|
|
42805
42848
|
if (!s.context.mainCamera) {
|
|
42806
42849
|
cu && console.log("Will not auto-fit because a default camera exists");
|
|
42807
42850
|
return;
|
|
@@ -42820,7 +42863,7 @@ function Mx(s, t) {
|
|
|
42820
42863
|
t = t ?? s.mainCameraComponent;
|
|
42821
42864
|
const e = t == null ? void 0 : t.gameObject;
|
|
42822
42865
|
if (cu && console.log("Creating default camera controls", t == null ? void 0 : t.name), e) {
|
|
42823
|
-
const i = Bu(e,
|
|
42866
|
+
const i = Bu(e, ve);
|
|
42824
42867
|
i.sourceId = (t == null ? void 0 : t.sourceId) ?? "unknown";
|
|
42825
42868
|
const n = s.domElement.getAttribute("auto-rotate");
|
|
42826
42869
|
if (i.autoRotate = n != null && n != "0" && (n == null ? void 0 : n.toLowerCase()) != "false", i.autoRotateSpeed = 0.5, i.autoFit = !0, i.autoRotate && n) {
|
|
@@ -42830,7 +42873,7 @@ function Mx(s, t) {
|
|
|
42830
42873
|
} else
|
|
42831
42874
|
console.warn("Missing camera object, can not add orbit controls");
|
|
42832
42875
|
}
|
|
42833
|
-
|
|
42876
|
+
pe.registerCallback(me.ContextCreated, (s) => {
|
|
42834
42877
|
const t = s.context.domElement.getAttribute("autoplay");
|
|
42835
42878
|
if (t !== void 0 && (t === "" || t === "true" || t === "1") && s.files)
|
|
42836
42879
|
for (const e of s.files)
|
|
@@ -42896,7 +42939,7 @@ const LI = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
42896
42939
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
42897
42940
|
export {
|
|
42898
42941
|
QD as $physicsKey,
|
|
42899
|
-
|
|
42942
|
+
_e as ActionBuilder,
|
|
42900
42943
|
qk as ActionCollection,
|
|
42901
42944
|
bi as ActionModel,
|
|
42902
42945
|
yO as Addressables,
|
|
@@ -42975,8 +43018,8 @@ export {
|
|
|
42975
43018
|
Yn as ContactShadows,
|
|
42976
43019
|
ee as Context,
|
|
42977
43020
|
LD as ContextArgs,
|
|
42978
|
-
|
|
42979
|
-
|
|
43021
|
+
me as ContextEvent,
|
|
43022
|
+
pe as ContextRegistry,
|
|
42980
43023
|
y_ as ControlTrackHandler,
|
|
42981
43024
|
cl as CustomBranding,
|
|
42982
43025
|
Wi as CustomShader,
|
|
@@ -43091,7 +43134,7 @@ export {
|
|
|
43091
43134
|
Tf as OneEuroFilter,
|
|
43092
43135
|
M0 as OneEuroFilterXYZ,
|
|
43093
43136
|
Oh as OpenURL,
|
|
43094
|
-
|
|
43137
|
+
ve as OrbitControls,
|
|
43095
43138
|
dh as Outline,
|
|
43096
43139
|
sP as OwnershipEvent,
|
|
43097
43140
|
Q0 as OwnershipModel,
|
|
@@ -43126,10 +43169,10 @@ export {
|
|
|
43126
43169
|
Zu as PreliminaryTrigger,
|
|
43127
43170
|
Yo as PreviewHelper,
|
|
43128
43171
|
Na as PrimitiveType,
|
|
43129
|
-
|
|
43172
|
+
de as Progress,
|
|
43130
43173
|
w0 as PromiseAllWithErrors,
|
|
43131
43174
|
Y_ as PromiseErrorResult,
|
|
43132
|
-
|
|
43175
|
+
le as RGBAColor,
|
|
43133
43176
|
Jr as RapierPhysics,
|
|
43134
43177
|
v_ as RawImage,
|
|
43135
43178
|
As as RaycastOptions,
|
|
@@ -43143,7 +43186,7 @@ export {
|
|
|
43143
43186
|
Ze as Renderer,
|
|
43144
43187
|
BO as RendererData,
|
|
43145
43188
|
Dm as RendererLightmap,
|
|
43146
|
-
|
|
43189
|
+
ye as Rigidbody,
|
|
43147
43190
|
it as RigidbodyConstraints,
|
|
43148
43191
|
ne as RoomEvents,
|
|
43149
43192
|
Cn as RotationBySpeedModule,
|
|
@@ -43284,7 +43327,7 @@ export {
|
|
|
43284
43327
|
ym as deserializeObject,
|
|
43285
43328
|
nn as destroy,
|
|
43286
43329
|
dO as destroyComponentInstance,
|
|
43287
|
-
|
|
43330
|
+
Ee as disposeObjectResources,
|
|
43288
43331
|
Cs as disposeStream,
|
|
43289
43332
|
fd as editorGuidKeyName,
|
|
43290
43333
|
xa as enableSpatialConsole,
|
|
@@ -43451,7 +43494,7 @@ export {
|
|
|
43451
43494
|
Lc as setWorldScale,
|
|
43452
43495
|
Iu as showBalloonError,
|
|
43453
43496
|
We as showBalloonMessage,
|
|
43454
|
-
|
|
43497
|
+
we as showBalloonWarning,
|
|
43455
43498
|
B0 as showDebugConsole,
|
|
43456
43499
|
dD as slerp,
|
|
43457
43500
|
ju as syncDestroy,
|