Camera Object Facade (CameraObject)

Detailed specification of the CameraObject facade in the Aircada SDK, providing control over viewports, clipping, FOV, and snapshot capturing.
Published: 7/10/2026

The CameraObject represents a viewport source or secondary camera rig in the 3D scene (type: 'CAMERA'). It extends the base ISceneObject interface and exposes properties to configure optical characteristics, field-of-view thresholds, and runtime snapshot generation.

Developers declare relationships to CameraObject instances using the @SceneObjectProperty() decorator. Once hydrated, Operators can dynamically focus viewpoints, configure resolution bounds, trigger snapshots, and listen to gesture events.

Example: Capturing Snapshot Sequences#

Example illustrating using action inputs to trigger immediate snapshot generation.

Example showing how to imperatively capture a snapshot image from a CameraObject.

typescript
// Imperatively trigger image capture sequence
this.securityCam.captureImage();
Triggering a snapshot capture on securityCam.

Example: Image Capture Handling & Memory Teardown#

Example illustrating how to bind image event capture streams on CameraObjects and cleanly unsubscribe using the Dispose pattern.

Example showing how to subscribe to snapshot image output events on a CameraObject and dispose the listener.

SnapshotReceiver.ts (typescript)
import { Setup, Dispose, Operator, SceneObjectProperty, CameraObject } from "@aircada/spec";
import { SceneObjects } from "../registry/scene.registry";

@Operator({
    name: "Snapshot Receiver",
    type: "SNAPSHOT_RECEIVER"
})
export class SnapshotReceiver {
    // Direct 3D mesh reference: matches an actual object in the 3D scene configured and referenced in the auto-generated scene.registry file.
    @SceneObjectProperty()
    securityCam: CameraObject = SceneObjects.SECURITY_CAM_1;

    private unsubscribeToImage?: () => void;

    @Setup()
    setup() {
        // Attach click listener and save unsubscribe callback
        this.unsubscribeToImage = this.securityCam.imageOutput.addListener((base64Data) => {
            console.log("Captured image segment! Length:", base64Data.length);
            // Do logic with base64 data here
        });
    }

    @Dispose()
    dispose() {
        // Prevent memory leaks by cleaning up the listener
        this.unsubscribeToImage?.();
    }
}
Operator class listening to imageOutput events on securityCam and cleaning up in dispose.

Example: Referencing a CameraObject#

Example illustrating how to declare a CameraObject property in an Operator and configure it on startup.

Example showing how to declare a CameraObject property and configure resolution bounds during setup.

SnapshotManager.ts (typescript)
import { Setup, Operator, SceneObjectProperty, CameraObject } from "@aircada/spec";
import { SceneObjects } from "../registry/scene.registry";

@Operator({
    name: "Security Snapshot Manager",
    type: "SECURITY_SNAPSHOT_MANAGER"
})
export class SnapshotManager {
    // Direct 3D mesh reference: matches an actual object in the 3D scene configured and referenced in the auto-generated scene.registry file.
    @SceneObjectProperty()
    securityCam: CameraObject = SceneObjects.SECURITY_CAM_1;

    @Setup()
    setup() {
        // Set standard snapshot resolution bounds
        this.securityCam.imageCaptureWidth = 1024;
        this.securityCam.imageCaptureHeight = 1024;
    }
}
Operator class declaring securityCam property as a CameraObject and setting imageCapture bounds.

Example: Custom Camera Projection Setup#

Example showing how to configure clipping bounds and custom focal perspectives dynamically.

Example showing how to configure fov, near, and far clipping planes on a CameraObject.

typescript
// Configure wide-angle lens with low clip margins for close-up scanning
this.securityCam.fov = 90;
this.securityCam.near = 0.05;
this.securityCam.far = 150;
Configuring vertical field of view and clipping planes on CameraObject.

CameraObject Action Inputs (@Input)#

Action commands exposed as inputs on CameraObject instances to handle visibility and snapshot captures.

Inputs represent imperative methods that can be called on CameraObject facades:

Available Inputs:

- show(): Unhides camera helper lines in viewports.

- hide(): Hides helper bounds from scene viewports.

- captureImage(): Triggers an immediate snapshot render pipeline process and dispatches the base64 output through imageOutput.

- dataInput(payload: DataBlock[]): Streams dynamic data blocks to drive visual positioning or configurations.

  • show() / hide(): Auxiliary camera helper display toggles.
  • captureImage(): Imperative trigger to output snapshots.
  • dataInput(payload): Dynamic pipeline data intake.

CameraObject Event Outputs (@Output)#

Asynchronous event emitters capturing pointer gestures and base64 snapshot image streams.

Outputs allow Operators to subscribe to reactive runtime events dispatched by the CameraObject:

Available Outputs:

- imageOutput: AirEvent<string>: Emits the captured base64 screenshot string immediately after captureImage() finishes.

- onClick: AirEvent<void>: Fired once upon completing a click interaction on the camera helper body.

- whileHeld: AirEvent<void>: Dispatched continuously every tick while the user maintains an active select on the helper body.

- onRelease: AirEvent<void>: Dispatched when a click, select, or hold gesture is ended.

- dataOutput: AirEvent<DataBlock[]>: Emits custom pipeline values downstream to other nodes.

  • imageOutput: Snapshot stream delivering base64 image strings.
  • onClick: Pointer click trigger.
  • whileHeld: Pointer hold interaction stream.
  • onRelease: Hold ended trigger.
  • dataOutput: Custom pipeline event emitter for transferring serializable states.

CameraObject Direct Properties#

Optical parameters, clipping thresholds, and image capture resolutions available directly on CameraObject instances.

A CameraObject exposes direct geometric and optical properties to manage physical projections and snapshot generation scales in real time.

Optical Properties:

- fov: number: Vertical Field of View (FLOAT, Range: 1 to 180).

- maintainHorizontalFOV: boolean: Standardizes aspect ratios to lock the horizontal dimension instead.

- near: number: Minimum physical rendering clip boundary (FLOAT, Range: 0.01 to 1).

- far: number: Maximum distance clipping boundary (FLOAT, Range: 1 to 200).

Image Capture Properties:

- imageCaptureWidth: number: Resolution width of snapshot outputs (FLOAT, Range: 64 to 2048).

- imageCaptureHeight: number: Resolution height of snapshot outputs (FLOAT, Range: 64 to 2048).

  • fov: Optical Field of View in vertical degrees.
  • near / far: Distance clipping planes to optimize rendering.
  • imageCaptureWidth / Height: Sets resolution constraints on captured snapshot string payloads.

Transform and Effects Facades#

Overview of child facades hosted by CameraObject instances (Note: CameraObjects do not contain material facades).

Every CameraObject hosts sub-facades to delegate spatial coordinates and custom post-processing layers:

- .transform: Coordinates spatial positioning, scaling, and rotation. (See the 3D Transforms & Coordinates reference guide).

- .effects: Configures custom camera post-processing and visual shader overlaps.

> [!NOTE] > Unlike geometry objects, cameras do not host a .material facade.