Interface: ModuleApi
@faeyumbrea/lib-camera-api-types
@faeyumbrea/lib-camera-api-types / ModuleApi
Defined in: api.d.ts:7
Properties
Section titled “Properties”apiMajor
Section titled “apiMajor”
readonlyapiMajor:1
Defined in: api.d.ts:9
fitScene
Section titled “fitScene”fitScene: (
consumerId,options?,signal?) =>Promise<MovementResult| {reason:RejectionReason;status:"rejected"; }>
Defined in: api.d.ts:19
Fit the current scene using a registered consumer’s camera ownership and movement options.
Fit the current scene through a registered consumer’s normal ownership and movement checks.
Parameters
Section titled “Parameters”consumerId
Section titled “consumerId”string
options?
Section titled “options?”Pick<MoveOptions, "duration" | "easing" | "bounds" | "lockInput" | "level">
signal?
Section titled “signal?”AbortSignal
Returns
Section titled “Returns”Promise<MovementResult | { reason: RejectionReason; status: "rejected"; }>
followUser
Section titled “followUser”followUser: (
consumerId,userId,options?,mode?) => {follow:CameraFollow;ok:true; } | {ok:false;reason:RejectionReason|"unavailable"; }
Defined in: api.d.ts:13
Follow the most recently changed viewport among the consumer-selected users on this scene.
Parameters
Section titled “Parameters”consumerId
Section titled “consumerId”string
userId
Section titled “userId”string | readonly string[]
options?
Section titled “options?”Pick<MoveOptions, "duration" | "easing" | "bounds" | "lockInput">
Returns
Section titled “Returns”{ follow: CameraFollow; ok: true; } | { ok: false; reason: RejectionReason | "unavailable"; }
followUser3D
Section titled “followUser3D”followUser3D: (
consumerId,userId) => {ok:false;reason:RejectionReason|"unavailable"; } | {follow:CameraFollow;ok:true; }
Defined in: api.d.ts:17
Copy a user’s native 3D view while holding a libCamera claim.
Acquire a camera claim and copy a user’s native 3D samples until stopped or preempted.
Parameters
Section titled “Parameters”consumerId
Section titled “consumerId”string
userId
Section titled “userId”string
Returns
Section titled “Returns”{ ok: false; reason: RejectionReason | "unavailable"; } | { follow: CameraFollow; ok: true; }
frame: (
bounds,options?) =>CameraPosition|undefined
Defined in: api.d.ts:21
Compute views without taking ownership or moving the camera.
Parameters
Section titled “Parameters”bounds
Section titled “bounds”readonly CameraBounds[]
options?
Section titled “options?”Returns
Section titled “Returns”CameraPosition | undefined
frameTokens
Section titled “frameTokens”frameTokens: (
tokenIds,options?) =>CameraPosition|undefined
Defined in: api.d.ts:22
Parameters
Section titled “Parameters”tokenIds
Section titled “tokenIds”readonly string[]
options?
Section titled “options?”Returns
Section titled “Returns”CameraPosition | undefined
get3DStatus
Section titled “get3DStatus”get3DStatus: () =>
Camera3DStatus
Defined in: api.d.ts:30
Current 3D availability without inspecting the adapter or moving the camera.
Returns
Section titled “Returns”gridPosition
Section titled “gridPosition”gridPosition: (
row,column) =>Readonly<{x:number;y:number; }> |undefined
Defined in: api.d.ts:35
Parameters
Section titled “Parameters”number
column
Section titled “column”number
Returns
Section titled “Returns”Readonly<{ x: number; y: number; }> | undefined
readonlyid:"lib-camera"
Defined in: api.d.ts:8
moveRemote
Section titled “moveRemote”moveRemote: (
consumer,targets,options,remote?) =>Promise<RemoteUserResult[]>
Defined in: api.d.ts:10
Parameters
Section titled “Parameters”consumer
Section titled “consumer”string
targets
Section titled “targets”string | readonly string[]
options
Section titled “options”remote?
Section titled “remote?”Returns
Section titled “Returns”Promise<RemoteUserResult[]>
observeUser
Section titled “observeUser”observeUser: (
userId,callback,mode?) =>ViewportSubscription
Defined in: api.d.ts:12
Parameters
Section titled “Parameters”userId
Section titled “userId”string
callback
Section titled “callback”(sample) => void
Returns
Section titled “Returns”observeUser3D
Section titled “observeUser3D”observeUser3D: (
userId,callback) =>ViewportSubscription
Defined in: api.d.ts:15
Observe a user’s native 3D viewport without taking camera ownership.
Subscribe to native 3D samples; sender identity is checked before delivering each sample.
Parameters
Section titled “Parameters”userId
Section titled “userId”string
callback
Section titled “callback”(sample) => void
Returns
Section titled “Returns”openControls
Section titled “openControls”openControls: () =>
void
Defined in: api.d.ts:41
Returns
Section titled “Returns”void
panic: () =>
Promise<void>
Defined in: api.d.ts:40
Stop this client immediately and persist its opt-out.
Returns
Section titled “Returns”Promise<void>
read: () =>
Readonly<CameraPosition> |undefined
Defined in: api.d.ts:26
Returns
Section titled “Returns”Readonly<CameraPosition> | undefined
read3D
Section titled “read3D”read3D: () =>
Readonly<CameraView3D> |undefined
Defined in: api.d.ts:28
Native 3D position and look-at target; absent unless 3D Canvas is active and ready.
Returns
Section titled “Returns”Readonly<CameraView3D> | undefined
register
Section titled “register”register: (
options) =>LocalConsumer
Defined in: api.d.ts:25
Registration is available at init; movement requires a ready canvas.
Parameters
Section titled “Parameters”options
Section titled “options”Returns
Section titled “Returns”sceneBounds
Section titled “sceneBounds”sceneBounds: () =>
CameraBounds|undefined
Defined in: api.d.ts:23
Returns
Section titled “Returns”CameraBounds | undefined
set3DRemote
Section titled “set3DRemote”set3DRemote: (
consumer,targets,view,remote?) =>Promise<RemoteUserResult[]>
Defined in: api.d.ts:11
Parameters
Section titled “Parameters”consumer
Section titled “consumer”string
targets
Section titled “targets”string | readonly string[]
remote?
Section titled “remote?”Returns
Section titled “Returns”Promise<RemoteUserResult[]>
tokenPosition
Section titled “tokenPosition”tokenPosition: (
tokenId) =>Readonly<{x:number;y:number; }> |undefined
Defined in: api.d.ts:31
Parameters
Section titled “Parameters”tokenId
Section titled “tokenId”string
Returns
Section titled “Returns”Readonly<{ x: number; y: number; }> | undefined