```sh npm install --save @use-gpu/scene ```
npm install @use-gpu/scene``sh`
npm install --save @use-gpu/scene
`sh`
yarn add @use-gpu/scene
Docs: https://usegpu.live/docs/reference-live-@use-gpu-scene
Implementation of a classic 3D scene with nodes that have position/rotation/scale/matrix transforms.
Leaf nodes:
- for rendering basic triangle meshes
- for efficiently drawing multiple copies of the same mesh
- for embedding other layers or draw calls
`tsx
import { Scene, Node, Mesh, Primitive } from '@use-gpu/scene';
{/ Scene will reset the matrix transform unless inherit is set /}
position={[1, 2, 3]}
scale={[1, 1, 1]}
rotation={[30, 60, 90]}
quaternion={[0, 0, 0, 1]}
/ 4x4 /
matrix={[1, 0, 0, 0, ...]}
>
{/
{/
is produced by e.g. StorageSources /}
mesh={mesh}
{/ Enable material shading /}
shaded
/ Meshes are pickable if given an id /
id={id}
>
{/ component
shaded
render={(Instance) => (
//
//
)}
>
{/
`
Made by Steven Wittens. Part of @use-gpu`.