Separate prototype in classes in multiple files, and merged two versions
This commit is contained in:
4
controllers/prototype/index.js
vendored
4
controllers/prototype/index.js
vendored
@@ -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);
|
||||
|
||||
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user