I have a cube, I know how to rotate it, but I want it rotates not around its center, but around one of its side. How can I do it? In the code below I change the positions of cubes via quaternions. But this code change positions of figures relative to its center, I need around one of cube side.
function applyMove(quaternions, cubes){
cubes.forEach((cube, idx) => cube.quaternion.copy(quaternions[idx]));
}