From 4e1d86ca8bc1f2553dbbb93c8e76679a7eb9a9f6 Mon Sep 17 00:00:00 2001 From: Thomas FORGIONE Date: Wed, 22 Jul 2015 17:01:36 +0200 Subject: [PATCH] Corrected tutorial --- .../apps/prototype/tutorial/TutorialSteps.js | 34 ++++++++++++++++--- js/l3d/apps/prototype/tutorial/main.js | 2 +- js/l3d/src/scenes/initScene.js | 6 ++-- 3 files changed, 33 insertions(+), 9 deletions(-) diff --git a/js/l3d/apps/prototype/tutorial/TutorialSteps.js b/js/l3d/apps/prototype/tutorial/TutorialSteps.js index 67255c5..1efb75d 100644 --- a/js/l3d/apps/prototype/tutorial/TutorialSteps.js +++ b/js/l3d/apps/prototype/tutorial/TutorialSteps.js @@ -75,7 +75,7 @@ var TutorialSteps = function(tutoCamera, scene, coins, onWindowResize, container justclick:true }, { - text: "Here are some more recommendations, try to browse the scene and find the missing red coins (5/8)", + text: "Here are some more recommendations, try to browse the scene and find the missing red coins", justclick:false }, { @@ -83,9 +83,29 @@ var TutorialSteps = function(tutoCamera, scene, coins, onWindowResize, container justclick: false }, { - text: "Tip : if you find that the previews take too much place, you can put them at the bottom of the screen (use the checkbox options below) !", + text: "Tip : you can use the arrow buttons in the bar at the bottom of the screen to go to the previous / next position", justclick: false }, + { + text: "Tip : you can use the arrow buttons in the bar at the bottom of the screen to go to the previous / next position", + justclick: false + }, + { + text: "Tip : you can use the arrow buttons in the bar at the bottom of the screen to go to the previous / next position", + justclick: false + }, + { + text: "Tip : you can use the arrow buttons in the bar at the bottom of the screen to go to the previous / next position", + justclick: false + }, + { + text: "Tip : you can use the arrow buttons in the bar at the bottom of the screen to go to the previous / next position", + justclick: false + }, + { + text: "Tip : you can use the arrow buttons in the bar at the bottom of the screen to go to the previous / next position", + justclick:false + }, { text: "Congratulations ! You've successfully finished the tutorial !", justclick: false @@ -175,11 +195,15 @@ TutorialSteps.prototype.nextStep = function() { for (var i = 0; i < cams.length; i == 1 ? i+=2 : i++) { this.addRecommendation(cams[i]); } + Coin.total = 1; Coin.max = 8; Coin.update(); - this.addCoin(new Coin(3.701112872561801,-0.4620393514856378,-3.3373375945128085, callback)); - this.addCoin(new Coin(6.694675339780243,-1.2480369397526456,-1.992336719279164, callback)); - this.addCoin(new Coin(-2.458336118265302,-1.549510268763568,-11.186153614421212, callback)); + var coins = L3D.generateCoins(L3D.createPeachCoins()); + for (var i = 0; i < coins.length; i++) { + coins[i].rotating = true; + coins[i].callback = callback; + this.addCoin(coins[i]); + } break; } this.step++; diff --git a/js/l3d/apps/prototype/tutorial/main.js b/js/l3d/apps/prototype/tutorial/main.js index 47845d5..2d2aadb 100644 --- a/js/l3d/apps/prototype/tutorial/main.js +++ b/js/l3d/apps/prototype/tutorial/main.js @@ -106,7 +106,7 @@ function initCanvases() { function initModels() { // Init recommendations - recommendations = L3D.initPeach(camera1, scene, coins, clickableObjects); + recommendations = L3D.initPeach(camera1, scene, coins, clickableObjects, null); // init clickable objects var i; diff --git a/js/l3d/src/scenes/initScene.js b/js/l3d/src/scenes/initScene.js index b988b9f..8967487 100644 --- a/js/l3d/src/scenes/initScene.js +++ b/js/l3d/src/scenes/initScene.js @@ -220,7 +220,9 @@ L3D.generateCoins = function(totalCoins, coin_ids) { if (coin_ids === undefined) L3D.shuffle(totalCoins); - else { + else if (coin_ids === null) { + return []; + } else { for (i = 0; i < coin_ids.length; i++) { @@ -250,8 +252,6 @@ L3D.generateCoins = function(totalCoins, coin_ids) { indices.push(totalCoins[i].id); } - console.log(bound); - if (coin_ids === undefined || (coin_ids instanceof Array && coin_ids.length === 0)) L3D.DB.Private.sendData('/posts/coin-id', {indices : indices});