@relu-interactives/spatial-ecs 0.3.11 → 0.3.13
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-C-KJeYcJ.d.cts → XRHandPose-9mVZVU3K.d.cts} +32 -8
- package/dist/{XRHandPose-B6I4y1lj.d.ts → XRHandPose-To0260Lc.d.ts} +32 -8
- package/dist/{chunk-TXEGYR76.js → chunk-3LDQ4GVZ.js} +7 -5
- package/dist/chunk-3LDQ4GVZ.js.map +1 -0
- package/dist/{chunk-Y3AC3VZ2.js → chunk-CHZQ4NXP.js} +3 -3
- package/dist/{chunk-Y3AC3VZ2.js.map → chunk-CHZQ4NXP.js.map} +1 -1
- package/dist/{chunk-FSHRPY65.js → chunk-JHFBEMXM.js} +4 -4
- package/dist/{chunk-FSHRPY65.js.map → chunk-JHFBEMXM.js.map} +1 -1
- package/dist/{chunk-KLU2M43M.js → chunk-N2634D4W.js} +112 -29
- package/dist/chunk-N2634D4W.js.map +1 -0
- package/dist/components/index.cjs +5 -3
- 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 +5 -3
- package/dist/factories/index.cjs +5 -3
- 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-DPRnnSI-.d.cts → index-BPKDsVF7.d.cts} +1 -1
- package/dist/{index-Bi_wIo1o.d.ts → index-BbXqWyEZ.d.ts} +34 -0
- package/dist/{index-CEZp7qLL.d.ts → index-Wzs-8FYa.d.ts} +1 -1
- package/dist/{index-jlgDou9W.d.cts → index-lqw8BM6E.d.cts} +34 -0
- package/dist/index.cjs +113 -28
- 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 +113 -28
- 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-KLU2M43M.js.map +0 -1
- package/dist/chunk-TXEGYR76.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-31wk-A0g.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-31wk-A0g.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-9mVZVU3K.cjs';
|
|
5
|
+
export { az as AnimationStateCallbacks, aA as AnimationStateMachine, aB as AnimationStateManager, aC as StateMachine } from './XRHandPose-9mVZVU3K.cjs';
|
|
6
|
+
import { X as XrCapabilities, a as XrInputState, b as XrHandPoseEventDetail } from './index-lqw8BM6E.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-lqw8BM6E.cjs';
|
|
8
|
+
export { i as CoreComponents } from './index-BPKDsVF7.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-31wk-A0g.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-31wk-A0g.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-To0260Lc.js';
|
|
5
|
+
export { az as AnimationStateCallbacks, aA as AnimationStateMachine, aB as AnimationStateManager, aC as StateMachine } from './XRHandPose-To0260Lc.js';
|
|
6
|
+
import { X as XrCapabilities, a as XrInputState, b as XrHandPoseEventDetail } from './index-BbXqWyEZ.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-BbXqWyEZ.js';
|
|
8
|
+
export { i as CoreComponents } from './index-Wzs-8FYa.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, 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-N2634D4W.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, 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-N2634D4W.js';
|
|
3
|
+
import { registerDefaultFactories } from './chunk-JHFBEMXM.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-JHFBEMXM.js';
|
|
5
|
+
import { ObjectManagementSystem } from './chunk-CHZQ4NXP.js';
|
|
6
|
+
export { ObjectManagementSystem, SHARED_MODEL_RESOURCE_FLAG, clearModelCache, loadSharedGltf, resolveDracoDecoderPath, setDracoDecoderPath } from './chunk-CHZQ4NXP.js';
|
|
7
|
+
import { SelectionTransformState, Object3DRef, Name, EntityType, ParentId, Environment, Postprocessing, ScriptComponent } from './chunk-3LDQ4GVZ.js';
|
|
8
|
+
export { AnimationStateMachine, AnimationStateManager, components_exports as CoreComponents, HAND_POSE_PRESETS, HAND_POSE_PRESET_IDS, cloneHandPose, getHandPosePreset, handPoseFromCurls } from './chunk-3LDQ4GVZ.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
|
@@ -2120,8 +2120,8 @@ var _XRInteractableComponent = class _XRInteractableComponent extends Component
|
|
|
2120
2120
|
this.attachPoints = (options?.attachPoints ?? []).map(
|
|
2121
2121
|
(point) => createAttachPoint(point)
|
|
2122
2122
|
);
|
|
2123
|
-
this.
|
|
2124
|
-
this.
|
|
2123
|
+
this.applyVelocityOnRelease = options?.applyVelocityOnRelease ?? true;
|
|
2124
|
+
this.velocityScale = options?.velocityScale ?? 1;
|
|
2125
2125
|
this.hoverBehavior = options?.hoverBehavior ?? "color";
|
|
2126
2126
|
this.hoverColor = options?.hoverColor ?? "#4da3ff";
|
|
2127
2127
|
this.hoverScale = options?.hoverScale ?? 1.06;
|
|
@@ -2165,7 +2165,9 @@ var _XRInteractorComponent = class _XRInteractorComponent extends Component {
|
|
|
2165
2165
|
this.handColor = options?.handColor ?? "#e8b48a";
|
|
2166
2166
|
this.handOpacity = options?.handOpacity ?? 1;
|
|
2167
2167
|
this.handEmissiveIntensity = options?.handEmissiveIntensity ?? 0;
|
|
2168
|
-
this.
|
|
2168
|
+
this.rayVisibility = options?.rayVisibility ?? "interacting";
|
|
2169
|
+
this.rayColor = options?.rayColor ?? "#4da3ff";
|
|
2170
|
+
this.rayThickness = options?.rayThickness ?? 6e-3;
|
|
2169
2171
|
}
|
|
2170
2172
|
};
|
|
2171
2173
|
__name(_XRInteractorComponent, "XRInteractorComponent");
|
|
@@ -5436,11 +5438,15 @@ function restorePostCreateComponents(world, objectManagementSystem, targetEntity
|
|
|
5436
5438
|
)
|
|
5437
5439
|
);
|
|
5438
5440
|
}
|
|
5439
|
-
if (typeof sourceInteractable.
|
|
5440
|
-
interactable.
|
|
5441
|
+
if (typeof sourceInteractable.applyVelocityOnRelease === "boolean") {
|
|
5442
|
+
interactable.applyVelocityOnRelease = sourceInteractable.applyVelocityOnRelease;
|
|
5443
|
+
} else if (typeof sourceInteractable.throwOnRelease === "boolean") {
|
|
5444
|
+
interactable.applyVelocityOnRelease = sourceInteractable.throwOnRelease;
|
|
5441
5445
|
}
|
|
5442
|
-
if (typeof sourceInteractable.
|
|
5443
|
-
interactable.
|
|
5446
|
+
if (typeof sourceInteractable.velocityScale === "number") {
|
|
5447
|
+
interactable.velocityScale = sourceInteractable.velocityScale;
|
|
5448
|
+
} else if (typeof sourceInteractable.throwStrength === "number") {
|
|
5449
|
+
interactable.velocityScale = sourceInteractable.throwStrength;
|
|
5444
5450
|
}
|
|
5445
5451
|
const grabPos = asRecord3(sourceInteractable.grabOffsetPosition);
|
|
5446
5452
|
if (grabPos) {
|
|
@@ -5516,8 +5522,16 @@ function restorePostCreateComponents(world, objectManagementSystem, targetEntity
|
|
|
5516
5522
|
if (typeof sourceInteractor.handEmissiveIntensity === "number") {
|
|
5517
5523
|
interactor.handEmissiveIntensity = sourceInteractor.handEmissiveIntensity;
|
|
5518
5524
|
}
|
|
5519
|
-
if (typeof sourceInteractor.
|
|
5520
|
-
interactor.
|
|
5525
|
+
if (typeof sourceInteractor.rayVisibility === "string") {
|
|
5526
|
+
interactor.rayVisibility = sourceInteractor.rayVisibility;
|
|
5527
|
+
} else if (typeof sourceInteractor.showRay === "boolean") {
|
|
5528
|
+
interactor.rayVisibility = sourceInteractor.showRay ? "interacting" : "never";
|
|
5529
|
+
}
|
|
5530
|
+
if (typeof sourceInteractor.rayColor === "string") {
|
|
5531
|
+
interactor.rayColor = sourceInteractor.rayColor;
|
|
5532
|
+
}
|
|
5533
|
+
if (typeof sourceInteractor.rayThickness === "number") {
|
|
5534
|
+
interactor.rayThickness = sourceInteractor.rayThickness;
|
|
5521
5535
|
}
|
|
5522
5536
|
}
|
|
5523
5537
|
}
|
|
@@ -8951,8 +8965,8 @@ var _XRInteractionSystem = class _XRInteractionSystem {
|
|
|
8951
8965
|
if (held.restoreBodyType !== null && physics) {
|
|
8952
8966
|
physics.values.rigidbody.type = held.restoreBodyType;
|
|
8953
8967
|
const dynamic = held.restoreBodyType === "dynamic";
|
|
8954
|
-
if (dynamic && interactable?.
|
|
8955
|
-
const velocity = held.tracker.computeVelocity(this.elapsed).multiplyScalar(interactable.
|
|
8968
|
+
if (dynamic && interactable?.applyVelocityOnRelease) {
|
|
8969
|
+
const velocity = held.tracker.computeVelocity(this.elapsed).multiplyScalar(interactable.velocityScale);
|
|
8956
8970
|
const spin = held.angularVelocity;
|
|
8957
8971
|
setPhysicsLiveRef(physics, "pendingVelocity", {
|
|
8958
8972
|
linear: { x: velocity.x, y: velocity.y, z: velocity.z },
|
|
@@ -9033,6 +9047,32 @@ var _XRInteractionSystem = class _XRInteractionSystem {
|
|
|
9033
9047
|
isGrabbing() {
|
|
9034
9048
|
return this.grabs.size > 0;
|
|
9035
9049
|
}
|
|
9050
|
+
/**
|
|
9051
|
+
* Whether this hand's primary action is committed to interaction.
|
|
9052
|
+
*
|
|
9053
|
+
* True while the hand holds something, and also while it merely HOVERS a
|
|
9054
|
+
* grabbable — because the pinch that is about to grab must not be read as a
|
|
9055
|
+
* teleport by the locomotion system. Without the hover half, the first pinch
|
|
9056
|
+
* of a grab teleports the player, and so does the pinch that takes an object
|
|
9057
|
+
* from the other hand.
|
|
9058
|
+
*/
|
|
9059
|
+
isHandBusy(world, handedness) {
|
|
9060
|
+
if (this.isGrabbingWith(handedness)) return true;
|
|
9061
|
+
const hover = this.getHoverFor(handedness);
|
|
9062
|
+
if (!hover) return false;
|
|
9063
|
+
const interactable = world.getComponent(
|
|
9064
|
+
hover.entityId,
|
|
9065
|
+
XRInteractableComponent
|
|
9066
|
+
);
|
|
9067
|
+
return Boolean(interactable?.enabled && interactable.grabbable);
|
|
9068
|
+
}
|
|
9069
|
+
/** True when THIS hand is holding something. */
|
|
9070
|
+
isGrabbingWith(handedness) {
|
|
9071
|
+
for (const input of this.grabs.keys()) {
|
|
9072
|
+
if (input.handedness === handedness) return true;
|
|
9073
|
+
}
|
|
9074
|
+
return false;
|
|
9075
|
+
}
|
|
9036
9076
|
/**
|
|
9037
9077
|
* How an entity is currently held.
|
|
9038
9078
|
*
|
|
@@ -9103,8 +9143,20 @@ var _XRLocomotionSystem = class _XRLocomotionSystem {
|
|
|
9103
9143
|
this.stickAiming = /* @__PURE__ */ new WeakSet();
|
|
9104
9144
|
/** True once we've tried to self-heal camera parenting for this session. */
|
|
9105
9145
|
this.parentingChecked = false;
|
|
9146
|
+
/**
|
|
9147
|
+
* Optional; when wired, hands busy grabbing are excluded from teleport.
|
|
9148
|
+
*
|
|
9149
|
+
* On hand tracking the SAME pinch drives both grabbing and teleport aiming,
|
|
9150
|
+
* so without this a user who picks something up is teleported at the same
|
|
9151
|
+
* moment.
|
|
9152
|
+
*/
|
|
9153
|
+
this.interactionSystem = null;
|
|
9106
9154
|
this.inputSystem = inputSystem;
|
|
9107
9155
|
}
|
|
9156
|
+
/** Wire the interaction system so grabs suppress teleport on that hand. */
|
|
9157
|
+
setInteractionSystem(interactionSystem) {
|
|
9158
|
+
this.interactionSystem = interactionSystem;
|
|
9159
|
+
}
|
|
9108
9160
|
update(world, deltaTime) {
|
|
9109
9161
|
this.aimCurve = [];
|
|
9110
9162
|
this.landingPoint = null;
|
|
@@ -9222,6 +9274,9 @@ var _XRLocomotionSystem = class _XRLocomotionSystem {
|
|
|
9222
9274
|
applyTeleport(world, transform, inputs) {
|
|
9223
9275
|
const targets = this.collectTeleportTargets(world);
|
|
9224
9276
|
for (const input of inputs) {
|
|
9277
|
+
if (input.handedness !== "none" && this.interactionSystem?.isHandBusy(world, input.handedness)) {
|
|
9278
|
+
continue;
|
|
9279
|
+
}
|
|
9225
9280
|
const source = input;
|
|
9226
9281
|
const stick = this.readStickAim(input, source);
|
|
9227
9282
|
const aiming = input.select || stick.aiming;
|
|
@@ -9579,6 +9634,7 @@ __name(applyHandMaterial, "applyHandMaterial");
|
|
|
9579
9634
|
|
|
9580
9635
|
// core/systems/XRControllerVisualSystem.ts
|
|
9581
9636
|
var RAY_LENGTH = 5;
|
|
9637
|
+
var RAY_RADIUS = 3e-3;
|
|
9582
9638
|
var SLOTS = [
|
|
9583
9639
|
{ index: 0, side: "left" },
|
|
9584
9640
|
{ index: 1, side: "right" }
|
|
@@ -9588,6 +9644,8 @@ var _XRControllerVisualSystem = class _XRControllerVisualSystem {
|
|
|
9588
9644
|
this.controllerModelFactory = new XRControllerModelFactory_js.XRControllerModelFactory();
|
|
9589
9645
|
this.handModelFactory = new XRHandModelFactory_js.XRHandModelFactory();
|
|
9590
9646
|
this.group = new THREE26__namespace.Group();
|
|
9647
|
+
/** Reused so a per-frame colour compare allocates nothing. */
|
|
9648
|
+
this.rayColorScratch = new THREE26__namespace.Color();
|
|
9591
9649
|
this.slots = /* @__PURE__ */ new Map();
|
|
9592
9650
|
this.attachedTo = null;
|
|
9593
9651
|
/** Last applied preset signature, so materials rebuild only on real change. */
|
|
@@ -9616,8 +9674,9 @@ var _XRControllerVisualSystem = class _XRControllerVisualSystem {
|
|
|
9616
9674
|
const hasHand = liveKind === null || liveKind === "hand";
|
|
9617
9675
|
visuals.controllerModel.visible = showControllers && hasController;
|
|
9618
9676
|
visuals.handModel.visible = showHands && hasHand;
|
|
9619
|
-
visuals.ray.visible = this.shouldShowRay(interactor);
|
|
9677
|
+
visuals.ray.visible = this.shouldShowRay(interactor, side);
|
|
9620
9678
|
this.fitRayToHover(visuals.ray, side);
|
|
9679
|
+
this.applyRayStyle(visuals.ray, interactor);
|
|
9621
9680
|
if (showHands && this.handMaterial) {
|
|
9622
9681
|
applyHandMaterial(visuals.handModel, this.handMaterial);
|
|
9623
9682
|
}
|
|
@@ -9693,10 +9752,26 @@ var _XRControllerVisualSystem = class _XRControllerVisualSystem {
|
|
|
9693
9752
|
* off entirely; otherwise it appears on hover/grab so it isn't permanent
|
|
9694
9753
|
* clutter implying the whole scene is clickable.
|
|
9695
9754
|
*/
|
|
9696
|
-
shouldShowRay(interactor) {
|
|
9697
|
-
|
|
9755
|
+
shouldShowRay(interactor, side) {
|
|
9756
|
+
const visibility = interactor?.rayVisibility ?? "interacting";
|
|
9757
|
+
if (visibility === "never") return false;
|
|
9758
|
+
if (visibility === "always") return true;
|
|
9698
9759
|
if (!this.interactionSystem) return true;
|
|
9699
|
-
|
|
9760
|
+
if (this.interactionSystem.isGrabbingWith(side)) return false;
|
|
9761
|
+
return this.interactionSystem.getHoverFor(side) !== null;
|
|
9762
|
+
}
|
|
9763
|
+
/** Push the author's ray colour and thickness onto the mesh. */
|
|
9764
|
+
applyRayStyle(ray, interactor) {
|
|
9765
|
+
if (!interactor) return;
|
|
9766
|
+
const material = ray.material;
|
|
9767
|
+
if (material?.color && !material.color.equals(this.rayColorScratch.set(interactor.rayColor))) {
|
|
9768
|
+
material.color.copy(this.rayColorScratch);
|
|
9769
|
+
}
|
|
9770
|
+
const radius = Math.max(5e-4, interactor.rayThickness / 2) / RAY_RADIUS;
|
|
9771
|
+
if (ray.scale.x !== radius) {
|
|
9772
|
+
ray.scale.x = radius;
|
|
9773
|
+
ray.scale.y = radius;
|
|
9774
|
+
}
|
|
9700
9775
|
}
|
|
9701
9776
|
/**
|
|
9702
9777
|
* Stop the ray at whatever it is pointing at.
|
|
@@ -9708,7 +9783,7 @@ var _XRControllerVisualSystem = class _XRControllerVisualSystem {
|
|
|
9708
9783
|
fitRayToHover(ray, side) {
|
|
9709
9784
|
const hover = this.interactionSystem?.getHoverFor(side) ?? null;
|
|
9710
9785
|
const length = hover && Number.isFinite(hover.distance) && hover.distance > 0 ? Math.min(hover.distance, RAY_LENGTH) : RAY_LENGTH;
|
|
9711
|
-
ray.scale.z = length
|
|
9786
|
+
ray.scale.z = length;
|
|
9712
9787
|
}
|
|
9713
9788
|
/** Lazily build per-slot visuals; the device reports profiles late. */
|
|
9714
9789
|
ensureSlots(world) {
|
|
@@ -9748,22 +9823,32 @@ var _XRControllerVisualSystem = class _XRControllerVisualSystem {
|
|
|
9748
9823
|
target.add(this.group);
|
|
9749
9824
|
this.attachedTo = target;
|
|
9750
9825
|
}
|
|
9826
|
+
/**
|
|
9827
|
+
* The pointer ray.
|
|
9828
|
+
*
|
|
9829
|
+
* A cylinder rather than a `THREE.Line`, because WebGL ignores `linewidth` —
|
|
9830
|
+
* every line renders one pixel wide regardless, which is nearly invisible on a
|
|
9831
|
+
* headset. A thin mesh is the only way to get a ray with real thickness
|
|
9832
|
+
* without pulling in a line-rendering extension.
|
|
9833
|
+
*/
|
|
9751
9834
|
createRay() {
|
|
9752
|
-
const geometry = new THREE26__namespace.
|
|
9753
|
-
|
|
9754
|
-
|
|
9755
|
-
|
|
9756
|
-
const material = new THREE26__namespace.LineBasicMaterial({
|
|
9835
|
+
const geometry = new THREE26__namespace.CylinderGeometry(RAY_RADIUS, RAY_RADIUS, 1, 8, 1);
|
|
9836
|
+
geometry.rotateX(-Math.PI / 2);
|
|
9837
|
+
geometry.translate(0, 0, -0.5);
|
|
9838
|
+
const material = new THREE26__namespace.MeshBasicMaterial({
|
|
9757
9839
|
color: "#4da3ff",
|
|
9758
9840
|
transparent: true,
|
|
9759
|
-
opacity: 0.
|
|
9760
|
-
depthTest: false
|
|
9841
|
+
opacity: 0.75,
|
|
9842
|
+
depthTest: false,
|
|
9843
|
+
depthWrite: false
|
|
9761
9844
|
});
|
|
9762
|
-
const
|
|
9763
|
-
|
|
9764
|
-
|
|
9765
|
-
|
|
9766
|
-
|
|
9845
|
+
const mesh = new THREE26__namespace.Mesh(geometry, material);
|
|
9846
|
+
mesh.name = "XRPointerRay";
|
|
9847
|
+
mesh.renderOrder = 999;
|
|
9848
|
+
mesh.visible = false;
|
|
9849
|
+
mesh.raycast = () => {
|
|
9850
|
+
};
|
|
9851
|
+
return mesh;
|
|
9767
9852
|
}
|
|
9768
9853
|
dispose() {
|
|
9769
9854
|
this.group.removeFromParent();
|