Skip to content
Void Monster Docs

Type to search guides and API reference.

    libCamera/Developer docs

    Interface: ModuleApi

    Public 1.14.2API 1.14.2

    @faeyumbrea/lib-camera-api-types


    @faeyumbrea/lib-camera-api-types / ModuleApi

    Defined in: api.d.ts:7

    readonly apiMajor: 1

    Defined in: api.d.ts:9


    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.

    string

    Pick<MoveOptions, "duration" | "easing" | "bounds" | "lockInput" | "level">

    AbortSignal

    Promise<MovementResult | { reason: RejectionReason; status: "rejected"; }>


    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.

    string

    string | readonly string[]

    Pick<MoveOptions, "duration" | "easing" | "bounds" | "lockInput">

    TrackingMode

    { follow: CameraFollow; ok: true; } | { ok: false; reason: RejectionReason | "unavailable"; }


    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.

    string

    string

    { 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.

    readonly CameraBounds[]

    FrameOptions

    CameraPosition | undefined


    frameTokens: (tokenIds, options?) => CameraPosition | undefined

    Defined in: api.d.ts:22

    readonly string[]

    FrameOptions

    CameraPosition | undefined


    get3DStatus: () => Camera3DStatus

    Defined in: api.d.ts:30

    Current 3D availability without inspecting the adapter or moving the camera.

    Camera3DStatus


    gridPosition: (row, column) => Readonly<{ x: number; y: number; }> | undefined

    Defined in: api.d.ts:35

    number

    number

    Readonly<{ x: number; y: number; }> | undefined


    readonly id: "lib-camera"

    Defined in: api.d.ts:8


    moveRemote: (consumer, targets, options, remote?) => Promise<RemoteUserResult[]>

    Defined in: api.d.ts:10

    string

    string | readonly string[]

    MoveOptions

    RemoteOptions

    Promise<RemoteUserResult[]>


    observeUser: (userId, callback, mode?) => ViewportSubscription

    Defined in: api.d.ts:12

    string

    (sample) => void

    TrackingMode

    ViewportSubscription


    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.

    string

    (sample) => void

    ViewportSubscription


    openControls: () => void

    Defined in: api.d.ts:41

    void


    panic: () => Promise<void>

    Defined in: api.d.ts:40

    Stop this client immediately and persist its opt-out.

    Promise<void>


    read: () => Readonly<CameraPosition> | undefined

    Defined in: api.d.ts:26

    Readonly<CameraPosition> | undefined


    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.

    Readonly<CameraView3D> | undefined


    register: (options) => LocalConsumer

    Defined in: api.d.ts:25

    Registration is available at init; movement requires a ready canvas.

    ConsumerOptions

    LocalConsumer


    sceneBounds: () => CameraBounds | undefined

    Defined in: api.d.ts:23

    CameraBounds | undefined


    set3DRemote: (consumer, targets, view, remote?) => Promise<RemoteUserResult[]>

    Defined in: api.d.ts:11

    string

    string | readonly string[]

    CameraView3D

    RemoteOptions

    Promise<RemoteUserResult[]>


    tokenPosition: (tokenId) => Readonly<{ x: number; y: number; }> | undefined

    Defined in: api.d.ts:31

    string

    Readonly<{ x: number; y: number; }> | undefined