33import * as React from 'react' ;
44import { useEffect , useRef , useMemo } from 'react' ;
55import * as THREE from 'three' ;
6- import { a } from 'react-spring/three' ;
7- import { useAnimationHook } from './layouts' ;
6+ import { a } from 'react-spring/three' ;
7+ import { useAnimationHook , useGenerateMaze } from './layouts' ;
88
99
1010
@@ -196,12 +196,6 @@ const Cells = ({board, layoutType, selectedPoint, onSelectPoint, groupingWallPoi
196196 return path ;
197197 } ;
198198
199- const directions = {
200- south : [ 0 , - 1 ] ,
201- north : [ 0 , 1 ] ,
202- west : [ - 1 , 0 ] ,
203- east : [ 1 , 0 ] ,
204- } ;
205199
206200 /*
207201 * Quick selection test
@@ -271,11 +265,12 @@ const Cells = ({board, layoutType, selectedPoint, onSelectPoint, groupingWallPoi
271265 /* useDrag */
272266 } ) ;
273267
274- generateMaze ( board ) ;
275- findCell ( 1 , 1 ) ;
268+ // generateMaze(board);
269+ // findCell(1, 1);
276270 // initializeCellColors();
277271 const { colorAttrib, colorArray} = usePointColorsHook ( { board, selectedPoint} ) ;
278272
273+
279274 // const { colorAttrib: groupingColorAttrib, colorArray: groupingColorArray } = useGroupColors({
280275 // board,
281276 // type: WALL_TYPE,
@@ -298,7 +293,7 @@ const Cells = ({board, layoutType, selectedPoint, onSelectPoint, groupingWallPoi
298293 { /* args = {[colorArray, 3]}*/ }
299294 { /* />*/ }
300295 { /*</sphereBufferGeometry>*/ }
301- < boxBufferGeometry attach = "geometry" args = { [ 0.6 , 0.3 , 0.6 , 18 ] } >
296+ < boxBufferGeometry attach = "geometry" args = { [ 1 , 0.5 , 1 , 18 ] } >
302297 < instancedBufferAttribute
303298 ref = { colorAttrib }
304299 attachObject = { [ 'attributes' , 'color' ] }
0 commit comments