Corrected (a little bit) sponza, add load.js to generate load in db
This commit is contained in:
parent
4060b427f0
commit
29029ce33a
|
@ -4,9 +4,10 @@ block title
|
|||
title #{title} - Prototype - Arrows
|
||||
|
||||
block mainjs
|
||||
script L3D.BD.disable();
|
||||
script initMainScene = L3D.initSponza
|
||||
script locked = false;
|
||||
script(src="/static/js/prototypeinteractive.min.js")
|
||||
script initMainScene = L3D.initSponza
|
||||
script L3D.BD.disable();
|
||||
|
||||
block configjs
|
||||
script Recommendation = L3D.ArrowRecommendation;
|
||||
|
|
|
@ -54,7 +54,7 @@ function main() {
|
|||
// Set the good size of cameras
|
||||
onWindowResize();
|
||||
|
||||
if (locked)
|
||||
if (locked !== undefined && locked)
|
||||
startCanvas.render();
|
||||
|
||||
// Some config
|
||||
|
|
|
@ -29,11 +29,12 @@ Log.ready = function(msg) {
|
|||
log('[RDY] ' + new Date() + ' ' + msg, Colors.GREEN);
|
||||
};
|
||||
|
||||
Log.request = function(req, res) {
|
||||
Log.request = function(req, res, time) {
|
||||
if (req.headers['x-forwarded-for'] !== undefined || isDev) {
|
||||
log(
|
||||
'[REQ] ' + new Date() + ' ' +
|
||||
(req.headers['x-forwarded-for'] || req.connection.remoteAddress) +
|
||||
(time !== undefined ? (' in ' + (" " + time).slice(-6) + ' ms') : '') +
|
||||
' : ' + req.url ,
|
||||
Colors.CYAN
|
||||
);
|
||||
|
|
|
@ -0,0 +1,58 @@
|
|||
function makeId()
|
||||
{
|
||||
var text = "";
|
||||
var possible = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
|
||||
|
||||
for( var i=0; i < 5; i++ )
|
||||
text += possible.charAt(Math.floor(Math.random() * possible.length));
|
||||
|
||||
return text;
|
||||
}
|
||||
|
||||
var fs = require('fs');
|
||||
|
||||
var casper = require('casper').create({
|
||||
stepTimeout: 100000,
|
||||
waitTimeout: 100000
|
||||
});
|
||||
|
||||
var limit = 100;
|
||||
|
||||
casper.start('http://localhost:4000/');
|
||||
|
||||
for (var i = 0; i < limit; i++) {
|
||||
|
||||
(function(i) {
|
||||
|
||||
casper.thenOpen('http://localhost:4000/user-study', function() {
|
||||
|
||||
console.log(i);
|
||||
|
||||
this.getHTML();
|
||||
|
||||
// this.waitForSelector('form#form', function() {
|
||||
|
||||
this.fillSelectors(
|
||||
'form#form', {
|
||||
'#inputId': makeId(),
|
||||
'#sel1': '-15',
|
||||
'#sel2': '3'
|
||||
}, true
|
||||
);
|
||||
|
||||
// }, true);
|
||||
|
||||
this.thenOpen('http://localhost:4000/prototype/game');
|
||||
this.thenOpen('http://localhost:4000/prototype/game');
|
||||
this.thenOpen('http://localhost:4000/prototype/game');
|
||||
this.thenOpen('http://localhost:4000/prototype/game');
|
||||
|
||||
this.thenOpen('http://localhost:4000/logout');
|
||||
|
||||
});
|
||||
|
||||
})(i);
|
||||
|
||||
}
|
||||
|
||||
casper.run();
|
Loading…
Reference in New Issue