Spaces:
Sleeping
Sleeping
File size: 489 Bytes
e95d66b a6e23da e95d66b a6e23da e95d66b a6e23da e95d66b |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
"use client";
import { useControls } from "leva";
import { Canvas as ThreeCanvas } from "@react-three/fiber";
import { Env } from "../components/env";
import { RubiksCube } from "./rubiks-cube";
export const Canvas = () => {
const { roughness } = useControls({
roughness: { value: 0.5, min: 0.2, max: 0.8 },
});
return (
<ThreeCanvas shadows camera={{ position: [0, 0, 4.5], fov: 50 }}>
<RubiksCube roughness={roughness} />
<Env />
</ThreeCanvas>
);
};
|