ThreePipe
    Preparing search index...

    Class OrthographicCamera0

    Empty class with the constructor same as OrthographicCamera in three.js. This can be used to remain compatible with three.js construct signature.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    _canvas?: HTMLCanvasElement

    reference to the canvas element used for rendering. (for aspect ratio, etc.)

    _positionWorld: Vector3 = ...

    world position cache for shader updates and other purposes

    activateMain: (
        this: ICamera,
        options?: Omit<ICameraEventMap["activateMain"], "bubbleToParent">,
        _internal?: boolean,
        _refresh?: boolean,
        canvas?: HTMLCanvasElement,
    ) => void = iCameraCommons.activateMain
    add: (
        ...object: IObject3D<
            IObject3DEventMap,
            undefined
            | IGeometry<NormalBufferAttributes, BufferGeometryEventMap>,
            undefined | IMaterial<IMaterialEventMap> | IMaterial<IMaterialEventMap>[],
        >[],
    ) => this

    Adds another Object3D as child of this Object3D.

    An arbitrary number of objects may be added

    aspect: number

    Aspect ratio to use when frustumSize is defined

    assetType: "camera" = ...
    autoAspect: boolean

    Automatically manage aspect ratio based on window/canvas size. Defaults to true if domElement(canvas) is set.

    autoLookAtTarget: boolean = false

    Automatically make the camera look at the target on setDirty call Defaults to false. Note that this must be set to true to make the camera look at the target without any controls

    autoNearFar: boolean = true

    Automatically manage near and far clipping planes based on scene size.

    bottom: number

    Camera frustum bottom plane.

    Expects a Float.

    -1

    Array with object's children.

    THREE.Object3DGroup | Group for info on manually grouping objects.

    []

    clone: (recursive?: boolean) => this

    Returns a clone of this object and optionally all descendants.

    Type declaration

      • (recursive?: boolean): this
      • Parameters

        • Optionalrecursive: boolean

          If true, descendants of the object are also cloned. Default true

        Returns this

    controlsMode: string
    copy: (
        source:
            | IObject3D<
                IObject3DEventMap,
                undefined
                | IGeometry<NormalBufferAttributes, BufferGeometryEventMap>,
                undefined | IMaterial<IMaterialEventMap> | IMaterial<IMaterialEventMap>[],
            >
            | ICamera<ICameraEventMap>
            | Camera<Object3DEventMap>,
        recursive?: boolean,
        distanceFromTarget?: number,
        worldSpace?: boolean,
    ) => this

    Copy the given object into this object

    Type declaration

    Note: event listeners and user-defined callbacks (.onAfterRender and .onBeforeRender) are not copied.

    deactivateMain: (
        this: ICamera,
        options?: Omit<ICameraEventMap["activateMain"], "bubbleToParent">,
        _internal?: boolean,
        _refresh?: boolean,
        clearCanvas?: boolean,
    ) => void = iCameraCommons.deactivateMain
    far: number = 50

    Far clipping plane. This is managed by RootScene for active cameras To change the maximum that's possible set maxFarPlane To use a fixed value set autoNearFar to false and set maxFarPlane

    getObjectById: <
        T extends
            IObject3D<
                IObject3DEventMap,
                undefined
                | IGeometry<NormalBufferAttributes, BufferGeometryEventMap>,
                undefined | IMaterial<IMaterialEventMap> | IMaterial<IMaterialEventMap>[],
            > = IObject3D<
            IObject3DEventMap,
            undefined
            | IGeometry<NormalBufferAttributes, BufferGeometryEventMap>,
            undefined | IMaterial<IMaterialEventMap> | IMaterial<IMaterialEventMap>[],
        >,
    >(
        id: number,
    ) => undefined | T

    Searches through an object and its children, starting with the object itself, and returns the first with a matching id.

    Type declaration

    Note that ids are assigned in chronological order: 1, 2, 3, ..., incrementing by one for each new object.

    id

    getObjectByName: <
        T extends
            IObject3D<
                IObject3DEventMap,
                undefined
                | IGeometry<NormalBufferAttributes, BufferGeometryEventMap>,
                undefined | IMaterial<IMaterialEventMap> | IMaterial<IMaterialEventMap>[],
            > = IObject3D<
            IObject3DEventMap,
            undefined
            | IGeometry<NormalBufferAttributes, BufferGeometryEventMap>,
            undefined | IMaterial<IMaterialEventMap> | IMaterial<IMaterialEventMap>[],
        >,
    >(
        name: string,
    ) => undefined | T

    Searches through an object and its children, starting with the object itself, and returns the first with a matching name.

    Type declaration

    Note that for most objects the name is an empty string by default

    getObjectByProperty: <
        T extends
            IObject3D<
                IObject3DEventMap,
                undefined
                | IGeometry<NormalBufferAttributes, BufferGeometryEventMap>,
                undefined | IMaterial<IMaterialEventMap> | IMaterial<IMaterialEventMap>[],
            > = IObject3D<
            IObject3DEventMap,
            undefined
            | IGeometry<NormalBufferAttributes, BufferGeometryEventMap>,
            undefined | IMaterial<IMaterialEventMap> | IMaterial<IMaterialEventMap>[],
        >,
    >(
        name: string,
        value: string,
    ) => undefined | T

    Searches through an object and its children, starting with the object itself, and returns the first with a property that matches the value given.

    Type declaration

    getView: <T extends ICameraView = CameraView>(
        this: ICamera,
        worldSpace?: boolean,
        _view?: T,
    ) => T = iCameraCommons.getView
    left: number

    Camera frustum left plane.

    Expects a Float

    -1

    maxFarPlane: number = 1000

    Maximum far clipping plane allowed. (Distance from camera) Used in RootScene when autoNearFar is true.

    minNearPlane: number = 0.5

    Minimum near clipping plane allowed. (Distance from camera) Used in RootScene when autoNearFar is true.

    0.2
    
    name: string

    Optional name of the object

    (doesn't need to be unique).

    ""

    near: number = 0.01

    Near clipping plane. This is managed by RootScene for active cameras To change the minimum that's possible set minNearPlane To use a fixed value set autoNearFar to false and set minNearPlane

    parent:
        | null
        | IObject3D<
            IObject3DEventMap,
            undefined
            | IGeometry<NormalBufferAttributes, BufferGeometryEventMap>,
            undefined | IMaterial<IMaterialEventMap> | IMaterial<IMaterialEventMap>[],
        >

    Object's parent in the scene graph.

    An object can have at most one parent.

    null

    position: Vector3

    Object's local position.

    new THREE.Vector3() - that is (0, 0, 0).

    quaternion: Quaternion

    Object's local rotation as a Quaternion.

    new THREE.Quaternion() - that is (0, 0, 0, 1).

    refreshAspect: (this: ICamera, setDirty?: boolean) => void = iCameraCommons.refreshAspect

    when aspect ratio is set to auto it must be refreshed on resize, this is done by the viewer for the main camera.

    refreshTarget: (
        this: ICamera,
        distanceFromTarget?: number,
        setDirty?: boolean,
    ) => void = iCameraCommons.refreshTarget
    refreshUi: (this: ICamera) => void = iCameraCommons.refreshUi
    remove: (
        ...object: IObject3D<
            IObject3DEventMap,
            undefined
            | IGeometry<NormalBufferAttributes, BufferGeometryEventMap>,
            undefined | IMaterial<IMaterialEventMap> | IMaterial<IMaterialEventMap>[],
        >[],
    ) => this

    Removes a Object3D as child of this Object3D.

    An arbitrary number of objects may be removed.

    Group for info on manually grouping objects.

    right: number

    Camera frustum right plane.

    Expects a Float

    1

    rotation: Euler

    Object's local rotation (Euler angles), in radians.

    new THREE.Euler() - that is (0, 0, 0, Euler.DEFAULT_ORDER).

    setView: <T extends ICameraView = CameraView>(this: ICamera, view: T) => void = iCameraCommons.setView
    setViewFromCamera: (
        this: ICamera,
        camera: ICamera<ICameraEventMap> | Camera<Object3DEventMap>,
        distanceFromTarget?: number,
        worldSpace?: boolean,
    ) => void = iCameraCommons.setViewFromCamera

    Set camera view from another camera.

    Type declaration

    setViewToMain: (
        this: ICamera,
        eventOptions: Omit<ICameraEventMap["setView"], "camera" | "bubbleToParent">,
    ) => void = iCameraCommons.setViewToMain

    Dispatches the setView event which triggers the main camera to set its view to this camera's view.

    target: Vector3 = ...

    The target position of the camera (where the camera looks at). Also syncs with the controls.target, so it's not required to set that separately. Note: this is always in world-space Note: autoLookAtTarget must be set to true to make the camera look at the target when no controls are enabled

    top: number

    Camera frustum top plane.

    Expects a Float

    1

    traverse: (callback: (object: IObject3D) => void) => void

    Executes the callback on this object and all descendants.

    Type declaration

      • (callback: (object: IObject3D) => void): void
      • Parameters

        • callback: (object: IObject3D) => void

          A function with as first argument an Object3D object.

        Returns void

    Note: Modifying the scene graph inside the callback is discouraged.

    traverseAncestors: (callback: (object: IObject3D) => void) => void

    Executes the callback on all ancestors.

    Type declaration

      • (callback: (object: IObject3D) => void): void
      • Parameters

        • callback: (object: IObject3D) => void

          A function with as first argument an Object3D object.

        Returns void

    Note: Modifying the scene graph inside the callback is discouraged.

    traverseVisible: (callback: (object: IObject3D) => void) => void

    Like traverse, but the callback will only be executed for visible objects

    Type declaration

      • (callback: (object: IObject3D) => void): void
      • Parameters

        • callback: (object: IObject3D) => void

          A function with as first argument an Object3D object.

        Returns void

    Descendants of invisible objects are not traversed.

    uiConfig: UiObjectConfig = ...

    This is used by the lookAt method, for example, to determine the orientation of the result.

    Object3D.DEFAULT_UP - that is (0, 1, 0).

    updateShaderProperties: (
        this: ICamera,
        material: {
            defines: Record<string, string | number | undefined>;
            uniforms: { [p: string]: IUniform<any> };
        },
    ) => ICamera<ICameraEventMap> = iCameraCommons.updateShaderProperties
    userData: ICameraUserData = {}

    An object that can be used to store custom data about the Object3D.

    It should not hold references to functions as these will not be cloned.

    {}

    visible: boolean

    Object gets rendered if true.

    true

    zoom: number

    Gets or sets the zoom factor of the camera.

    1

    Accessors

    • get frustumSize(): number

      Frustum size of the camera. This is used to calculate bounds (left, right, top, bottom) based on aspect ratio. Set to 0 (or negative) value to disable automatic, and to set the bounds manually.

      Returns number

    • set frustumSize(value: number): void

      Parameters

      • value: number

      Returns void

    Methods

    • Set the canvas which is used as dom element in controls, etc. This is done by the viewer/scene when main camera is changed

      Parameters

      • canvas: undefined | HTMLCanvasElement
      • refresh: boolean = true

      Returns void

    • Serializes this camera with controls to JSON.

      Parameters

      • Optionalmeta: any

        metadata for serialization

      • _internal: boolean = false

        Calls only super.toJSON, does internal three.js serialization and @serialize tags. Set it to true only if you know what you are doing. This is used in Serialization->serializer

      Returns any