Skip to main content

Node

This component lets you attach custom event handlers to individual nodes. It needs to be a child of the Asset component.

The events supported can be found in the react three fiber docs.

To introspect the nodes from the asset at runtime, see the useModel hook.

Example

<Asset refkey="shoe">
<Node id={meshId} onClick={() => console.log('clicked mesh')} />
</Asset>