Preparing search index...

    Class FaceCropTextureProvider

    Texture Provider giving a cropped region of the input texture, calculated based on face position. Can be accessed using Texture.control on a FaceCropTexture asset. For more information, see the Crop Textures guide.

    //@input Asset.Texture faceCropTexture
    //@input Asset.Texture deviceCameraTexture

    var cropProvider = script.faceCropTexture.control;
    cropProvider.inputTexture = script.deviceCameraTexture;
    cropProvider.faceIndex = 0;
    cropProvider.textureScale = new vec2(1.25, 1.25);
    cropProvider.faceCenterMouthWeight = 0.0;

    Hierarchy (View Summary)

    Index

    Properties

    faceCenterMouthWeight: number

    Ratio of the mouth position on the cropped texture. Value ranges from 0 to 1, with 0 having no effect and 1 centering the image on the mouth.

    faceIndex: number

    Index of the face being tracked.

    inputTexture: Texture

    Input texture to crop.

    textureScale: vec2

    Scaling of the cropped texture.

    The tracking context this effect is being applied to.

    trackingStatus: TrackingStatus

    Access to the TrackingStatus for this Texture. Can be used to check if tracking is available and subscribe to events for status changes. Subscribing to events on TrackingStatus will also trigger the Texture to request tracking even if it is not otherwise being used in the Scene.

    Methods

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

      Returns number

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

      Parameters

      • type: string

      Returns boolean