Appearance
Entity
Generic entity within a model hierarchy (bones, groups, nested models)
Access via representation.findChild(). Allows manipulation of nested entities within loaded USDZ models.
Example:
javascript
var bone = rep.findChild("thumb_1");
bone.rotation = hand.joints.thumbKnuckle.localTransform.rotation;
// Iterate children
rep.findChild("wrist").children.forEach(function(child) {
console.log(child.name);
});Properties
children
- Type: Array<any>
- Direct child entities
isEnabled
- Type: boolean
- Whether this entity is enabled/visible
jointNames
- Type: Array<any>
- Joint names for skeletal animation (empty if not a skeletal model)
jointTransforms
- Type: Array<any>
- Joint transforms array (parallel to jointNames)
name
- Type: string
- Entity name
opacity
- Type: number
- Opacity (0-1)
position
- Type: Vector3
- Local position relative to parent
rotation
- Type: Rotation
- Local rotation as quaternion
scale
- Type: Vector3
- Local scale
transform
- Type: Transform
- Local transform (position, rotation, scale combined)
worldPosition
- Type: Vector3
- World-space position
worldRotation
- Type: Rotation
- World-space rotation
worldTransform
- Type: Transform
- World-space transform
Methods
clearInstances()
javascript
clearInstances(): voidRemove instancing from this node, reverting to the single base mesh.
Returns: void
findChild()
javascript
findChild(name: string, recursive?: any): EntityFind a child entity by name
Example:
javascript
var bone = entity.findChild("thumb_1"); // recursive
var direct = entity.findChild("arm", false); // immediate onlyParameters:
name(string) - Entity name to findrecursive(any) (optional) - Search all descendants (default: true)
Returns: Entity
setInstances()
javascript
setInstances(transforms: any): voidGPU-instance this node's mesh – draw one copy per transform. Pass Instances.transforms([...]) (or a bare array of Transform / Vector3). Rendering-only (no physics / collision / identity). Gate with environment.features.has('instancing') (iOS 26 / visionOS 26 / macOS 26+).
Parameters:
transforms(any)
Returns: void