A little cleaning
This commit is contained in:
parent
74eda889be
commit
fe34290802
|
@ -21,11 +21,11 @@ var Info = function(id, finishAction) {
|
|||
pg.connect(pgc.url, function(err, client, release) {
|
||||
self.client = client;
|
||||
self.release = release;
|
||||
self.loadAll();
|
||||
self.execute();
|
||||
});
|
||||
}
|
||||
|
||||
Info.prototype.loadAll = function() {
|
||||
Info.prototype.execute = function() {
|
||||
this.loadCameras();
|
||||
this.loadCoins();
|
||||
this.loadArrows();
|
||||
|
|
|
@ -380,10 +380,6 @@ PointerCamera.prototype.redoable = function() {
|
|||
return this.history.redoable();
|
||||
}
|
||||
|
||||
// Static members
|
||||
PointerCamera.DISTANCE_X = 1000;
|
||||
PointerCamera.DISTANCE_Z = 300;
|
||||
|
||||
var History = function() {
|
||||
this.states = new Array();
|
||||
this.index = -1;
|
||||
|
|
|
@ -1,15 +1,11 @@
|
|||
var Tools = {version : "1.0" };
|
||||
|
||||
Tools.sum = function(v1, v2) {
|
||||
var ret = v1.clone();
|
||||
ret.add(v2);
|
||||
return ret;
|
||||
return new THREE.Vector3(v1.x + v2.x, v1.y + v2.y, v1.z + v2.z);
|
||||
}
|
||||
|
||||
Tools.diff = function(v1, v2) {
|
||||
var ret = v1.clone();
|
||||
ret.sub(v2);
|
||||
return ret;
|
||||
return new THREE.Vector3(v1.x - v2.x, v1.y - v2.y, v1.z - v2.z);
|
||||
}
|
||||
|
||||
Tools.dot = function(v1, v2) {
|
||||
|
@ -17,15 +13,15 @@ Tools.dot = function(v1, v2) {
|
|||
}
|
||||
|
||||
Tools.cross = function(v1, v2) {
|
||||
var ret = v1.clone();
|
||||
ret.cross(v2);
|
||||
return ret;
|
||||
return new THREE.Vector3(
|
||||
v1.y * v2.z - v1.z * v2.y,
|
||||
v1.z * v2.x - v1.x * v2.z,
|
||||
v1.x * v2.y - v1.y * v2.x
|
||||
);
|
||||
}
|
||||
|
||||
Tools.mul = function(v1, lambda) {
|
||||
var ret = v1.clone();
|
||||
ret.multiplyScalar(lambda);
|
||||
return ret;
|
||||
return new THREE.Vector3(v1.x * lambda, v1.y * lambda, v1.z * lambda);
|
||||
}
|
||||
|
||||
Tools.equals = function(v1, v2) {
|
||||
|
|
Loading…
Reference in New Issue