Missing files
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
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) {
|
||||
case '2': res.locals.scene = 'L3D.initBobomb'; break;
|
||||
case '3': res.locals.scene = 'L3D.initMountain'; break;
|
||||
case '4': res.locals.scene = 'L3D.initWhomp'; break;
|
||||
}
|
||||
|
||||
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);
|
||||
});
|
||||
};
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
module.exports = {
|
||||
'/demo-config': 'demoConfig',
|
||||
'/demo': 'demo'
|
||||
};
|
||||
@@ -0,0 +1,42 @@
|
||||
extends ../../../views/base.jade
|
||||
|
||||
block extrahead
|
||||
link(rel="stylesheet", href="/static/css/signin.css")
|
||||
|
||||
block content
|
||||
form#form.form-signin(method="GET", action='/demo')
|
||||
h2 Set your parameters !
|
||||
.form-group
|
||||
label Select your scene
|
||||
.form-group
|
||||
input(type='radio', name='scene', value='2', style={'margin-right': '5px'}, checked)
|
||||
| Bobomb scene<br/>
|
||||
input(type='radio', name='scene', value='3', style={'margin-right': '5px'})
|
||||
| Cool cool mountain scene<br />
|
||||
input(type='radio', name='scene', value='4', style={'margin-right': '5px'})
|
||||
| Whomp scene
|
||||
|
||||
label Select your bookmarks
|
||||
.form-group
|
||||
input(type='radio', name='bookmark', value='0', style={'margin-right': '5px'}, checked)
|
||||
| No bookmarks<br/>
|
||||
input(type='radio', name='bookmark', value='1', style={'margin-right': '5px'})
|
||||
| Viewports<br />
|
||||
input(type='radio', name='bookmark', value='2', style={'margin-right': '5px'})
|
||||
| Arrows
|
||||
|
||||
label Select your prefetching policy
|
||||
.form-group
|
||||
input(type='radio', name='prefetch', value='NV-PN', style={'margin-right': '5px'}, checked)
|
||||
| NV-PN : frustum / backface culling, no prefetch<br/>
|
||||
input(type='radio', name='prefetch', value='V-PP', style={'margin-right': '5px'})
|
||||
| V-PP : try to predict the next clicked bookmark and prefetch it<br />
|
||||
input(type='radio', name='prefetch', value='V-PD', style={'margin-right': '5px'})
|
||||
| V-PD : only prefetch when clicking on a bookmark<br/>
|
||||
input(type='radio', name='prefetch', value='V-PP+PD', style={'margin-right': '5px'})
|
||||
| V-PP+PD : try to predict bookmark and prefetch on click
|
||||
|
||||
button.btn.btn-lg.btn-primary.btn-block(type="submit") Start playing !
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
extends ../../../views/withjs
|
||||
|
||||
block title
|
||||
title #{title} - Prototype
|
||||
|
||||
block prepend js
|
||||
script BD_DISABLED = true;
|
||||
|
||||
block extrajs
|
||||
script(src="/static/js/l3dp.min.js")
|
||||
block configjs
|
||||
script.
|
||||
initMainScene = #{scene};
|
||||
Recommendation = #{bookmark};
|
||||
prefetch = "#{prefetch}";
|
||||
locked = #{session.locked === undefined ? 'true' : session.locked};
|
||||
coinsId=[];
|
||||
|
||||
script(src="/static/js/prototypeinteractive.min.js")
|
||||
script document.getElementById('music').volume = 0.5;
|
||||
|
||||
|
||||
block extrahead
|
||||
link(rel="stylesheet" href="/static/css/prototype.css")
|
||||
|
||||
block content
|
||||
#main-div.panel-group(style={'margin-top':'10px', 'margin-bottom':'10px'})
|
||||
block description
|
||||
#alert-placeholder
|
||||
.progress
|
||||
.progress-bar.progress-bar-striped.active(role='progress-bar', aria-valuenow='0',aria-valuemin="0", aria-valuemax="100", style={width:'0%'})
|
||||
#percentage 0%
|
||||
|
||||
div(style="margin:5px")
|
||||
#container(style={'padding': '0px', 'margin': '0px'}, tabindex="1")
|
||||
|
||||
nav.navbar.navbar-default.navbar-fixed-bottom
|
||||
.container
|
||||
button#reset.btn.btn-primary.navbar-btn(style={'margin-right': '10px', 'margin-bottom':'10px'}) Reset camera
|
||||
block extrabutton
|
||||
|
||||
button#undo.btn.btn-default.navbar-btn(style={'margin-right': '10px', 'margin-bottom': '10px'})
|
||||
span.glyphicon.glyphicon-triangle-left('aria-hidden'="true")
|
||||
|
||||
button#redo.btn.btn-default.navbar-btn(style={'margin-right': '10px', 'margin-bottom':'10px'})
|
||||
span.glyphicon.glyphicon-triangle-right('aria-hidden'="true")
|
||||
|
||||
//-input#fullarrow(type="checkbox", style={'margin-right': '10px', 'margin-bottom': '10px'})
|
||||
//-label(for="fullarrow" style={'margin-right':'10px'}) Full arrow
|
||||
|
||||
input#lock(type="checkbox", style={'zoom':'1.7'}, checked)
|
||||
label(for="lock" style={'margin-right':'10px', 'zoom': '1.7'}) Pointer lock
|
||||
|
||||
input#showarrows(type="checkbox", style={'margin-right': '10px', 'margin-bottom': '10px', 'display':'none'}, checked)
|
||||
label(for="showarrows" style={'margin-right':'10px', 'display': 'none'}) Show arrows
|
||||
|
||||
//- block lastbutton
|
||||
|
||||
//-input#recommendation(type="checkbox", style={'margin-right': '10px', 'margin-bottom': '10px'})
|
||||
//-label(for="recommendation" style={'margin-right':'10px'}) Fixed prev
|
||||
|
||||
audio#music(controls, volume=0.5)
|
||||
source(src="/static/data/music/bobomb.ogg")
|
||||
source(src="/static/data/music/bobomb.mp3")
|
||||
|
||||
Reference in New Issue
Block a user