feat: add directional light

This commit is contained in:
Bart van der Braak 2023-07-29 17:23:43 +02:00
parent 9dacad79fb
commit e35966d7ff
2 changed files with 7 additions and 3 deletions

View file

@ -13,6 +13,5 @@
<Canvas>
<Scene />
<Github3d />
</Canvas>
</main>

View file

@ -21,6 +21,8 @@
}}
/>
<T.DirectionalLight position={[0, 10, 10]} />
<T.Mesh
rotation.y={rotation}
position.y={1}
@ -30,13 +32,16 @@
on:click={() => scale.set(3)}
>
<T.BoxGeometry args={[1, 2, 1]} />
<T.MeshBasicMaterial color={[0, 0, 0]} />
<T.MeshBasicMaterial color={[255, 255, 255]} />
</T.Mesh>
<Github3d
position={[0, 0, 0]}
scale={$scale}
on:pointerenter={() => scale.set(1.5)}
on:pointerleave={() => scale.set(1)}
on:click={() => scale.set(3)}
/>
>
</Github3d>