1- import React , { useMemo } from ' react'
2- import { Billboard , Circle , Image } from ' @react-three/drei'
3- import * as THREE from ' three'
4- import { Group , MeshPhongMaterial , Mesh } from ' ./components'
1+ import React , { useMemo } from " react" ;
2+ import { Billboard , Circle , Image } from " @react-three/drei" ;
3+ import * as THREE from " three" ;
4+ import { Group , MeshPhongMaterial , Mesh } from " ./components" ;
55
6- const potHeight = 400
7- const plantHeight = 500
6+ const potHeight = 400 ;
7+ const plantHeight = 500 ;
88
9- const PottedPlant = ( ) => {
9+ export const PottedPlant = ( ) => {
1010 const points = useMemo ( ( ) => [
11- new THREE . Vector2 ( 0 , 0 ) , // Bottom center
12- new THREE . Vector2 ( 0.3 , 0 ) , // Base width
13- new THREE . Vector2 ( 0.35 , 0.1 ) , // Slight flare at the bottom
14- new THREE . Vector2 ( 0.25 , 0.6 ) , // Narrowing midsection
15- new THREE . Vector2 ( 0.3 , 0.8 ) , // Widening towards the top
16- new THREE . Vector2 ( 0.4 , 1 ) , // Outer lip
17- new THREE . Vector2 ( 0.35 , 1 ) , // Inner lip
18- new THREE . Vector2 ( 0.2 , 0.6 ) , // Depth
19- new THREE . Vector2 ( 0 , 0.6 ) // Close the profile
20- ] , [ ] )
11+ new THREE . Vector2 ( 0 , 0 ) ,
12+ new THREE . Vector2 ( 0.3 , 0 ) ,
13+ new THREE . Vector2 ( 0.35 , 0.1 ) ,
14+ new THREE . Vector2 ( 0.25 , 0.6 ) ,
15+ new THREE . Vector2 ( 0.3 , 0.8 ) ,
16+ new THREE . Vector2 ( 0.4 , 1 ) ,
17+ new THREE . Vector2 ( 0.35 , 1 ) ,
18+ new THREE . Vector2 ( 0.2 , 0.6 ) ,
19+ new THREE . Vector2 ( 0 , 0.6 ) ,
20+ ] , [ ] ) ;
2121
22- const geometry = useMemo ( ( ) => new THREE . LatheGeometry ( points , 32 , 0 , Math . PI * 2 ) , [ points ] )
22+ const geometry = useMemo ( ( ) => new THREE . LatheGeometry ( points , 32 , 0 , Math . PI * 2 ) , [ points ] ) ;
2323
2424 return (
2525 < Group name = "pot-with-plant" >
@@ -43,7 +43,5 @@ const PottedPlant = () => {
4343 />
4444 </ Billboard >
4545 </ Group >
46- )
47- }
48-
49- export default PottedPlant
46+ ) ;
47+ } ;
0 commit comments