Preparing search index...

    Renders the scene from a viewpoint with configurable projection and output.

        const model = this.pluginSystem.findInterface(Editor.Model.IModel) as Editor.Model.IModel;
    const scene = model.project.scene;

    // Access the main camera and configure it
    const cam = scene.mainCamera;
    if (Editor.isNull(cam)) {
    console.log('No main camera');
    return;
    }

    // Configure as perspective camera
    cam.cameraType = Editor.Components.CameraType.Perspective;
    cam.fov = 60;
    cam.near = 0.1;
    cam.far = 1000;
    cam.renderOrder = 0;
    console.log(`Camera: type=Perspective, fov=${cam.fov}, near=${cam.near}, far=${cam.far}`);
    console.log(` renderOrder=${cam.renderOrder}, aspect=${cam.aspect}`);

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    aspect: number

    Width-to-height ratio of the camera view.

    aspectPreset: CameraAspectPreset

    Preset aspect ratio option.

    cameraType: CameraType

    Projection type (perspective or orthographic).

    Background color rendered before scene content.

    Depth buffer clearing behavior.

    Depth buffer format and configuration.

    deviceProperty: CameraDeviceProperty

    Device camera properties (aspect, FOV, or both) to inherit from the physical camera.

    enabled: boolean

    Whether the component is active.

    far: number

    Far clipping plane distance.

    fov: number

    Vertical field of view in degrees.

    id: Uuid

    The unique id of the entity.

    inputTexture: Texture

    Texture used as the camera's input (background) image.

    maskTexture: Texture

    Texture used to mask camera output.

    meta: Meta

    Metadata associated with this entity, providing access to its unique identifier and other descriptive properties.

    mipmapLevel: number

    Mip level at which to render the camera.

    name: string

    Name of the component.

    near: number

    Near clipping plane distance.

    oitLayers: CameraOitLayers

    Order-independent transparency layer configuration.

    orthographicSize: vec2

    Height of the orthographic view in world units.

    renderLayer: LayerSet

    The set of render layers this component belongs to.

    renderOrder: number

    Rendering priority relative to other cameras.

    renderTarget: RenderTarget

    Output texture or framebuffer for rendering.

    sceneObject: SceneObject

    Scene object this component is attached to.

    size: number

    Size of the camera's render region.

    type: string

    The entity's type.

    Methods

    • Returns true if the object is of the specified type.

      Parameters

      • type: string

      Returns boolean