@relu-interactives/spatial-ecs 0.3.11 → 0.3.12
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-DawOR0uR.d.cts} +8 -0
- package/dist/{XRHandPose-B6I4y1lj.d.ts → XRHandPose-DhAd9Qi6.d.ts} +8 -0
- package/dist/{chunk-Y3AC3VZ2.js → chunk-7ZIN6TGT.js} +3 -3
- package/dist/{chunk-Y3AC3VZ2.js.map → chunk-7ZIN6TGT.js.map} +1 -1
- package/dist/{chunk-FSHRPY65.js → chunk-ID7U4FER.js} +4 -4
- package/dist/{chunk-FSHRPY65.js.map → chunk-ID7U4FER.js.map} +1 -1
- package/dist/{chunk-KLU2M43M.js → chunk-LCJ6IH2O.js} +60 -20
- package/dist/chunk-LCJ6IH2O.js.map +1 -0
- package/dist/{chunk-TXEGYR76.js → chunk-OMDYLFTN.js} +4 -2
- package/dist/chunk-OMDYLFTN.js.map +1 -0
- package/dist/components/index.cjs +2 -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 +2 -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-CEZp7qLL.d.ts → index-B49322Q3.d.ts} +1 -1
- package/dist/{index-jlgDou9W.d.cts → index-DJ9bn9SF.d.cts} +14 -0
- package/dist/{index-Bi_wIo1o.d.ts → index-M0I5B3JA.d.ts} +14 -0
- package/dist/{index-DPRnnSI-.d.cts → index-Xm3im4Pt.d.cts} +1 -1
- package/dist/index.cjs +58 -16
- 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 +58 -16
- 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-DawOR0uR.cjs';
|
|
5
|
+
export { az as AnimationStateCallbacks, aA as AnimationStateMachine, aB as AnimationStateManager, aC as StateMachine } from './XRHandPose-DawOR0uR.cjs';
|
|
6
|
+
import { X as XrCapabilities, a as XrInputState, b as XrHandPoseEventDetail } from './index-DJ9bn9SF.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-DJ9bn9SF.cjs';
|
|
8
|
+
export { i as CoreComponents } from './index-Xm3im4Pt.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-DhAd9Qi6.js';
|
|
5
|
+
export { az as AnimationStateCallbacks, aA as AnimationStateMachine, aB as AnimationStateManager, aC as StateMachine } from './XRHandPose-DhAd9Qi6.js';
|
|
6
|
+
import { X as XrCapabilities, a as XrInputState, b as XrHandPoseEventDetail } from './index-M0I5B3JA.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-M0I5B3JA.js';
|
|
8
|
+
export { i as CoreComponents } from './index-B49322Q3.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-LCJ6IH2O.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-LCJ6IH2O.js';
|
|
3
|
+
import { registerDefaultFactories } from './chunk-ID7U4FER.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-ID7U4FER.js';
|
|
5
|
+
import { ObjectManagementSystem } from './chunk-7ZIN6TGT.js';
|
|
6
|
+
export { ObjectManagementSystem, SHARED_MODEL_RESOURCE_FLAG, clearModelCache, loadSharedGltf, resolveDracoDecoderPath, setDracoDecoderPath } from './chunk-7ZIN6TGT.js';
|
|
7
|
+
import { SelectionTransformState, Object3DRef, Name, EntityType, ParentId, Environment, Postprocessing, ScriptComponent } from './chunk-OMDYLFTN.js';
|
|
8
|
+
export { AnimationStateMachine, AnimationStateManager, components_exports as CoreComponents, HAND_POSE_PRESETS, HAND_POSE_PRESET_IDS, cloneHandPose, getHandPosePreset, handPoseFromCurls } from './chunk-OMDYLFTN.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
|
@@ -2166,6 +2166,8 @@ var _XRInteractorComponent = class _XRInteractorComponent extends Component {
|
|
|
2166
2166
|
this.handOpacity = options?.handOpacity ?? 1;
|
|
2167
2167
|
this.handEmissiveIntensity = options?.handEmissiveIntensity ?? 0;
|
|
2168
2168
|
this.showRay = options?.showRay ?? true;
|
|
2169
|
+
this.rayColor = options?.rayColor ?? "#4da3ff";
|
|
2170
|
+
this.rayThickness = options?.rayThickness ?? 6e-3;
|
|
2169
2171
|
}
|
|
2170
2172
|
};
|
|
2171
2173
|
__name(_XRInteractorComponent, "XRInteractorComponent");
|
|
@@ -5519,6 +5521,12 @@ function restorePostCreateComponents(world, objectManagementSystem, targetEntity
|
|
|
5519
5521
|
if (typeof sourceInteractor.showRay === "boolean") {
|
|
5520
5522
|
interactor.showRay = sourceInteractor.showRay;
|
|
5521
5523
|
}
|
|
5524
|
+
if (typeof sourceInteractor.rayColor === "string") {
|
|
5525
|
+
interactor.rayColor = sourceInteractor.rayColor;
|
|
5526
|
+
}
|
|
5527
|
+
if (typeof sourceInteractor.rayThickness === "number") {
|
|
5528
|
+
interactor.rayThickness = sourceInteractor.rayThickness;
|
|
5529
|
+
}
|
|
5522
5530
|
}
|
|
5523
5531
|
}
|
|
5524
5532
|
{
|
|
@@ -9033,6 +9041,13 @@ var _XRInteractionSystem = class _XRInteractionSystem {
|
|
|
9033
9041
|
isGrabbing() {
|
|
9034
9042
|
return this.grabs.size > 0;
|
|
9035
9043
|
}
|
|
9044
|
+
/** True when THIS hand is holding something. */
|
|
9045
|
+
isGrabbingWith(handedness) {
|
|
9046
|
+
for (const input of this.grabs.keys()) {
|
|
9047
|
+
if (input.handedness === handedness) return true;
|
|
9048
|
+
}
|
|
9049
|
+
return false;
|
|
9050
|
+
}
|
|
9036
9051
|
/**
|
|
9037
9052
|
* How an entity is currently held.
|
|
9038
9053
|
*
|
|
@@ -9579,6 +9594,7 @@ __name(applyHandMaterial, "applyHandMaterial");
|
|
|
9579
9594
|
|
|
9580
9595
|
// core/systems/XRControllerVisualSystem.ts
|
|
9581
9596
|
var RAY_LENGTH = 5;
|
|
9597
|
+
var RAY_RADIUS = 3e-3;
|
|
9582
9598
|
var SLOTS = [
|
|
9583
9599
|
{ index: 0, side: "left" },
|
|
9584
9600
|
{ index: 1, side: "right" }
|
|
@@ -9588,6 +9604,8 @@ var _XRControllerVisualSystem = class _XRControllerVisualSystem {
|
|
|
9588
9604
|
this.controllerModelFactory = new XRControllerModelFactory_js.XRControllerModelFactory();
|
|
9589
9605
|
this.handModelFactory = new XRHandModelFactory_js.XRHandModelFactory();
|
|
9590
9606
|
this.group = new THREE26__namespace.Group();
|
|
9607
|
+
/** Reused so a per-frame colour compare allocates nothing. */
|
|
9608
|
+
this.rayColorScratch = new THREE26__namespace.Color();
|
|
9591
9609
|
this.slots = /* @__PURE__ */ new Map();
|
|
9592
9610
|
this.attachedTo = null;
|
|
9593
9611
|
/** Last applied preset signature, so materials rebuild only on real change. */
|
|
@@ -9616,8 +9634,9 @@ var _XRControllerVisualSystem = class _XRControllerVisualSystem {
|
|
|
9616
9634
|
const hasHand = liveKind === null || liveKind === "hand";
|
|
9617
9635
|
visuals.controllerModel.visible = showControllers && hasController;
|
|
9618
9636
|
visuals.handModel.visible = showHands && hasHand;
|
|
9619
|
-
visuals.ray.visible = this.shouldShowRay(interactor);
|
|
9637
|
+
visuals.ray.visible = this.shouldShowRay(interactor, side);
|
|
9620
9638
|
this.fitRayToHover(visuals.ray, side);
|
|
9639
|
+
this.applyRayStyle(visuals.ray, interactor);
|
|
9621
9640
|
if (showHands && this.handMaterial) {
|
|
9622
9641
|
applyHandMaterial(visuals.handModel, this.handMaterial);
|
|
9623
9642
|
}
|
|
@@ -9693,10 +9712,23 @@ var _XRControllerVisualSystem = class _XRControllerVisualSystem {
|
|
|
9693
9712
|
* off entirely; otherwise it appears on hover/grab so it isn't permanent
|
|
9694
9713
|
* clutter implying the whole scene is clickable.
|
|
9695
9714
|
*/
|
|
9696
|
-
shouldShowRay(interactor) {
|
|
9715
|
+
shouldShowRay(interactor, side) {
|
|
9697
9716
|
if (interactor && !interactor.showRay) return false;
|
|
9698
9717
|
if (!this.interactionSystem) return true;
|
|
9699
|
-
return this.interactionSystem.
|
|
9718
|
+
return this.interactionSystem.getHoverFor(side) !== null || this.interactionSystem.isGrabbingWith(side);
|
|
9719
|
+
}
|
|
9720
|
+
/** Push the author's ray colour and thickness onto the mesh. */
|
|
9721
|
+
applyRayStyle(ray, interactor) {
|
|
9722
|
+
if (!interactor) return;
|
|
9723
|
+
const material = ray.material;
|
|
9724
|
+
if (material?.color && !material.color.equals(this.rayColorScratch.set(interactor.rayColor))) {
|
|
9725
|
+
material.color.copy(this.rayColorScratch);
|
|
9726
|
+
}
|
|
9727
|
+
const radius = Math.max(5e-4, interactor.rayThickness / 2) / RAY_RADIUS;
|
|
9728
|
+
if (ray.scale.x !== radius) {
|
|
9729
|
+
ray.scale.x = radius;
|
|
9730
|
+
ray.scale.y = radius;
|
|
9731
|
+
}
|
|
9700
9732
|
}
|
|
9701
9733
|
/**
|
|
9702
9734
|
* Stop the ray at whatever it is pointing at.
|
|
@@ -9708,7 +9740,7 @@ var _XRControllerVisualSystem = class _XRControllerVisualSystem {
|
|
|
9708
9740
|
fitRayToHover(ray, side) {
|
|
9709
9741
|
const hover = this.interactionSystem?.getHoverFor(side) ?? null;
|
|
9710
9742
|
const length = hover && Number.isFinite(hover.distance) && hover.distance > 0 ? Math.min(hover.distance, RAY_LENGTH) : RAY_LENGTH;
|
|
9711
|
-
ray.scale.z = length
|
|
9743
|
+
ray.scale.z = length;
|
|
9712
9744
|
}
|
|
9713
9745
|
/** Lazily build per-slot visuals; the device reports profiles late. */
|
|
9714
9746
|
ensureSlots(world) {
|
|
@@ -9748,22 +9780,32 @@ var _XRControllerVisualSystem = class _XRControllerVisualSystem {
|
|
|
9748
9780
|
target.add(this.group);
|
|
9749
9781
|
this.attachedTo = target;
|
|
9750
9782
|
}
|
|
9783
|
+
/**
|
|
9784
|
+
* The pointer ray.
|
|
9785
|
+
*
|
|
9786
|
+
* A cylinder rather than a `THREE.Line`, because WebGL ignores `linewidth` —
|
|
9787
|
+
* every line renders one pixel wide regardless, which is nearly invisible on a
|
|
9788
|
+
* headset. A thin mesh is the only way to get a ray with real thickness
|
|
9789
|
+
* without pulling in a line-rendering extension.
|
|
9790
|
+
*/
|
|
9751
9791
|
createRay() {
|
|
9752
|
-
const geometry = new THREE26__namespace.
|
|
9753
|
-
|
|
9754
|
-
|
|
9755
|
-
|
|
9756
|
-
const material = new THREE26__namespace.LineBasicMaterial({
|
|
9792
|
+
const geometry = new THREE26__namespace.CylinderGeometry(RAY_RADIUS, RAY_RADIUS, 1, 8, 1);
|
|
9793
|
+
geometry.rotateX(-Math.PI / 2);
|
|
9794
|
+
geometry.translate(0, 0, -0.5);
|
|
9795
|
+
const material = new THREE26__namespace.MeshBasicMaterial({
|
|
9757
9796
|
color: "#4da3ff",
|
|
9758
9797
|
transparent: true,
|
|
9759
|
-
opacity: 0.
|
|
9760
|
-
depthTest: false
|
|
9798
|
+
opacity: 0.75,
|
|
9799
|
+
depthTest: false,
|
|
9800
|
+
depthWrite: false
|
|
9761
9801
|
});
|
|
9762
|
-
const
|
|
9763
|
-
|
|
9764
|
-
|
|
9765
|
-
|
|
9766
|
-
|
|
9802
|
+
const mesh = new THREE26__namespace.Mesh(geometry, material);
|
|
9803
|
+
mesh.name = "XRPointerRay";
|
|
9804
|
+
mesh.renderOrder = 999;
|
|
9805
|
+
mesh.visible = false;
|
|
9806
|
+
mesh.raycast = () => {
|
|
9807
|
+
};
|
|
9808
|
+
return mesh;
|
|
9767
9809
|
}
|
|
9768
9810
|
dispose() {
|
|
9769
9811
|
this.group.removeFromParent();
|