3D Loader
component comes with two themes: light (default) and darkExample
<Loader theme="light" />
<Loader theme="dark" />
color
prop, you have the power to define the color of your 3D model.scale
prop, you can enter numerical values that determine the model‘s size.rotationAxis
prop. Use therotationDirection
prop to set the spin direction to either 'positive' or 'negative'.easeAnimation
prop to true to enable a easing spinning animation. Control the model's rotation speed by inputting numerical values into thespeed
prop.theme
prop by choosing either 'dark' or 'light'. For more customization, use thematerial
prop to pass any ThreeJS material.wireframe
prop, when set to true, enables wireframe rendering for the model (If applicable). Use thematcapIndex
andmatcapSize
props to apply matcaps with theuseMatcapTexture
function from React-Three-Drei.Example
<Loader model={2} />
Position
prop allows the ability to change the X, Y, and Z properties of the Loader. This prop accepts an Array of 3 values,[X, Y, Z]
. By default the position is set to[0,0,0]
.HexagonLoader
,ChipLoader
, andMeshLoader
for additional customization options without supplying themodel
prop.Example
import { Canvas } from "@react-three/fiber";
import { Loader } from "r3dy";
export default function App() {
return (
<Canvas>
<Loader />
</Canvas>
);
}