mirror of
https://github.com/bartvdbraak/hellob.art.git
synced 2025-04-26 17:11: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>
|
||||
<Scene />
|
||||
<Github3d />
|
||||
</Canvas>
|
||||
</main>
|
||||
|
|
|
@ -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>
|
||||
|
||||
|
|
Loading…
Reference in a new issue