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