Monster commit

This commit is contained in:
Thomas FORGIONE
2016-01-08 16:05:09 +01:00
parent 1bee439d5a
commit f338e4006b
37 changed files with 1876 additions and 333 deletions
+3 -3
View File
@@ -12,9 +12,9 @@ module.exports.demo = function(req, res) {
res.setHeader('Content-Type', 'text/html');
switch (req.query.scene) {
case '2': res.locals.scene = 'L3D.initBobomb'; break;
case '3': res.locals.scene = 'L3D.initMountain'; break;
case '4': res.locals.scene = 'L3D.initWhomp'; break;
case '2': res.locals.scene = 'BobombScene'; break;
case '3': res.locals.scene = 'MountainScene'; break;
case '4': res.locals.scene = 'WhompScene'; break;
}
switch (req.query.bookmark) {
+11 -6
View File
@@ -4,17 +4,22 @@ block title
title #{title} - Prototype
block prepend js
script BD_DISABLED = true;
script.
GLOB = typeof GLOB !== 'undefined' ? GLOB : {};
GLOB.BD_DISABLED = true;
block extrajs
script(src="/static/js/l3dp.min.js")
script.
GLOB = typeof GLOB !== 'undefined' ? GLOB : {};
GLOB.SceneClass = #{scene};
GLOB.Recommendation = #{bookmark};
GLOB.prefetch = "#{prefetch}";
GLOB.locked = #{session.locked === undefined ? 'true' : session.locked};
block configjs
script.
initMainScene = #{scene};
Recommendation = #{bookmark};
prefetch = "#{prefetch}";
locked = #{session.locked === undefined ? 'true' : session.locked};
coinsId=[];
GLOB = typeof GLOB !== 'undefined' ? GLOB : {};
GLOB.coinConfig={ids:[], type: Coin.Config.NONE};
script(src="/static/js/prototypeinteractive.min.js")
script document.getElementById('music').volume = 0.5;
+10 -8
View File
@@ -14,13 +14,13 @@ module.exports.index = function(req, res) {
var sceneToFunction = function(scene) {
switch (scene) {
case 2:
return 'L3D.initBobomb';
return 'BobombScene';
case 3:
return 'L3D.initMountain';
return 'MountainScene';
case 4:
return 'L3D.initWhomp';
return 'WhompScene';
default:
return 'L3D.initPeach';
return 'PeachScene';
}
};
@@ -110,6 +110,8 @@ module.exports.play = function(req, res) {
req.session.expId = expId;
req.session.save();
res.locals.lowRes = true;
// Prepare next experiment
module.exports.game(req, null);
@@ -225,10 +227,10 @@ function editorHelper(templateName) {
switch (scene) {
case 'peach': res.locals.scene = "L3D.initPeach"; break;
case 'coolcoolmountain': res.locals.scene = "L3D.initMountain"; break;
case 'whomp': res.locals.scene = "L3D.initWhomp"; break;
case 'bobomb': res.locals.scene = "L3D.initBobomb"; break;
case 'peach': res.locals.scene = "PeachScene"; break;
case 'coolcoolmountain': res.locals.scene = "MountainScene"; break;
case 'whomp': res.locals.scene = "WhompScene"; break;
case 'bobomb': res.locals.scene = "BobombScene"; break;
default:
// 404
var err = new Error('Incorrect scene');
@@ -9,7 +9,7 @@ block extrajs
block mainjs
script document.getElementById('music').volume = 0.5;
block extrahead
block append extrahead
link(rel="stylesheet" href="/static/css/prototype.css")
block content
@@ -4,8 +4,8 @@ block title
title #{title} - Prototype
block mainjs
script initMainScene = #{scene};
script Recommendation = L3D.ArrowRecommendation;
script GLOB.SceneClass = #{scene};
script GLOB.Recommendation = L3D.ArrowRecommendation;
script(src="/static/js/coinchecker.min.js")
@@ -4,8 +4,8 @@ block title
title #{title} - Prototype
block mainjs
script initMainScene = #{scene};
script Recommendation = L3D.ArrowRecommendation;
script GLOB.SceneClass = #{scene};
script GLOB.Recommendation = L3D.ArrowRecommendation;
script(src="/static/js/coincreator.min.js")
@@ -4,8 +4,8 @@ block title
title #{title} - Prototype
block mainjs
script initMainScene = #{scene};
script locked = #{session.locked === undefined ? 'true' : session.locked};
script GLOB.SceneClass = #{scene};
script GLOB.locked = #{session.locked === undefined ? 'true' : session.locked};
script(src="/static/js/prototypeinteractive.min.js")
block description
@@ -4,7 +4,9 @@ block title
title #{title} - Prototype - Arrows
block configjs
script Recommendation = #{recommendationStyle}; coinsId = [#{coins}];
script GLOB.Recommendation = #{recommendationStyle}; GLOB.coinConfig = {type : Coin.Config.SOME, ids : [#{coins}]};
if (lowRes === true)
script GLOB.lowRes = true; GLOB.hideBeforeLoading = true;
block lastbutton
button#next.btn.btn-success.navbar-btn(style={'margin-right':'10px', 'margin-bottom':'10px', 'display':'none'})
@@ -4,7 +4,7 @@ block title
title #{title} - Prototype - Reverse
block configjs
script Recommendation = L3D.ReverseRecommendation;
script GLOB.Recommendation = L3D.ReverseRecommendation;
//-block preciseDescription
p
@@ -4,8 +4,8 @@ block title
title #{title} - Prototype
block mainjs
script initMainScene = #{scene};
script Recommendation = L3D.ArrowRecommendation;
script GLOB.SceneClass = #{scene};
script GLOB.Recommendation = L3D.ArrowRecommendation;
script(src="/static/js/coinviewer.min.js")
@@ -7,9 +7,9 @@ block prepend js
script window.DB_DISABLED = true;
block mainjs
script locked = false;
script GLOB.locked = false;
script(src="/static/js/prototypeinteractive.min.js")
script initMainScene = L3D.initSponza
script GLOB.SceneClass = SponzaScene;
block configjs
script Recommendation = L3D.ArrowRecommendation;
@@ -7,7 +7,7 @@ block title
title #{title} - Prototype - Tutorial
block configjs
script Recommendation = L3D.ArrowRecommendation; coinsId = [#{coins}];
script GLOB.Recommendation = L3D.ArrowRecommendation; GLOB.coinConfig = {type : Coin.Config.SOME, ids : [#{coins}]};
script(src="/static/js/tutorial.min.js")
block lastbutton