threlte logo
@threlte/extras

<Instance>

Every <Instance> component nested in an <InstancedMesh> component resembles one instance. An <Instance> can therefore only be used as a child component to a <InstancedMesh> component. The <Instance> component can be transformed and colorized individually:

<InstancedMesh>
  <T.BoxGeometry />
  <T.MeshStandardMaterial />

  <Instance
    position.x={5}
    scale={1}
  />
  <Instance
    position.z={2}
    scale={2}
    color="red"
  />
</InstancedMesh>

Component Signature

<Instance> extends <T.PositionalMesh> and supports all its props, slot props, bindings and events.

Props

name
type
required
default

color
THREE.ColorRepresentation
no

id
string
no
'default'