Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
diwi committed Jan 1, 2018
1 parent c016b3c commit 4b34674
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 31 deletions.
4 changes: 2 additions & 2 deletions examples/MultiView/MultiView.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@

var NX = 3;
var NY = 2;
var cameras = [];

var cameras;

function setup() {
createCanvas(windowWidth, windowHeight, WEBGL);
Expand All @@ -32,6 +31,7 @@ function setup() {

console.log(Dw.EasyCam.INFO);

cameras = [];
cameras.length = NX * NY;

for(var i = 0; i < cameras.length; i++){
Expand Down
42 changes: 14 additions & 28 deletions p5.easycam.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,19 @@
*/


// Dw namespace, .... new Dw.EasyCam(renderer, args);
var Dw = {};




(function () {

(function(ext) {


// p5.EasyCam library info
const INFO =
{
LIBRARY : "p5.EasyCam",
VERSION : "1.0.1",
VERSION : "1.0.2",
AUTHOR : "Thomas Diewald",
SOURCE : "https://github.com/diwi/p5.EasyCam",

Expand Down Expand Up @@ -1206,26 +1208,15 @@ var glInfo = function(){






// adding class and objects to the p5 namespace
// Note: Not sure if this is the preferred way ...

EasyCam.INFO = INFO; // make static
Object.freeze(INFO); // and constant

// Dw namespace
Dw =
{
EasyCam : EasyCam,
DampedAction : DampedAction,
Interpolation : Interpolation,
Rotation : Rotation,
Vec3 : Vec3,
Scalar : Scalar,
}

ext.EasyCam = EasyCam;
ext.DampedAction = DampedAction;
ext.Interpolation = Interpolation;
ext.Rotation = Rotation;
ext.Vec3 = Vec3;
ext.Scalar = Scalar;


////////////////////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -1264,7 +1255,7 @@ if(p5){
args = arguments[1]; // could still be undefined, which is fine
}

return new Dw.EasyCam(renderer, args);
return new ext.EasyCam(renderer, args);
}
}

Expand Down Expand Up @@ -1316,14 +1307,9 @@ if(p5){



})(Dw);


})();



// Dw namespace, .... new Dw.EasyCam(renderer, args);
var Dw;



Expand Down
Loading

0 comments on commit 4b34674

Please sign in to comment.