@relu-interactives/spatial-ecs 0.3.5 → 0.3.6
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-vrU46Vuw.d.cts → System-TmC2EijF.d.cts} +2 -2
- package/dist/{System-vrU46Vuw.d.ts → System-TmC2EijF.d.ts} +2 -2
- package/dist/{XRRig-2686IqLQ.d.cts → XRInteractor-CCUzSqg9.d.ts} +96 -2
- package/dist/{XRRig-D2QURXl1.d.ts → XRInteractor-I2q6TKtF.d.cts} +96 -2
- package/dist/{chunk-4BZYK3JP.js → chunk-FQTOC7HK.js} +135 -88
- package/dist/chunk-FQTOC7HK.js.map +1 -0
- package/dist/{chunk-2LVFGVWI.js → chunk-JRJ3CL5H.js} +3 -3
- package/dist/{chunk-2LVFGVWI.js.map → chunk-JRJ3CL5H.js.map} +1 -1
- package/dist/{chunk-6QC2PJLD.js → chunk-N4GKZ7IV.js} +29 -3
- package/dist/chunk-N4GKZ7IV.js.map +1 -0
- package/dist/{chunk-G53MZVKQ.js → chunk-WRJ2K3LZ.js} +285 -39
- package/dist/chunk-WRJ2K3LZ.js.map +1 -0
- package/dist/components/index.cjs +26 -0
- 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/factories/index.cjs +185 -112
- package/dist/factories/index.cjs.map +1 -1
- package/dist/factories/index.d.cts +7 -3
- package/dist/factories/index.d.ts +7 -3
- package/dist/factories/index.js +3 -3
- package/dist/{index-BtKOaHfY.d.ts → index-BltjPEhg.d.cts} +10 -3
- package/dist/{index-B-CViRMx.d.ts → index-BpbmZuOz.d.ts} +43 -14
- package/dist/{index-BvCmmuJ0.d.cts → index-C5FrDt3z.d.cts} +43 -14
- package/dist/{index-Xu238jLn.d.cts → index-W8pUajCW.d.ts} +10 -3
- package/dist/index.cjs +602 -279
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +35 -9
- package/dist/index.d.ts +35 -9
- package/dist/index.js +8 -8
- package/dist/systems/index.cjs +304 -34
- 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-4BZYK3JP.js.map +0 -1
- package/dist/chunk-6QC2PJLD.js.map +0 -1
- package/dist/chunk-G53MZVKQ.js.map +0 -1
|
@@ -333,7 +333,7 @@ type EntityId = number;
|
|
|
333
333
|
* maps to an object factory in `core/factories/objects/*` that creates the
|
|
334
334
|
* baseline component set.
|
|
335
335
|
*/
|
|
336
|
-
type EcsEntityKind = "cube" | "sphere" | "plane" | "capsule" | "cylinder" | "empty" | "model" | "image" | "imageTarget" | "sprite" | "audio" | "camera" | "video" | "ambientLight" | "directionalLight" | "pointLight" | "spotLight" | "areaLight" | "instancedMesh" | "instanceSlot" | "scriptObject" | "xrRig" | "teleportArea";
|
|
336
|
+
type EcsEntityKind = "cube" | "sphere" | "plane" | "capsule" | "cylinder" | "empty" | "model" | "image" | "imageTarget" | "sprite" | "audio" | "camera" | "video" | "ambientLight" | "directionalLight" | "pointLight" | "spotLight" | "areaLight" | "instancedMesh" | "instanceSlot" | "scriptObject" | "xrRig" | "xrInteractor" | "teleportArea";
|
|
337
337
|
/** {@link EcsEntityKind} extended with editor-only utility entities (gizmos, helpers). */
|
|
338
338
|
type EcsEntityEditorKind = EcsEntityKind | "editorUtility";
|
|
339
339
|
/** Callback invoked when the selected entity changes. `null` indicates a deselection. */
|
|
@@ -612,7 +612,7 @@ type CreateContext = {
|
|
|
612
612
|
isEditor?: boolean;
|
|
613
613
|
};
|
|
614
614
|
type EntityFactory = (context: CreateContext) => EntityId;
|
|
615
|
-
type EcsComponentFactoryKind = "animation" | "audio" | "camera" | "environment" | "entityType" | "image" | "imageTargetAnchor" | "imageTarget" | "light" | "material" | "mesh" | "meshGeometry" | "model" | "name" | "object3DRef" | "parentId" | "physics" | "postprocessing" | "script" | "scriptObject" | "selectable" | "selectionTransformState" | "sprite" | "transform" | "video" | "instancedMesh" | "xrRig" | "vrTeleportArea" | "xrInteractable";
|
|
615
|
+
type EcsComponentFactoryKind = "animation" | "audio" | "camera" | "environment" | "entityType" | "image" | "imageTargetAnchor" | "imageTarget" | "light" | "material" | "mesh" | "meshGeometry" | "model" | "name" | "object3DRef" | "parentId" | "physics" | "postprocessing" | "script" | "scriptObject" | "selectable" | "selectionTransformState" | "sprite" | "transform" | "video" | "instancedMesh" | "xrRig" | "vrTeleportArea" | "xrInteractable" | "xrInteractor" | "xrInteractorSide";
|
|
616
616
|
type ComponentFactory = (world: World, entityId: EntityId, ...args: any[]) => unknown;
|
|
617
617
|
declare class ObjectManagementSystem implements EcsSystem {
|
|
618
618
|
private readonly scene;
|
|
@@ -333,7 +333,7 @@ type EntityId = number;
|
|
|
333
333
|
* maps to an object factory in `core/factories/objects/*` that creates the
|
|
334
334
|
* baseline component set.
|
|
335
335
|
*/
|
|
336
|
-
type EcsEntityKind = "cube" | "sphere" | "plane" | "capsule" | "cylinder" | "empty" | "model" | "image" | "imageTarget" | "sprite" | "audio" | "camera" | "video" | "ambientLight" | "directionalLight" | "pointLight" | "spotLight" | "areaLight" | "instancedMesh" | "instanceSlot" | "scriptObject" | "xrRig" | "teleportArea";
|
|
336
|
+
type EcsEntityKind = "cube" | "sphere" | "plane" | "capsule" | "cylinder" | "empty" | "model" | "image" | "imageTarget" | "sprite" | "audio" | "camera" | "video" | "ambientLight" | "directionalLight" | "pointLight" | "spotLight" | "areaLight" | "instancedMesh" | "instanceSlot" | "scriptObject" | "xrRig" | "xrInteractor" | "teleportArea";
|
|
337
337
|
/** {@link EcsEntityKind} extended with editor-only utility entities (gizmos, helpers). */
|
|
338
338
|
type EcsEntityEditorKind = EcsEntityKind | "editorUtility";
|
|
339
339
|
/** Callback invoked when the selected entity changes. `null` indicates a deselection. */
|
|
@@ -612,7 +612,7 @@ type CreateContext = {
|
|
|
612
612
|
isEditor?: boolean;
|
|
613
613
|
};
|
|
614
614
|
type EntityFactory = (context: CreateContext) => EntityId;
|
|
615
|
-
type EcsComponentFactoryKind = "animation" | "audio" | "camera" | "environment" | "entityType" | "image" | "imageTargetAnchor" | "imageTarget" | "light" | "material" | "mesh" | "meshGeometry" | "model" | "name" | "object3DRef" | "parentId" | "physics" | "postprocessing" | "script" | "scriptObject" | "selectable" | "selectionTransformState" | "sprite" | "transform" | "video" | "instancedMesh" | "xrRig" | "vrTeleportArea" | "xrInteractable";
|
|
615
|
+
type EcsComponentFactoryKind = "animation" | "audio" | "camera" | "environment" | "entityType" | "image" | "imageTargetAnchor" | "imageTarget" | "light" | "material" | "mesh" | "meshGeometry" | "model" | "name" | "object3DRef" | "parentId" | "physics" | "postprocessing" | "script" | "scriptObject" | "selectable" | "selectionTransformState" | "sprite" | "transform" | "video" | "instancedMesh" | "xrRig" | "vrTeleportArea" | "xrInteractable" | "xrInteractor" | "xrInteractorSide";
|
|
616
616
|
type ComponentFactory = (world: World, entityId: EntityId, ...args: any[]) => unknown;
|
|
617
617
|
declare class ObjectManagementSystem implements EcsSystem {
|
|
618
618
|
private readonly scene;
|
|
@@ -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-TmC2EijF.js';
|
|
3
3
|
import * as RAPIER from '@dimforge/rapier3d-compat';
|
|
4
4
|
|
|
5
5
|
interface StateMachine {
|
|
@@ -1252,10 +1252,25 @@ declare class XRInteractableComponent extends Component {
|
|
|
1252
1252
|
constructor(options?: XRInteractableOptions);
|
|
1253
1253
|
}
|
|
1254
1254
|
|
|
1255
|
+
/**
|
|
1256
|
+
* Where the headset's origin sits in the scene.
|
|
1257
|
+
*
|
|
1258
|
+
* `floor` maps to the WebXR `local-floor` reference space: Y=0 is the user's
|
|
1259
|
+
* real floor, so content authored standing on the ground lines up naturally.
|
|
1260
|
+
* `eye` maps to `local`: Y=0 is wherever the headset was when the session
|
|
1261
|
+
* started, which suits seated/cockpit experiences.
|
|
1262
|
+
*
|
|
1263
|
+
* Getting this wrong is the classic "I spawned inside/under the geometry" bug —
|
|
1264
|
+
* with `eye`, a scene authored floor-relative places the user's eyes at ground
|
|
1265
|
+
* level, sinking them through the floor.
|
|
1266
|
+
*/
|
|
1267
|
+
type XrTrackingOrigin = "floor" | "eye";
|
|
1255
1268
|
/** How the player moves through the scene in an immersive session. */
|
|
1256
1269
|
type XrLocomotionMode = "teleport" | "smooth" | "none";
|
|
1257
1270
|
/** Optional initializer for {@link XRRigComponent}. */
|
|
1258
1271
|
type XRRigOptions = {
|
|
1272
|
+
/** Where the headset origin sits. Defaults to `floor`. */
|
|
1273
|
+
trackingOrigin?: XrTrackingOrigin;
|
|
1259
1274
|
/** Movement style. Defaults to `teleport` — the most comfort-safe option. */
|
|
1260
1275
|
locomotion?: XrLocomotionMode;
|
|
1261
1276
|
/** Metres/second for `smooth` locomotion. */
|
|
@@ -1282,6 +1297,8 @@ type XRRigOptions = {
|
|
|
1282
1297
|
* @category Components
|
|
1283
1298
|
*/
|
|
1284
1299
|
declare class XRRigComponent extends Component {
|
|
1300
|
+
/** Where the headset origin sits (floor-relative vs eye-relative). */
|
|
1301
|
+
trackingOrigin: XrTrackingOrigin;
|
|
1285
1302
|
/** Movement style. */
|
|
1286
1303
|
locomotion: XrLocomotionMode;
|
|
1287
1304
|
/** Metres/second for `smooth` locomotion. */
|
|
@@ -1295,4 +1312,81 @@ declare class XRRigComponent extends Component {
|
|
|
1295
1312
|
constructor(options?: XRRigOptions);
|
|
1296
1313
|
}
|
|
1297
1314
|
|
|
1298
|
-
|
|
1315
|
+
/**
|
|
1316
|
+
* What is rendered at the user's hands.
|
|
1317
|
+
*
|
|
1318
|
+
* `both` is the honest default for a cross-device build: a Quest user may put
|
|
1319
|
+
* controllers down and switch to hands mid-session, and Android XR leads with
|
|
1320
|
+
* hands while Quest/Pico lead with controllers. Rendering whichever the device
|
|
1321
|
+
* currently reports avoids shipping a build that shows nothing on half the
|
|
1322
|
+
* hardware. `none` hands presentation entirely to the author's own meshes.
|
|
1323
|
+
*/
|
|
1324
|
+
type XrInteractorType = "hands" | "controllers" | "both" | "none";
|
|
1325
|
+
/**
|
|
1326
|
+
* Look applied to tracked-hand meshes.
|
|
1327
|
+
*
|
|
1328
|
+
* Presets exist because hand rendering is the single most visible surface of a
|
|
1329
|
+
* VR experience and hand-authoring a shader for it is a big ask — but `custom`
|
|
1330
|
+
* is always available for authors who want full control.
|
|
1331
|
+
*/
|
|
1332
|
+
type XrHandPreset = "default" | "ghost" | "neon" | "skeleton" | "custom";
|
|
1333
|
+
/** Which hand a child interactor entity follows. */
|
|
1334
|
+
type XrInteractorSide = "left" | "right";
|
|
1335
|
+
/** Optional initializer for {@link XRInteractorComponent}. */
|
|
1336
|
+
type XRInteractorOptions = {
|
|
1337
|
+
/** What to render at the hands. */
|
|
1338
|
+
interactorType?: XrInteractorType;
|
|
1339
|
+
/** Look for tracked-hand meshes. */
|
|
1340
|
+
handPreset?: XrHandPreset;
|
|
1341
|
+
/** Tint applied by the preset (and by `custom`). */
|
|
1342
|
+
handColor?: string;
|
|
1343
|
+
/** 0-1; `ghost` leans on this. */
|
|
1344
|
+
handOpacity?: number;
|
|
1345
|
+
/** Emissive strength, used by `neon`. */
|
|
1346
|
+
handEmissiveIntensity?: number;
|
|
1347
|
+
/** Draw the aim ray from each hand. */
|
|
1348
|
+
showRay?: boolean;
|
|
1349
|
+
};
|
|
1350
|
+
/**
|
|
1351
|
+
* Configures what the user sees as their hands, and hosts custom hand content.
|
|
1352
|
+
*
|
|
1353
|
+
* An interactor entity owns two children — a left and a right interactor —
|
|
1354
|
+
* whose transforms are driven by the corresponding tracked hand. Anything an
|
|
1355
|
+
* author parents under those children renders at that hand, which is how custom
|
|
1356
|
+
* tools, gloves, or held props are built without any scripting.
|
|
1357
|
+
*
|
|
1358
|
+
* @category Components
|
|
1359
|
+
*/
|
|
1360
|
+
declare class XRInteractorComponent extends Component {
|
|
1361
|
+
/** What to render at the hands. */
|
|
1362
|
+
interactorType: XrInteractorType;
|
|
1363
|
+
/** Look for tracked-hand meshes. */
|
|
1364
|
+
handPreset: XrHandPreset;
|
|
1365
|
+
/** Tint applied by the preset. */
|
|
1366
|
+
handColor: string;
|
|
1367
|
+
/** 0-1 opacity for translucent presets. */
|
|
1368
|
+
handOpacity: number;
|
|
1369
|
+
/** Emissive strength for glowing presets. */
|
|
1370
|
+
handEmissiveIntensity: number;
|
|
1371
|
+
/** Draw the aim ray from each hand. */
|
|
1372
|
+
showRay: boolean;
|
|
1373
|
+
constructor(options?: XRInteractorOptions);
|
|
1374
|
+
}
|
|
1375
|
+
/**
|
|
1376
|
+
* Marks an entity as the left or right hand slot of an {@link XRInteractorComponent}.
|
|
1377
|
+
*
|
|
1378
|
+
* Its transform is driven every frame from the tracked hand, so authored
|
|
1379
|
+
* children ride along. Authors never set this by hand — the interactor factory
|
|
1380
|
+
* creates both slots.
|
|
1381
|
+
*
|
|
1382
|
+
* @category Components
|
|
1383
|
+
*/
|
|
1384
|
+
declare class XRInteractorSideComponent extends Component {
|
|
1385
|
+
/** Which hand this slot follows. */
|
|
1386
|
+
side: XrInteractorSide;
|
|
1387
|
+
constructor(options?: {
|
|
1388
|
+
side?: XrInteractorSide;
|
|
1389
|
+
});
|
|
1390
|
+
}
|
|
1391
|
+
|
|
1392
|
+
export { SpriteComponent as $, AnimationComponent as A, MeshGeometryComponent as B, CameraComponent as C, DEFAULT_COLLIDER_STATE as D, type EditableMeshObjectKind as E, type MeshGeometryParameters as F, type MeshGeometryParametersByKind as G, ModelComponent as H, ImageComponent as I, type PhysicsState as J, type PlaneMeshParameters as K, LightComponent as L, MaterialComponent as M, Name as N, Object3DRef as O, PhysicsComponent as P, type RadiusMeshParameters as Q, type RadiusHeightMeshParameters as R, type RigidbodyState as S, type RigidbodyType as T, ScriptComponent as U, type ScriptEntry as V, ScriptObjectComponent as W, type ScriptObjectComponentInput as X, type ScriptObjectRuntimeState as Y, Selectable as Z, SelectionTransformState as _, type AnimationComponentOptions as a, type TextureFilteringValue as a0, type TransformModeValue as a1, type TransformSpaceValue as a2, VRTeleportAreaComponent as a3, type VRTeleportAreaOptions as a4, VideoComponent as a5, type VrTeleportShape as a6, XRInteractableComponent as a7, type XRInteractableOptions as a8, XRInteractorComponent as a9, type XRInteractorOptions as aa, XRInteractorSideComponent as ab, XRRigComponent as ac, type XRRigOptions as ad, type XrGrabMode as ae, type XrHandPreset as af, type XrInteractorSide as ag, type XrInteractorType as ah, type XrLocomotionMode as ai, type XrTrackingOrigin as aj, defaultMaterialValue as ak, normalizePhysicsState as al, setPhysicsLiveRef as am, type AnimationStateCallbacks as an, AnimationStateMachine as ao, AnimationStateManager as ap, type StateMachine as aq, AudioComponent as b, type CameraComponentOptions as c, type CameraProjection as d, type CameraRuntimeType as e, type ColliderShape as f, type ColliderState as g, type CubeMeshParameters as h, DEFAULT_INSTANCED_MESH_PARAMETERS as i, DEFAULT_INSTANCE_TRANSFORM as j, DEFAULT_MESH_GEOMETRY_PARAMETERS as k, DEFAULT_PHYSICS_STATE as l, DEFAULT_RIGIDBODY_STATE as m, EntityType as n, ImageTarget as o, ImageTargetAnchor as p, type ImageTargetAnchorOptions as q, type ImageTargetReference as r, InstanceSlotComponent as s, type InstanceTransform as t, InstancedMeshComponent as u, type InstancedMeshKind as v, type LightValueState as w, type MaterialTypeValue as x, type MaterialValueState as y, MeshComponent as z };
|
|
@@ -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-TmC2EijF.cjs';
|
|
3
3
|
import * as RAPIER from '@dimforge/rapier3d-compat';
|
|
4
4
|
|
|
5
5
|
interface StateMachine {
|
|
@@ -1252,10 +1252,25 @@ declare class XRInteractableComponent extends Component {
|
|
|
1252
1252
|
constructor(options?: XRInteractableOptions);
|
|
1253
1253
|
}
|
|
1254
1254
|
|
|
1255
|
+
/**
|
|
1256
|
+
* Where the headset's origin sits in the scene.
|
|
1257
|
+
*
|
|
1258
|
+
* `floor` maps to the WebXR `local-floor` reference space: Y=0 is the user's
|
|
1259
|
+
* real floor, so content authored standing on the ground lines up naturally.
|
|
1260
|
+
* `eye` maps to `local`: Y=0 is wherever the headset was when the session
|
|
1261
|
+
* started, which suits seated/cockpit experiences.
|
|
1262
|
+
*
|
|
1263
|
+
* Getting this wrong is the classic "I spawned inside/under the geometry" bug —
|
|
1264
|
+
* with `eye`, a scene authored floor-relative places the user's eyes at ground
|
|
1265
|
+
* level, sinking them through the floor.
|
|
1266
|
+
*/
|
|
1267
|
+
type XrTrackingOrigin = "floor" | "eye";
|
|
1255
1268
|
/** How the player moves through the scene in an immersive session. */
|
|
1256
1269
|
type XrLocomotionMode = "teleport" | "smooth" | "none";
|
|
1257
1270
|
/** Optional initializer for {@link XRRigComponent}. */
|
|
1258
1271
|
type XRRigOptions = {
|
|
1272
|
+
/** Where the headset origin sits. Defaults to `floor`. */
|
|
1273
|
+
trackingOrigin?: XrTrackingOrigin;
|
|
1259
1274
|
/** Movement style. Defaults to `teleport` — the most comfort-safe option. */
|
|
1260
1275
|
locomotion?: XrLocomotionMode;
|
|
1261
1276
|
/** Metres/second for `smooth` locomotion. */
|
|
@@ -1282,6 +1297,8 @@ type XRRigOptions = {
|
|
|
1282
1297
|
* @category Components
|
|
1283
1298
|
*/
|
|
1284
1299
|
declare class XRRigComponent extends Component {
|
|
1300
|
+
/** Where the headset origin sits (floor-relative vs eye-relative). */
|
|
1301
|
+
trackingOrigin: XrTrackingOrigin;
|
|
1285
1302
|
/** Movement style. */
|
|
1286
1303
|
locomotion: XrLocomotionMode;
|
|
1287
1304
|
/** Metres/second for `smooth` locomotion. */
|
|
@@ -1295,4 +1312,81 @@ declare class XRRigComponent extends Component {
|
|
|
1295
1312
|
constructor(options?: XRRigOptions);
|
|
1296
1313
|
}
|
|
1297
1314
|
|
|
1298
|
-
|
|
1315
|
+
/**
|
|
1316
|
+
* What is rendered at the user's hands.
|
|
1317
|
+
*
|
|
1318
|
+
* `both` is the honest default for a cross-device build: a Quest user may put
|
|
1319
|
+
* controllers down and switch to hands mid-session, and Android XR leads with
|
|
1320
|
+
* hands while Quest/Pico lead with controllers. Rendering whichever the device
|
|
1321
|
+
* currently reports avoids shipping a build that shows nothing on half the
|
|
1322
|
+
* hardware. `none` hands presentation entirely to the author's own meshes.
|
|
1323
|
+
*/
|
|
1324
|
+
type XrInteractorType = "hands" | "controllers" | "both" | "none";
|
|
1325
|
+
/**
|
|
1326
|
+
* Look applied to tracked-hand meshes.
|
|
1327
|
+
*
|
|
1328
|
+
* Presets exist because hand rendering is the single most visible surface of a
|
|
1329
|
+
* VR experience and hand-authoring a shader for it is a big ask — but `custom`
|
|
1330
|
+
* is always available for authors who want full control.
|
|
1331
|
+
*/
|
|
1332
|
+
type XrHandPreset = "default" | "ghost" | "neon" | "skeleton" | "custom";
|
|
1333
|
+
/** Which hand a child interactor entity follows. */
|
|
1334
|
+
type XrInteractorSide = "left" | "right";
|
|
1335
|
+
/** Optional initializer for {@link XRInteractorComponent}. */
|
|
1336
|
+
type XRInteractorOptions = {
|
|
1337
|
+
/** What to render at the hands. */
|
|
1338
|
+
interactorType?: XrInteractorType;
|
|
1339
|
+
/** Look for tracked-hand meshes. */
|
|
1340
|
+
handPreset?: XrHandPreset;
|
|
1341
|
+
/** Tint applied by the preset (and by `custom`). */
|
|
1342
|
+
handColor?: string;
|
|
1343
|
+
/** 0-1; `ghost` leans on this. */
|
|
1344
|
+
handOpacity?: number;
|
|
1345
|
+
/** Emissive strength, used by `neon`. */
|
|
1346
|
+
handEmissiveIntensity?: number;
|
|
1347
|
+
/** Draw the aim ray from each hand. */
|
|
1348
|
+
showRay?: boolean;
|
|
1349
|
+
};
|
|
1350
|
+
/**
|
|
1351
|
+
* Configures what the user sees as their hands, and hosts custom hand content.
|
|
1352
|
+
*
|
|
1353
|
+
* An interactor entity owns two children — a left and a right interactor —
|
|
1354
|
+
* whose transforms are driven by the corresponding tracked hand. Anything an
|
|
1355
|
+
* author parents under those children renders at that hand, which is how custom
|
|
1356
|
+
* tools, gloves, or held props are built without any scripting.
|
|
1357
|
+
*
|
|
1358
|
+
* @category Components
|
|
1359
|
+
*/
|
|
1360
|
+
declare class XRInteractorComponent extends Component {
|
|
1361
|
+
/** What to render at the hands. */
|
|
1362
|
+
interactorType: XrInteractorType;
|
|
1363
|
+
/** Look for tracked-hand meshes. */
|
|
1364
|
+
handPreset: XrHandPreset;
|
|
1365
|
+
/** Tint applied by the preset. */
|
|
1366
|
+
handColor: string;
|
|
1367
|
+
/** 0-1 opacity for translucent presets. */
|
|
1368
|
+
handOpacity: number;
|
|
1369
|
+
/** Emissive strength for glowing presets. */
|
|
1370
|
+
handEmissiveIntensity: number;
|
|
1371
|
+
/** Draw the aim ray from each hand. */
|
|
1372
|
+
showRay: boolean;
|
|
1373
|
+
constructor(options?: XRInteractorOptions);
|
|
1374
|
+
}
|
|
1375
|
+
/**
|
|
1376
|
+
* Marks an entity as the left or right hand slot of an {@link XRInteractorComponent}.
|
|
1377
|
+
*
|
|
1378
|
+
* Its transform is driven every frame from the tracked hand, so authored
|
|
1379
|
+
* children ride along. Authors never set this by hand — the interactor factory
|
|
1380
|
+
* creates both slots.
|
|
1381
|
+
*
|
|
1382
|
+
* @category Components
|
|
1383
|
+
*/
|
|
1384
|
+
declare class XRInteractorSideComponent extends Component {
|
|
1385
|
+
/** Which hand this slot follows. */
|
|
1386
|
+
side: XrInteractorSide;
|
|
1387
|
+
constructor(options?: {
|
|
1388
|
+
side?: XrInteractorSide;
|
|
1389
|
+
});
|
|
1390
|
+
}
|
|
1391
|
+
|
|
1392
|
+
export { SpriteComponent as $, AnimationComponent as A, MeshGeometryComponent as B, CameraComponent as C, DEFAULT_COLLIDER_STATE as D, type EditableMeshObjectKind as E, type MeshGeometryParameters as F, type MeshGeometryParametersByKind as G, ModelComponent as H, ImageComponent as I, type PhysicsState as J, type PlaneMeshParameters as K, LightComponent as L, MaterialComponent as M, Name as N, Object3DRef as O, PhysicsComponent as P, type RadiusMeshParameters as Q, type RadiusHeightMeshParameters as R, type RigidbodyState as S, type RigidbodyType as T, ScriptComponent as U, type ScriptEntry as V, ScriptObjectComponent as W, type ScriptObjectComponentInput as X, type ScriptObjectRuntimeState as Y, Selectable as Z, SelectionTransformState as _, type AnimationComponentOptions as a, type TextureFilteringValue as a0, type TransformModeValue as a1, type TransformSpaceValue as a2, VRTeleportAreaComponent as a3, type VRTeleportAreaOptions as a4, VideoComponent as a5, type VrTeleportShape as a6, XRInteractableComponent as a7, type XRInteractableOptions as a8, XRInteractorComponent as a9, type XRInteractorOptions as aa, XRInteractorSideComponent as ab, XRRigComponent as ac, type XRRigOptions as ad, type XrGrabMode as ae, type XrHandPreset as af, type XrInteractorSide as ag, type XrInteractorType as ah, type XrLocomotionMode as ai, type XrTrackingOrigin as aj, defaultMaterialValue as ak, normalizePhysicsState as al, setPhysicsLiveRef as am, type AnimationStateCallbacks as an, AnimationStateMachine as ao, AnimationStateManager as ap, type StateMachine as aq, AudioComponent as b, type CameraComponentOptions as c, type CameraProjection as d, type CameraRuntimeType as e, type ColliderShape as f, type ColliderState as g, type CubeMeshParameters as h, DEFAULT_INSTANCED_MESH_PARAMETERS as i, DEFAULT_INSTANCE_TRANSFORM as j, DEFAULT_MESH_GEOMETRY_PARAMETERS as k, DEFAULT_PHYSICS_STATE as l, DEFAULT_RIGIDBODY_STATE as m, EntityType as n, ImageTarget as o, ImageTargetAnchor as p, type ImageTargetAnchorOptions as q, type ImageTargetReference as r, InstanceSlotComponent as s, type InstanceTransform as t, InstancedMeshComponent as u, type InstancedMeshKind as v, type LightValueState as w, type MaterialTypeValue as x, type MaterialValueState as y, MeshComponent as z };
|