Defines a mesh vertex stretch point for FaceStretchVisual deformation.
Example
// StretchPoint describes a single control point for a FaceStretchVisual feature. // index — vertex index into the face mesh the stretch is anchored to. // See the face-mesh vertex layout in the Lens Scripting reference: // https://developers.snap.com/lens-studio/api/lens-scripting/classes/Built-In.FaceStretchVisual // delta — displacement applied to that vertex (local-space vec3). // weight — blend amount applied to this point (0..1). constpoint = newEditor.Components.StretchPoint(); point.index = 3; // vertex #3 on the face mesh point.delta = newvec3(0.5, 1.0, 0.0); point.weight = 0.75;
// Points are typically assembled into an array and handed to // FaceStretchVisual.updateFeaturePoints(featureName, points). constpoints: Editor.Components.StretchPoint[] = [point]; console.log(`StretchPoint feature: ${points.length} point(s), first at vertex ${points[0].index}`);
Defines a mesh vertex stretch point for FaceStretchVisual deformation.
Example