Class: XRBlocksWorldSensingPort
Defined in: xrblocks-environment/src/world-sensing-port.ts:40
What an adapter implements. Everything except observe is optional, because
every host has a different subset and a missing method is reported rather
than thrown.
Implements
Constructors
Constructor
new XRBlocksWorldSensingPort(world: XBWorldLike): XRBlocksWorldSensingPort;
Defined in: xrblocks-environment/src/world-sensing-port.ts:49
Parameters
| Parameter | Type |
|---|---|
world | XBWorldLike |
Returns
XRBlocksWorldSensingPort
Methods
createAnchor()
createAnchor(): Promise<string | null>;
Defined in: xrblocks-environment/src/world-sensing-port.ts:89
Ask the runtime to remember a point. Resolves to the anchor's id, or null
when the runtime refused. Anchors then arrive through host.anchors like
any other, so an app can treat its own and the system's the same way.
Returns
Promise<string | null>
Implementation of
dispose()
dispose(): void;
Defined in: xrblocks-environment/src/world-sensing-port.ts:105
Returns
void
Implementation of
observe()
observe(host: WorldSensingPortHost): () => void;
Defined in: xrblocks-environment/src/world-sensing-port.ts:53
Parameters
| Parameter | Type |
|---|---|
host | WorldSensingPortHost |
Returns
() => void
Implementation of
setDetection()
setDetection(detection:
| ResolvedWorldDetection
| null): void;
Defined in: xrblocks-environment/src/world-sensing-port.ts:60
Turn detection on or off. null means stop everything.
Parameters
| Parameter | Type |
|---|---|
detection | | ResolvedWorldDetection | null |
Returns
void
Implementation of
startHitTest()
startHitTest(_request: HitTestRequest): void;
Defined in: xrblocks-environment/src/world-sensing-port.ts:81
Parameters
| Parameter | Type |
|---|---|
_request | HitTestRequest |
Returns
void
Implementation of
update()
update(): void;
Defined in: xrblocks-environment/src/world-sensing-port.ts:98
Called from the director's update; this is where a port polls its host.
Returns
void