'how can i make a cube with a grid in three.js

Cube

I want to make something exactly like this but I can change the amount of cubes in the grid with a variable.(I have no idea how to start)



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source