Interface: WorldSensingPort
Defined in: world-sensing-director.ts:57
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.
Methods
createAnchor()?
optional createAnchor(pose: WorldPose): Promise<string | null>;
Defined in: world-sensing-director.ts:68
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.
Parameters
| Parameter | Type |
|---|---|
pose | WorldPose |
Returns
Promise<string | null>
dispose()?
optional dispose(): void;
Defined in: world-sensing-director.ts:72
Returns
void
observe()
observe(host: WorldSensingPortHost): void | (() => void);
Defined in: world-sensing-director.ts:58
Parameters
| Parameter | Type |
|---|---|
host | WorldSensingPortHost |
Returns
void | (() => void)
removeAnchor()?
optional removeAnchor(id: string): void;
Defined in: world-sensing-director.ts:69
Parameters
| Parameter | Type |
|---|---|
id | string |
Returns
void
setDetection()?
optional setDetection(detection: ResolvedWorldDetection | null): void;
Defined in: world-sensing-director.ts:60
Turn detection on or off. null means stop everything.
Parameters
| Parameter | Type |
|---|---|
detection | ResolvedWorldDetection | null |
Returns
void
startHitTest()?
optional startHitTest(request: HitTestRequest): void;
Defined in: world-sensing-director.ts:61
Parameters
| Parameter | Type |
|---|---|
request | HitTestRequest |
Returns
void
stopHitTest()?
optional stopHitTest(id: string): void;
Defined in: world-sensing-director.ts:62
Parameters
| Parameter | Type |
|---|---|
id | string |
Returns
void
update()?
optional update(deltaMs: number): void;
Defined in: world-sensing-director.ts:71
Called from the director's update; this is where a port polls its host.
Parameters
| Parameter | Type |
|---|---|
deltaMs | number |
Returns
void