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




This component is part of a recently released feature of threlte. It is still very much in a beta phase and can be subject to breaking API changes. Please use at your own risk. Learn more about this feature here.

The component <T> cannot be used without the threlte preprocessor. Please follow the instructions to install it first.

The usage of the component <T> is derived from the component <Three>. The preprocessor essentially transforms all occurrences of <T> components to <Three> components.

Let's have a look at a basic example. The preprocessor transforms this component:

	import { T } from '@threlte/core'

<T.Mesh position.x={6}>
	<T.BoxGeometry args={[1, 2, 1]} />
	<T.MeshBasicMaterial />

into this:

	import { Mesh, BoxGeometry, MeshBasicMaterial } from 'three'
	import { Three } from '@threlte/core'

<Three type={Mesh} position.x={6}>
	<Three type={BoxGeometry} args={[1, 2, 1]} />
	<Three type={MeshBasicMaterial} />

Please follow the documentation of the component <Three> for implementation details.



Github View Source Code


NPM View Package