Skip to content

Commit

Permalink
Merge pull request #906 from OpenGeoscience/expose-mat4-in-camera
Browse files Browse the repository at this point in the history
Expose matrix and vector classes in the camera object.
  • Loading branch information
manthey authored Aug 31, 2018
2 parents fe0b139 + 6831e52 commit 20b3537
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
8 changes: 8 additions & 0 deletions src/camera.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
var inherit = require('./inherit');
var object = require('./object');
var util = require('./util');
var mat3 = require('gl-mat3');
var vec3 = require('gl-vec3');
var mat4 = require('gl-mat4');
var vec4 = require('gl-vec4');

Expand Down Expand Up @@ -914,5 +916,11 @@ camera.css = function (t) {
')';
};

// expose the vector and matrix functions for convenience
camera.vec3 = vec3;
camera.mat3 = mat3;
camera.vec4 = vec4;
camera.mat4 = mat4;

inherit(camera, object);
module.exports = camera;
3 changes: 0 additions & 3 deletions tests/cases/camera.js
Original file line number Diff line number Diff line change
Expand Up @@ -371,9 +371,6 @@ describe('geo.camera', function () {
}

function assert_position(position) {
if (!closeToEqual(get_node_position(), position, 2)) { //DWM::
console.log('assert_position', get_node_position(), position); //DWM::
} //DWM::
expect(closeToEqual(get_node_position(), position, 2)).toBe(true);
}

Expand Down

0 comments on commit 20b3537

Please sign in to comment.