Skip to content

Commit

Permalink
fix dice loading smh
Browse files Browse the repository at this point in the history
  • Loading branch information
Platane committed Aug 11, 2024
1 parent d44926e commit 94ebed7
Showing 1 changed file with 2 additions and 13 deletions.
15 changes: 2 additions & 13 deletions src/App/Scene/Dice.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,9 @@ type Props = {
* 1x1x1 dice
*/
export const Dice = ({ selected, ...props }: Props) => {
const { nodes, materials } = useGLTF(diceUrl);
const { nodes } = useGLTF(diceUrl);

const mesh = nodes.mesh_0 as THREE.Mesh;
const mat = materials.Dice as THREE.MeshStandardMaterial;

return (
<mesh
Expand All @@ -30,16 +29,6 @@ export const Dice = ({ selected, ...props }: Props) => {
material={mesh.material}
scale={scale}
dispose={null}
>
{false && <boxGeometry args={[2, 2, 2]} />}
{false && <meshStandardMaterial color="#ab34ef" />}

{false && (
<meshStandardMaterial
{...mat}
color={selected ? "hotpink" : mat.color}
/>
)}
</mesh>
/>
);
};

0 comments on commit 94ebed7

Please sign in to comment.