Skip to main content

Editor.Assets.HandMesh

Class

A render mesh that follows a tracked hand.

A render mesh that follows a tracked hand. Assign it to a RenderMeshVisual's mesh to render the user's hand.

Index

Example

// Render a mesh of the user's left hand: create a Hand Mesh asset and show it with a RenderMeshVisual.
export function addHandMesh(
project: Editor.Model.Project,
handType: Editor.Assets.HandTracking3DHandType,
material: Editor.Assets.Material,
): Editor.Components.RenderMeshVisual {
const destination = new Editor.Model.SourcePath(new Editor.Path(''), Editor.Model.SourceRootDirectory.Assets);
const handMesh = project.assetManager.createNativeAsset('HandMesh', 'Hand Mesh', destination) as Editor.Assets.HandMesh;
handMesh.handType = handType;

const sceneObject = project.scene.createSceneObject('Hand Mesh');
const visual = sceneObject.addComponent('RenderMeshVisual');
visual.mesh = handMesh;
visual.materials = [material];
return visual;
}

// For example: addHandMesh(project, Editor.Assets.HandTracking3DHandType.Left, material);

Extends

Properties

cacheFile

readonly cacheFile: Path

Path to the cached asset file.

Inherited from

RenderMesh.cacheFile


fileMeta

readonly fileMeta: AssetImportMetadata

Import metadata for the asset.

Inherited from

RenderMesh.fileMeta


handIndex

handIndex: number

Index of the tracked hand that the mesh follows. Defaults to 0.


handType

handType: HandTracking3DHandType

Which hand the mesh follows, left or right. Defaults to Right.


id

readonly id: Uuid

The unique id of the entity.

Inherited from

RenderMesh.id


meta

readonly meta: Meta

Metadata associated with this entity, providing access to its unique identifier and other descriptive properties.

Inherited from

RenderMesh.meta


name

readonly name: string

The name of the asset.

Inherited from

RenderMesh.name


type

readonly type: string

The entity's type.

Inherited from

RenderMesh.type

Methods

getDirectlyReferencedEntities()

getDirectlyReferencedEntities(): Entity[]

A list of entities which this entity has a reference to.

Returns

Entity[]

Inherited from

RenderMesh.getDirectlyReferencedEntities


getMeta()

static getMeta(): Meta

Returns metadata about this type.

Returns

Meta

Overrides

RenderMesh.getMeta


getOwnedEntities()

getOwnedEntities(): Entity[]

A list of entities which has a reference to this entity.

Returns

Entity[]

Inherited from

RenderMesh.getOwnedEntities


getTypeName()

static getTypeName(): string

Returns the type name of this class.

Returns

string

Overrides

RenderMesh.getTypeName


getTypeName()

getTypeName(): string

Returns the name of this object's type.

Returns

string

Inherited from

RenderMesh.getTypeName


isOfType()

isOfType(type): boolean

Returns true if the object is of the specified type.

Parameters

ParameterType
typestring

Returns

boolean

Inherited from

RenderMesh.isOfType


isSame()

isSame(other): boolean

Returns true if this object refers to the same instance as the given object.

Parameters

ParameterType
otherScriptObject

Returns

boolean

Inherited from

RenderMesh.isSame