@relu-interactives/spatial-ecs 0.3.12 → 0.3.14
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/{System-31wk-A0g.d.cts → System-BhnLw0fZ.d.cts} +7 -0
- package/dist/{System-31wk-A0g.d.ts → System-BhnLw0fZ.d.ts} +7 -0
- package/dist/{XRHandPose-DawOR0uR.d.cts → XRHandPose-LR4EhboN.d.cts} +25 -9
- package/dist/{XRHandPose-DhAd9Qi6.d.ts → XRHandPose-SZ7ou63b.d.ts} +25 -9
- package/dist/{chunk-OMDYLFTN.js → chunk-3LDQ4GVZ.js} +5 -5
- package/dist/chunk-3LDQ4GVZ.js.map +1 -0
- package/dist/{chunk-7ZIN6TGT.js → chunk-PNQ7HDQC.js} +3 -3
- package/dist/{chunk-7ZIN6TGT.js.map → chunk-PNQ7HDQC.js.map} +1 -1
- package/dist/{chunk-ID7U4FER.js → chunk-UHJ4MDIM.js} +7 -4
- package/dist/chunk-UHJ4MDIM.js.map +1 -0
- package/dist/{chunk-LCJ6IH2O.js → chunk-XHMOFI3Q.js} +104 -16
- package/dist/chunk-XHMOFI3Q.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 +3 -3
- package/dist/components/index.d.ts +3 -3
- package/dist/components/index.js +1 -1
- package/dist/docs/guide/vr-and-hand-poses.md +5 -3
- package/dist/factories/index.cjs +6 -3
- package/dist/factories/index.cjs.map +1 -1
- package/dist/factories/index.d.cts +2 -2
- package/dist/factories/index.d.ts +2 -2
- package/dist/factories/index.js +3 -3
- package/dist/{index-Xm3im4Pt.d.cts → index-BL5EWkwY.d.cts} +2 -2
- package/dist/{index-B49322Q3.d.ts → index-ByiUoIoh.d.ts} +2 -2
- package/dist/{index-DJ9bn9SF.d.cts → index-CbrjAm_8.d.cts} +23 -1
- package/dist/{index-M0I5B3JA.d.ts → index-CvIXdHzx.d.ts} +23 -1
- package/dist/index.cjs +106 -14
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +45 -8
- package/dist/index.d.ts +45 -8
- package/dist/index.js +8 -8
- package/dist/systems/index.cjs +102 -14
- package/dist/systems/index.cjs.map +1 -1
- package/dist/systems/index.d.cts +2 -2
- package/dist/systems/index.d.ts +2 -2
- package/dist/systems/index.js +3 -3
- package/dist/types.d.cts +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/worldSnapshotUtils.d.cts +1 -1
- package/dist/worldSnapshotUtils.d.ts +1 -1
- package/package.json +1 -1
- package/dist/chunk-ID7U4FER.js.map +0 -1
- package/dist/chunk-LCJ6IH2O.js.map +0 -1
- package/dist/chunk-OMDYLFTN.js.map +0 -1
|
@@ -603,6 +603,13 @@ type CreatePayload = {
|
|
|
603
603
|
options?: Record<string, unknown>;
|
|
604
604
|
camera?: Record<string, unknown>;
|
|
605
605
|
useWorldCamera?: boolean;
|
|
606
|
+
/**
|
|
607
|
+
* Suppress the default child entities a factory would otherwise create.
|
|
608
|
+
*
|
|
609
|
+
* Set during hydration: the snapshot already contains those children, so
|
|
610
|
+
* letting the factory add its own too duplicates them on every load.
|
|
611
|
+
*/
|
|
612
|
+
skipDefaultChildren?: boolean;
|
|
606
613
|
};
|
|
607
614
|
type CreateContext = {
|
|
608
615
|
world: World;
|
|
@@ -603,6 +603,13 @@ type CreatePayload = {
|
|
|
603
603
|
options?: Record<string, unknown>;
|
|
604
604
|
camera?: Record<string, unknown>;
|
|
605
605
|
useWorldCamera?: boolean;
|
|
606
|
+
/**
|
|
607
|
+
* Suppress the default child entities a factory would otherwise create.
|
|
608
|
+
*
|
|
609
|
+
* Set during hydration: the snapshot already contains those children, so
|
|
610
|
+
* letting the factory add its own too duplicates them on every load.
|
|
611
|
+
*/
|
|
612
|
+
skipDefaultChildren?: boolean;
|
|
606
613
|
};
|
|
607
614
|
type CreateContext = {
|
|
608
615
|
world: World;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as THREE from 'three';
|
|
2
|
-
import { C as Component, p as EcsEntityKind, F as EcsEntityEditorKind, r as EntityId } from './System-
|
|
2
|
+
import { C as Component, p as EcsEntityKind, F as EcsEntityEditorKind, r as EntityId } from './System-BhnLw0fZ.cjs';
|
|
3
3
|
import * as RAPIER from '@dimforge/rapier3d-compat';
|
|
4
4
|
import { a as XrFinger, b as XrHandPoseOrientation, X as XrHandPoseDefinition } from './handPose-dFxqbFFY.cjs';
|
|
5
5
|
|
|
@@ -1342,10 +1342,10 @@ type XRInteractableOptions = {
|
|
|
1342
1342
|
maxScale?: number;
|
|
1343
1343
|
/** Authored hand-holds. Empty means grab anywhere. */
|
|
1344
1344
|
attachPoints?: XrAttachPoint[];
|
|
1345
|
-
/**
|
|
1346
|
-
|
|
1345
|
+
/** Hand the object the velocity it was moving with when released. */
|
|
1346
|
+
applyVelocityOnRelease?: boolean;
|
|
1347
1347
|
/** Scales released velocity; >1 makes throws feel stronger than real life. */
|
|
1348
|
-
|
|
1348
|
+
velocityScale?: number;
|
|
1349
1349
|
/** Feedback shown while a pointer is on the object. */
|
|
1350
1350
|
hoverBehavior?: XrHoverBehavior;
|
|
1351
1351
|
/** Outline colour used by the `color` and `both` behaviours. */
|
|
@@ -1398,10 +1398,16 @@ declare class XRInteractableComponent extends Component {
|
|
|
1398
1398
|
maxScale: number;
|
|
1399
1399
|
/** Authored hand-holds; empty means grab anywhere. */
|
|
1400
1400
|
attachPoints: XrAttachPoint[];
|
|
1401
|
-
/**
|
|
1402
|
-
|
|
1401
|
+
/**
|
|
1402
|
+
* Hand the object the velocity it was moving with when released.
|
|
1403
|
+
*
|
|
1404
|
+
* Applies to every release, not just a deliberate throw — letting go while
|
|
1405
|
+
* your hand drifts should nudge the object, which is why this is not called
|
|
1406
|
+
* "throw".
|
|
1407
|
+
*/
|
|
1408
|
+
applyVelocityOnRelease: boolean;
|
|
1403
1409
|
/** Multiplier on released velocity. */
|
|
1404
|
-
|
|
1410
|
+
velocityScale: number;
|
|
1405
1411
|
/** Feedback shown while a pointer is on the object. */
|
|
1406
1412
|
hoverBehavior: XrHoverBehavior;
|
|
1407
1413
|
/** Outline colour for the `color` and `both` behaviours. */
|
|
@@ -1484,6 +1490,14 @@ declare class XRRigComponent extends Component {
|
|
|
1484
1490
|
* currently reports avoids shipping a build that shows nothing on half the
|
|
1485
1491
|
* hardware. `none` hands presentation entirely to the author's own meshes.
|
|
1486
1492
|
*/
|
|
1493
|
+
/**
|
|
1494
|
+
* When the pointer ray is drawn.
|
|
1495
|
+
*
|
|
1496
|
+
* `interacting` (default) shows it only while the hand is pointing at something
|
|
1497
|
+
* it could act on, so the scene isn't permanently criss-crossed with rays
|
|
1498
|
+
* implying everything is clickable. `always` suits scenes built around pointing.
|
|
1499
|
+
*/
|
|
1500
|
+
type XrRayVisibility = "always" | "interacting" | "never";
|
|
1487
1501
|
type XrInteractorType = "hands" | "controllers" | "both" | "none";
|
|
1488
1502
|
/**
|
|
1489
1503
|
* Look applied to tracked-hand meshes.
|
|
@@ -1508,7 +1522,8 @@ type XRInteractorOptions = {
|
|
|
1508
1522
|
/** Emissive strength, used by `neon`. */
|
|
1509
1523
|
handEmissiveIntensity?: number;
|
|
1510
1524
|
/** Draw the aim ray from each hand. */
|
|
1511
|
-
|
|
1525
|
+
/** When the pointer ray is drawn. */
|
|
1526
|
+
rayVisibility?: XrRayVisibility;
|
|
1512
1527
|
/** Pointer ray colour. */
|
|
1513
1528
|
rayColor?: string;
|
|
1514
1529
|
/** Pointer ray thickness (diameter), metres. */
|
|
@@ -1536,7 +1551,8 @@ declare class XRInteractorComponent extends Component {
|
|
|
1536
1551
|
/** Emissive strength for glowing presets. */
|
|
1537
1552
|
handEmissiveIntensity: number;
|
|
1538
1553
|
/** Draw the aim ray from each hand. */
|
|
1539
|
-
|
|
1554
|
+
/** When the pointer ray is drawn. */
|
|
1555
|
+
rayVisibility: XrRayVisibility;
|
|
1540
1556
|
/** Pointer ray colour. */
|
|
1541
1557
|
rayColor: string;
|
|
1542
1558
|
/** Pointer ray thickness (diameter), metres. */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as THREE from 'three';
|
|
2
|
-
import { C as Component, p as EcsEntityKind, F as EcsEntityEditorKind, r as EntityId } from './System-
|
|
2
|
+
import { C as Component, p as EcsEntityKind, F as EcsEntityEditorKind, r as EntityId } from './System-BhnLw0fZ.js';
|
|
3
3
|
import * as RAPIER from '@dimforge/rapier3d-compat';
|
|
4
4
|
import { a as XrFinger, b as XrHandPoseOrientation, X as XrHandPoseDefinition } from './handPose-dFxqbFFY.js';
|
|
5
5
|
|
|
@@ -1342,10 +1342,10 @@ type XRInteractableOptions = {
|
|
|
1342
1342
|
maxScale?: number;
|
|
1343
1343
|
/** Authored hand-holds. Empty means grab anywhere. */
|
|
1344
1344
|
attachPoints?: XrAttachPoint[];
|
|
1345
|
-
/**
|
|
1346
|
-
|
|
1345
|
+
/** Hand the object the velocity it was moving with when released. */
|
|
1346
|
+
applyVelocityOnRelease?: boolean;
|
|
1347
1347
|
/** Scales released velocity; >1 makes throws feel stronger than real life. */
|
|
1348
|
-
|
|
1348
|
+
velocityScale?: number;
|
|
1349
1349
|
/** Feedback shown while a pointer is on the object. */
|
|
1350
1350
|
hoverBehavior?: XrHoverBehavior;
|
|
1351
1351
|
/** Outline colour used by the `color` and `both` behaviours. */
|
|
@@ -1398,10 +1398,16 @@ declare class XRInteractableComponent extends Component {
|
|
|
1398
1398
|
maxScale: number;
|
|
1399
1399
|
/** Authored hand-holds; empty means grab anywhere. */
|
|
1400
1400
|
attachPoints: XrAttachPoint[];
|
|
1401
|
-
/**
|
|
1402
|
-
|
|
1401
|
+
/**
|
|
1402
|
+
* Hand the object the velocity it was moving with when released.
|
|
1403
|
+
*
|
|
1404
|
+
* Applies to every release, not just a deliberate throw — letting go while
|
|
1405
|
+
* your hand drifts should nudge the object, which is why this is not called
|
|
1406
|
+
* "throw".
|
|
1407
|
+
*/
|
|
1408
|
+
applyVelocityOnRelease: boolean;
|
|
1403
1409
|
/** Multiplier on released velocity. */
|
|
1404
|
-
|
|
1410
|
+
velocityScale: number;
|
|
1405
1411
|
/** Feedback shown while a pointer is on the object. */
|
|
1406
1412
|
hoverBehavior: XrHoverBehavior;
|
|
1407
1413
|
/** Outline colour for the `color` and `both` behaviours. */
|
|
@@ -1484,6 +1490,14 @@ declare class XRRigComponent extends Component {
|
|
|
1484
1490
|
* currently reports avoids shipping a build that shows nothing on half the
|
|
1485
1491
|
* hardware. `none` hands presentation entirely to the author's own meshes.
|
|
1486
1492
|
*/
|
|
1493
|
+
/**
|
|
1494
|
+
* When the pointer ray is drawn.
|
|
1495
|
+
*
|
|
1496
|
+
* `interacting` (default) shows it only while the hand is pointing at something
|
|
1497
|
+
* it could act on, so the scene isn't permanently criss-crossed with rays
|
|
1498
|
+
* implying everything is clickable. `always` suits scenes built around pointing.
|
|
1499
|
+
*/
|
|
1500
|
+
type XrRayVisibility = "always" | "interacting" | "never";
|
|
1487
1501
|
type XrInteractorType = "hands" | "controllers" | "both" | "none";
|
|
1488
1502
|
/**
|
|
1489
1503
|
* Look applied to tracked-hand meshes.
|
|
@@ -1508,7 +1522,8 @@ type XRInteractorOptions = {
|
|
|
1508
1522
|
/** Emissive strength, used by `neon`. */
|
|
1509
1523
|
handEmissiveIntensity?: number;
|
|
1510
1524
|
/** Draw the aim ray from each hand. */
|
|
1511
|
-
|
|
1525
|
+
/** When the pointer ray is drawn. */
|
|
1526
|
+
rayVisibility?: XrRayVisibility;
|
|
1512
1527
|
/** Pointer ray colour. */
|
|
1513
1528
|
rayColor?: string;
|
|
1514
1529
|
/** Pointer ray thickness (diameter), metres. */
|
|
@@ -1536,7 +1551,8 @@ declare class XRInteractorComponent extends Component {
|
|
|
1536
1551
|
/** Emissive strength for glowing presets. */
|
|
1537
1552
|
handEmissiveIntensity: number;
|
|
1538
1553
|
/** Draw the aim ray from each hand. */
|
|
1539
|
-
|
|
1554
|
+
/** When the pointer ray is drawn. */
|
|
1555
|
+
rayVisibility: XrRayVisibility;
|
|
1540
1556
|
/** Pointer ray colour. */
|
|
1541
1557
|
rayColor: string;
|
|
1542
1558
|
/** Pointer ray thickness (diameter), metres. */
|
|
@@ -1964,8 +1964,8 @@ var _XRInteractableComponent = class _XRInteractableComponent extends Component
|
|
|
1964
1964
|
this.attachPoints = (options?.attachPoints ?? []).map(
|
|
1965
1965
|
(point) => createAttachPoint(point)
|
|
1966
1966
|
);
|
|
1967
|
-
this.
|
|
1968
|
-
this.
|
|
1967
|
+
this.applyVelocityOnRelease = options?.applyVelocityOnRelease ?? true;
|
|
1968
|
+
this.velocityScale = options?.velocityScale ?? 1;
|
|
1969
1969
|
this.hoverBehavior = options?.hoverBehavior ?? "color";
|
|
1970
1970
|
this.hoverColor = options?.hoverColor ?? "#4da3ff";
|
|
1971
1971
|
this.hoverScale = options?.hoverScale ?? 1.06;
|
|
@@ -2009,7 +2009,7 @@ var _XRInteractorComponent = class _XRInteractorComponent extends Component {
|
|
|
2009
2009
|
this.handColor = options?.handColor ?? "#e8b48a";
|
|
2010
2010
|
this.handOpacity = options?.handOpacity ?? 1;
|
|
2011
2011
|
this.handEmissiveIntensity = options?.handEmissiveIntensity ?? 0;
|
|
2012
|
-
this.
|
|
2012
|
+
this.rayVisibility = options?.rayVisibility ?? "interacting";
|
|
2013
2013
|
this.rayColor = options?.rayColor ?? "#4da3ff";
|
|
2014
2014
|
this.rayThickness = options?.rayThickness ?? 6e-3;
|
|
2015
2015
|
}
|
|
@@ -2230,5 +2230,5 @@ __name(_XRHandPoseComponent, "XRHandPoseComponent");
|
|
|
2230
2230
|
var XRHandPoseComponent = _XRHandPoseComponent;
|
|
2231
2231
|
|
|
2232
2232
|
export { AnimationComponent, AnimationStateMachine, AnimationStateManager, AudioComponent, CameraComponent, DEFAULT_COLLIDER_STATE, DEFAULT_ENVIRONMENT_STATE, DEFAULT_INSTANCED_MESH_PARAMETERS, DEFAULT_INSTANCE_TRANSFORM, DEFAULT_MESH_GEOMETRY_PARAMETERS, DEFAULT_PHYSICS_STATE, DEFAULT_POSE_CURLS, DEFAULT_POSTPROCESSING_STATE, DEFAULT_RIGIDBODY_STATE, EntityType, Environment, HAND_POSE_PRESETS, HAND_POSE_PRESET_IDS, ImageComponent, ImageTarget, ImageTargetAnchor, InstanceSlotComponent, InstancedMeshComponent, LightComponent, MaterialComponent, MeshComponent, MeshGeometryComponent, ModelComponent, Name, Object3DRef, ParentId, PhysicsComponent, Postprocessing, PrefabInstance, PrefabNode, ScriptComponent, ScriptObjectComponent, Selectable, SelectionTransformState, SpriteComponent, TransformComponent, VRTeleportAreaComponent, VideoComponent, XRHandPoseComponent, XRInteractableComponent, XRInteractorComponent, XRInteractorSideComponent, XRRigComponent, cloneHandPose, components_exports, createAttachPoint, createHandPoseEntry, defaultMaterialValue, getHandPosePreset, handPoseDefinitionFor, handPoseFromCurls, normalizePhysicsState, setPhysicsLiveRef };
|
|
2233
|
-
//# sourceMappingURL=chunk-
|
|
2234
|
-
//# sourceMappingURL=chunk-
|
|
2233
|
+
//# sourceMappingURL=chunk-3LDQ4GVZ.js.map
|
|
2234
|
+
//# sourceMappingURL=chunk-3LDQ4GVZ.js.map
|