From EJS to Jade

This commit is contained in:
Thomas FORGIONE
2015-05-05 16:30:51 +02:00
parent e05add5ee5
commit 7363f0aeed
26 changed files with 246 additions and 269 deletions

View File

@@ -1,8 +1,5 @@
var pejs = require('pejs');
var tools = require('../../my_modules/filterInt')
views = pejs();
module.exports.index = function(req, res, next) {
// Parse get argument res
@@ -22,7 +19,8 @@ module.exports.index = function(req, res, next) {
}
res.setHeader('Content-Type', 'text/html');
views.render('stream/index.html', res.locals, function(err, result) {
res.render('index.jade', res.locals, function(err, result) {
console.log(err);
res.send(result);
});
}

View File

@@ -0,0 +1,18 @@
extends ../../../views/withjs
block title
title #{title} - Streaming simulator
block extrajs
script params = {}; params.get= {}; params.get.res = #{resolution}
script(src="/static/js/stream/main.js")
block content
h2 Streaming simulator
p.
In fact, it's not really streaming. The sphere is fully preloaded and then,
a mesh is created and vertices and faces are dynamically added to this mesh
as time goes by.
#container