Separate prototype in classes in multiple files, and merged two versions

This commit is contained in:
Thomas FORGIONE
2015-05-06 14:54:02 +02:00
parent 453cc401d1
commit 1d6dbc0522
12 changed files with 646 additions and 1109 deletions

View File

@@ -10,7 +10,7 @@ module.exports.index = function(req, res) {
module.exports.arrows = function(req, res) {
res.setHeader('Content-Type', 'text/html');
res.locals.extrajs = '<script src="/static/js/prototype/arrows/main.js"></script>';
res.locals.cameraStyle = 'arrows';
res.render('prototype.jade', res.locals, function(err, result) {
console.log(err);
@@ -21,7 +21,7 @@ module.exports.arrows = function(req, res) {
module.exports.viewports = function(req, res) {
res.setHeader('Content-Type', 'text/html');
res.locals.extrajs = '<script src="/static/js/prototype/viewports/main.js"></script>';
res.locals.cameraStyle = 'viewports';
res.render('prototype.jade', res.locals, function(err, result) {
res.send(result);

View File

@@ -4,7 +4,15 @@ block title
title #{title} - Prototype
block extrajs
#{extrajs}
script(src="/static/js/prototype/initScene.js")
script(src="/static/js/prototype/raycasterTools.js")
script(src="/static/js/prototype/Previewer.js")
script(src="/static/js/prototype/ButtonManager.js")
if cameraStyle == 'arrows'
script Recommendation = FixedCamera;
else if cameraStyle == 'viewports'
script Recommendation = OldFixedCamera;
script(src="/static/js/prototype/main.js")
block extrahead
link(rel="stylesheet" href="/static/css/prototype.css")