Controls a camera texture resource. Can be accessed through Texture.control on a Camera texture. For more information, see the Camera and Layers guide.

interface RenderTargetProvider {
    clearColor: vec4;
    clearColorEnabled: boolean;
    clearColorOption: ClearColorOption;
    clearDepthEnabled: boolean;
    inputTexture: Texture;
    resolution: vec2;
    resolutionScale: number;
    textureType: TextureType;
    useScreenResolution: boolean;
    getAspect(): number;
    getHeight(): number;
    getLoadStatus(): LoadStatus;
    getTypeName(): string;
    getWidth(): number;
    isOfType(type: string): boolean;
    isSame(other: ScriptObject): boolean;
}

Hierarchy (view full)

Properties

clearColor: vec4

When clearColorEnabled is true and inputTexture is null, this color is used to clear this RenderTarget the first time it is drawn to each frame.

clearColorEnabled: boolean

If true, the color on this RenderTarget will be cleared the first time it is drawn to each frame. inputTexture will be used to clear it unless it is null, in which case clearColor is used instead.

clearColorOption: ClearColorOption

Sets the clear color option.

clearDepthEnabled: boolean

If true, the depth buffer will be cleared on this RenderTarget the first time it is drawn to each frame.

inputTexture: Texture

When clearColorEnabled is true, this texture is used to clear this RenderTarget the first time it is drawn to each frame. If this texture is null, clearColor will be used instead.

resolution: vec2

When useScreenResolution is false, controls the horizontal and vertical resolution of the Render Target.

resolutionScale: number

When Use Screen Resolution is enabled, this scales the render target resolution relative to the device resolution.

textureType: TextureType

The texture type of the render target.

useScreenResolution: boolean

If true, the Render Target's resolution will match the device's screen resolution.

Methods

  • Returns the texture's aspect ratio, which is calculated as width / height.

    Returns number

  • Returns the width of the texture in pixels.

    Returns number

  • Returns true if the object matches or derives from the passed in type.

    Parameters

    • type: string

    Returns boolean

  • Returns true if this object is the same as other. Useful for checking if two references point to the same thing.

    Parameters

    Returns boolean