Comparing version 0.0.41 to 0.0.42
// Generated by CoffeeScript 1.9.2 | ||
/*! Oo3d 0.0.41 //// MIT Licence //// http://oo3d.richplastow.com/ */ | ||
/*! Oo3d 0.0.42 //// MIT Licence //// http://oo3d.richplastow.com/ */ | ||
@@ -12,3 +12,3 @@ (function() { | ||
ªV = '0.0.41'; | ||
ªV = '0.0.42'; | ||
@@ -752,2 +752,21 @@ ªA = 'array'; | ||
Main.prototype.getCameraSnapshot = function(cameraI) { | ||
var camera, mat; | ||
camera = this.cameras[cameraI]; | ||
mat = new Float32Array(16); | ||
mat.set(camera.matTransform); | ||
return { | ||
mat: mat, | ||
rX: camera.rX, | ||
rY: camera.rY, | ||
rZ: camera.rZ, | ||
sX: camera.sX, | ||
sY: camera.sY, | ||
sZ: camera.sZ, | ||
tX: camera.tX, | ||
tY: camera.tY, | ||
tZ: camera.tZ | ||
}; | ||
}; | ||
Main.prototype.getItemSnapshot = function(itemI) { | ||
@@ -772,2 +791,19 @@ var item, mat; | ||
Main.prototype.setCameraSnapshot = function(snapshot, cameraI) { | ||
var camera; | ||
camera = this.cameras[cameraI]; | ||
camera.matTransform = new Float32Array(16); | ||
camera.matTransform.set(snapshot.mat); | ||
camera.rX = snapshot.rX; | ||
camera.rY = snapshot.rY; | ||
camera.rZ = snapshot.rZ; | ||
camera.sX = snapshot.sX; | ||
camera.sY = snapshot.sY; | ||
camera.sZ = snapshot.sZ; | ||
camera.tX = snapshot.tX; | ||
camera.tY = snapshot.tY; | ||
camera.tZ = snapshot.tZ; | ||
return this; | ||
}; | ||
Main.prototype.setItemSnapshot = function(snapshot, itemI) { | ||
@@ -774,0 +810,0 @@ var item; |
@@ -7,1 +7,2 @@ Usage | ||
3. [Pick Transform](http://oo3d.richplastow.com/usage/03-pick-transform.html) | ||
4. [Scene Builder](http://oo3d.richplastow.com/usage/04-scene-builder.html) |
{ | ||
"name": "oo3d", | ||
"version": "0.0.41", | ||
"version": "0.0.42", | ||
"description": "The Oopish WebGL engine", | ||
@@ -5,0 +5,0 @@ "main": "build/oo3d.js", |
@@ -9,7 +9,7 @@ Oo3d | ||
- [Documentation](http://oo3d.richplastow.com/#/doc/documentation) | ||
- [Fork Oo3d on GitHub](https://github.com/richplastow/oo3d) | ||
- [NPM Package](https://www.npmjs.com/package/oo3d) | ||
- [Test](http://oo3d.richplastow.com/test/run-test.html) | ||
- [Usage](http://oo3d.richplastow.com/#/doc/usage) | ||
- [Test](http://oo3d.richplastow.com/test/run-test.html) | ||
- [NPM Package](https://www.npmjs.com/package/oo3d) | ||
- [Fork Oo3d on GitHub](https://github.com/richplastow/oo3d) | ||
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
337926
38
3566