What you need to do is create a cubic grid, and then apply the shift matrix to the cube geometry. The operation distorts the geometry as you described.
var geometry = new THREE.BoxGeometry( 5, 5, 5 ); var matrix = new THREE.Matrix4(); matrix.set( 1, Syx, Szx, 0, Sxy, 1, Szy, 0, Sxz, Syz, 1, 0, 0, 0, 0, 1 ); geometry.applyMatrix( matrix );
Here is the script: http://jsfiddle.net/4kHdQ/54/
EDIT: Updated to three. js r.71
Westlangley
source share