@relu-interactives/spatial-ecs 0.3.17 → 0.3.18
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/dist/{XRHandPose-LR4EhboN.d.cts → XRHandPose-B8xxFb9A.d.cts} +12 -0
- package/dist/{XRHandPose-SZ7ou63b.d.ts → XRHandPose-ubMe5Igc.d.ts} +12 -0
- package/dist/{chunk-CE2CPZSP.js → chunk-7SSOZWXM.js} +113 -35
- package/dist/chunk-7SSOZWXM.js.map +1 -0
- package/dist/{chunk-3LDQ4GVZ.js → chunk-J3EUNW57.js} +5 -2
- package/dist/chunk-J3EUNW57.js.map +1 -0
- package/dist/{chunk-UHJ4MDIM.js → chunk-KRWBNC6Y.js} +4 -4
- package/dist/{chunk-UHJ4MDIM.js.map → chunk-KRWBNC6Y.js.map} +1 -1
- package/dist/{chunk-PNQ7HDQC.js → chunk-PFE2SDXR.js} +3 -3
- package/dist/{chunk-PNQ7HDQC.js.map → chunk-PFE2SDXR.js.map} +1 -1
- package/dist/components/index.cjs +3 -0
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.d.cts +2 -2
- package/dist/components/index.d.ts +2 -2
- package/dist/components/index.js +1 -1
- package/dist/docs/guide/vr-and-hand-poses.md +1 -1
- package/dist/factories/index.cjs +3 -0
- package/dist/factories/index.cjs.map +1 -1
- package/dist/factories/index.d.cts +1 -1
- package/dist/factories/index.d.ts +1 -1
- package/dist/factories/index.js +3 -3
- package/dist/{index-ekS4iypo.d.cts → index-7CFf45fo.d.cts} +22 -1
- package/dist/{index-BL5EWkwY.d.cts → index-CA9fqh4Z.d.cts} +1 -1
- package/dist/{index-uKFxVCmr.d.ts → index-D7aSZ-e9.d.ts} +22 -1
- package/dist/{index-ByiUoIoh.d.ts → index-DhWfxUgL.d.ts} +1 -1
- package/dist/index.cjs +112 -31
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5 -5
- package/dist/index.d.ts +5 -5
- package/dist/index.js +8 -8
- package/dist/systems/index.cjs +112 -31
- package/dist/systems/index.cjs.map +1 -1
- package/dist/systems/index.d.cts +1 -1
- package/dist/systems/index.d.ts +1 -1
- package/dist/systems/index.js +3 -3
- package/package.json +1 -1
- package/dist/chunk-3LDQ4GVZ.js.map +0 -1
- package/dist/chunk-CE2CPZSP.js.map +0 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { k as EcsSystem, C as Component, W as WorldEntityView, T as TransformComponent, l as World, S as SpawnPrefabSource, m as SpawnPrefabOptions, n as ComponentClass, o as ParentLookup, p as EcsEntityKind, O as ObjectManagementSystem, q as SubtreeSnapshot, r as EntityId, s as ExternalRefWarning } from './System-BhnLw0fZ.cjs';
|
|
2
2
|
export { A as AssetInput, t as CheckboxInput, u as ColorInput, v as ComponentFactory, w as ComponentInput, x as ComponentKind, y as DropdownInput, z as DropdownOption, B as EcsComponentFactoryKind, F as EcsEntityEditorKind, G as EntityInput, H as FloatInput, I as InputSystem, J as IntersectionResult, K as KeyboardKey, L as KeyboardKeys, M as MouseButton, N as PREFAB_FILE_VERSION, Q as PREFAB_FILE_VERSION_NESTED, R as PrefabAsset, U as RemapSnapshotOptions, X as RenderSystem, Y as SelectionListener, Z as SliderInput, _ as TextInput, $ as ToggleInput, a0 as TransformSyncSystem, a1 as Vec3, a2 as Vector2Input, a3 as Vector3Input, a4 as clearPrefabCache, a5 as despawnPrefab, a6 as loadPrefab, a7 as parsePrefabAsset, a8 as prefabFileVersionFor, a9 as remapSnapshotEntityIds, aa as setPrefabAssetUrlResolver, ab as spawnPrefab } from './System-BhnLw0fZ.cjs';
|
|
3
3
|
import * as THREE from 'three';
|
|
4
|
-
import { O as Object3DRef, an as XrHandPreset } from './XRHandPose-
|
|
5
|
-
export { az as AnimationStateCallbacks, aA as AnimationStateMachine, aB as AnimationStateManager, aC as StateMachine } from './XRHandPose-
|
|
6
|
-
import { X as XrCapabilities, a as XrInputState, b as XrHandPoseEventDetail } from './index-
|
|
7
|
-
export { A as AnimationSystem, c as AudioSystem, C as CameraSyncSystem, E as EnvironmentSyncSystem, I as InstancedMeshSystem, L as LightSyncSystem, M as MaterialSyncSystem, d as MeshGeometrySystem, e as ModuleLoader, N as NO_XR_CAPABILITIES, O as ObjectVisibilitySystem, P as PhysicsSyncSystem, f as PostprocessingSyncSystem, S as SCRIPT_OBJECT_ROOT_FLAG, g as ScriptBehaviourSystem, h as ScriptObjectSystem, i as SelectionContext, V as VRTeleportAreaSystem, j as VideoSystem, k as XRControllerVisualSystem, l as XRHandPoseSystem, m as XRHoverVisualSystem, n as XRInputSystem, o as XRInteractionSystem, p as XRLocomotionSystem, q as XRSessionSystem, r as XRTeleportVisualSystem, s as XR_HOVER_SHELL_FLAG, t as XrHandedness, u as XrInputKind, v as readXrCapabilities } from './index-
|
|
8
|
-
export { i as CoreComponents } from './index-
|
|
4
|
+
import { O as Object3DRef, an as XrHandPreset } from './XRHandPose-B8xxFb9A.cjs';
|
|
5
|
+
export { az as AnimationStateCallbacks, aA as AnimationStateMachine, aB as AnimationStateManager, aC as StateMachine } from './XRHandPose-B8xxFb9A.cjs';
|
|
6
|
+
import { X as XrCapabilities, a as XrInputState, b as XrHandPoseEventDetail } from './index-7CFf45fo.cjs';
|
|
7
|
+
export { A as AnimationSystem, c as AudioSystem, C as CameraSyncSystem, E as EnvironmentSyncSystem, I as InstancedMeshSystem, L as LightSyncSystem, M as MaterialSyncSystem, d as MeshGeometrySystem, e as ModuleLoader, N as NO_XR_CAPABILITIES, O as ObjectVisibilitySystem, P as PhysicsSyncSystem, f as PostprocessingSyncSystem, S as SCRIPT_OBJECT_ROOT_FLAG, g as ScriptBehaviourSystem, h as ScriptObjectSystem, i as SelectionContext, V as VRTeleportAreaSystem, j as VideoSystem, k as XRControllerVisualSystem, l as XRHandPoseSystem, m as XRHoverVisualSystem, n as XRInputSystem, o as XRInteractionSystem, p as XRLocomotionSystem, q as XRSessionSystem, r as XRTeleportVisualSystem, s as XR_HOVER_SHELL_FLAG, t as XrHandedness, u as XrInputKind, v as readXrCapabilities } from './index-7CFf45fo.cjs';
|
|
8
|
+
export { i as CoreComponents } from './index-CA9fqh4Z.cjs';
|
|
9
9
|
export { createAnimationComponent, createAudioComponent, createCameraComponent, createEntityTypeComponent, createEnvironmentComponent, createImageComponent, createImageTargetAnchorComponent, createImageTargetComponent, createInstanceSlotComponent, createInstancedMeshComponent, createLightComponent, createMaterialComponent, createMeshComponent, createMeshGeometryComponent, createModelComponent, createNameComponent, createObject3DRefComponent, createParentIdComponent, createPhysicsComponent, createPostprocessingComponent, createScriptComponent, createScriptObjectComponent, createSelectableComponent, createSelectionTransformStateComponent, createSpriteComponent, createTransformComponent, createVRTeleportAreaComponent, createVideoComponent, createXRHandPoseComponent, createXRInteractableComponent, createXRInteractorComponent, createXRInteractorSideComponent, createXRRigComponent, registerDefaultComponentFactories, registerDefaultFactories } from './factories/index.cjs';
|
|
10
10
|
import { GLTF } from 'three/examples/jsm/loaders/GLTFLoader.js';
|
|
11
11
|
import { X as XrHandPoseDefinition, a as XrFinger, b as XrHandPoseOrientation } from './handPose-dFxqbFFY.cjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { k as EcsSystem, C as Component, W as WorldEntityView, T as TransformComponent, l as World, S as SpawnPrefabSource, m as SpawnPrefabOptions, n as ComponentClass, o as ParentLookup, p as EcsEntityKind, O as ObjectManagementSystem, q as SubtreeSnapshot, r as EntityId, s as ExternalRefWarning } from './System-BhnLw0fZ.js';
|
|
2
2
|
export { A as AssetInput, t as CheckboxInput, u as ColorInput, v as ComponentFactory, w as ComponentInput, x as ComponentKind, y as DropdownInput, z as DropdownOption, B as EcsComponentFactoryKind, F as EcsEntityEditorKind, G as EntityInput, H as FloatInput, I as InputSystem, J as IntersectionResult, K as KeyboardKey, L as KeyboardKeys, M as MouseButton, N as PREFAB_FILE_VERSION, Q as PREFAB_FILE_VERSION_NESTED, R as PrefabAsset, U as RemapSnapshotOptions, X as RenderSystem, Y as SelectionListener, Z as SliderInput, _ as TextInput, $ as ToggleInput, a0 as TransformSyncSystem, a1 as Vec3, a2 as Vector2Input, a3 as Vector3Input, a4 as clearPrefabCache, a5 as despawnPrefab, a6 as loadPrefab, a7 as parsePrefabAsset, a8 as prefabFileVersionFor, a9 as remapSnapshotEntityIds, aa as setPrefabAssetUrlResolver, ab as spawnPrefab } from './System-BhnLw0fZ.js';
|
|
3
3
|
import * as THREE from 'three';
|
|
4
|
-
import { O as Object3DRef, an as XrHandPreset } from './XRHandPose-
|
|
5
|
-
export { az as AnimationStateCallbacks, aA as AnimationStateMachine, aB as AnimationStateManager, aC as StateMachine } from './XRHandPose-
|
|
6
|
-
import { X as XrCapabilities, a as XrInputState, b as XrHandPoseEventDetail } from './index-
|
|
7
|
-
export { A as AnimationSystem, c as AudioSystem, C as CameraSyncSystem, E as EnvironmentSyncSystem, I as InstancedMeshSystem, L as LightSyncSystem, M as MaterialSyncSystem, d as MeshGeometrySystem, e as ModuleLoader, N as NO_XR_CAPABILITIES, O as ObjectVisibilitySystem, P as PhysicsSyncSystem, f as PostprocessingSyncSystem, S as SCRIPT_OBJECT_ROOT_FLAG, g as ScriptBehaviourSystem, h as ScriptObjectSystem, i as SelectionContext, V as VRTeleportAreaSystem, j as VideoSystem, k as XRControllerVisualSystem, l as XRHandPoseSystem, m as XRHoverVisualSystem, n as XRInputSystem, o as XRInteractionSystem, p as XRLocomotionSystem, q as XRSessionSystem, r as XRTeleportVisualSystem, s as XR_HOVER_SHELL_FLAG, t as XrHandedness, u as XrInputKind, v as readXrCapabilities } from './index-
|
|
8
|
-
export { i as CoreComponents } from './index-
|
|
4
|
+
import { O as Object3DRef, an as XrHandPreset } from './XRHandPose-ubMe5Igc.js';
|
|
5
|
+
export { az as AnimationStateCallbacks, aA as AnimationStateMachine, aB as AnimationStateManager, aC as StateMachine } from './XRHandPose-ubMe5Igc.js';
|
|
6
|
+
import { X as XrCapabilities, a as XrInputState, b as XrHandPoseEventDetail } from './index-D7aSZ-e9.js';
|
|
7
|
+
export { A as AnimationSystem, c as AudioSystem, C as CameraSyncSystem, E as EnvironmentSyncSystem, I as InstancedMeshSystem, L as LightSyncSystem, M as MaterialSyncSystem, d as MeshGeometrySystem, e as ModuleLoader, N as NO_XR_CAPABILITIES, O as ObjectVisibilitySystem, P as PhysicsSyncSystem, f as PostprocessingSyncSystem, S as SCRIPT_OBJECT_ROOT_FLAG, g as ScriptBehaviourSystem, h as ScriptObjectSystem, i as SelectionContext, V as VRTeleportAreaSystem, j as VideoSystem, k as XRControllerVisualSystem, l as XRHandPoseSystem, m as XRHoverVisualSystem, n as XRInputSystem, o as XRInteractionSystem, p as XRLocomotionSystem, q as XRSessionSystem, r as XRTeleportVisualSystem, s as XR_HOVER_SHELL_FLAG, t as XrHandedness, u as XrInputKind, v as readXrCapabilities } from './index-D7aSZ-e9.js';
|
|
8
|
+
export { i as CoreComponents } from './index-DhWfxUgL.js';
|
|
9
9
|
export { createAnimationComponent, createAudioComponent, createCameraComponent, createEntityTypeComponent, createEnvironmentComponent, createImageComponent, createImageTargetAnchorComponent, createImageTargetComponent, createInstanceSlotComponent, createInstancedMeshComponent, createLightComponent, createMaterialComponent, createMeshComponent, createMeshGeometryComponent, createModelComponent, createNameComponent, createObject3DRefComponent, createParentIdComponent, createPhysicsComponent, createPostprocessingComponent, createScriptComponent, createScriptObjectComponent, createSelectableComponent, createSelectionTransformStateComponent, createSpriteComponent, createTransformComponent, createVRTeleportAreaComponent, createVideoComponent, createXRHandPoseComponent, createXRInteractableComponent, createXRInteractorComponent, createXRInteractorSideComponent, createXRRigComponent, registerDefaultComponentFactories, registerDefaultFactories } from './factories/index.js';
|
|
10
10
|
import { GLTF } from 'three/examples/jsm/loaders/GLTFLoader.js';
|
|
11
11
|
import { X as XrHandPoseDefinition, a as XrFinger, b as XrHandPoseOrientation } from './handPose-dFxqbFFY.js';
|
package/dist/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { MeshGeometrySystem, InstancedMeshSystem, EnvironmentSyncSystem, PostprocessingSyncSystem, LightSyncSystem, MaterialSyncSystem, VRTeleportAreaSystem, PhysicsSyncSystem, AnimationSystem, AudioSystem, VideoSystem, CameraSyncSystem, TransformSyncSystem, ObjectVisibilitySystem, RenderSystem, spawnPrefab, despawnPrefab, buildNodeKeyMapsFromSnapshot, indexSnapshotByEntity, findTopLevelNestedRegions, collectSnapshotSubtreeIds, groupOverridePaths, OVERRIDE_DIFF_EXCLUDED_COMPONENTS, OVERRIDE_ROOT_EXCLUDED_COMPONENTS, canonicalizeComponentValue, mergeComponentValue, decanonicalizeComponentValue, computeInstanceOverrides, collectEntitySubtree, ADDED_NODE_MARKER_COMPONENT } from './chunk-
|
|
2
|
-
export { ADDED_NODE_MARKER_COMPONENT, ARC_GRAVITY, ARC_MAX_TIME, ARC_SPEED, ARC_STEPS, AnimationSystem, AudioSystem, Behaviour, CURLED_COS, CameraSyncSystem, DEFAULT_ENTER_CONFIDENCE, DEFAULT_EXIT_CONFIDENCE, DEFAULT_LOST_GRACE_SECONDS, DEFAULT_MIN_HOLD_SECONDS, EnvironmentSyncSystem, FALLBACK_HAND_SCALE, HYDRATABLE_ENTITY_KINDS, HandPoseTracker, InputSystem, InstancedMeshSystem, KeyboardKeys, LightSyncSystem, MATCH_FALLOFF, MAX_PLAUSIBLE_SPEED, MAX_SAMPLE_AGE_SECONDS, MaterialSyncSystem, MeshGeometrySystem, NODE_KEY_SEPARATOR, NO_XR_CAPABILITIES, OVERRIDE_DIFF_EXCLUDED_COMPONENTS, OVERRIDE_ROOT_EXCLUDED_COMPONENTS, ObjectVisibilitySystem, PINCH_FINGERS, PREFAB_FILE_VERSION, PREFAB_FILE_VERSION_NESTED, PhysicsSyncSystem, PostprocessingSyncSystem, RenderSystem, SCRIPT_OBJECT_ROOT_FLAG, STRAIGHT_COS, ScriptBehaviourSystem, ScriptObject, ScriptObjectSystem, TeleportAimGate, ThrowVelocityTracker, TransformSyncSystem, VELOCITY_SAMPLES, VRTeleportAreaSystem, VideoSystem, XRControllerVisualSystem, XRHandPoseSystem, XRHoverVisualSystem, XRInputSystem, XRInteractionSystem, XRLocomotionSystem, XRSessionSystem, XRTeleportVisualSystem, XR_FINGERS, XR_HOVER_SHELL_FLAG, angularVelocityFrom, applyHandMaterial, arcGroundCrossing, buildComponentValueMaps, buildNodeKeyMapsFromSnapshot, buildNodeMapsFromSnapshot, canonicalizeComponentValue, clearPrefabCache, collectDiffPaths, collectEntitySubtree, collectSnapshotSubtreeIds, computeFingerCurl, computeHandShape, computeInstanceOverrides, computePalmPose, computePalmWidth, computePinch, computeSpread, createHandMaterial, decanonicalizeComponentValue, despawnPrefab, encodeOverride, estimateHandScale, findSnapshotRootEntityIds, findTopLevelNestedRegions, groupOverridePaths, hydrateWorldFromSnapshot, hydrateWorldFromSnapshotDetailed, indexSnapshotByEntity, instantiateSubtree, loadPrefab, matchHandPose, mergeComponentValue, parseOverride, parsePrefabAsset, prefabFileVersionFor, readXrCapabilities, restoreComponentState, restorePostCreateComponents, sampleTeleportArc, setPrefabAssetUrlResolver, spawnPrefab } from './chunk-
|
|
3
|
-
import { registerDefaultFactories } from './chunk-
|
|
4
|
-
export { createAnimationComponent, createAudioComponent, createCameraComponent, createEntityTypeComponent, createEnvironmentComponent, createImageComponent, createImageTargetAnchorComponent, createImageTargetComponent, createInstanceSlotComponent, createInstancedMeshComponent, createLightComponent, createMaterialComponent, createMeshComponent, createMeshGeometryComponent, createModelComponent, createNameComponent, createObject3DRefComponent, createParentIdComponent, createPhysicsComponent, createPostprocessingComponent, createScriptComponent, createScriptObjectComponent, createSelectableComponent, createSelectionTransformStateComponent, createSpriteComponent, createTransformComponent, createVRTeleportAreaComponent, createVideoComponent, createXRHandPoseComponent, createXRInteractableComponent, createXRInteractorComponent, createXRInteractorSideComponent, createXRRigComponent, registerDefaultComponentFactories, registerDefaultFactories } from './chunk-
|
|
5
|
-
import { ObjectManagementSystem } from './chunk-
|
|
6
|
-
export { ObjectManagementSystem, SHARED_MODEL_RESOURCE_FLAG, clearModelCache, loadSharedGltf, resolveDracoDecoderPath, setDracoDecoderPath } from './chunk-
|
|
7
|
-
import { SelectionTransformState, Object3DRef, Name, EntityType, ParentId, Environment, Postprocessing, ScriptComponent } from './chunk-
|
|
8
|
-
export { AnimationStateMachine, AnimationStateManager, components_exports as CoreComponents, HAND_POSE_PRESETS, HAND_POSE_PRESET_IDS, cloneHandPose, getHandPosePreset, handPoseFromCurls } from './chunk-
|
|
1
|
+
import { MeshGeometrySystem, InstancedMeshSystem, EnvironmentSyncSystem, PostprocessingSyncSystem, LightSyncSystem, MaterialSyncSystem, VRTeleportAreaSystem, PhysicsSyncSystem, AnimationSystem, AudioSystem, VideoSystem, CameraSyncSystem, TransformSyncSystem, ObjectVisibilitySystem, RenderSystem, spawnPrefab, despawnPrefab, buildNodeKeyMapsFromSnapshot, indexSnapshotByEntity, findTopLevelNestedRegions, collectSnapshotSubtreeIds, groupOverridePaths, OVERRIDE_DIFF_EXCLUDED_COMPONENTS, OVERRIDE_ROOT_EXCLUDED_COMPONENTS, canonicalizeComponentValue, mergeComponentValue, decanonicalizeComponentValue, computeInstanceOverrides, collectEntitySubtree, ADDED_NODE_MARKER_COMPONENT } from './chunk-7SSOZWXM.js';
|
|
2
|
+
export { ADDED_NODE_MARKER_COMPONENT, ARC_GRAVITY, ARC_MAX_TIME, ARC_SPEED, ARC_STEPS, AnimationSystem, AudioSystem, Behaviour, CURLED_COS, CameraSyncSystem, DEFAULT_ENTER_CONFIDENCE, DEFAULT_EXIT_CONFIDENCE, DEFAULT_LOST_GRACE_SECONDS, DEFAULT_MIN_HOLD_SECONDS, EnvironmentSyncSystem, FALLBACK_HAND_SCALE, HYDRATABLE_ENTITY_KINDS, HandPoseTracker, InputSystem, InstancedMeshSystem, KeyboardKeys, LightSyncSystem, MATCH_FALLOFF, MAX_PLAUSIBLE_SPEED, MAX_SAMPLE_AGE_SECONDS, MaterialSyncSystem, MeshGeometrySystem, NODE_KEY_SEPARATOR, NO_XR_CAPABILITIES, OVERRIDE_DIFF_EXCLUDED_COMPONENTS, OVERRIDE_ROOT_EXCLUDED_COMPONENTS, ObjectVisibilitySystem, PINCH_FINGERS, PREFAB_FILE_VERSION, PREFAB_FILE_VERSION_NESTED, PhysicsSyncSystem, PostprocessingSyncSystem, RenderSystem, SCRIPT_OBJECT_ROOT_FLAG, STRAIGHT_COS, ScriptBehaviourSystem, ScriptObject, ScriptObjectSystem, TeleportAimGate, ThrowVelocityTracker, TransformSyncSystem, VELOCITY_SAMPLES, VRTeleportAreaSystem, VideoSystem, XRControllerVisualSystem, XRHandPoseSystem, XRHoverVisualSystem, XRInputSystem, XRInteractionSystem, XRLocomotionSystem, XRSessionSystem, XRTeleportVisualSystem, XR_FINGERS, XR_HOVER_SHELL_FLAG, angularVelocityFrom, applyHandMaterial, arcGroundCrossing, buildComponentValueMaps, buildNodeKeyMapsFromSnapshot, buildNodeMapsFromSnapshot, canonicalizeComponentValue, clearPrefabCache, collectDiffPaths, collectEntitySubtree, collectSnapshotSubtreeIds, computeFingerCurl, computeHandShape, computeInstanceOverrides, computePalmPose, computePalmWidth, computePinch, computeSpread, createHandMaterial, decanonicalizeComponentValue, despawnPrefab, encodeOverride, estimateHandScale, findSnapshotRootEntityIds, findTopLevelNestedRegions, groupOverridePaths, hydrateWorldFromSnapshot, hydrateWorldFromSnapshotDetailed, indexSnapshotByEntity, instantiateSubtree, loadPrefab, matchHandPose, mergeComponentValue, parseOverride, parsePrefabAsset, prefabFileVersionFor, readXrCapabilities, restoreComponentState, restorePostCreateComponents, sampleTeleportArc, setPrefabAssetUrlResolver, spawnPrefab } from './chunk-7SSOZWXM.js';
|
|
3
|
+
import { registerDefaultFactories } from './chunk-KRWBNC6Y.js';
|
|
4
|
+
export { createAnimationComponent, createAudioComponent, createCameraComponent, createEntityTypeComponent, createEnvironmentComponent, createImageComponent, createImageTargetAnchorComponent, createImageTargetComponent, createInstanceSlotComponent, createInstancedMeshComponent, createLightComponent, createMaterialComponent, createMeshComponent, createMeshGeometryComponent, createModelComponent, createNameComponent, createObject3DRefComponent, createParentIdComponent, createPhysicsComponent, createPostprocessingComponent, createScriptComponent, createScriptObjectComponent, createSelectableComponent, createSelectionTransformStateComponent, createSpriteComponent, createTransformComponent, createVRTeleportAreaComponent, createVideoComponent, createXRHandPoseComponent, createXRInteractableComponent, createXRInteractorComponent, createXRInteractorSideComponent, createXRRigComponent, registerDefaultComponentFactories, registerDefaultFactories } from './chunk-KRWBNC6Y.js';
|
|
5
|
+
import { ObjectManagementSystem } from './chunk-PFE2SDXR.js';
|
|
6
|
+
export { ObjectManagementSystem, SHARED_MODEL_RESOURCE_FLAG, clearModelCache, loadSharedGltf, resolveDracoDecoderPath, setDracoDecoderPath } from './chunk-PFE2SDXR.js';
|
|
7
|
+
import { SelectionTransformState, Object3DRef, Name, EntityType, ParentId, Environment, Postprocessing, ScriptComponent } from './chunk-J3EUNW57.js';
|
|
8
|
+
export { AnimationStateMachine, AnimationStateManager, components_exports as CoreComponents, HAND_POSE_PRESETS, HAND_POSE_PRESET_IDS, cloneHandPose, getHandPosePreset, handPoseFromCurls } from './chunk-J3EUNW57.js';
|
|
9
9
|
import './chunk-QHILSPT4.js';
|
|
10
10
|
import { normalizeDebugValue, DEBUG_CHANGE_IGNORED_SYSTEMS, cloneHistoryValue } from './chunk-OWQSESTO.js';
|
|
11
11
|
import { __name } from './chunk-OY7ZODZP.js';
|
package/dist/systems/index.cjs
CHANGED
|
@@ -2151,6 +2151,9 @@ var _XRRigComponent = class _XRRigComponent extends Component {
|
|
|
2151
2151
|
this.snapTurn = options?.snapTurn ?? true;
|
|
2152
2152
|
this.snapTurnDegrees = options?.snapTurnDegrees ?? 30;
|
|
2153
2153
|
this.fallbackEyeHeight = options?.fallbackEyeHeight ?? 1.6;
|
|
2154
|
+
this.teleportArcColor = options?.teleportArcColor ?? "#4da3ff";
|
|
2155
|
+
this.teleportArcInvalidColor = options?.teleportArcInvalidColor ?? "#ff5a5a";
|
|
2156
|
+
this.teleportArcThickness = options?.teleportArcThickness ?? 0.012;
|
|
2154
2157
|
}
|
|
2155
2158
|
};
|
|
2156
2159
|
__name(_XRRigComponent, "XRRigComponent");
|
|
@@ -5361,6 +5364,15 @@ function restorePostCreateComponents(world, objectManagementSystem, targetEntity
|
|
|
5361
5364
|
if (typeof sourceXrRig.snapTurnDegrees === "number") {
|
|
5362
5365
|
rig.snapTurnDegrees = sourceXrRig.snapTurnDegrees;
|
|
5363
5366
|
}
|
|
5367
|
+
if (typeof sourceXrRig.teleportArcColor === "string") {
|
|
5368
|
+
rig.teleportArcColor = sourceXrRig.teleportArcColor;
|
|
5369
|
+
}
|
|
5370
|
+
if (typeof sourceXrRig.teleportArcInvalidColor === "string") {
|
|
5371
|
+
rig.teleportArcInvalidColor = sourceXrRig.teleportArcInvalidColor;
|
|
5372
|
+
}
|
|
5373
|
+
if (typeof sourceXrRig.teleportArcThickness === "number") {
|
|
5374
|
+
rig.teleportArcThickness = sourceXrRig.teleportArcThickness;
|
|
5375
|
+
}
|
|
5364
5376
|
if (typeof sourceXrRig.fallbackEyeHeight === "number") {
|
|
5365
5377
|
rig.fallbackEyeHeight = sourceXrRig.fallbackEyeHeight;
|
|
5366
5378
|
}
|
|
@@ -9933,24 +9945,33 @@ __name(_XRControllerVisualSystem, "XRControllerVisualSystem");
|
|
|
9933
9945
|
var XRControllerVisualSystem = _XRControllerVisualSystem;
|
|
9934
9946
|
var MARKER_RADIUS = 0.28;
|
|
9935
9947
|
var ACCENT = new THREE26__namespace.Color("#4da3ff");
|
|
9936
|
-
var
|
|
9948
|
+
var SEGMENT_AXIS = new THREE26__namespace.Vector3(0, 1, 0);
|
|
9949
|
+
var HEAD_CLEARANCE = 0.25;
|
|
9937
9950
|
var _XRTeleportVisualSystem = class _XRTeleportVisualSystem {
|
|
9938
9951
|
constructor(locomotionSystem) {
|
|
9939
9952
|
this.group = new THREE26__namespace.Group();
|
|
9940
|
-
|
|
9953
|
+
/** Holds the segment chain that draws the arc. */
|
|
9954
|
+
this.arc = new THREE26__namespace.Group();
|
|
9955
|
+
/**
|
|
9956
|
+
* Unit cylinder along +Y, reused by every segment.
|
|
9957
|
+
*
|
|
9958
|
+
* The arc was a `THREE.Line`, which WebGL always renders one pixel wide —
|
|
9959
|
+
* effectively invisible on a headset, and not thickenable at all. A chain of
|
|
9960
|
+
* scaled cylinders gives real thickness while rebuilding no geometry: each
|
|
9961
|
+
* frame only moves, rotates and scales meshes that already exist.
|
|
9962
|
+
*/
|
|
9963
|
+
this.segmentGeometry = new THREE26__namespace.CylinderGeometry(1, 1, 1, 6, 1);
|
|
9964
|
+
this.segments = [];
|
|
9941
9965
|
this.marker = new THREE26__namespace.Group();
|
|
9942
9966
|
this.attached = false;
|
|
9967
|
+
this.scratchDirection = new THREE26__namespace.Vector3();
|
|
9968
|
+
this.scratchHead = new THREE26__namespace.Vector3();
|
|
9969
|
+
this.validColor = new THREE26__namespace.Color();
|
|
9970
|
+
this.invalidColor = new THREE26__namespace.Color();
|
|
9943
9971
|
this.locomotionSystem = locomotionSystem;
|
|
9944
9972
|
this.group.name = "XRTeleportVisuals";
|
|
9945
9973
|
this.group.userData.ecsPreviewHidden = true;
|
|
9946
|
-
|
|
9947
|
-
vertexColors: true,
|
|
9948
|
-
transparent: true,
|
|
9949
|
-
depthTest: false
|
|
9950
|
-
});
|
|
9951
|
-
this.arc = new THREE26__namespace.Line(this.arcGeometry, arcMaterial);
|
|
9952
|
-
this.arc.frustumCulled = false;
|
|
9953
|
-
this.arc.renderOrder = 998;
|
|
9974
|
+
this.arc.name = "XRTeleportArc";
|
|
9954
9975
|
this.group.add(this.arc);
|
|
9955
9976
|
this.marker.add(this.createRing(), this.createDot());
|
|
9956
9977
|
this.marker.renderOrder = 999;
|
|
@@ -9962,15 +9983,27 @@ var _XRTeleportVisualSystem = class _XRTeleportVisualSystem {
|
|
|
9962
9983
|
world.getScene().add(this.group);
|
|
9963
9984
|
this.attached = true;
|
|
9964
9985
|
}
|
|
9965
|
-
const
|
|
9986
|
+
const raw = this.locomotionSystem.getAimCurve();
|
|
9966
9987
|
const landing = this.locomotionSystem.getLandingPoint();
|
|
9967
9988
|
const valid = this.locomotionSystem.isAimValid();
|
|
9989
|
+
if (raw.length < 2) {
|
|
9990
|
+
this.setVisible(false);
|
|
9991
|
+
return;
|
|
9992
|
+
}
|
|
9993
|
+
const curve = this.trimNearHead(world, raw);
|
|
9968
9994
|
if (curve.length < 2) {
|
|
9969
9995
|
this.setVisible(false);
|
|
9970
9996
|
return;
|
|
9971
9997
|
}
|
|
9972
|
-
this.
|
|
9998
|
+
const rig = this.resolveRig(world);
|
|
9999
|
+
const thickness = Math.min(
|
|
10000
|
+
0.1,
|
|
10001
|
+
Math.max(1e-3, rig?.teleportArcThickness ?? 0.012)
|
|
10002
|
+
);
|
|
10003
|
+
const tint = valid ? this.validColor.set(rig?.teleportArcColor ?? "#4da3ff") : this.invalidColor.set(rig?.teleportArcInvalidColor ?? "#ff5a5a");
|
|
10004
|
+
this.updateArcGeometry(curve, tint, thickness);
|
|
9973
10005
|
if (valid && landing) {
|
|
10006
|
+
this.tintMarker(tint);
|
|
9974
10007
|
this.marker.position.copy(landing);
|
|
9975
10008
|
this.marker.position.y += 0.01;
|
|
9976
10009
|
this.marker.visible = true;
|
|
@@ -9979,27 +10012,66 @@ var _XRTeleportVisualSystem = class _XRTeleportVisualSystem {
|
|
|
9979
10012
|
}
|
|
9980
10013
|
this.setVisible(true);
|
|
9981
10014
|
}
|
|
9982
|
-
updateArcGeometry(curve, tint) {
|
|
9983
|
-
const
|
|
9984
|
-
|
|
9985
|
-
const
|
|
9986
|
-
for (let i = 0; i <
|
|
9987
|
-
const
|
|
9988
|
-
|
|
9989
|
-
|
|
9990
|
-
|
|
9991
|
-
|
|
10015
|
+
updateArcGeometry(curve, tint, thickness) {
|
|
10016
|
+
const needed = curve.length - 1;
|
|
10017
|
+
this.ensureSegments(needed);
|
|
10018
|
+
const radius = thickness / 2;
|
|
10019
|
+
for (let i = 0; i < this.segments.length; i += 1) {
|
|
10020
|
+
const segment = this.segments[i];
|
|
10021
|
+
if (i >= needed) {
|
|
10022
|
+
segment.visible = false;
|
|
10023
|
+
continue;
|
|
10024
|
+
}
|
|
10025
|
+
const from = curve[i];
|
|
10026
|
+
const to = curve[i + 1];
|
|
10027
|
+
this.scratchDirection.subVectors(to, from);
|
|
10028
|
+
const length = this.scratchDirection.length();
|
|
10029
|
+
if (length < 1e-6) {
|
|
10030
|
+
segment.visible = false;
|
|
10031
|
+
continue;
|
|
10032
|
+
}
|
|
10033
|
+
segment.visible = true;
|
|
10034
|
+
segment.position.copy(from).addScaledVector(this.scratchDirection, 0.5);
|
|
10035
|
+
segment.quaternion.setFromUnitVectors(
|
|
10036
|
+
SEGMENT_AXIS,
|
|
10037
|
+
this.scratchDirection.divideScalar(length)
|
|
10038
|
+
);
|
|
10039
|
+
segment.scale.set(radius, length, radius);
|
|
10040
|
+
const t = needed > 1 ? i / (needed - 1) : 0;
|
|
9992
10041
|
const fade = 1 - t * 0.75;
|
|
9993
|
-
|
|
9994
|
-
|
|
9995
|
-
|
|
10042
|
+
segment.material.color.copy(tint).multiplyScalar(fade);
|
|
10043
|
+
}
|
|
10044
|
+
}
|
|
10045
|
+
/** Grow the segment pool to cover the current arc. */
|
|
10046
|
+
ensureSegments(count) {
|
|
10047
|
+
while (this.segments.length < count) {
|
|
10048
|
+
const material = new THREE26__namespace.MeshBasicMaterial({
|
|
10049
|
+
transparent: true,
|
|
10050
|
+
depthTest: false,
|
|
10051
|
+
depthWrite: false
|
|
10052
|
+
});
|
|
10053
|
+
const mesh = new THREE26__namespace.Mesh(this.segmentGeometry, material);
|
|
10054
|
+
mesh.frustumCulled = false;
|
|
10055
|
+
mesh.renderOrder = 998;
|
|
10056
|
+
mesh.raycast = () => {
|
|
10057
|
+
};
|
|
10058
|
+
this.segments.push(mesh);
|
|
10059
|
+
this.arc.add(mesh);
|
|
9996
10060
|
}
|
|
9997
|
-
|
|
9998
|
-
|
|
9999
|
-
|
|
10000
|
-
);
|
|
10001
|
-
|
|
10002
|
-
|
|
10061
|
+
}
|
|
10062
|
+
/** Drop leading points that sit too close to the viewer's head. */
|
|
10063
|
+
trimNearHead(world, curve) {
|
|
10064
|
+
world.getCamera().getWorldPosition(this.scratchHead);
|
|
10065
|
+
let start = 0;
|
|
10066
|
+
while (start < curve.length - 2 && curve[start].distanceTo(this.scratchHead) < HEAD_CLEARANCE) {
|
|
10067
|
+
start += 1;
|
|
10068
|
+
}
|
|
10069
|
+
return start === 0 ? curve : curve.slice(start);
|
|
10070
|
+
}
|
|
10071
|
+
resolveRig(world) {
|
|
10072
|
+
const entityId = world.query(XRRigComponent)[0];
|
|
10073
|
+
if (typeof entityId !== "number") return null;
|
|
10074
|
+
return world.getComponent(entityId, XRRigComponent) ?? null;
|
|
10003
10075
|
}
|
|
10004
10076
|
createRing() {
|
|
10005
10077
|
const geometry = new THREE26__namespace.RingGeometry(
|
|
@@ -10033,6 +10105,15 @@ var _XRTeleportVisualSystem = class _XRTeleportVisualSystem {
|
|
|
10033
10105
|
})
|
|
10034
10106
|
);
|
|
10035
10107
|
}
|
|
10108
|
+
/** Recolour the landing marker to match the arc. */
|
|
10109
|
+
tintMarker(color) {
|
|
10110
|
+
this.marker.traverse((child) => {
|
|
10111
|
+
const material = child.material;
|
|
10112
|
+
if (material && !Array.isArray(material)) {
|
|
10113
|
+
material.color?.copy(color);
|
|
10114
|
+
}
|
|
10115
|
+
});
|
|
10116
|
+
}
|
|
10036
10117
|
setVisible(visible) {
|
|
10037
10118
|
this.group.visible = visible;
|
|
10038
10119
|
}
|