Three.js: update inaccurate comment. NFC.
parent
b97a80b6ed
commit
201e15e68a
|
@ -25,10 +25,11 @@ SolvespaceCamera.prototype.updateProjectionMatrix = function() {
|
||||||
var n = new THREE.Vector3().crossVectors(this.up, this.right);
|
var n = new THREE.Vector3().crossVectors(this.up, this.right);
|
||||||
var rotate = new THREE.Matrix4().makeBasis(this.right, this.up, n);
|
var rotate = new THREE.Matrix4().makeBasis(this.right, this.up, n);
|
||||||
rotate.transpose();
|
rotate.transpose();
|
||||||
/* FIXME: At some point we ended up using row-major.
|
/* Transpose of rotation matrix == inverse. Rotating the camera by a
|
||||||
THREE.js wants column major. Scale/depth correct unaffected b/c diagonal
|
basis is equivalent to rotating an object by the inverse of the
|
||||||
matrices remain the same when transposed. makeTranslation also makes
|
basis. To mimic Solvespace's behavior, we pan relative to the camera.
|
||||||
a column-major matrix. */
|
So we need to be rotated to where the camera is pointing before panning.
|
||||||
|
See: https://en.wikipedia.org/wiki/Change_of_basis#Two_dimensions */
|
||||||
|
|
||||||
/* TODO: If we want perspective, we need an additional matrix
|
/* TODO: If we want perspective, we need an additional matrix
|
||||||
here which will modify w for perspective divide. */
|
here which will modify w for perspective divide. */
|
||||||
|
|
Loading…
Reference in New Issue