File tree Expand file tree Collapse file tree 1 file changed +15
-4
lines changed Expand file tree Collapse file tree 1 file changed +15
-4
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import * as three from "three";
2
2
import { useState , useRef } from "react"
3
3
import { useFrame } from "@react-three/fiber" ;
4
4
5
- function Experience ( ) {
5
+ function Experience ( positon : any ) {
6
6
// This reference gives us direct access to the THREE.Mesh object
7
7
const cube = useRef < three . Mesh > ( null ) ;
8
8
@@ -16,16 +16,27 @@ function Experience() {
16
16
} ) ;
17
17
18
18
return (
19
+ < >
20
+ < mesh
21
+ // rotation={[0,0,0]}
22
+ scale = { .75 }
23
+ position = { [ - 3 , 0 , 0 ] }
24
+ >
25
+ < sphereGeometry />
26
+ < meshBasicMaterial color = { "purple" } />
27
+ </ mesh >
28
+
19
29
< mesh
20
30
ref = { cube }
21
- scale = { clicked ? 1.5 : 1 }
31
+ scale = { clicked ? 2 : 1 }
22
32
onClick = { ( ) => click ( ! clicked ) }
23
33
onPointerOver = { ( event ) => ( event . stopPropagation ( ) , hover ( true ) ) }
24
34
onPointerOut = { ( ) => hover ( false ) }
25
35
>
26
- < boxGeometry args = { [ 1 , 1 , 1 ] } />
27
- { hovered ? < meshNormalMaterial /> : < meshStandardMaterial color = "hotpink" /> }
36
+ < boxGeometry />
37
+ { hovered ? < meshBasicMaterial color = { "purple" } /> : < meshBasicMaterial color = { "yellow" } /> }
28
38
</ mesh >
39
+ </ >
29
40
) ;
30
41
}
31
42
You can’t perform that action at this time.
0 commit comments