@needle-tools/engine 2.24.0-pre
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 +568 -0
- package/LICENSE.md +10 -0
- package/README.md +11 -0
- package/dist/needle-engine.d.ts +5011 -0
- package/dist/needle-engine.js +6605 -0
- package/dist/needle-engine.js.map +7 -0
- package/dist/needle-engine.min.js +167 -0
- package/dist/needle-engine.min.js.map +7 -0
- package/lib/engine/debug/error_overlay.d.ts +1 -0
- package/lib/engine/debug/error_overlay.js +110 -0
- package/lib/engine/debug/error_overlay.js.map +1 -0
- package/lib/engine/engine.d.ts +27 -0
- package/lib/engine/engine.js +13 -0
- package/lib/engine/engine.js.map +1 -0
- package/lib/engine/engine_addressables.d.ts +46 -0
- package/lib/engine/engine_addressables.js +264 -0
- package/lib/engine/engine_addressables.js.map +1 -0
- package/lib/engine/engine_application.d.ts +13 -0
- package/lib/engine/engine_application.js +35 -0
- package/lib/engine/engine_application.js.map +1 -0
- package/lib/engine/engine_assetdatabase.d.ts +54 -0
- package/lib/engine/engine_assetdatabase.js +150 -0
- package/lib/engine/engine_assetdatabase.js.map +1 -0
- package/lib/engine/engine_caching.d.ts +0 -0
- package/lib/engine/engine_caching.js +2 -0
- package/lib/engine/engine_caching.js.map +1 -0
- package/lib/engine/engine_constants.d.ts +2 -0
- package/lib/engine/engine_constants.js +3 -0
- package/lib/engine/engine_constants.js.map +1 -0
- package/lib/engine/engine_coroutine.d.ts +3 -0
- package/lib/engine/engine_coroutine.js +14 -0
- package/lib/engine/engine_coroutine.js.map +1 -0
- package/lib/engine/engine_default_parameters.d.ts +2 -0
- package/lib/engine/engine_default_parameters.js +4 -0
- package/lib/engine/engine_default_parameters.js.map +1 -0
- package/lib/engine/engine_element.d.ts +32 -0
- package/lib/engine/engine_element.js +340 -0
- package/lib/engine/engine_element.js.map +1 -0
- package/lib/engine/engine_element_loading.d.ts +31 -0
- package/lib/engine/engine_element_loading.js +154 -0
- package/lib/engine/engine_element_loading.js.map +1 -0
- package/lib/engine/engine_element_overlay.d.ts +17 -0
- package/lib/engine/engine_element_overlay.js +95 -0
- package/lib/engine/engine_element_overlay.js.map +1 -0
- package/lib/engine/engine_gizmos.d.ts +2 -0
- package/lib/engine/engine_gizmos.js +14 -0
- package/lib/engine/engine_gizmos.js.map +1 -0
- package/lib/engine/engine_gltf.d.ts +2 -0
- package/lib/engine/engine_gltf.js +2 -0
- package/lib/engine/engine_gltf.js.map +1 -0
- package/lib/engine/engine_gltf_builtin_components.d.ts +8 -0
- package/lib/engine/engine_gltf_builtin_components.js +251 -0
- package/lib/engine/engine_gltf_builtin_components.js.map +1 -0
- package/lib/engine/engine_input.d.ts +193 -0
- package/lib/engine/engine_input.js +566 -0
- package/lib/engine/engine_input.js.map +1 -0
- package/lib/engine/engine_input_utils.d.ts +2 -0
- package/lib/engine/engine_input_utils.js +23 -0
- package/lib/engine/engine_input_utils.js.map +1 -0
- package/lib/engine/engine_lightdata.d.ts +21 -0
- package/lib/engine/engine_lightdata.js +85 -0
- package/lib/engine/engine_lightdata.js.map +1 -0
- package/lib/engine/engine_loaders.d.ts +3 -0
- package/lib/engine/engine_loaders.js +20 -0
- package/lib/engine/engine_loaders.js.map +1 -0
- package/lib/engine/engine_mainloop_utils.d.ts +9 -0
- package/lib/engine/engine_mainloop_utils.js +288 -0
- package/lib/engine/engine_mainloop_utils.js.map +1 -0
- package/lib/engine/engine_math.d.ts +11 -0
- package/lib/engine/engine_math.js +40 -0
- package/lib/engine/engine_math.js.map +1 -0
- package/lib/engine/engine_networking.d.ts +133 -0
- package/lib/engine/engine_networking.js +541 -0
- package/lib/engine/engine_networking.js.map +1 -0
- package/lib/engine/engine_networking_auto.d.ts +18 -0
- package/lib/engine/engine_networking_auto.js +252 -0
- package/lib/engine/engine_networking_auto.js.map +1 -0
- package/lib/engine/engine_networking_files.d.ts +23 -0
- package/lib/engine/engine_networking_files.js +173 -0
- package/lib/engine/engine_networking_files.js.map +1 -0
- package/lib/engine/engine_networking_files_default_components.d.ts +3 -0
- package/lib/engine/engine_networking_files_default_components.js +45 -0
- package/lib/engine/engine_networking_files_default_components.js.map +1 -0
- package/lib/engine/engine_networking_instantiate.d.ts +34 -0
- package/lib/engine/engine_networking_instantiate.js +274 -0
- package/lib/engine/engine_networking_instantiate.js.map +1 -0
- package/lib/engine/engine_networking_peer.d.ts +10 -0
- package/lib/engine/engine_networking_peer.js +106 -0
- package/lib/engine/engine_networking_peer.js.map +1 -0
- package/lib/engine/engine_networking_utils.d.ts +1 -0
- package/lib/engine/engine_networking_utils.js +11 -0
- package/lib/engine/engine_networking_utils.js.map +1 -0
- package/lib/engine/engine_networking_websocket.d.ts +0 -0
- package/lib/engine/engine_networking_websocket.js +3 -0
- package/lib/engine/engine_networking_websocket.js.map +1 -0
- package/lib/engine/engine_physics.d.ts +88 -0
- package/lib/engine/engine_physics.js +563 -0
- package/lib/engine/engine_physics.js.map +1 -0
- package/lib/engine/engine_rendererdata.d.ts +48 -0
- package/lib/engine/engine_rendererdata.js +182 -0
- package/lib/engine/engine_rendererdata.js.map +1 -0
- package/lib/engine/engine_scenetools.d.ts +25 -0
- package/lib/engine/engine_scenetools.js +211 -0
- package/lib/engine/engine_scenetools.js.map +1 -0
- package/lib/engine/engine_serialization.d.ts +3 -0
- package/lib/engine/engine_serialization.js +5 -0
- package/lib/engine/engine_serialization.js.map +1 -0
- package/lib/engine/engine_serialization_builtin_serializer.d.ts +49 -0
- package/lib/engine/engine_serialization_builtin_serializer.js +238 -0
- package/lib/engine/engine_serialization_builtin_serializer.js.map +1 -0
- package/lib/engine/engine_serialization_core.d.ts +70 -0
- package/lib/engine/engine_serialization_core.js +417 -0
- package/lib/engine/engine_serialization_core.js.map +1 -0
- package/lib/engine/engine_serialization_decorator.d.ts +9 -0
- package/lib/engine/engine_serialization_decorator.js +44 -0
- package/lib/engine/engine_serialization_decorator.js.map +1 -0
- package/lib/engine/engine_setup.d.ts +129 -0
- package/lib/engine/engine_setup.js +609 -0
- package/lib/engine/engine_setup.js.map +1 -0
- package/lib/engine/engine_shaders.d.ts +31 -0
- package/lib/engine/engine_shaders.js +230 -0
- package/lib/engine/engine_shaders.js.map +1 -0
- package/lib/engine/engine_three_utils.d.ts +20 -0
- package/lib/engine/engine_three_utils.js +247 -0
- package/lib/engine/engine_three_utils.js.map +1 -0
- package/lib/engine/engine_time.d.ts +13 -0
- package/lib/engine/engine_time.js +31 -0
- package/lib/engine/engine_time.js.map +1 -0
- package/lib/engine/engine_typestore.d.ts +7 -0
- package/lib/engine/engine_typestore.js +17 -0
- package/lib/engine/engine_typestore.js.map +1 -0
- package/lib/engine/engine_utils.d.ts +34 -0
- package/lib/engine/engine_utils.js +239 -0
- package/lib/engine/engine_utils.js.map +1 -0
- package/lib/engine/engine_web_api.d.ts +12 -0
- package/lib/engine/engine_web_api.js +114 -0
- package/lib/engine/engine_web_api.js.map +1 -0
- package/lib/engine/extensions/KHR_animation_pointer.d.ts +0 -0
- package/lib/engine/extensions/KHR_animation_pointer.js +385 -0
- package/lib/engine/extensions/KHR_animation_pointer.js.map +1 -0
- package/lib/engine/extensions/NEEDLE_animator_controller.d.ts +0 -0
- package/lib/engine/extensions/NEEDLE_animator_controller.js +59 -0
- package/lib/engine/extensions/NEEDLE_animator_controller.js.map +1 -0
- package/lib/engine/extensions/NEEDLE_animator_controller_model.d.ts +108 -0
- package/lib/engine/extensions/NEEDLE_animator_controller_model.js +92 -0
- package/lib/engine/extensions/NEEDLE_animator_controller_model.js.map +1 -0
- package/lib/engine/extensions/NEEDLE_components.d.ts +32 -0
- package/lib/engine/extensions/NEEDLE_components.js +193 -0
- package/lib/engine/extensions/NEEDLE_components.js.map +1 -0
- package/lib/engine/extensions/NEEDLE_deferred_texture.d.ts +18 -0
- package/lib/engine/extensions/NEEDLE_deferred_texture.js +149 -0
- package/lib/engine/extensions/NEEDLE_deferred_texture.js.map +1 -0
- package/lib/engine/extensions/NEEDLE_gameobject_data.d.ts +10 -0
- package/lib/engine/extensions/NEEDLE_gameobject_data.js +54 -0
- package/lib/engine/extensions/NEEDLE_gameobject_data.js.map +1 -0
- package/lib/engine/extensions/NEEDLE_lighting_settings.d.ts +35 -0
- package/lib/engine/extensions/NEEDLE_lighting_settings.js +136 -0
- package/lib/engine/extensions/NEEDLE_lighting_settings.js.map +1 -0
- package/lib/engine/extensions/NEEDLE_lightmaps.d.ts +17 -0
- package/lib/engine/extensions/NEEDLE_lightmaps.js +69 -0
- package/lib/engine/extensions/NEEDLE_lightmaps.js.map +1 -0
- package/lib/engine/extensions/NEEDLE_persistent_assets.d.ts +11 -0
- package/lib/engine/extensions/NEEDLE_persistent_assets.js +64 -0
- package/lib/engine/extensions/NEEDLE_persistent_assets.js.map +1 -0
- package/lib/engine/extensions/NEEDLE_render_objects.d.ts +12 -0
- package/lib/engine/extensions/NEEDLE_render_objects.js +144 -0
- package/lib/engine/extensions/NEEDLE_render_objects.js.map +1 -0
- package/lib/engine/extensions/NEEDLE_techniques_webgl.d.ts +39 -0
- package/lib/engine/extensions/NEEDLE_techniques_webgl.js +419 -0
- package/lib/engine/extensions/NEEDLE_techniques_webgl.js.map +1 -0
- package/lib/engine/extensions/NEEDLE_timeline.d.ts +0 -0
- package/lib/engine/extensions/NEEDLE_timeline.js +57 -0
- package/lib/engine/extensions/NEEDLE_timeline.js.map +1 -0
- package/lib/engine/extensions/extension_resolver.d.ts +4 -0
- package/lib/engine/extensions/extension_resolver.js +2 -0
- package/lib/engine/extensions/extension_resolver.js.map +1 -0
- package/lib/engine/extensions/extension_utils.d.ts +2 -0
- package/lib/engine/extensions/extension_utils.js +130 -0
- package/lib/engine/extensions/extension_utils.js.map +1 -0
- package/lib/engine/extensions/extensions.d.ts +6 -0
- package/lib/engine/extensions/extensions.js +41 -0
- package/lib/engine/extensions/extensions.js.map +1 -0
- package/lib/engine/shaders/shaderData.d.ts +55 -0
- package/lib/engine/shaders/shaderData.js +59 -0
- package/lib/engine/shaders/shaderData.js.map +1 -0
- package/lib/engine/tests/simulate_avatars.d.ts +0 -0
- package/lib/engine/tests/simulate_avatars.js +3 -0
- package/lib/engine/tests/simulate_avatars.js.map +1 -0
- package/lib/engine/tests/test_utils.d.ts +2 -0
- package/lib/engine/tests/test_utils.js +54 -0
- package/lib/engine/tests/test_utils.js.map +1 -0
- package/lib/engine-components/AlignmentConstraint.d.ts +10 -0
- package/lib/engine-components/AlignmentConstraint.js +27 -0
- package/lib/engine-components/AlignmentConstraint.js.map +1 -0
- package/lib/engine-components/Animation.d.ts +44 -0
- package/lib/engine-components/Animation.js +257 -0
- package/lib/engine-components/Animation.js.map +1 -0
- package/lib/engine-components/AnimationCurve.d.ts +15 -0
- package/lib/engine-components/AnimationCurve.js +62 -0
- package/lib/engine-components/AnimationCurve.js.map +1 -0
- package/lib/engine-components/Animator.d.ts +48 -0
- package/lib/engine-components/Animator.js +126 -0
- package/lib/engine-components/Animator.js.map +1 -0
- package/lib/engine-components/AnimatorController.d.ts +39 -0
- package/lib/engine-components/AnimatorController.js +687 -0
- package/lib/engine-components/AnimatorController.js.map +1 -0
- package/lib/engine-components/AudioListener.d.ts +7 -0
- package/lib/engine-components/AudioListener.js +29 -0
- package/lib/engine-components/AudioListener.js.map +1 -0
- package/lib/engine-components/AudioSource.d.ts +61 -0
- package/lib/engine-components/AudioSource.js +377 -0
- package/lib/engine-components/AudioSource.js.map +1 -0
- package/lib/engine-components/AvatarLoader.d.ts +22 -0
- package/lib/engine-components/AvatarLoader.js +203 -0
- package/lib/engine-components/AvatarLoader.js.map +1 -0
- package/lib/engine-components/AxesHelper.d.ts +9 -0
- package/lib/engine-components/AxesHelper.js +43 -0
- package/lib/engine-components/AxesHelper.js.map +1 -0
- package/lib/engine-components/BasicIKConstraint.d.ts +9 -0
- package/lib/engine-components/BasicIKConstraint.js +44 -0
- package/lib/engine-components/BasicIKConstraint.js.map +1 -0
- package/lib/engine-components/BoxCollider.d.ts +2 -0
- package/lib/engine-components/BoxCollider.js +3 -0
- package/lib/engine-components/BoxCollider.js.map +1 -0
- package/lib/engine-components/BoxHelperComponent.d.ts +16 -0
- package/lib/engine-components/BoxHelperComponent.js +72 -0
- package/lib/engine-components/BoxHelperComponent.js.map +1 -0
- package/lib/engine-components/Camera.d.ts +38 -0
- package/lib/engine-components/Camera.js +258 -0
- package/lib/engine-components/Camera.js.map +1 -0
- package/lib/engine-components/Collider.d.ts +21 -0
- package/lib/engine-components/Collider.js +65 -0
- package/lib/engine-components/Collider.js.map +1 -0
- package/lib/engine-components/Component.d.ts +165 -0
- package/lib/engine-components/Component.js +895 -0
- package/lib/engine-components/Component.js.map +1 -0
- package/lib/engine-components/ComponentExtensions.d.ts +2 -0
- package/lib/engine-components/ComponentExtensions.js +3 -0
- package/lib/engine-components/ComponentExtensions.js.map +1 -0
- package/lib/engine-components/DeleteBox.d.ts +9 -0
- package/lib/engine-components/DeleteBox.js +27 -0
- package/lib/engine-components/DeleteBox.js.map +1 -0
- package/lib/engine-components/DeviceFlag.d.ts +12 -0
- package/lib/engine-components/DeviceFlag.js +50 -0
- package/lib/engine-components/DeviceFlag.js.map +1 -0
- package/lib/engine-components/DragControls.d.ts +44 -0
- package/lib/engine-components/DragControls.js +465 -0
- package/lib/engine-components/DragControls.js.map +1 -0
- package/lib/engine-components/DropListener.d.ts +15 -0
- package/lib/engine-components/DropListener.js +102 -0
- package/lib/engine-components/DropListener.js.map +1 -0
- package/lib/engine-components/Duplicatable.d.ts +16 -0
- package/lib/engine-components/Duplicatable.js +150 -0
- package/lib/engine-components/Duplicatable.js.map +1 -0
- package/lib/engine-components/EventList.d.ts +22 -0
- package/lib/engine-components/EventList.js +97 -0
- package/lib/engine-components/EventList.js.map +1 -0
- package/lib/engine-components/EventTrigger.d.ts +3 -0
- package/lib/engine-components/EventTrigger.js +4 -0
- package/lib/engine-components/EventTrigger.js.map +1 -0
- package/lib/engine-components/EventType.d.ts +19 -0
- package/lib/engine-components/EventType.js +72 -0
- package/lib/engine-components/EventType.js.map +1 -0
- package/lib/engine-components/FlyControls.d.ts +7 -0
- package/lib/engine-components/FlyControls.js +22 -0
- package/lib/engine-components/FlyControls.js.map +1 -0
- package/lib/engine-components/Gizmos.d.ts +12 -0
- package/lib/engine-components/Gizmos.js +61 -0
- package/lib/engine-components/Gizmos.js.map +1 -0
- package/lib/engine-components/GltfExport.d.ts +28 -0
- package/lib/engine-components/GltfExport.js +201 -0
- package/lib/engine-components/GltfExport.js.map +1 -0
- package/lib/engine-components/GridHelper.d.ts +11 -0
- package/lib/engine-components/GridHelper.js +41 -0
- package/lib/engine-components/GridHelper.js.map +1 -0
- package/lib/engine-components/GroundProjection.d.ts +18 -0
- package/lib/engine-components/GroundProjection.js +77 -0
- package/lib/engine-components/GroundProjection.js.map +1 -0
- package/lib/engine-components/Interactable.d.ts +10 -0
- package/lib/engine-components/Interactable.js +13 -0
- package/lib/engine-components/Interactable.js.map +1 -0
- package/lib/engine-components/LODGroup.d.ts +29 -0
- package/lib/engine-components/LODGroup.js +176 -0
- package/lib/engine-components/LODGroup.js.map +1 -0
- package/lib/engine-components/Light.d.ts +69 -0
- package/lib/engine-components/Light.js +407 -0
- package/lib/engine-components/Light.js.map +1 -0
- package/lib/engine-components/LookAtConstraint.d.ts +7 -0
- package/lib/engine-components/LookAtConstraint.js +18 -0
- package/lib/engine-components/LookAtConstraint.js.map +1 -0
- package/lib/engine-components/MeshCollider.d.ts +4 -0
- package/lib/engine-components/MeshCollider.js +8 -0
- package/lib/engine-components/MeshCollider.js.map +1 -0
- package/lib/engine-components/NavMesh.d.ts +5 -0
- package/lib/engine-components/NavMesh.js +11 -0
- package/lib/engine-components/NavMesh.js.map +1 -0
- package/lib/engine-components/NestedGltf.d.ts +10 -0
- package/lib/engine-components/NestedGltf.js +61 -0
- package/lib/engine-components/NestedGltf.js.map +1 -0
- package/lib/engine-components/Networking.d.ts +9 -0
- package/lib/engine-components/Networking.js +47 -0
- package/lib/engine-components/Networking.js.map +1 -0
- package/lib/engine-components/OffsetConstraint.d.ts +11 -0
- package/lib/engine-components/OffsetConstraint.js +31 -0
- package/lib/engine-components/OffsetConstraint.js.map +1 -0
- package/lib/engine-components/OrbitControls.d.ts +45 -0
- package/lib/engine-components/OrbitControls.js +247 -0
- package/lib/engine-components/OrbitControls.js.map +1 -0
- package/lib/engine-components/ParticleSystem.d.ts +34 -0
- package/lib/engine-components/ParticleSystem.js +216 -0
- package/lib/engine-components/ParticleSystem.js.map +1 -0
- package/lib/engine-components/ParticleSystemModules.d.ts +93 -0
- package/lib/engine-components/ParticleSystemModules.js +167 -0
- package/lib/engine-components/ParticleSystemModules.js.map +1 -0
- package/lib/engine-components/PlayerColor.d.ts +13 -0
- package/lib/engine-components/PlayerColor.js +85 -0
- package/lib/engine-components/PlayerColor.js.map +1 -0
- package/lib/engine-components/Renderer.d.ts +72 -0
- package/lib/engine-components/Renderer.js +678 -0
- package/lib/engine-components/Renderer.js.map +1 -0
- package/lib/engine-components/RendererLightmap.d.ts +23 -0
- package/lib/engine-components/RendererLightmap.js +128 -0
- package/lib/engine-components/RendererLightmap.js.map +1 -0
- package/lib/engine-components/Rigidbody.d.ts +42 -0
- package/lib/engine-components/Rigidbody.js +170 -0
- package/lib/engine-components/Rigidbody.js.map +1 -0
- package/lib/engine-components/ScreenCapture.d.ts +9 -0
- package/lib/engine-components/ScreenCapture.js +44 -0
- package/lib/engine-components/ScreenCapture.js.map +1 -0
- package/lib/engine-components/ShadowCatcher.d.ts +15 -0
- package/lib/engine-components/ShadowCatcher.js +94 -0
- package/lib/engine-components/ShadowCatcher.js.map +1 -0
- package/lib/engine-components/Skybox.d.ts +16 -0
- package/lib/engine-components/Skybox.js +121 -0
- package/lib/engine-components/Skybox.js.map +1 -0
- package/lib/engine-components/SmoothFollow.d.ts +13 -0
- package/lib/engine-components/SmoothFollow.js +57 -0
- package/lib/engine-components/SmoothFollow.js.map +1 -0
- package/lib/engine-components/SpatialTrigger.d.ts +27 -0
- package/lib/engine-components/SpatialTrigger.js +145 -0
- package/lib/engine-components/SpatialTrigger.js.map +1 -0
- package/lib/engine-components/SpectatorCamera.d.ts +36 -0
- package/lib/engine-components/SpectatorCamera.js +311 -0
- package/lib/engine-components/SpectatorCamera.js.map +1 -0
- package/lib/engine-components/SphereCollider.d.ts +2 -0
- package/lib/engine-components/SphereCollider.js +3 -0
- package/lib/engine-components/SphereCollider.js.map +1 -0
- package/lib/engine-components/SpringJoint.d.ts +13 -0
- package/lib/engine-components/SpringJoint.js +42 -0
- package/lib/engine-components/SpringJoint.js.map +1 -0
- package/lib/engine-components/SpriteRenderer.d.ts +33 -0
- package/lib/engine-components/SpriteRenderer.js +141 -0
- package/lib/engine-components/SpriteRenderer.js.map +1 -0
- package/lib/engine-components/SyncedCamera.d.ts +23 -0
- package/lib/engine-components/SyncedCamera.js +188 -0
- package/lib/engine-components/SyncedCamera.js.map +1 -0
- package/lib/engine-components/SyncedRoom.d.ts +20 -0
- package/lib/engine-components/SyncedRoom.js +151 -0
- package/lib/engine-components/SyncedRoom.js.map +1 -0
- package/lib/engine-components/SyncedTransform.d.ts +35 -0
- package/lib/engine-components/SyncedTransform.js +268 -0
- package/lib/engine-components/SyncedTransform.js.map +1 -0
- package/lib/engine-components/TestRunner.d.ts +13 -0
- package/lib/engine-components/TestRunner.js +100 -0
- package/lib/engine-components/TestRunner.js.map +1 -0
- package/lib/engine-components/TransformGizmo.d.ts +15 -0
- package/lib/engine-components/TransformGizmo.js +166 -0
- package/lib/engine-components/TransformGizmo.js.map +1 -0
- package/lib/engine-components/VideoPlayer.d.ts +55 -0
- package/lib/engine-components/VideoPlayer.js +307 -0
- package/lib/engine-components/VideoPlayer.js.map +1 -0
- package/lib/engine-components/Voip.d.ts +22 -0
- package/lib/engine-components/Voip.js +400 -0
- package/lib/engine-components/Voip.js.map +1 -0
- package/lib/engine-components/Volume.d.ts +30 -0
- package/lib/engine-components/Volume.js +86 -0
- package/lib/engine-components/Volume.js.map +1 -0
- package/lib/engine-components/WebARSessionRoot.d.ts +21 -0
- package/lib/engine-components/WebARSessionRoot.js +105 -0
- package/lib/engine-components/WebARSessionRoot.js.map +1 -0
- package/lib/engine-components/WebXR.d.ts +90 -0
- package/lib/engine-components/WebXR.js +498 -0
- package/lib/engine-components/WebXR.js.map +1 -0
- package/lib/engine-components/WebXRAvatar.d.ts +59 -0
- package/lib/engine-components/WebXRAvatar.js +263 -0
- package/lib/engine-components/WebXRAvatar.js.map +1 -0
- package/lib/engine-components/WebXRController.d.ts +145 -0
- package/lib/engine-components/WebXRController.js +924 -0
- package/lib/engine-components/WebXRController.js.map +1 -0
- package/lib/engine-components/WebXRGrabRendering.d.ts +42 -0
- package/lib/engine-components/WebXRGrabRendering.js +138 -0
- package/lib/engine-components/WebXRGrabRendering.js.map +1 -0
- package/lib/engine-components/WebXRRig.d.ts +4 -0
- package/lib/engine-components/WebXRRig.js +8 -0
- package/lib/engine-components/WebXRRig.js.map +1 -0
- package/lib/engine-components/WebXRSync.d.ts +54 -0
- package/lib/engine-components/WebXRSync.js +405 -0
- package/lib/engine-components/WebXRSync.js.map +1 -0
- package/lib/engine-components/XRFlag.d.ts +32 -0
- package/lib/engine-components/XRFlag.js +115 -0
- package/lib/engine-components/XRFlag.js.map +1 -0
- package/lib/engine-components/avatar/AvatarBlink_Simple.d.ts +10 -0
- package/lib/engine-components/avatar/AvatarBlink_Simple.js +76 -0
- package/lib/engine-components/avatar/AvatarBlink_Simple.js.map +1 -0
- package/lib/engine-components/avatar/AvatarEyeLook_Rotation.d.ts +13 -0
- package/lib/engine-components/avatar/AvatarEyeLook_Rotation.js +75 -0
- package/lib/engine-components/avatar/AvatarEyeLook_Rotation.js.map +1 -0
- package/lib/engine-components/avatar/Avatar_Brain_LookAt.d.ts +27 -0
- package/lib/engine-components/avatar/Avatar_Brain_LookAt.js +120 -0
- package/lib/engine-components/avatar/Avatar_Brain_LookAt.js.map +1 -0
- package/lib/engine-components/avatar/Avatar_MouthShapes.d.ts +13 -0
- package/lib/engine-components/avatar/Avatar_MouthShapes.js +77 -0
- package/lib/engine-components/avatar/Avatar_MouthShapes.js.map +1 -0
- package/lib/engine-components/avatar/Avatar_MustacheShake.d.ts +8 -0
- package/lib/engine-components/avatar/Avatar_MustacheShake.js +29 -0
- package/lib/engine-components/avatar/Avatar_MustacheShake.js.map +1 -0
- package/lib/engine-components/codegen/exports.d.ts +140 -0
- package/lib/engine-components/codegen/exports.js +142 -0
- package/lib/engine-components/codegen/exports.js.map +1 -0
- package/lib/engine-components/debug/LogStats.d.ts +5 -0
- package/lib/engine-components/debug/LogStats.js +19 -0
- package/lib/engine-components/debug/LogStats.js.map +1 -0
- package/lib/engine-components/js-extensions/RGBAColor.d.ts +9 -0
- package/lib/engine-components/js-extensions/RGBAColor.js +35 -0
- package/lib/engine-components/js-extensions/RGBAColor.js.map +1 -0
- package/lib/engine-components/timeline/PlayableDirector.d.ts +66 -0
- package/lib/engine-components/timeline/PlayableDirector.js +460 -0
- package/lib/engine-components/timeline/PlayableDirector.js.map +1 -0
- package/lib/engine-components/timeline/SignalAsset.d.ts +19 -0
- package/lib/engine-components/timeline/SignalAsset.js +87 -0
- package/lib/engine-components/timeline/SignalAsset.js.map +1 -0
- package/lib/engine-components/timeline/TimelineModels.d.ts +86 -0
- package/lib/engine-components/timeline/TimelineModels.js +23 -0
- package/lib/engine-components/timeline/TimelineModels.js.map +1 -0
- package/lib/engine-components/timeline/TimelineTracks.d.ts +73 -0
- package/lib/engine-components/timeline/TimelineTracks.js +573 -0
- package/lib/engine-components/timeline/TimelineTracks.js.map +1 -0
- package/lib/engine-components/ui/BaseUIComponent.d.ts +24 -0
- package/lib/engine-components/ui/BaseUIComponent.js +129 -0
- package/lib/engine-components/ui/BaseUIComponent.js.map +1 -0
- package/lib/engine-components/ui/Button.d.ts +55 -0
- package/lib/engine-components/ui/Button.js +217 -0
- package/lib/engine-components/ui/Button.js.map +1 -0
- package/lib/engine-components/ui/Canvas.d.ts +39 -0
- package/lib/engine-components/ui/Canvas.js +169 -0
- package/lib/engine-components/ui/Canvas.js.map +1 -0
- package/lib/engine-components/ui/CanvasGroup.d.ts +14 -0
- package/lib/engine-components/ui/CanvasGroup.js +53 -0
- package/lib/engine-components/ui/CanvasGroup.js.map +1 -0
- package/lib/engine-components/ui/EventSystem.d.ts +44 -0
- package/lib/engine-components/ui/EventSystem.js +480 -0
- package/lib/engine-components/ui/EventSystem.js.map +1 -0
- package/lib/engine-components/ui/Graphic.d.ts +33 -0
- package/lib/engine-components/ui/Graphic.js +145 -0
- package/lib/engine-components/ui/Graphic.js.map +1 -0
- package/lib/engine-components/ui/Image.d.ts +20 -0
- package/lib/engine-components/ui/Image.js +61 -0
- package/lib/engine-components/ui/Image.js.map +1 -0
- package/lib/engine-components/ui/InputField.d.ts +25 -0
- package/lib/engine-components/ui/InputField.js +179 -0
- package/lib/engine-components/ui/InputField.js.map +1 -0
- package/lib/engine-components/ui/Interfaces.d.ts +7 -0
- package/lib/engine-components/ui/Interfaces.js +2 -0
- package/lib/engine-components/ui/Interfaces.js.map +1 -0
- package/lib/engine-components/ui/Keyboard.d.ts +31 -0
- package/lib/engine-components/ui/Keyboard.js +177 -0
- package/lib/engine-components/ui/Keyboard.js.map +1 -0
- package/lib/engine-components/ui/Layout.d.ts +10 -0
- package/lib/engine-components/ui/Layout.js +11 -0
- package/lib/engine-components/ui/Layout.js.map +1 -0
- package/lib/engine-components/ui/PointerEvents.d.ts +35 -0
- package/lib/engine-components/ui/PointerEvents.js +20 -0
- package/lib/engine-components/ui/PointerEvents.js.map +1 -0
- package/lib/engine-components/ui/Raycaster.d.ts +20 -0
- package/lib/engine-components/ui/Raycaster.js +40 -0
- package/lib/engine-components/ui/Raycaster.js.map +1 -0
- package/lib/engine-components/ui/RectTransform.d.ts +39 -0
- package/lib/engine-components/ui/RectTransform.js +173 -0
- package/lib/engine-components/ui/RectTransform.js.map +1 -0
- package/lib/engine-components/ui/SpatialHtml.d.ts +6 -0
- package/lib/engine-components/ui/SpatialHtml.js +58 -0
- package/lib/engine-components/ui/SpatialHtml.js.map +1 -0
- package/lib/engine-components/ui/Text.d.ts +68 -0
- package/lib/engine-components/ui/Text.js +631 -0
- package/lib/engine-components/ui/Text.js.map +1 -0
- package/lib/engine-components/ui/Utils.d.ts +19 -0
- package/lib/engine-components/ui/Utils.js +85 -0
- package/lib/engine-components/ui/Utils.js.map +1 -0
- package/lib/engine-schemes/schemes.d.ts +4 -0
- package/lib/engine-schemes/schemes.js +20 -0
- package/lib/engine-schemes/schemes.js.map +1 -0
- package/lib/engine-schemes/synced-camera-model.d.ts +25 -0
- package/lib/engine-schemes/synced-camera-model.js +68 -0
- package/lib/engine-schemes/synced-camera-model.js.map +1 -0
- package/lib/engine-schemes/synced-transform-model.d.ts +31 -0
- package/lib/engine-schemes/synced-transform-model.js +67 -0
- package/lib/engine-schemes/synced-transform-model.js.map +1 -0
- package/lib/engine-schemes/transform.d.ts +12 -0
- package/lib/engine-schemes/transform.js +40 -0
- package/lib/engine-schemes/transform.js.map +1 -0
- package/lib/engine-schemes/vec3.d.ts +11 -0
- package/lib/engine-schemes/vec3.js +30 -0
- package/lib/engine-schemes/vec3.js.map +1 -0
- package/lib/engine-schemes/vec4.d.ts +12 -0
- package/lib/engine-schemes/vec4.js +34 -0
- package/lib/engine-schemes/vec4.js.map +1 -0
- package/lib/engine-schemes/vr-user-state-buffer.d.ts +36 -0
- package/lib/engine-schemes/vr-user-state-buffer.js +104 -0
- package/lib/engine-schemes/vr-user-state-buffer.js.map +1 -0
- package/lib/needle-engine.d.ts +5 -0
- package/lib/needle-engine.js +34 -0
- package/lib/needle-engine.js.map +1 -0
- package/package.json +63 -0
- package/src/engine/codegen/register_types.js +297 -0
- package/src/engine/debug/error_overlay.ts +122 -0
- package/src/engine/engine.ts +15 -0
- package/src/engine/engine_addressables.ts +297 -0
- package/src/engine/engine_application.ts +42 -0
- package/src/engine/engine_assetdatabase.ts +215 -0
- package/src/engine/engine_caching.ts +0 -0
- package/src/engine/engine_components.js +202 -0
- package/src/engine/engine_constants.ts +3 -0
- package/src/engine/engine_coroutine.ts +16 -0
- package/src/engine/engine_default_parameters.ts +4 -0
- package/src/engine/engine_element.ts +380 -0
- package/src/engine/engine_element_loading.ts +178 -0
- package/src/engine/engine_element_overlay.ts +108 -0
- package/src/engine/engine_fileloader.js +9 -0
- package/src/engine/engine_generic_utils.js +14 -0
- package/src/engine/engine_gizmos.ts +15 -0
- package/src/engine/engine_gltf.ts +4 -0
- package/src/engine/engine_gltf_builtin_components.ts +298 -0
- package/src/engine/engine_input.ts +581 -0
- package/src/engine/engine_input_utils.ts +24 -0
- package/src/engine/engine_lightdata.ts +111 -0
- package/src/engine/engine_loaders.ts +26 -0
- package/src/engine/engine_mainloop_utils.ts +292 -0
- package/src/engine/engine_math.ts +43 -0
- package/src/engine/engine_networking.ts +664 -0
- package/src/engine/engine_networking_auto.ts +300 -0
- package/src/engine/engine_networking_files.ts +198 -0
- package/src/engine/engine_networking_files_default_components.ts +54 -0
- package/src/engine/engine_networking_instantiate.ts +321 -0
- package/src/engine/engine_networking_peer.ts +128 -0
- package/src/engine/engine_networking_utils.ts +12 -0
- package/src/engine/engine_networking_websocket.ts +1 -0
- package/src/engine/engine_physics.ts +652 -0
- package/src/engine/engine_rendererdata.ts +214 -0
- package/src/engine/engine_scenetools.ts +231 -0
- package/src/engine/engine_serialization.ts +4 -0
- package/src/engine/engine_serialization_builtin_serializer.ts +266 -0
- package/src/engine/engine_serialization_core.ts +513 -0
- package/src/engine/engine_serialization_decorator.ts +55 -0
- package/src/engine/engine_setup.ts +705 -0
- package/src/engine/engine_shaders.ts +243 -0
- package/src/engine/engine_three_utils.ts +290 -0
- package/src/engine/engine_time.ts +38 -0
- package/src/engine/engine_typestore.ts +21 -0
- package/src/engine/engine_utils.ts +268 -0
- package/src/engine/engine_web_api.ts +122 -0
- package/src/engine/extensions/EXT_texture_exr.js +42 -0
- package/src/engine/extensions/KHR_animation_pointer.ts +484 -0
- package/src/engine/extensions/NEEDLE_animator_controller.ts +68 -0
- package/src/engine/extensions/NEEDLE_animator_controller_model.ts +185 -0
- package/src/engine/extensions/NEEDLE_components.ts +234 -0
- package/src/engine/extensions/NEEDLE_deferred_texture.ts +175 -0
- package/src/engine/extensions/NEEDLE_gameobject_data.ts +76 -0
- package/src/engine/extensions/NEEDLE_lighting_settings.ts +161 -0
- package/src/engine/extensions/NEEDLE_lightmaps.ts +93 -0
- package/src/engine/extensions/NEEDLE_persistent_assets.ts +76 -0
- package/src/engine/extensions/NEEDLE_render_objects.ts +197 -0
- package/src/engine/extensions/NEEDLE_techniques_webgl.ts +482 -0
- package/src/engine/extensions/NEEDLE_timeline.ts +68 -0
- package/src/engine/extensions/extension_resolver.ts +5 -0
- package/src/engine/extensions/extension_utils.ts +138 -0
- package/src/engine/extensions/extensions.ts +49 -0
- package/src/engine/shaders/shaderData.ts +68 -0
- package/src/engine/tests/simulate_avatars.ts +2 -0
- package/src/engine/tests/test_utils.ts +63 -0
- package/src/engine-components/AlignmentConstraint.ts +33 -0
- package/src/engine-components/Animation.ts +282 -0
- package/src/engine-components/AnimationCurve.ts +42 -0
- package/src/engine-components/Animator.ts +148 -0
- package/src/engine-components/AnimatorController.ts +799 -0
- package/src/engine-components/AudioListener.ts +32 -0
- package/src/engine-components/AudioSource.ts +383 -0
- package/src/engine-components/AvatarLoader.ts +240 -0
- package/src/engine-components/AxesHelper.ts +32 -0
- package/src/engine-components/BasicIKConstraint.ts +54 -0
- package/src/engine-components/BoxCollider.ts +2 -0
- package/src/engine-components/BoxHelperComponent.ts +83 -0
- package/src/engine-components/Camera.ts +261 -0
- package/src/engine-components/Collider.ts +72 -0
- package/src/engine-components/Component.ts +1042 -0
- package/src/engine-components/ComponentExtensions.ts +7 -0
- package/src/engine-components/DeleteBox.ts +34 -0
- package/src/engine-components/DeviceFlag.ts +46 -0
- package/src/engine-components/DragControls.ts +534 -0
- package/src/engine-components/DropListener.ts +101 -0
- package/src/engine-components/Duplicatable.ts +146 -0
- package/src/engine-components/EventList.ts +116 -0
- package/src/engine-components/EventTrigger.ts +28 -0
- package/src/engine-components/EventType.ts +88 -0
- package/src/engine-components/FlyControls.ts +27 -0
- package/src/engine-components/Gizmos.ts +53 -0
- package/src/engine-components/GltfExport.ts +232 -0
- package/src/engine-components/GridHelper.ts +32 -0
- package/src/engine-components/GroundProjection.ts +75 -0
- package/src/engine-components/Interactable.ts +28 -0
- package/src/engine-components/LODGroup.ts +173 -0
- package/src/engine-components/Light.ts +418 -0
- package/src/engine-components/LookAtConstraint.ts +12 -0
- package/src/engine-components/MeshCollider.ts +12 -0
- package/src/engine-components/NavMesh.ts +118 -0
- package/src/engine-components/NestedGltf.ts +56 -0
- package/src/engine-components/Networking.ts +58 -0
- package/src/engine-components/OffsetConstraint.ts +32 -0
- package/src/engine-components/OrbitControls.ts +270 -0
- package/src/engine-components/ParticleSystem.ts +249 -0
- package/src/engine-components/ParticleSystemModules.ts +173 -0
- package/src/engine-components/PlayerColor.ts +93 -0
- package/src/engine-components/Renderer.ts +732 -0
- package/src/engine-components/RendererLightmap.ts +152 -0
- package/src/engine-components/RigidBody.ts +177 -0
- package/src/engine-components/ScreenCapture.ts +47 -0
- package/src/engine-components/ShadowCatcher.ts +93 -0
- package/src/engine-components/Skybox.ts +116 -0
- package/src/engine-components/SmoothFollow.ts +55 -0
- package/src/engine-components/SpatialTrigger.ts +142 -0
- package/src/engine-components/SpectatorCamera.ts +350 -0
- package/src/engine-components/SphereCollider.ts +2 -0
- package/src/engine-components/SpringJoint.ts +45 -0
- package/src/engine-components/SpriteRenderer.ts +143 -0
- package/src/engine-components/SyncedCamera.ts +206 -0
- package/src/engine-components/SyncedRoom.ts +157 -0
- package/src/engine-components/SyncedTransform.ts +339 -0
- package/src/engine-components/TestRunner.ts +116 -0
- package/src/engine-components/TransformGizmo.ts +185 -0
- package/src/engine-components/VideoPlayer.ts +308 -0
- package/src/engine-components/Voip.ts +455 -0
- package/src/engine-components/Volume.ts +86 -0
- package/src/engine-components/WebARSessionRoot.ts +109 -0
- package/src/engine-components/WebXR.ts +586 -0
- package/src/engine-components/WebXRAvatar.ts +326 -0
- package/src/engine-components/WebXRController.ts +1049 -0
- package/src/engine-components/WebXRGrabRendering.ts +151 -0
- package/src/engine-components/WebXRRig.ts +9 -0
- package/src/engine-components/WebXRSync.ts +458 -0
- package/src/engine-components/XRFlag.ts +134 -0
- package/src/engine-components/avatar/AvatarBlink_Simple.ts +68 -0
- package/src/engine-components/avatar/AvatarEyeLook_Rotation.ts +69 -0
- package/src/engine-components/avatar/Avatar_Brain_LookAt.ts +137 -0
- package/src/engine-components/avatar/Avatar_MouthShapes.ts +81 -0
- package/src/engine-components/avatar/Avatar_MustacheShake.ts +29 -0
- package/src/engine-components/codegen/exports.ts +141 -0
- package/src/engine-components/debug/LogStats.ts +22 -0
- package/src/engine-components/js-extensions/RGBAColor.ts +36 -0
- package/src/engine-components/timeline/PlayableDirector.ts +485 -0
- package/src/engine-components/timeline/SignalAsset.ts +108 -0
- package/src/engine-components/timeline/TimelineModels.ts +91 -0
- package/src/engine-components/timeline/TimelineTracks.ts +627 -0
- package/src/engine-components/ui/BaseUIComponent.ts +153 -0
- package/src/engine-components/ui/Button.ts +251 -0
- package/src/engine-components/ui/Canvas.ts +166 -0
- package/src/engine-components/ui/CanvasGroup.ts +47 -0
- package/src/engine-components/ui/EventSystem.ts +523 -0
- package/src/engine-components/ui/Graphic.ts +157 -0
- package/src/engine-components/ui/Image.ts +57 -0
- package/src/engine-components/ui/InputField.ts +235 -0
- package/src/engine-components/ui/Interfaces.ts +8 -0
- package/src/engine-components/ui/Keyboard.ts +203 -0
- package/src/engine-components/ui/Layout.ts +17 -0
- package/src/engine-components/ui/PointerEvents.ts +54 -0
- package/src/engine-components/ui/Raycaster.ts +47 -0
- package/src/engine-components/ui/RectTransform.ts +180 -0
- package/src/engine-components/ui/SpatialHtml.ts +63 -0
- package/src/engine-components/ui/Text.ts +634 -0
- package/src/engine-components/ui/Utils.ts +105 -0
- package/src/engine-components-experimental/Presentation.ts +13 -0
- package/src/engine-components-experimental/annotation/LineDrawer.ts +191 -0
- package/src/engine-components-experimental/annotation/LinesManager.ts +218 -0
- package/src/engine-components-experimental/networking/PlayerSync.ts +131 -0
- package/src/engine-schemes/COMPILE_SCHEMES.bat +4 -0
- package/src/engine-schemes/COMPILE_TS.bat +12 -0
- package/src/engine-schemes/schemes.ts +29 -0
- package/src/engine-schemes/synced-camera-model.ts +92 -0
- package/src/engine-schemes/synced-transform-model.ts +90 -0
- package/src/engine-schemes/syncedCamera.fbs +11 -0
- package/src/engine-schemes/transform.ts +50 -0
- package/src/engine-schemes/transforms.fbs +26 -0
- package/src/engine-schemes/vec.fbs +19 -0
- package/src/engine-schemes/vec2.ts +33 -0
- package/src/engine-schemes/vec3.ts +38 -0
- package/src/engine-schemes/vec4.ts +43 -0
- package/src/engine-schemes/vr-user-state-buffer.ts +138 -0
- package/src/engine-schemes/vrUserStateBuffer.fbs +17 -0
- package/src/needle-engine.ts +39 -0
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
// automatically generated by the FlatBuffers compiler, do not modify
|
|
2
|
+
import * as flatbuffers from 'flatbuffers';
|
|
3
|
+
import { Vec3 } from './vec3';
|
|
4
|
+
import { Vec4 } from './vec4';
|
|
5
|
+
export class VrUserStateBuffer {
|
|
6
|
+
bb = null;
|
|
7
|
+
bb_pos = 0;
|
|
8
|
+
__init(i, bb) {
|
|
9
|
+
this.bb_pos = i;
|
|
10
|
+
this.bb = bb;
|
|
11
|
+
return this;
|
|
12
|
+
}
|
|
13
|
+
static getRootAsVrUserStateBuffer(bb, obj) {
|
|
14
|
+
return (obj || new VrUserStateBuffer()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
|
15
|
+
}
|
|
16
|
+
static getSizePrefixedRootAsVrUserStateBuffer(bb, obj) {
|
|
17
|
+
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
|
|
18
|
+
return (obj || new VrUserStateBuffer()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
|
19
|
+
}
|
|
20
|
+
guid(optionalEncoding) {
|
|
21
|
+
const offset = this.bb.__offset(this.bb_pos, 4);
|
|
22
|
+
return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null;
|
|
23
|
+
}
|
|
24
|
+
time() {
|
|
25
|
+
const offset = this.bb.__offset(this.bb_pos, 6);
|
|
26
|
+
return offset ? this.bb.readInt64(this.bb_pos + offset) : this.bb.createLong(0, 0);
|
|
27
|
+
}
|
|
28
|
+
avatarId(optionalEncoding) {
|
|
29
|
+
const offset = this.bb.__offset(this.bb_pos, 8);
|
|
30
|
+
return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null;
|
|
31
|
+
}
|
|
32
|
+
position(obj) {
|
|
33
|
+
const offset = this.bb.__offset(this.bb_pos, 10);
|
|
34
|
+
return offset ? (obj || new Vec3()).__init(this.bb_pos + offset, this.bb) : null;
|
|
35
|
+
}
|
|
36
|
+
rotation(obj) {
|
|
37
|
+
const offset = this.bb.__offset(this.bb_pos, 12);
|
|
38
|
+
return offset ? (obj || new Vec4()).__init(this.bb_pos + offset, this.bb) : null;
|
|
39
|
+
}
|
|
40
|
+
scale() {
|
|
41
|
+
const offset = this.bb.__offset(this.bb_pos, 14);
|
|
42
|
+
return offset ? this.bb.readFloat32(this.bb_pos + offset) : 0.0;
|
|
43
|
+
}
|
|
44
|
+
posLeftHand(obj) {
|
|
45
|
+
const offset = this.bb.__offset(this.bb_pos, 16);
|
|
46
|
+
return offset ? (obj || new Vec3()).__init(this.bb_pos + offset, this.bb) : null;
|
|
47
|
+
}
|
|
48
|
+
posRightHand(obj) {
|
|
49
|
+
const offset = this.bb.__offset(this.bb_pos, 18);
|
|
50
|
+
return offset ? (obj || new Vec3()).__init(this.bb_pos + offset, this.bb) : null;
|
|
51
|
+
}
|
|
52
|
+
rotLeftHand(obj) {
|
|
53
|
+
const offset = this.bb.__offset(this.bb_pos, 20);
|
|
54
|
+
return offset ? (obj || new Vec4()).__init(this.bb_pos + offset, this.bb) : null;
|
|
55
|
+
}
|
|
56
|
+
rotRightHand(obj) {
|
|
57
|
+
const offset = this.bb.__offset(this.bb_pos, 22);
|
|
58
|
+
return offset ? (obj || new Vec4()).__init(this.bb_pos + offset, this.bb) : null;
|
|
59
|
+
}
|
|
60
|
+
static startVrUserStateBuffer(builder) {
|
|
61
|
+
builder.startObject(10);
|
|
62
|
+
}
|
|
63
|
+
static addGuid(builder, guidOffset) {
|
|
64
|
+
builder.addFieldOffset(0, guidOffset, 0);
|
|
65
|
+
}
|
|
66
|
+
static addTime(builder, time) {
|
|
67
|
+
builder.addFieldInt64(1, time, builder.createLong(0, 0));
|
|
68
|
+
}
|
|
69
|
+
static addAvatarId(builder, avatarIdOffset) {
|
|
70
|
+
builder.addFieldOffset(2, avatarIdOffset, 0);
|
|
71
|
+
}
|
|
72
|
+
static addPosition(builder, positionOffset) {
|
|
73
|
+
builder.addFieldStruct(3, positionOffset, 0);
|
|
74
|
+
}
|
|
75
|
+
static addRotation(builder, rotationOffset) {
|
|
76
|
+
builder.addFieldStruct(4, rotationOffset, 0);
|
|
77
|
+
}
|
|
78
|
+
static addScale(builder, scale) {
|
|
79
|
+
builder.addFieldFloat32(5, scale, 0.0);
|
|
80
|
+
}
|
|
81
|
+
static addPosLeftHand(builder, posLeftHandOffset) {
|
|
82
|
+
builder.addFieldStruct(6, posLeftHandOffset, 0);
|
|
83
|
+
}
|
|
84
|
+
static addPosRightHand(builder, posRightHandOffset) {
|
|
85
|
+
builder.addFieldStruct(7, posRightHandOffset, 0);
|
|
86
|
+
}
|
|
87
|
+
static addRotLeftHand(builder, rotLeftHandOffset) {
|
|
88
|
+
builder.addFieldStruct(8, rotLeftHandOffset, 0);
|
|
89
|
+
}
|
|
90
|
+
static addRotRightHand(builder, rotRightHandOffset) {
|
|
91
|
+
builder.addFieldStruct(9, rotRightHandOffset, 0);
|
|
92
|
+
}
|
|
93
|
+
static endVrUserStateBuffer(builder) {
|
|
94
|
+
const offset = builder.endObject();
|
|
95
|
+
return offset;
|
|
96
|
+
}
|
|
97
|
+
static finishVrUserStateBufferBuffer(builder, offset) {
|
|
98
|
+
builder.finish(offset);
|
|
99
|
+
}
|
|
100
|
+
static finishSizePrefixedVrUserStateBufferBuffer(builder, offset) {
|
|
101
|
+
builder.finish(offset, undefined, true);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
//# sourceMappingURL=vr-user-state-buffer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vr-user-state-buffer.js","sourceRoot":"","sources":["../../../engine-schemes/vr-user-state-buffer.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import "./engine/engine_element";
|
|
2
|
+
import "./engine/engine_setup";
|
|
3
|
+
// import "./engine/engine_mainloop";
|
|
4
|
+
// import "./engine-components/DomOverlay";
|
|
5
|
+
export { GameObject, Behaviour } from "./engine-components/Component";
|
|
6
|
+
export { serializeable } from "./engine/engine_serialization_decorator";
|
|
7
|
+
export * from "./engine-components/codegen/exports";
|
|
8
|
+
// make accessible for external javascript
|
|
9
|
+
import { Context } from "./engine/engine_setup";
|
|
10
|
+
const Needle = { Context: Context };
|
|
11
|
+
globalThis["Needle"] = Needle;
|
|
12
|
+
function registerGlobal(obj) {
|
|
13
|
+
for (const key in obj) {
|
|
14
|
+
Needle[key] = obj[key];
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
import * as Component from "./engine-components/Component";
|
|
18
|
+
import * as Components from "./engine-components/codegen/exports";
|
|
19
|
+
registerGlobal(Component);
|
|
20
|
+
registerGlobal(Components);
|
|
21
|
+
import { GameObject } from "./engine-components/Component";
|
|
22
|
+
for (const method of Object.getOwnPropertyNames(GameObject)) {
|
|
23
|
+
switch (method) {
|
|
24
|
+
case "prototype":
|
|
25
|
+
case "constructor":
|
|
26
|
+
case "length":
|
|
27
|
+
case "name":
|
|
28
|
+
continue;
|
|
29
|
+
default:
|
|
30
|
+
Needle[method] = GameObject[method];
|
|
31
|
+
break;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=needle-engine.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"needle-engine.js","sourceRoot":"","sources":["../../needle-engine.ts"],"names":[],"mappings":"AAAA,OAAO,yBAAyB,CAAC;AACjC,OAAO,uBAAuB,CAAC;AAC/B,qCAAqC;AACrC,2CAA2C;AAE3C,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AACtE,OAAO,EAAE,aAAa,EAAE,MAAM,yCAAyC,CAAC;AACxE,cAAc,qCAAqC,CAAC;AAKpD,0CAA0C;AAC1C,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,MAAM,MAAM,GAAG,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC;AACpC,UAAU,CAAC,QAAQ,CAAC,GAAG,MAAM,CAAC;AAC9B,SAAS,cAAc,CAAC,GAAW;IAC/B,KAAK,MAAM,GAAG,IAAI,GAAG,EAAE;QACnB,MAAM,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC,GAAG,CAAC,CAAC;KAC1B;AACL,CAAC;AACD,OAAO,KAAK,SAAS,MAAM,+BAA+B,CAAC;AAC3D,OAAO,KAAK,UAAU,MAAM,qCAAqC,CAAC;AAClE,cAAc,CAAC,SAAS,CAAC,CAAC;AAC1B,cAAc,CAAC,UAAU,CAAC,CAAC;AAE3B,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAC3D,KAAK,MAAM,MAAM,IAAI,MAAM,CAAC,mBAAmB,CAAC,UAAU,CAAC,EAAE;IACzD,QAAQ,MAAM,EAAE;QACZ,KAAK,WAAW,CAAC;QACjB,KAAK,aAAa,CAAC;QACnB,KAAK,QAAQ,CAAC;QACd,KAAK,MAAM;YACP,SAAS;QACb;YACI,MAAM,CAAC,MAAM,CAAC,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC;YACpC,MAAM;KACb;CACJ"}
|
package/package.json
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@needle-tools/engine",
|
|
3
|
+
"version": "2.24.0-pre",
|
|
4
|
+
"description": "Needle Engine is a web-based runtime for 3D apps. It runs on your machine for development, and can be deployed anywhere. It is flexible, extensible, and collaboration and XR come naturally.",
|
|
5
|
+
"main": "dist/needle-engine.js",
|
|
6
|
+
"module": "lib/needle-engine.js",
|
|
7
|
+
"type": "module",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "https://github.com/needle-tools/needle-engine-support"
|
|
11
|
+
},
|
|
12
|
+
"bugs": {
|
|
13
|
+
"url": "https://github.com/needle-tools/needle-engine-support/issues"
|
|
14
|
+
},
|
|
15
|
+
"homepage": "https://needle.tools",
|
|
16
|
+
"author": {
|
|
17
|
+
"name": "Needle",
|
|
18
|
+
"email": "hi@needle.tools",
|
|
19
|
+
"url": "https://needle.tools/"
|
|
20
|
+
},
|
|
21
|
+
"files": [
|
|
22
|
+
"package.json",
|
|
23
|
+
"README.md",
|
|
24
|
+
"CHANGELOG.md",
|
|
25
|
+
"LICENSE.md",
|
|
26
|
+
"src",
|
|
27
|
+
"dist",
|
|
28
|
+
"lib"
|
|
29
|
+
],
|
|
30
|
+
"keywords": [
|
|
31
|
+
"needle",
|
|
32
|
+
"unity",
|
|
33
|
+
"blender",
|
|
34
|
+
"ar",
|
|
35
|
+
"augmented reality",
|
|
36
|
+
"gltf",
|
|
37
|
+
"glb",
|
|
38
|
+
"webar",
|
|
39
|
+
"webvr",
|
|
40
|
+
"webxr",
|
|
41
|
+
"3d"
|
|
42
|
+
],
|
|
43
|
+
"dependencies": {
|
|
44
|
+
"cannon-es": "^0.18.0",
|
|
45
|
+
"cannon-es-debugger": "^0.1.4",
|
|
46
|
+
"dat.gui.image": "^1.0.4",
|
|
47
|
+
"flatbuffers": "2.0.4",
|
|
48
|
+
"md5": "^2.3.0",
|
|
49
|
+
"peerjs": "1.3.2",
|
|
50
|
+
"stats.js": "^0.17.0",
|
|
51
|
+
"three": "github:needle-tools/three.js#needle-dev-5",
|
|
52
|
+
"three-mesh-ui": "^6.3.2",
|
|
53
|
+
"three.meshline": "^1.4.0",
|
|
54
|
+
"uuid": "^8.3.2",
|
|
55
|
+
"websocket-ts": "^1.1.1"
|
|
56
|
+
},
|
|
57
|
+
"publishConfig": {
|
|
58
|
+
"access": "public",
|
|
59
|
+
"registry": "https://registry.npmjs.org"
|
|
60
|
+
},
|
|
61
|
+
"typings": "lib/needle-engine.d.ts",
|
|
62
|
+
"types": "lib/needle-engine.d.ts"
|
|
63
|
+
}
|
|
@@ -0,0 +1,297 @@
|
|
|
1
|
+
import { TypeStore } from "./../engine_typestore"
|
|
2
|
+
|
|
3
|
+
// Import types
|
|
4
|
+
import { AlignmentConstraint } from "../../engine-components/AlignmentConstraint.ts";
|
|
5
|
+
import { Animation } from "../../engine-components/Animation.ts";
|
|
6
|
+
import { AnimationCurve } from "../../engine-components/AnimationCurve.ts";
|
|
7
|
+
import { Animator } from "../../engine-components/Animator.ts";
|
|
8
|
+
import { AnimatorController } from "../../engine-components/AnimatorController.ts";
|
|
9
|
+
import { AudioListener } from "../../engine-components/AudioListener.ts";
|
|
10
|
+
import { AudioSource } from "../../engine-components/AudioSource.ts";
|
|
11
|
+
import { AvatarModel } from "../../engine-components/AvatarLoader.ts";
|
|
12
|
+
import { AvatarLoader } from "../../engine-components/AvatarLoader.ts";
|
|
13
|
+
import { AxesHelper } from "../../engine-components/AxesHelper.ts";
|
|
14
|
+
import { BasicIKConstraint } from "../../engine-components/BasicIKConstraint.ts";
|
|
15
|
+
import { BoxHelperComponent } from "../../engine-components/BoxHelperComponent.ts";
|
|
16
|
+
import { Camera } from "../../engine-components/Camera.ts";
|
|
17
|
+
import { Collider } from "../../engine-components/Collider.ts";
|
|
18
|
+
import { SphereCollider } from "../../engine-components/Collider.ts";
|
|
19
|
+
import { BoxCollider } from "../../engine-components/Collider.ts";
|
|
20
|
+
import { InstantiateOptions } from "../../engine-components/Component.ts";
|
|
21
|
+
import { UnityObject } from "../../engine-components/ComponentExtensions.ts";
|
|
22
|
+
import { DeleteBox } from "../../engine-components/DeleteBox.ts";
|
|
23
|
+
import { Deletable } from "../../engine-components/DeleteBox.ts";
|
|
24
|
+
import { DeviceFlag } from "../../engine-components/DeviceFlag.ts";
|
|
25
|
+
import { DragControls } from "../../engine-components/DragControls.ts";
|
|
26
|
+
import { DropListener } from "../../engine-components/DropListener.ts";
|
|
27
|
+
import { Duplicatable } from "../../engine-components/Duplicatable.ts";
|
|
28
|
+
import { CallInfo } from "../../engine-components/EventList.ts";
|
|
29
|
+
import { EventListEvent } from "../../engine-components/EventList.ts";
|
|
30
|
+
import { EventList } from "../../engine-components/EventList.ts";
|
|
31
|
+
import { EventTrigger } from "../../engine-components/EventTrigger.ts";
|
|
32
|
+
import { FlyControls } from "../../engine-components/FlyControls.ts";
|
|
33
|
+
import { BoxGizmo } from "../../engine-components/Gizmos.ts";
|
|
34
|
+
import { GltfExportBox } from "../../engine-components/GltfExport.ts";
|
|
35
|
+
import { GltfExport } from "../../engine-components/GltfExport.ts";
|
|
36
|
+
import { GridHelper } from "../../engine-components/GridHelper.ts";
|
|
37
|
+
import { GroundProjectedEnv } from "../../engine-components/GroundProjection.ts";
|
|
38
|
+
import { Interactable } from "../../engine-components/Interactable.ts";
|
|
39
|
+
import { UsageMarker } from "../../engine-components/Interactable.ts";
|
|
40
|
+
import { Light } from "../../engine-components/Light.ts";
|
|
41
|
+
import { LODModel } from "../../engine-components/LODGroup.ts";
|
|
42
|
+
import { LODGroup } from "../../engine-components/LODGroup.ts";
|
|
43
|
+
import { LookAtConstraint } from "../../engine-components/LookAtConstraint.ts";
|
|
44
|
+
import { MeshCollider } from "../../engine-components/MeshCollider.ts";
|
|
45
|
+
import { NavMesh } from "../../engine-components/NavMesh.ts";
|
|
46
|
+
import { NavMeshAgent } from "../../engine-components/NavMesh.ts";
|
|
47
|
+
import { NestedGltf } from "../../engine-components/NestedGltf.ts";
|
|
48
|
+
import { Networking } from "../../engine-components/Networking.ts";
|
|
49
|
+
import { OffsetConstraint } from "../../engine-components/OffsetConstraint.ts";
|
|
50
|
+
import { OrbitControls } from "../../engine-components/OrbitControls.ts";
|
|
51
|
+
import { ParticleSystemRenderer } from "../../engine-components/ParticleSystem.ts";
|
|
52
|
+
import { ParticleSystem } from "../../engine-components/ParticleSystem.ts";
|
|
53
|
+
import { MainModule } from "../../engine-components/ParticleSystemModules.ts";
|
|
54
|
+
import { EmissionModule } from "../../engine-components/ParticleSystemModules.ts";
|
|
55
|
+
import { ShapeModule } from "../../engine-components/ParticleSystemModules.ts";
|
|
56
|
+
import { PlayerColor } from "../../engine-components/PlayerColor.ts";
|
|
57
|
+
import { FieldWithDefault } from "../../engine-components/Renderer.ts";
|
|
58
|
+
import { Renderer } from "../../engine-components/Renderer.ts";
|
|
59
|
+
import { MeshRenderer } from "../../engine-components/Renderer.ts";
|
|
60
|
+
import { SkinnedMeshRenderer } from "../../engine-components/Renderer.ts";
|
|
61
|
+
import { InstancingUtil } from "../../engine-components/Renderer.ts";
|
|
62
|
+
import { RendererLightmap } from "../../engine-components/RendererLightmap.ts";
|
|
63
|
+
import { Rigidbody } from "../../engine-components/RigidBody.ts";
|
|
64
|
+
import { ScreenCapture } from "../../engine-components/ScreenCapture.ts";
|
|
65
|
+
import { ShadowCatcher } from "../../engine-components/ShadowCatcher.ts";
|
|
66
|
+
import { RemoteSkybox } from "../../engine-components/Skybox.ts";
|
|
67
|
+
import { SmoothFollow } from "../../engine-components/SmoothFollow.ts";
|
|
68
|
+
import { SpatialTriggerReceiver } from "../../engine-components/SpatialTrigger.ts";
|
|
69
|
+
import { SpatialTrigger } from "../../engine-components/SpatialTrigger.ts";
|
|
70
|
+
import { SpectatorCamera } from "../../engine-components/SpectatorCamera.ts";
|
|
71
|
+
import { SpringJoint } from "../../engine-components/SpringJoint.ts";
|
|
72
|
+
import { Sprite } from "../../engine-components/SpriteRenderer.ts";
|
|
73
|
+
import { SpriteRenderer } from "../../engine-components/SpriteRenderer.ts";
|
|
74
|
+
import { SyncedCamera } from "../../engine-components/SyncedCamera.ts";
|
|
75
|
+
import { SyncedRoom } from "../../engine-components/SyncedRoom.ts";
|
|
76
|
+
import { SyncedTransform } from "../../engine-components/SyncedTransform.ts";
|
|
77
|
+
import { TestRunner } from "../../engine-components/TestRunner.ts";
|
|
78
|
+
import { TestSimulateUserData } from "../../engine-components/TestRunner.ts";
|
|
79
|
+
import { TransformGizmo } from "../../engine-components/TransformGizmo.ts";
|
|
80
|
+
import { VideoPlayer } from "../../engine-components/VideoPlayer.ts";
|
|
81
|
+
import { Voip } from "../../engine-components/Voip.ts";
|
|
82
|
+
import { VolumeParameter } from "../../engine-components/Volume.ts";
|
|
83
|
+
import { VolumeComponent } from "../../engine-components/Volume.ts";
|
|
84
|
+
import { ToneMapping } from "../../engine-components/Volume.ts";
|
|
85
|
+
import { ColorAdjustments } from "../../engine-components/Volume.ts";
|
|
86
|
+
import { VolumeProfile } from "../../engine-components/Volume.ts";
|
|
87
|
+
import { Volume } from "../../engine-components/Volume.ts";
|
|
88
|
+
import { WebARSessionRoot } from "../../engine-components/WebARSessionRoot.ts";
|
|
89
|
+
import { WebXR } from "../../engine-components/WebXR.ts";
|
|
90
|
+
import { WebAR } from "../../engine-components/WebXR.ts";
|
|
91
|
+
import { AvatarMarker } from "../../engine-components/WebXRAvatar.ts";
|
|
92
|
+
import { WebXRAvatar } from "../../engine-components/WebXRAvatar.ts";
|
|
93
|
+
import { TeleportTarget } from "../../engine-components/WebXRController.ts";
|
|
94
|
+
import { WebXRController } from "../../engine-components/WebXRController.ts";
|
|
95
|
+
import { AttachedObject } from "../../engine-components/WebXRController.ts";
|
|
96
|
+
import { XRGrabModel } from "../../engine-components/WebXRGrabRendering.ts";
|
|
97
|
+
import { XRGrabRendering } from "../../engine-components/WebXRGrabRendering.ts";
|
|
98
|
+
import { XRRig } from "../../engine-components/WebXRRig.ts";
|
|
99
|
+
import { VRUserState } from "../../engine-components/WebXRSync.ts";
|
|
100
|
+
import { WebXRSync } from "../../engine-components/WebXRSync.ts";
|
|
101
|
+
import { XRState } from "../../engine-components/XRFlag.ts";
|
|
102
|
+
import { XRFlag } from "../../engine-components/XRFlag.ts";
|
|
103
|
+
import { AvatarBlink_Simple } from "../../engine-components/avatar/AvatarBlink_Simple.ts";
|
|
104
|
+
import { AvatarEyeLook_Rotation } from "../../engine-components/avatar/AvatarEyeLook_Rotation.ts";
|
|
105
|
+
import { Avatar_POI } from "../../engine-components/avatar/Avatar_Brain_LookAt.ts";
|
|
106
|
+
import { Avatar_Brain_LookAt } from "../../engine-components/avatar/Avatar_Brain_LookAt.ts";
|
|
107
|
+
import { Avatar_MouthShapes } from "../../engine-components/avatar/Avatar_MouthShapes.ts";
|
|
108
|
+
import { Avatar_MustacheShake } from "../../engine-components/avatar/Avatar_MustacheShake.ts";
|
|
109
|
+
import { LogStats } from "../../engine-components/debug/LogStats.ts";
|
|
110
|
+
import { RGBAColor } from "../../engine-components/js-extensions/RGBAColor.ts";
|
|
111
|
+
import { PlayableDirector } from "../../engine-components/timeline/PlayableDirector.ts";
|
|
112
|
+
import { SignalAsset } from "../../engine-components/timeline/SignalAsset.ts";
|
|
113
|
+
import { SignalReceiverEvent } from "../../engine-components/timeline/SignalAsset.ts";
|
|
114
|
+
import { SignalReceiver } from "../../engine-components/timeline/SignalAsset.ts";
|
|
115
|
+
import { AnimationTrackHandler } from "../../engine-components/timeline/TimelineTracks.ts";
|
|
116
|
+
import { AudioTrackHandler } from "../../engine-components/timeline/TimelineTracks.ts";
|
|
117
|
+
import { SignalTrackHandler } from "../../engine-components/timeline/TimelineTracks.ts";
|
|
118
|
+
import { ControlTrackHandler } from "../../engine-components/timeline/TimelineTracks.ts";
|
|
119
|
+
import { BaseUIComponent } from "../../engine-components/ui/BaseUIComponent.ts";
|
|
120
|
+
import { UIRootComponent } from "../../engine-components/ui/BaseUIComponent.ts";
|
|
121
|
+
import { Button } from "../../engine-components/ui/Button.ts";
|
|
122
|
+
import { Canvas } from "../../engine-components/ui/Canvas.ts";
|
|
123
|
+
import { CanvasGroup } from "../../engine-components/ui/CanvasGroup.ts";
|
|
124
|
+
import { EventSystem } from "../../engine-components/ui/EventSystem.ts";
|
|
125
|
+
import { Graphic } from "../../engine-components/ui/Graphic.ts";
|
|
126
|
+
import { MaskableGraphic } from "../../engine-components/ui/Graphic.ts";
|
|
127
|
+
import { Image } from "../../engine-components/ui/Image.ts";
|
|
128
|
+
import { RawImage } from "../../engine-components/ui/Image.ts";
|
|
129
|
+
import { InputField } from "../../engine-components/ui/InputField.ts";
|
|
130
|
+
import { Keyboard } from "../../engine-components/ui/Keyboard.ts";
|
|
131
|
+
import { LayoutGroup } from "../../engine-components/ui/Layout.ts";
|
|
132
|
+
import { VerticalLayoutGroup } from "../../engine-components/ui/Layout.ts";
|
|
133
|
+
import { HorizontalLayoutGroup } from "../../engine-components/ui/Layout.ts";
|
|
134
|
+
import { GridLayoutGroup } from "../../engine-components/ui/Layout.ts";
|
|
135
|
+
import { PointerEventData } from "../../engine-components/ui/PointerEvents.ts";
|
|
136
|
+
import { Raycaster } from "../../engine-components/ui/Raycaster.ts";
|
|
137
|
+
import { ObjectRaycaster } from "../../engine-components/ui/Raycaster.ts";
|
|
138
|
+
import { GraphicRaycaster } from "../../engine-components/ui/Raycaster.ts";
|
|
139
|
+
import { Size } from "../../engine-components/ui/RectTransform.ts";
|
|
140
|
+
import { Rect } from "../../engine-components/ui/RectTransform.ts";
|
|
141
|
+
import { RectTransform } from "../../engine-components/ui/RectTransform.ts";
|
|
142
|
+
import { SpatialHtml } from "../../engine-components/ui/SpatialHtml.ts";
|
|
143
|
+
import { Text } from "../../engine-components/ui/Text.ts";
|
|
144
|
+
import { PresentationMode } from "../../engine-components-experimental/Presentation.ts";
|
|
145
|
+
import { LinesDrawer } from "../../engine-components-experimental/annotation/LineDrawer.ts";
|
|
146
|
+
import { LineInstanceHandler } from "../../engine-components-experimental/annotation/LinesManager.ts";
|
|
147
|
+
import { LinesManager } from "../../engine-components-experimental/annotation/LinesManager.ts";
|
|
148
|
+
import { PlayerSync } from "../../engine-components-experimental/networking/PlayerSync.ts";
|
|
149
|
+
import { PlayerState } from "../../engine-components-experimental/networking/PlayerSync.ts";
|
|
150
|
+
|
|
151
|
+
// Register types
|
|
152
|
+
TypeStore.add("AlignmentConstraint", AlignmentConstraint);
|
|
153
|
+
TypeStore.add("Animation", Animation);
|
|
154
|
+
TypeStore.add("AnimationCurve", AnimationCurve);
|
|
155
|
+
TypeStore.add("Animator", Animator);
|
|
156
|
+
TypeStore.add("AnimatorController", AnimatorController);
|
|
157
|
+
TypeStore.add("AudioListener", AudioListener);
|
|
158
|
+
TypeStore.add("AudioSource", AudioSource);
|
|
159
|
+
TypeStore.add("AvatarModel", AvatarModel);
|
|
160
|
+
TypeStore.add("AvatarLoader", AvatarLoader);
|
|
161
|
+
TypeStore.add("AxesHelper", AxesHelper);
|
|
162
|
+
TypeStore.add("BasicIKConstraint", BasicIKConstraint);
|
|
163
|
+
TypeStore.add("BoxHelperComponent", BoxHelperComponent);
|
|
164
|
+
TypeStore.add("Camera", Camera);
|
|
165
|
+
TypeStore.add("Collider", Collider);
|
|
166
|
+
TypeStore.add("SphereCollider", SphereCollider);
|
|
167
|
+
TypeStore.add("BoxCollider", BoxCollider);
|
|
168
|
+
TypeStore.add("InstantiateOptions", InstantiateOptions);
|
|
169
|
+
TypeStore.add("UnityObject", UnityObject);
|
|
170
|
+
TypeStore.add("DeleteBox", DeleteBox);
|
|
171
|
+
TypeStore.add("Deletable", Deletable);
|
|
172
|
+
TypeStore.add("DeviceFlag", DeviceFlag);
|
|
173
|
+
TypeStore.add("DragControls", DragControls);
|
|
174
|
+
TypeStore.add("DropListener", DropListener);
|
|
175
|
+
TypeStore.add("Duplicatable", Duplicatable);
|
|
176
|
+
TypeStore.add("CallInfo", CallInfo);
|
|
177
|
+
TypeStore.add("EventListEvent", EventListEvent);
|
|
178
|
+
TypeStore.add("EventList", EventList);
|
|
179
|
+
TypeStore.add("EventTrigger", EventTrigger);
|
|
180
|
+
TypeStore.add("FlyControls", FlyControls);
|
|
181
|
+
TypeStore.add("BoxGizmo", BoxGizmo);
|
|
182
|
+
TypeStore.add("GltfExportBox", GltfExportBox);
|
|
183
|
+
TypeStore.add("GltfExport", GltfExport);
|
|
184
|
+
TypeStore.add("GridHelper", GridHelper);
|
|
185
|
+
TypeStore.add("GroundProjectedEnv", GroundProjectedEnv);
|
|
186
|
+
TypeStore.add("Interactable", Interactable);
|
|
187
|
+
TypeStore.add("UsageMarker", UsageMarker);
|
|
188
|
+
TypeStore.add("Light", Light);
|
|
189
|
+
TypeStore.add("LODModel", LODModel);
|
|
190
|
+
TypeStore.add("LODGroup", LODGroup);
|
|
191
|
+
TypeStore.add("LookAtConstraint", LookAtConstraint);
|
|
192
|
+
TypeStore.add("MeshCollider", MeshCollider);
|
|
193
|
+
TypeStore.add("NavMesh", NavMesh);
|
|
194
|
+
TypeStore.add("NavMeshAgent", NavMeshAgent);
|
|
195
|
+
TypeStore.add("NestedGltf", NestedGltf);
|
|
196
|
+
TypeStore.add("Networking", Networking);
|
|
197
|
+
TypeStore.add("OffsetConstraint", OffsetConstraint);
|
|
198
|
+
TypeStore.add("OrbitControls", OrbitControls);
|
|
199
|
+
TypeStore.add("ParticleSystemRenderer", ParticleSystemRenderer);
|
|
200
|
+
TypeStore.add("ParticleSystem", ParticleSystem);
|
|
201
|
+
TypeStore.add("MainModule", MainModule);
|
|
202
|
+
TypeStore.add("EmissionModule", EmissionModule);
|
|
203
|
+
TypeStore.add("ShapeModule", ShapeModule);
|
|
204
|
+
TypeStore.add("PlayerColor", PlayerColor);
|
|
205
|
+
TypeStore.add("FieldWithDefault", FieldWithDefault);
|
|
206
|
+
TypeStore.add("Renderer", Renderer);
|
|
207
|
+
TypeStore.add("MeshRenderer", MeshRenderer);
|
|
208
|
+
TypeStore.add("SkinnedMeshRenderer", SkinnedMeshRenderer);
|
|
209
|
+
TypeStore.add("InstancingUtil", InstancingUtil);
|
|
210
|
+
TypeStore.add("RendererLightmap", RendererLightmap);
|
|
211
|
+
TypeStore.add("Rigidbody", Rigidbody);
|
|
212
|
+
TypeStore.add("ScreenCapture", ScreenCapture);
|
|
213
|
+
TypeStore.add("ShadowCatcher", ShadowCatcher);
|
|
214
|
+
TypeStore.add("RemoteSkybox", RemoteSkybox);
|
|
215
|
+
TypeStore.add("SmoothFollow", SmoothFollow);
|
|
216
|
+
TypeStore.add("SpatialTriggerReceiver", SpatialTriggerReceiver);
|
|
217
|
+
TypeStore.add("SpatialTrigger", SpatialTrigger);
|
|
218
|
+
TypeStore.add("SpectatorCamera", SpectatorCamera);
|
|
219
|
+
TypeStore.add("SpringJoint", SpringJoint);
|
|
220
|
+
TypeStore.add("Sprite", Sprite);
|
|
221
|
+
TypeStore.add("SpriteRenderer", SpriteRenderer);
|
|
222
|
+
TypeStore.add("SyncedCamera", SyncedCamera);
|
|
223
|
+
TypeStore.add("SyncedRoom", SyncedRoom);
|
|
224
|
+
TypeStore.add("SyncedTransform", SyncedTransform);
|
|
225
|
+
TypeStore.add("TestRunner", TestRunner);
|
|
226
|
+
TypeStore.add("TestSimulateUserData", TestSimulateUserData);
|
|
227
|
+
TypeStore.add("TransformGizmo", TransformGizmo);
|
|
228
|
+
TypeStore.add("VideoPlayer", VideoPlayer);
|
|
229
|
+
TypeStore.add("Voip", Voip);
|
|
230
|
+
TypeStore.add("VolumeParameter", VolumeParameter);
|
|
231
|
+
TypeStore.add("VolumeComponent", VolumeComponent);
|
|
232
|
+
TypeStore.add("ToneMapping", ToneMapping);
|
|
233
|
+
TypeStore.add("ColorAdjustments", ColorAdjustments);
|
|
234
|
+
TypeStore.add("VolumeProfile", VolumeProfile);
|
|
235
|
+
TypeStore.add("Volume", Volume);
|
|
236
|
+
TypeStore.add("WebARSessionRoot", WebARSessionRoot);
|
|
237
|
+
TypeStore.add("WebXR", WebXR);
|
|
238
|
+
TypeStore.add("WebAR", WebAR);
|
|
239
|
+
TypeStore.add("AvatarMarker", AvatarMarker);
|
|
240
|
+
TypeStore.add("WebXRAvatar", WebXRAvatar);
|
|
241
|
+
TypeStore.add("TeleportTarget", TeleportTarget);
|
|
242
|
+
TypeStore.add("WebXRController", WebXRController);
|
|
243
|
+
TypeStore.add("AttachedObject", AttachedObject);
|
|
244
|
+
TypeStore.add("XRGrabModel", XRGrabModel);
|
|
245
|
+
TypeStore.add("XRGrabRendering", XRGrabRendering);
|
|
246
|
+
TypeStore.add("XRRig", XRRig);
|
|
247
|
+
TypeStore.add("VRUserState", VRUserState);
|
|
248
|
+
TypeStore.add("WebXRSync", WebXRSync);
|
|
249
|
+
TypeStore.add("XRState", XRState);
|
|
250
|
+
TypeStore.add("XRFlag", XRFlag);
|
|
251
|
+
TypeStore.add("AvatarBlink_Simple", AvatarBlink_Simple);
|
|
252
|
+
TypeStore.add("AvatarEyeLook_Rotation", AvatarEyeLook_Rotation);
|
|
253
|
+
TypeStore.add("Avatar_POI", Avatar_POI);
|
|
254
|
+
TypeStore.add("Avatar_Brain_LookAt", Avatar_Brain_LookAt);
|
|
255
|
+
TypeStore.add("Avatar_MouthShapes", Avatar_MouthShapes);
|
|
256
|
+
TypeStore.add("Avatar_MustacheShake", Avatar_MustacheShake);
|
|
257
|
+
TypeStore.add("LogStats", LogStats);
|
|
258
|
+
TypeStore.add("RGBAColor", RGBAColor);
|
|
259
|
+
TypeStore.add("PlayableDirector", PlayableDirector);
|
|
260
|
+
TypeStore.add("SignalAsset", SignalAsset);
|
|
261
|
+
TypeStore.add("SignalReceiverEvent", SignalReceiverEvent);
|
|
262
|
+
TypeStore.add("SignalReceiver", SignalReceiver);
|
|
263
|
+
TypeStore.add("AnimationTrackHandler", AnimationTrackHandler);
|
|
264
|
+
TypeStore.add("AudioTrackHandler", AudioTrackHandler);
|
|
265
|
+
TypeStore.add("SignalTrackHandler", SignalTrackHandler);
|
|
266
|
+
TypeStore.add("ControlTrackHandler", ControlTrackHandler);
|
|
267
|
+
TypeStore.add("BaseUIComponent", BaseUIComponent);
|
|
268
|
+
TypeStore.add("UIRootComponent", UIRootComponent);
|
|
269
|
+
TypeStore.add("Button", Button);
|
|
270
|
+
TypeStore.add("Canvas", Canvas);
|
|
271
|
+
TypeStore.add("CanvasGroup", CanvasGroup);
|
|
272
|
+
TypeStore.add("EventSystem", EventSystem);
|
|
273
|
+
TypeStore.add("Graphic", Graphic);
|
|
274
|
+
TypeStore.add("MaskableGraphic", MaskableGraphic);
|
|
275
|
+
TypeStore.add("Image", Image);
|
|
276
|
+
TypeStore.add("RawImage", RawImage);
|
|
277
|
+
TypeStore.add("InputField", InputField);
|
|
278
|
+
TypeStore.add("Keyboard", Keyboard);
|
|
279
|
+
TypeStore.add("LayoutGroup", LayoutGroup);
|
|
280
|
+
TypeStore.add("VerticalLayoutGroup", VerticalLayoutGroup);
|
|
281
|
+
TypeStore.add("HorizontalLayoutGroup", HorizontalLayoutGroup);
|
|
282
|
+
TypeStore.add("GridLayoutGroup", GridLayoutGroup);
|
|
283
|
+
TypeStore.add("PointerEventData", PointerEventData);
|
|
284
|
+
TypeStore.add("Raycaster", Raycaster);
|
|
285
|
+
TypeStore.add("ObjectRaycaster", ObjectRaycaster);
|
|
286
|
+
TypeStore.add("GraphicRaycaster", GraphicRaycaster);
|
|
287
|
+
TypeStore.add("Size", Size);
|
|
288
|
+
TypeStore.add("Rect", Rect);
|
|
289
|
+
TypeStore.add("RectTransform", RectTransform);
|
|
290
|
+
TypeStore.add("SpatialHtml", SpatialHtml);
|
|
291
|
+
TypeStore.add("Text", Text);
|
|
292
|
+
TypeStore.add("PresentationMode", PresentationMode);
|
|
293
|
+
TypeStore.add("LinesDrawer", LinesDrawer);
|
|
294
|
+
TypeStore.add("LineInstanceHandler", LineInstanceHandler);
|
|
295
|
+
TypeStore.add("LinesManager", LinesManager);
|
|
296
|
+
TypeStore.add("PlayerSync", PlayerSync);
|
|
297
|
+
TypeStore.add("PlayerState", PlayerState);
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import { getParam } from "../engine_utils";
|
|
2
|
+
import { isLocalNetwork } from "../engine_networking_utils";
|
|
3
|
+
import { Context } from "../engine_setup";
|
|
4
|
+
|
|
5
|
+
const debug = getParam("debugdebug");
|
|
6
|
+
const hide = getParam("noerrors");
|
|
7
|
+
|
|
8
|
+
const errorContainer: Map<HTMLElement, HTMLElement> = new Map();
|
|
9
|
+
const locationRegex = new RegExp(" at .+\/(.+?\.ts)", "g");
|
|
10
|
+
|
|
11
|
+
enum LogType {
|
|
12
|
+
Log,
|
|
13
|
+
Warn,
|
|
14
|
+
Error
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export function makeErrorsVisibleForDevelopment() {
|
|
18
|
+
if (hide) return;
|
|
19
|
+
if (isLocalNetwork()) {
|
|
20
|
+
if (debug)
|
|
21
|
+
console.log(window.location.hostname);
|
|
22
|
+
const error = console.error;
|
|
23
|
+
console.error = (...args: any[]) => {
|
|
24
|
+
error.apply(console, args);
|
|
25
|
+
handleLog(LogType.Error, args, null, null);
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
window.addEventListener("error", (event) => {
|
|
29
|
+
if (!event) return;
|
|
30
|
+
handleLog(LogType.Error, event.error, event.filename, event.lineno);
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
function handleLog(type: LogType, message: string | any[], _file: string | null, _line: number | null) {
|
|
38
|
+
|
|
39
|
+
const context = Context.Current;
|
|
40
|
+
if (!context) return;
|
|
41
|
+
if (type === LogType.Error) {
|
|
42
|
+
if (Array.isArray(message)) {
|
|
43
|
+
message = message.join(" ");
|
|
44
|
+
}
|
|
45
|
+
appendErrorMessageToDomElement(context.domElement, message);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
function getLocation(err: Error): string {
|
|
52
|
+
const location = err.stack;
|
|
53
|
+
console.log(location);
|
|
54
|
+
if (location) {
|
|
55
|
+
locationRegex.exec(location);
|
|
56
|
+
const match = locationRegex.exec(location);
|
|
57
|
+
return match ? match[1] : "";
|
|
58
|
+
}
|
|
59
|
+
return "";
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
function getErrorContainer(domElement: HTMLElement): HTMLElement {
|
|
65
|
+
if (errorContainer.has(domElement)) {
|
|
66
|
+
return errorContainer.get(domElement)!;
|
|
67
|
+
} else {
|
|
68
|
+
const container = document.createElement("div");
|
|
69
|
+
container.style.position = "absolute";
|
|
70
|
+
container.style.top = "0";
|
|
71
|
+
container.style.left = "0";
|
|
72
|
+
container.style.margin = "5px";
|
|
73
|
+
container.style.width = "calc(100% - 10px)";
|
|
74
|
+
container.style.zIndex = "1000";
|
|
75
|
+
container.style.pointerEvents = "none";
|
|
76
|
+
container.style.display = "flex";
|
|
77
|
+
container.style.alignItems = "end";
|
|
78
|
+
container.style.flexDirection = "column";
|
|
79
|
+
container.style.color = "white";
|
|
80
|
+
container.style.overflow = "auto";
|
|
81
|
+
domElement.appendChild(container);
|
|
82
|
+
errorContainer.set(domElement, container);
|
|
83
|
+
return container;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
function appendErrorMessageToDomElement(element: HTMLElement, msg: string, location?: string) {
|
|
89
|
+
const container = getErrorContainer(element);
|
|
90
|
+
if (container.childElementCount >= 5) {
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
const errorElement = document.createElement("div");
|
|
94
|
+
container.appendChild(errorElement);
|
|
95
|
+
errorElement.style.display = "flex";
|
|
96
|
+
errorElement.style.alignItems = "start";
|
|
97
|
+
errorElement.style.flexDirection = "row";
|
|
98
|
+
// errorElement.style.justifyContent = "space-between";
|
|
99
|
+
// errorElement.style.width = "100%";
|
|
100
|
+
errorElement.style.padding = ".2em";
|
|
101
|
+
errorElement.style.backgroundColor = "rgba(0,0,0,1)";
|
|
102
|
+
errorElement.style.marginBottom = "2px";
|
|
103
|
+
errorElement.style.borderRadius = "8px";
|
|
104
|
+
errorElement.style.color = "#ff5555";
|
|
105
|
+
errorElement.style.fontWeight = "bold";
|
|
106
|
+
errorElement.title = "Open developer console to debug";
|
|
107
|
+
errorElement.style.pointerEvents = "all";
|
|
108
|
+
errorElement.style.userSelect = "text";
|
|
109
|
+
|
|
110
|
+
const messageElement = document.createElement("div");
|
|
111
|
+
const locationElement = document.createElement("div");
|
|
112
|
+
errorElement.appendChild(messageElement);
|
|
113
|
+
errorElement.appendChild(locationElement);
|
|
114
|
+
if (msg.length > 200) {
|
|
115
|
+
msg = msg.substring(0, 200) + "...";
|
|
116
|
+
}
|
|
117
|
+
messageElement.innerText = msg;// "Javascript error: please open the browser developer console to debug";// + msg;
|
|
118
|
+
locationElement.innerText = location || "";
|
|
119
|
+
setTimeout(() => {
|
|
120
|
+
container.removeChild(errorElement);
|
|
121
|
+
}, 10000);
|
|
122
|
+
}
|