Skip to content

Commit

Permalink
JOSH-DEV-2024: Updated Experience Colors To Refresh Memory
Browse files Browse the repository at this point in the history
  • Loading branch information
Josh Lavallee committed Sep 22, 2024
1 parent b882bf8 commit 53e7ec6
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions src/Experience.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as three from "three";
import { useState, useRef } from "react"
import { useFrame } from "@react-three/fiber";

function Experience() {
function Experience(positon: any) {
// This reference gives us direct access to the THREE.Mesh object
const cube = useRef<three.Mesh>(null);

Expand All @@ -16,16 +16,27 @@ function Experience() {
});

return (
<>
<mesh
// rotation={[0,0,0]}
scale={.75}
position={[-3, 0, 0]}
>
<sphereGeometry />
<meshBasicMaterial color={"purple"}/>
</mesh>

<mesh
ref={cube}
scale={clicked ? 1.5 : 1}
scale={clicked ? 2 : 1}
onClick={() => click(!clicked)}
onPointerOver={(event) => (event.stopPropagation(), hover(true))}
onPointerOut={() => hover(false)}
>
<boxGeometry args={[1, 1, 1]} />
{hovered ? <meshNormalMaterial /> : <meshStandardMaterial color="hotpink" />}
<boxGeometry />
{hovered ? <meshBasicMaterial color={"purple"}/> : <meshBasicMaterial color={"yellow"} />}
</mesh>
</>
);
}

Expand Down

0 comments on commit 53e7ec6

Please sign in to comment.