InterfaceUpperBodyRenderObjectProvider

Provides a render object of the upper body, without the head. Unlike BodyMesh which handles the whole body, this model is optimized to work better with FaceMesh and selfie use cases.

function createUpperBodyRenderObjectProvider() {
var upperBodyProvider = global.scene.createResourceProvider("Provider.UpperBodyRenderObjectProvider");
upperBodyProvider.faceIndex = script.faceIndex;
return upperBodyProvider;
}

// 3D Upper Body Mesh
var meshVisual = script.getSceneObject().getComponent("Component.RenderMeshVisual");
meshVisual.mesh = global.assetSystem.createAsset("Asset.RenderMesh");
meshVisual.mesh.control = createUpperBodyRenderObjectProvider();
meshVisual.addMaterial(script.material);
interface UpperBodyRenderObjectProvider {
    faceIndex: number;
    getLoadStatus(): LoadStatus;
    getTypeName(): string;
    isOfType(type: string): boolean;
    isSame(other: ScriptObject): boolean;
}

Hierarchy (view full)

Properties

faceIndex: number

The index of the face whose upper body you want to render. The first face detected is 0, the second 1, and so on.

Methods

  • 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