Removed useless log, and fix previsualization on arrow
This commit is contained in:
parent
a31c71513a
commit
a6f637223f
|
@ -15,7 +15,6 @@ module.exports.index = function(req, res) {
|
||||||
req.body.time
|
req.body.time
|
||||||
],
|
],
|
||||||
function(err, result) {
|
function(err, result) {
|
||||||
console.log(err);
|
|
||||||
release();
|
release();
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
|
@ -47,8 +47,8 @@ CameraSelecter.prototype.pointedCamera = function() {
|
||||||
return coins[coin];
|
return coins[coin];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
this.currentPointedCamera = this.cameras.getByObject(intersects[bestIndex].object);
|
||||||
return this.cameras.getByObject(intersects[bestIndex].object);
|
return this.currentPointedCamera;
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -60,11 +60,14 @@ CameraSelecter.prototype.update = function(event) {
|
||||||
this.mouse.y = event.offsetY == undefined ? event.layerY : event.offsetY;
|
this.mouse.y = event.offsetY == undefined ? event.layerY : event.offsetY;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var previousCamera = this.currentPointedCamera;
|
||||||
var hovered = this.pointedCamera(event);
|
var hovered = this.pointedCamera(event);
|
||||||
|
|
||||||
if (hovered !== undefined && !(hovered instanceof Coin)) {
|
if (hovered !== undefined && !(hovered instanceof Coin)) {
|
||||||
|
if (hovered !== previousCamera) {
|
||||||
this.prev.x = this.mouse.x;
|
this.prev.x = this.mouse.x;
|
||||||
this.prev.y = this.mouse.y;
|
this.prev.y = this.mouse.y;
|
||||||
|
}
|
||||||
this.prev.camera = hovered;
|
this.prev.camera = hovered;
|
||||||
this.prev.go = true;
|
this.prev.go = true;
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue