mrdoob/three.js — Issue #908: Concatenate transform matrices of 3dobjects
Author: foo123
Created: 2011-12-14 17:40:02+00:00
State: open

i'm developing a rubik cube app/game using three.js. i have already developed a similar application in flash
using papervision3D at http://nikos-web-development.netai.net/blog/intuitive-3d-rubik-cube-viewer-and-solver/
i understand three.js is very similar to actionscript 3D engines like papervision3D the problem is the following:
I try to rotate the rows of the rubik cube (the rubik cube is an Object3D subclass which contains all the cubelets)
in doing so (as in the flash version) i define the angle, compute a rotation matrix with this angle and
post/pre multiply the transform matrix of the cubelet with the new rotation matrix (in papervision this works and it saves alot of trouble trying to maintain the current position etc of the cubelet while applying the rotation) this way all cubelets that belong to given row can be rotated (each with respective results) with the same transform matrix which is just a rotationX, rotationY or rotationZ matrix.
i have the following code but doesn't seem to work (the row that contains the cubelets to be rotated just disappears or does nothing)
for (var k=0;k