@relu-interactives/spatial-ecs 0.3.12 → 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-DawOR0uR.d.cts → XRHandPose-9mVZVU3K.d.cts} +24 -8
- package/dist/{XRHandPose-DhAd9Qi6.d.ts → XRHandPose-To0260Lc.d.ts} +24 -8
- package/dist/{chunk-OMDYLFTN.js → chunk-3LDQ4GVZ.js} +5 -5
- package/dist/chunk-3LDQ4GVZ.js.map +1 -0
- package/dist/{chunk-7ZIN6TGT.js → chunk-CHZQ4NXP.js} +3 -3
- package/dist/{chunk-7ZIN6TGT.js.map → chunk-CHZQ4NXP.js.map} +1 -1
- package/dist/{chunk-ID7U4FER.js → chunk-JHFBEMXM.js} +4 -4
- package/dist/{chunk-ID7U4FER.js.map → chunk-JHFBEMXM.js.map} +1 -1
- package/dist/{chunk-LCJ6IH2O.js → chunk-N2634D4W.js} +57 -14
- package/dist/chunk-N2634D4W.js.map +1 -0
- package/dist/components/index.cjs +3 -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 +3 -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-Xm3im4Pt.d.cts → index-BPKDsVF7.d.cts} +1 -1
- package/dist/{index-M0I5B3JA.d.ts → index-BbXqWyEZ.d.ts} +20 -0
- package/dist/{index-B49322Q3.d.ts → index-Wzs-8FYa.d.ts} +1 -1
- package/dist/{index-DJ9bn9SF.d.cts → index-lqw8BM6E.d.cts} +20 -0
- package/dist/index.cjs +56 -13
- 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 +56 -13
- 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-LCJ6IH2O.js.map +0 -1
- package/dist/chunk-OMDYLFTN.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,7 @@ 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
2169
|
this.rayColor = options?.rayColor ?? "#4da3ff";
|
|
2170
2170
|
this.rayThickness = options?.rayThickness ?? 6e-3;
|
|
2171
2171
|
}
|
|
@@ -5438,11 +5438,15 @@ function restorePostCreateComponents(world, objectManagementSystem, targetEntity
|
|
|
5438
5438
|
)
|
|
5439
5439
|
);
|
|
5440
5440
|
}
|
|
5441
|
-
if (typeof sourceInteractable.
|
|
5442
|
-
interactable.
|
|
5441
|
+
if (typeof sourceInteractable.applyVelocityOnRelease === "boolean") {
|
|
5442
|
+
interactable.applyVelocityOnRelease = sourceInteractable.applyVelocityOnRelease;
|
|
5443
|
+
} else if (typeof sourceInteractable.throwOnRelease === "boolean") {
|
|
5444
|
+
interactable.applyVelocityOnRelease = sourceInteractable.throwOnRelease;
|
|
5443
5445
|
}
|
|
5444
|
-
if (typeof sourceInteractable.
|
|
5445
|
-
interactable.
|
|
5446
|
+
if (typeof sourceInteractable.velocityScale === "number") {
|
|
5447
|
+
interactable.velocityScale = sourceInteractable.velocityScale;
|
|
5448
|
+
} else if (typeof sourceInteractable.throwStrength === "number") {
|
|
5449
|
+
interactable.velocityScale = sourceInteractable.throwStrength;
|
|
5446
5450
|
}
|
|
5447
5451
|
const grabPos = asRecord3(sourceInteractable.grabOffsetPosition);
|
|
5448
5452
|
if (grabPos) {
|
|
@@ -5518,8 +5522,10 @@ function restorePostCreateComponents(world, objectManagementSystem, targetEntity
|
|
|
5518
5522
|
if (typeof sourceInteractor.handEmissiveIntensity === "number") {
|
|
5519
5523
|
interactor.handEmissiveIntensity = sourceInteractor.handEmissiveIntensity;
|
|
5520
5524
|
}
|
|
5521
|
-
if (typeof sourceInteractor.
|
|
5522
|
-
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";
|
|
5523
5529
|
}
|
|
5524
5530
|
if (typeof sourceInteractor.rayColor === "string") {
|
|
5525
5531
|
interactor.rayColor = sourceInteractor.rayColor;
|
|
@@ -8959,8 +8965,8 @@ var _XRInteractionSystem = class _XRInteractionSystem {
|
|
|
8959
8965
|
if (held.restoreBodyType !== null && physics) {
|
|
8960
8966
|
physics.values.rigidbody.type = held.restoreBodyType;
|
|
8961
8967
|
const dynamic = held.restoreBodyType === "dynamic";
|
|
8962
|
-
if (dynamic && interactable?.
|
|
8963
|
-
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);
|
|
8964
8970
|
const spin = held.angularVelocity;
|
|
8965
8971
|
setPhysicsLiveRef(physics, "pendingVelocity", {
|
|
8966
8972
|
linear: { x: velocity.x, y: velocity.y, z: velocity.z },
|
|
@@ -9041,6 +9047,25 @@ var _XRInteractionSystem = class _XRInteractionSystem {
|
|
|
9041
9047
|
isGrabbing() {
|
|
9042
9048
|
return this.grabs.size > 0;
|
|
9043
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
|
+
}
|
|
9044
9069
|
/** True when THIS hand is holding something. */
|
|
9045
9070
|
isGrabbingWith(handedness) {
|
|
9046
9071
|
for (const input of this.grabs.keys()) {
|
|
@@ -9118,8 +9143,20 @@ var _XRLocomotionSystem = class _XRLocomotionSystem {
|
|
|
9118
9143
|
this.stickAiming = /* @__PURE__ */ new WeakSet();
|
|
9119
9144
|
/** True once we've tried to self-heal camera parenting for this session. */
|
|
9120
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;
|
|
9121
9154
|
this.inputSystem = inputSystem;
|
|
9122
9155
|
}
|
|
9156
|
+
/** Wire the interaction system so grabs suppress teleport on that hand. */
|
|
9157
|
+
setInteractionSystem(interactionSystem) {
|
|
9158
|
+
this.interactionSystem = interactionSystem;
|
|
9159
|
+
}
|
|
9123
9160
|
update(world, deltaTime) {
|
|
9124
9161
|
this.aimCurve = [];
|
|
9125
9162
|
this.landingPoint = null;
|
|
@@ -9237,6 +9274,9 @@ var _XRLocomotionSystem = class _XRLocomotionSystem {
|
|
|
9237
9274
|
applyTeleport(world, transform, inputs) {
|
|
9238
9275
|
const targets = this.collectTeleportTargets(world);
|
|
9239
9276
|
for (const input of inputs) {
|
|
9277
|
+
if (input.handedness !== "none" && this.interactionSystem?.isHandBusy(world, input.handedness)) {
|
|
9278
|
+
continue;
|
|
9279
|
+
}
|
|
9240
9280
|
const source = input;
|
|
9241
9281
|
const stick = this.readStickAim(input, source);
|
|
9242
9282
|
const aiming = input.select || stick.aiming;
|
|
@@ -9713,9 +9753,12 @@ var _XRControllerVisualSystem = class _XRControllerVisualSystem {
|
|
|
9713
9753
|
* clutter implying the whole scene is clickable.
|
|
9714
9754
|
*/
|
|
9715
9755
|
shouldShowRay(interactor, side) {
|
|
9716
|
-
|
|
9756
|
+
const visibility = interactor?.rayVisibility ?? "interacting";
|
|
9757
|
+
if (visibility === "never") return false;
|
|
9758
|
+
if (visibility === "always") return true;
|
|
9717
9759
|
if (!this.interactionSystem) return true;
|
|
9718
|
-
|
|
9760
|
+
if (this.interactionSystem.isGrabbingWith(side)) return false;
|
|
9761
|
+
return this.interactionSystem.getHoverFor(side) !== null;
|
|
9719
9762
|
}
|
|
9720
9763
|
/** Push the author's ray colour and thickness onto the mesh. */
|
|
9721
9764
|
applyRayStyle(ray, interactor) {
|