TresCanvas
The
TresCanvas
component is the main component of Tres. It's the one that creates the ThreeJS
WebGLRenderer
.
Canvas size
The
TresCanvas
component will use the parent element size as the canvas size. If you want to use the window size as the canvas size, you can set the
window-size
prop to
true
.
Or you can use CSS to set your canvas size.
Presets
Tres comes with a few presets for the
TresCanvas
component. You can use them by setting the
preset
prop.
Realistic
The
realistic
preset makes it easy to setup the renderer for more realistic 3D scenes.
It's equivalent to: