log map, smaller maze
This commit is contained in:
@ -59,4 +59,10 @@ export default class MazeMesh extends THREE.InstancedMesh {
|
|||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
toString() {
|
||||||
|
return this.map.map(row =>
|
||||||
|
row.map(isWall => isWall? "██":"░░").join("")
|
||||||
|
).join("\n")
|
||||||
|
}
|
||||||
}
|
}
|
6
main.js
6
main.js
@ -14,10 +14,10 @@ import { Sky } from 'three/addons/objects/Sky.js';
|
|||||||
|
|
||||||
import MazeMesh from './MazeMesh.js';
|
import MazeMesh from './MazeMesh.js';
|
||||||
|
|
||||||
|
const mazeLength = 23
|
||||||
|
const mazeWidth = 23
|
||||||
const latitude = THREE.MathUtils.degToRad(35)
|
const latitude = THREE.MathUtils.degToRad(35)
|
||||||
const longitude = THREE.MathUtils.degToRad(25)
|
const longitude = THREE.MathUtils.degToRad(25)
|
||||||
const mazeLength = 51
|
|
||||||
const mazeWidth = 51
|
|
||||||
|
|
||||||
let showGUI = window.location.search.includes("debug")
|
let showGUI = window.location.search.includes("debug")
|
||||||
let showStats = window.location.search.includes("stats")
|
let showStats = window.location.search.includes("stats")
|
||||||
@ -265,6 +265,8 @@ for ( let i=0; i<maze.count; i++ ) {
|
|||||||
worldOctree.fromGraphNode( clone )
|
worldOctree.fromGraphNode( clone )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
console.log(String(maze))
|
||||||
|
|
||||||
// debug
|
// debug
|
||||||
|
|
||||||
let stats, octreeHelper, gui
|
let stats, octreeHelper, gui
|
||||||
|
Reference in New Issue
Block a user