Visit the Documentation of the upcoming Threlte 6.
  1. @threlte/core
  2. SceneGraphObject



This component is extending the component <HierarchicalObject> and conveniently provides methods to add and remove children to the scene graph.


This is a trait component. Trait components are mostly used internally and make certain aspects of three.js objects accessible and reactive and interact with Threlte systems.



Github View Source Code


NPM View Package

Basic Example

In this example the component is responsible for

  • forwarding the mesh to the parent <HierarchicalObject>
  • adding children to the scene graph, i.e. as children to the mesh
  • removing children from the scene graph

You most likely want to use a <MeshInstance> component in this scenario. The component <SceneGraphObject> is part of the component <Object3DInstance>, which the component <MeshInstance> is extending.

	import { SceneGraphObject } from '@threlte/core'
	import { Mesh } from 'three'

	const mesh = new Mesh()

<SceneGraphObject	object={mesh} />


// required
object: Object3D