2016-01-04 17:54:14 +01:00
|
|
|
module.exports.demoConfig = function(req, res) {
|
|
|
|
res.setHeader('Content-Type', 'text/html');
|
|
|
|
|
|
|
|
res.render('demo-config.jade', res.locals, function(err, result) {
|
|
|
|
res.send(result);
|
|
|
|
});
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
module.exports.demo = function(req, res) {
|
|
|
|
|
|
|
|
res.setHeader('Content-Type', 'text/html');
|
|
|
|
|
|
|
|
switch (req.query.scene) {
|
2016-01-08 16:05:09 +01:00
|
|
|
case '2': res.locals.scene = 'BobombScene'; break;
|
|
|
|
case '3': res.locals.scene = 'MountainScene'; break;
|
|
|
|
case '4': res.locals.scene = 'WhompScene'; break;
|
2016-01-04 17:54:14 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
switch (req.query.bookmark) {
|
|
|
|
case '0': res.locals.bookmark = 'L3D.BaseRecommendation'; break;
|
|
|
|
case '1': res.locals.bookmark = 'L3D.ViewportRecommendation'; break;
|
|
|
|
case '2': res.locals.bookmark = 'L3D.ArrowRecommendation'; break;
|
|
|
|
}
|
|
|
|
|
|
|
|
res.locals.prefetch = req.query.prefetch;
|
|
|
|
|
|
|
|
res.render('demo.jade', res.locals, function(err, result) {
|
|
|
|
res.send(result);
|
|
|
|
});
|
|
|
|
};
|
|
|
|
|