TextureProvider for face textures. See the Face Texture Guide for more information. Can be accessed using Texture.control on a face texture asset.

// Use this in "Frame Updated" to zoom in and out on a face texture over time
//@input Asset.Texture faceTexture

var faceTexProvider = script.faceTexture.control;
var scaleAmount = .75 + Math.sin(getTime())*.25;
faceTexProvider.scale = new vec2(scaleAmount, scaleAmount);
interface FaceTextureProvider {
    faceIndex: number;
    inputTexture: Texture;
    scale: vec2;
    getAspect(): number;
    getHeight(): number;
    getLoadStatus(): LoadStatus;
    getTypeName(): string;
    getWidth(): number;
    isOfType(type: string): boolean;
    isSame(other: ScriptObject): boolean;
}

Hierarchy (view full)

Properties

faceIndex: number

Index of the face to track.

inputTexture: Texture

The source texture being drawn. This is useful for controlling which effects are visible on the face texture, based on which camera output texture is being used.

scale: vec2

The x and y scale used to draw the face within the texture region. A lower scale will be more zoomed in on the face, and a higher scale will be more zoomed out. The default scale is (1, 1).

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