Documentation, BD -> DB

This commit is contained in:
Thomas FORGIONE
2015-07-17 16:28:55 +02:00
parent df87f629f6
commit 6a4cd21081
8 changed files with 252 additions and 61 deletions

View File

@@ -35,7 +35,7 @@ var ButtonManager = function(camera, cameras, previewer) {
self.camera.onPointerLockChange();
// Log
var event = new L3D.BD.Event.SwitchedLockOption();
var event = new L3D.DB.Event.SwitchedLockOption();
event.locked = self.pointerLockElement.checked;
event.send();
};

View File

@@ -21,7 +21,7 @@ var container_size = {
};
function logfps(fps) {
var event = new L3D.BD.Event.Fps();
var event = new L3D.DB.Event.Fps();
event.fps = fps;
event.send();
}
@@ -49,7 +49,7 @@ function objectClickerOnHover(camera1, previewer, recommendations, container) {
// Manage the hover camera event
if (hoveredCamera !== obj) {
var event = new L3D.BD.Event.Hovered();
var event = new L3D.DB.Event.Hovered();
if (obj instanceof L3D.BaseRecommendation) {
// The newly hovered object is different and is a recommendation
@@ -93,7 +93,7 @@ function objectClickerOnClick(camera1, buttonManager, recommendations, coins) {
obj.get();
// Send event to DB
event = new L3D.BD.Event.CoinClicked();
event = new L3D.DB.Event.CoinClicked();
event.coin_id = coins.indexOf(obj);
event.send();
@@ -103,7 +103,7 @@ function objectClickerOnClick(camera1, buttonManager, recommendations, coins) {
camera1.moveHermite(obj);
// Send event to DB
event = new L3D.BD.Event.ArrowClicked();
event = new L3D.DB.Event.ArrowClicked();
event.arrow_id = recommendations.indexOf(obj);
event.send();
}

View File

@@ -48,7 +48,7 @@ saveCoins = function() {
result.coins.push(coins[i].mesh.position);
}
L3D.BD.Private.sendData('/posts/coin-info', result, true);
L3D.DB.Private.sendData('/posts/coin-info', result, true);
};
@@ -69,7 +69,7 @@ function main() {
onWindowResize();
// Some config
L3D.BD.disable();
L3D.DB.disable();
Coin.update();
startCanvas.render(L3D.StartCanvas.Black);

View File

@@ -47,7 +47,7 @@ function main() {
if (initMainScene !== L3D.initPeach && initMainScene !== L3D.initSponza)
setInterval(function() {logfps(stats.getFps());}, 500);
else
L3D.BD.disable();
L3D.DB.disable();
Coin.update();
startCanvas.render(L3D.StartCanvas.Black);

View File

@@ -270,7 +270,7 @@ TutoCamera.prototype.reset = function() {
this.resetPosition();
this.moving = false;
this.movingHermite = false;
(new L3D.BD.Event.ResetClicked()).send();
(new L3D.DB.Event.ResetClicked()).send();
this.previousTheta = this.theta;
this.previousPhi = this.phi;
@@ -435,7 +435,7 @@ TutoCamera.prototype.onKeyEvent = function(event, toSet) {
if (motionJsonCopy != JSON.stringify(this.motion)) {
// Log any change
var e = new L3D.BD.Event.KeyboardEvent();
var e = new L3D.DB.Event.KeyboardEvent();
e.camera = this;
e.send();
}
@@ -503,7 +503,7 @@ TutoCamera.prototype.onMouseUp = function(event) {
// Send log to DB
if (this.dragging && this.mouseMoved && !this.moving && !this.movingHermite) {
var e = new L3D.BD.Event.KeyboardEvent();
var e = new L3D.DB.Event.KeyboardEvent();
e.camera = this;
e.send();
}
@@ -526,7 +526,7 @@ TutoCamera.prototype.save = function() {
TutoCamera.prototype.undo = function() {
var move = this.history.undo();
if (move !== undefined) {
var event = new L3D.BD.Event.PreviousNextClicked();
var event = new L3D.DB.Event.PreviousNextClicked();
event.previous = true;
event.camera = move;
event.send();
@@ -538,7 +538,7 @@ TutoCamera.prototype.undo = function() {
TutoCamera.prototype.redo = function() {
var move = this.history.redo();
if (move !== undefined) {
var event = new L3D.BD.Event.PreviousNextClicked();
var event = new L3D.DB.Event.PreviousNextClicked();
event.previous = false;
event.camera = move;
event.send();