I am currently having a issue with the following code. When I attempt to deconstruct the world object for some of its properties and then floor the values, I get a initialization error.
(https://replit.com/@Michael_Nicol/Issue#index.js)
const world = {
mazeIndex: 0,
startZ: 1.5,
startY: 2,
startX: 2.5,
endZ: 0,
endY: 1.34543,
endX: 3.1
};
function generateCoordMaze() {
let { startZ, startY, startX, endZ, endY, endX } = world
[startZ, startY, startX, endZ, endY, endX].map(c => Math.floor(c))
console.log([startZ, startY, startX, endZ, endY, endX])
}
generateCoordMaze()
The reason I need to do this is because world is actually the object for a dat.gui controller, and each of its properties will be slider values.
