dacha
    Preparing search index...

    Class Camera

    Camera component for defining how a scene should be viewed.

    Camera component marks an actor as the possible camera to view the scene.

    // Create a camera
    const camera = new Camera({
    zoom: 2,
    current: true,
    });

    // Add to actor actor.setComponent(camera);

    Hierarchy (View Summary)

    Index
    actor?: Actor
    current: boolean

    Whether the camera is the current camera. Only one camera can be the current camera.

    windowSizeX: number

    Size of the game window in the x axis in pixels

    windowSizeY: number

    Size of the game window in the y axis in pixels

    zoom: number

    Zoom of the camera

    componentName: string