Lens Studio v3.0+
Inherits from CropTextureProvider
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.
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.
Index of the face being tracked.
Scaling of the cropped texture.
Returns the texture’s aspect ratio, which is calculated as width / height.
Returns the height of the texture in pixels.
Returns the width of the texture in pixels.
Returns the name of this object’s type.
isOfType(String type) :
Returns true if the object matches or derives from the passed in type.
Input texture to crop.
//@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;
Still Looking for help?Visit Support