mirror of
https://github.com/bartvdbraak/hellob.art.git
synced 2025-04-27 17:41:21 +00:00
feat: add directional light
This commit is contained in:
parent
9dacad79fb
commit
e35966d7ff
2 changed files with 7 additions and 3 deletions
|
@ -13,6 +13,5 @@
|
||||||
|
|
||||||
<Canvas>
|
<Canvas>
|
||||||
<Scene />
|
<Scene />
|
||||||
<Github3d />
|
|
||||||
</Canvas>
|
</Canvas>
|
||||||
</main>
|
</main>
|
||||||
|
|
|
@ -21,6 +21,8 @@
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
<T.DirectionalLight position={[0, 10, 10]} />
|
||||||
|
|
||||||
<T.Mesh
|
<T.Mesh
|
||||||
rotation.y={rotation}
|
rotation.y={rotation}
|
||||||
position.y={1}
|
position.y={1}
|
||||||
|
@ -30,13 +32,16 @@
|
||||||
on:click={() => scale.set(3)}
|
on:click={() => scale.set(3)}
|
||||||
>
|
>
|
||||||
<T.BoxGeometry args={[1, 2, 1]} />
|
<T.BoxGeometry args={[1, 2, 1]} />
|
||||||
<T.MeshBasicMaterial color={[0, 0, 0]} />
|
<T.MeshBasicMaterial color={[255, 255, 255]} />
|
||||||
</T.Mesh>
|
</T.Mesh>
|
||||||
|
|
||||||
|
|
||||||
<Github3d
|
<Github3d
|
||||||
position={[0, 0, 0]}
|
position={[0, 0, 0]}
|
||||||
scale={$scale}
|
scale={$scale}
|
||||||
on:pointerenter={() => scale.set(1.5)}
|
on:pointerenter={() => scale.set(1.5)}
|
||||||
on:pointerleave={() => scale.set(1)}
|
on:pointerleave={() => scale.set(1)}
|
||||||
on:click={() => scale.set(3)}
|
on:click={() => scale.set(3)}
|
||||||
/>
|
>
|
||||||
|
</Github3d>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue