@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
|
@@ -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,12 @@ 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;
|
|
1527
|
+
/** Pointer ray colour. */
|
|
1528
|
+
rayColor?: string;
|
|
1529
|
+
/** Pointer ray thickness (diameter), metres. */
|
|
1530
|
+
rayThickness?: number;
|
|
1512
1531
|
};
|
|
1513
1532
|
/**
|
|
1514
1533
|
* Configures what the user sees as their hands, and hosts custom hand content.
|
|
@@ -1532,7 +1551,12 @@ declare class XRInteractorComponent extends Component {
|
|
|
1532
1551
|
/** Emissive strength for glowing presets. */
|
|
1533
1552
|
handEmissiveIntensity: number;
|
|
1534
1553
|
/** Draw the aim ray from each hand. */
|
|
1535
|
-
|
|
1554
|
+
/** When the pointer ray is drawn. */
|
|
1555
|
+
rayVisibility: XrRayVisibility;
|
|
1556
|
+
/** Pointer ray colour. */
|
|
1557
|
+
rayColor: string;
|
|
1558
|
+
/** Pointer ray thickness (diameter), metres. */
|
|
1559
|
+
rayThickness: number;
|
|
1536
1560
|
constructor(options?: XRInteractorOptions);
|
|
1537
1561
|
}
|
|
1538
1562
|
/**
|
|
@@ -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,12 @@ 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;
|
|
1527
|
+
/** Pointer ray colour. */
|
|
1528
|
+
rayColor?: string;
|
|
1529
|
+
/** Pointer ray thickness (diameter), metres. */
|
|
1530
|
+
rayThickness?: number;
|
|
1512
1531
|
};
|
|
1513
1532
|
/**
|
|
1514
1533
|
* Configures what the user sees as their hands, and hosts custom hand content.
|
|
@@ -1532,7 +1551,12 @@ declare class XRInteractorComponent extends Component {
|
|
|
1532
1551
|
/** Emissive strength for glowing presets. */
|
|
1533
1552
|
handEmissiveIntensity: number;
|
|
1534
1553
|
/** Draw the aim ray from each hand. */
|
|
1535
|
-
|
|
1554
|
+
/** When the pointer ray is drawn. */
|
|
1555
|
+
rayVisibility: XrRayVisibility;
|
|
1556
|
+
/** Pointer ray colour. */
|
|
1557
|
+
rayColor: string;
|
|
1558
|
+
/** Pointer ray thickness (diameter), metres. */
|
|
1559
|
+
rayThickness: number;
|
|
1536
1560
|
constructor(options?: XRInteractorOptions);
|
|
1537
1561
|
}
|
|
1538
1562
|
/**
|
|
@@ -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,9 @@ 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
|
+
this.rayColor = options?.rayColor ?? "#4da3ff";
|
|
2014
|
+
this.rayThickness = options?.rayThickness ?? 6e-3;
|
|
2013
2015
|
}
|
|
2014
2016
|
};
|
|
2015
2017
|
__name(_XRInteractorComponent, "XRInteractorComponent");
|
|
@@ -2228,5 +2230,5 @@ __name(_XRHandPoseComponent, "XRHandPoseComponent");
|
|
|
2228
2230
|
var XRHandPoseComponent = _XRHandPoseComponent;
|
|
2229
2231
|
|
|
2230
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 };
|
|
2231
|
-
//# sourceMappingURL=chunk-
|
|
2232
|
-
//# sourceMappingURL=chunk-
|
|
2233
|
+
//# sourceMappingURL=chunk-3LDQ4GVZ.js.map
|
|
2234
|
+
//# sourceMappingURL=chunk-3LDQ4GVZ.js.map
|