Some modifications

This commit is contained in:
Thomas FORGIONE 2015-09-04 16:31:21 +02:00
parent 3ea3f5494b
commit 1c885d9c6d
4 changed files with 70 additions and 35 deletions

View File

@ -1,5 +1,10 @@
extends ../../../views/base.jade extends ../../../views/base.jade
mixin message
span(style={'margin-bottom':'10px', 'margin-right': '10px'})
block
br
mixin question(id, qu, info) mixin question(id, qu, info)
label(for="#{id}", style={'margin-right':'10px'}) #{qu} label(for="#{id}", style={'margin-right':'10px'}) #{qu}
if (info !== undefined) if (info !== undefined)
@ -7,16 +12,30 @@ mixin question(id, qu, info)
input.form-control(name="answer#{id}", type="text", placeholder="Answer") input.form-control(name="answer#{id}", type="text", placeholder="Answer")
mixin rate(id, qu, info) mixin rate(id, qu, info)
label(for="anwser#{id}", style={'margin-right':'10px'}) #{qu} div
if (info !== undefined) label(for="anwser#{id}", style={'margin-right':'10px'}) #{qu}
span.glyphicon.glyphicon-question-sign(type='button', data-toggle='tooltip', data-placement='top', title='#{info}') if (info !== undefined)
input.rating(id="answer#{id}", name="answer#{id}", type="number", min='0', max='5', step='1', default='3') span.glyphicon.glyphicon-question-sign(type='button', data-toggle='tooltip', data-placement='top', title='#{info}')
//-input.rating(id="answer#{id}", name="answer#{id}", type="number", min='0', max='5', step='1', default='3')
br
input(type='radio', name='answerItem#{id}', value='1', style={'margin-right':'10px'})
+message Very easy
input(type='radio', name='answerItem#{id}', value='2', style={'margin-right':'10px'})
+message Easy
input(type='radio', name='answerItem#{id}', value='3', style={'margin-right':'10px'})
+message Medium
input(type='radio', name='answerItem#{id}', value='4', style={'margin-right':'10px'})
+message Hard
input(type='radio', name='answerItem#{id}', value='5', style={'margin-right':'10px'})
+message Very hard
div(style={'margin-bottom':'10px'})
block extrahead block extrahead
link(rel="stylesheet", href="/static/css/feedback.css") link(rel="stylesheet", href="/static/css/feedback.css")
link(rel="stylesheet", href="/static/css/star-rating.min.css") link(rel="stylesheet", href="/static/css/star-rating.min.css")
block extrajs //-block extrajs
script(src="/static/js/star-rating.min.js") script(src="/static/js/star-rating.min.js")
script $(function () { $('[data-toggle="tooltip"]').tooltip() }) script $(function () { $('[data-toggle="tooltip"]').tooltip() })
script. script.
@ -30,8 +49,8 @@ block content
form.form-signin(method="POST", action='/feedback-target') form.form-signin(method="POST", action='/feedback-target')
h2 Please give us your feedback h2 Please give us your feedback
+rate(1, "What was the difficulty level without recommendation ?", "1 star if it was very easy, 5 stars if it was very difficult") +rate(1, "What was the difficulty level without recommendation ?")
+rate(2, "What was the difficulty level with recommendation ?", "1 star if it was very easy, 5 stars if it was very difficult") +rate(2, "What was the difficulty level with recommendation ?")
+question(3, "Did the recommendations help you to find the coins ?") +question(3, "Did the recommendations help you to find the coins ?")
+question(4, "Did the recommendations help you to browse the scene ?") +question(4, "Did the recommendations help you to browse the scene ?")
+question(5, "Do you think recommendations can be helpful ?") +question(5, "Do you think recommendations can be helpful ?")

View File

@ -24,7 +24,18 @@ block extrabody
<strong>Error</strong> : this id is already used ! <strong>Error</strong> : this id is already used !
block content block content
form.form-signin(method="POST", action='/identification') script.
function validateForm() {
if (document.getElementById('sel1').selectedIndex === -1) {
alert('Select a correct age please');
return false;
}
if (document.getElementById('sel2').selectedIndex === -1) {
alert('Select a correct date for the last time you played please');
return false;
}
}
form.form-signin(method="POST", action='/identification', onsubmit='return validateForm()')
h2 Please sign in h2 Please sign in
label(for='inputId').sr-only Id label(for='inputId').sr-only Id
input#inputId.form-control(name="inputId", type="text", placeholder='Id', required, autofocus) input#inputId.form-control(name="inputId", type="text", placeholder='Id', required, autofocus)
@ -53,6 +64,9 @@ block content
option(value='50-55') Between 50 and 55 option(value='50-55') Between 50 and 55
option(value='55-60') Between 55 and 60 option(value='55-60') Between 55 and 60
option(value='60-') More than 60 option(value='60-') More than 60
script.
document.getElementById('sel1').selectedIndex = -1;
.form-group .form-group
label(for='se21', style={'margin-right':'10px'}) When is the last time you played a 3D video game ? label(for='se21', style={'margin-right':'10px'}) When is the last time you played a 3D video game ?
@ -62,6 +76,8 @@ block content
option(value='2') This month option(value='2') This month
option(value='1') This year option(value='1') This year
option(value='0') I never played a 3D video game option(value='0') I never played a 3D video game
script.
document.getElementById('sel2').selectedIndex = -1;
label(for='3dgames', style={'margin-right':'10px'}) Rate your 3D game skills label(for='3dgames', style={'margin-right':'10px'}) Rate your 3D game skills

View File

@ -11,71 +11,71 @@ var TutorialSteps = function(tutoCamera, scene, coins, onWindowResize, container
this.instructions = [ this.instructions = [
{ {
text:"Welcome to this tutorial ! Click on the canvas to go start !", text:"Welcome to the tutorial. Click anywhere on the canvas to start. You will enter into the 'pointer lock' mode",
justclick:false justclick:false
}, },
{ {
text: "You can use your mouse to move around, and press the escape key to unlock the pointer", text: "Move your mouse to look around. Press the escape key to unlock the pointer.",
justclick: false justclick: false
}, },
{ {
text: "You can also uncheck the <em>lock pointer</em> otion at the bottom of the page to rotate the camera via drag'n'drop !", text: "You can also uncheck the <em>lock pointer</em> option at the bottom of the page to unlock the pointer.",
justclick: false justclick: false
}, },
{ {
text:"You can use your mouse (drag'n'drop) to rotate the camera", text:"Now, the pointer is unlocked. Click and drag your mouse to look around.",
justclick:false justclick:false
}, },
{ {
text:"Nice ! You can also use (2,4,6 and 8) keys or (k,j,l and i)", text:"Nice! You can also use the (2,4,6 and 8) keys or (k,j,l and i) keys to look around.",
justclick: true justclick: true
}, },
{ {
text: "Here is a red coin, click on it !", text: "Here is a red coin, click on it!",
justclick: false justclick: false
}, },
{ {
text: "Nice, there are a 3 more red coins around you, try to get them ! Check the coin counter !", text: "Nice, there are a 3 more red coins around you, try to get them! Check the gauge (your score)! You can lock the pointer if you wish.",
justclick: false justclick: false
}, },
{ {
text: "Two more ! Feel free to select the pointer lock option you prefer", text: "Two more!",
justclick: false justclick: false
}, },
{ {
text: "One more !", text: "One more!",
justclick: false justclick: false
}, },
{ {
text:"Nice ! You will now learn to translate the camera", text:"Nice! You will now learn to navigate in the scene.",
justclick: true justclick: true
}, },
{ {
text: "Try pressing an arrow key on your keyboard to translate the camera !", text: "Press one of the arrow keys on your keyboard to move!",
justclick: false justclick: false
}, },
{ {
text: "There is a red coin on the roof of the castle, just in front of you ! Go and get it !", text: "There is a red coin on the roof of the castle, just in front of you! Go and get it!",
justclick: false justclick: false
}, },
{ {
text: "You got it ! Try to click on reset camera !", text: "You got it! Now, click on the 'reset camera' button!",
justclick: false justclick: false
}, },
{ {
text: "Nice ! Let me introduce you to <em>recommendations</em>", text: "Nice! Let me introduce you to <em>recommendations</em>",
justclick: true justclick: true
}, },
{ {
text: "This is a recommendation, by hovering it, you should see a preview, and by clicking on it, you should go to the recommended viewpoint", text: "This is a recommendation, by hovering it, you should see a preview, and by clicking on it, you will automatically move towards the recommended viewpoint. Click on this recommendation to try.",
justclick: false justclick: false
}, },
{ {
text: "The recommendation will change color once you clicked on it, just like a web link", text: "The recommendation will change color once you clicked on it, just like a web link.",
justclick:true justclick:true
}, },
{ {
text: "Recommendations can be displayed as 3D arrows like the one you just saw, or as viewports like this one", text: "Recommendations can be displayed as 3D arrows like the one you just saw, or as viewports like this one. Click on this recommendation to proceed.",
justclick: false justclick: false
}, },
{ {
@ -83,35 +83,35 @@ var TutorialSteps = function(tutoCamera, scene, coins, onWindowResize, container
justclick:false justclick:false
}, },
{ {
text:"Tip : you can use the previous / next buttons in the bar at the bottom of the screen to go to the previous / next position", text:"Tip: You can use the previous / next buttons in the control bar at the bottom of the screen to go to the previous / next position",
justclick: false justclick: false
}, },
{ {
text: "Tip : you can use the previous / next buttons in the bar at the bottom of the screen to go to the previous / next position", text: "Tip: You can use the previous / next buttons in the control bar at the bottom of the screen to go to the previous / next position",
justclick: false justclick: false
}, },
{ {
text: "Tip : you can use the previous / next buttons in the bar at the bottom of the screen to go to the previous / next position", text: "Tip: You can use the previous / next buttons in the control bar at the bottom of the screen to go to the previous / next position",
justclick: false justclick: false
}, },
{ {
text: "Tip : you can use the previous / next buttons in the bar at the bottom of the screen to go to the previous / next position", text: "Tip: You can use the previous / next buttons in the control bar at the bottom of the screen to go to the previous / next position",
justclick: false justclick: false
}, },
{ {
text: "Tip : you can use the previous / next buttons in the bar at the bottom of the screen to go to the previous / next position", text: "Tip: You can use the previous / next buttons in the control bar at the bottom of the screen to go to the previous / next position",
justclick: false justclick: false
}, },
{ {
text: "Tip : you can use the previous / next buttons in the bar at the bottom of the screen to go to the previous / next position", text: "Tip: You can use the previous / next buttons in the control bar at the bottom of the screen to go to the previous / next position",
justclick: false justclick: false
}, },
{ {
text: "Tip : you can use the previous / next buttons in the bar at the bottom of the screen to go to the previous / next position", text: "Tip: You can use the previous / next buttons in the control bar at the bottom of the screen to go to the previous / next position",
justclick:false justclick:false
}, },
{ {
text: "Congratulations ! You've successfully finished the tutorial ! Click on the green button to continue !", text: "Congratulations! You've successfully collected all the coins and completed the tutorial ! Click on the green button to continue!",
justclick: false justclick: false
} }
]; ];
@ -266,7 +266,7 @@ TutorialSteps.prototype.notify = function(myString, justclick) {
'<span><strong>' + '<span><strong>' +
myString + myString +
(justclick ? (justclick ?
' <a href="#" onclick="setTimeout(onWindowResize, 100); nextStep();"><em>(next)</em></span>' : '' ) + ' <a href="#" onclick="setTimeout(onWindowResize, 100); nextStep();"><em>Click here to continue the tutorial. </em></span>' : '' ) +
'</strong></span>' + '</strong></span>' +
'</div>' '</div>'
); );

View File

@ -10,7 +10,7 @@ html(lang='fr')
link(rel="stylesheet", href="http://fonts.googleapis.com/css?family=Ubuntu:400,700,400italic") link(rel="stylesheet", href="http://fonts.googleapis.com/css?family=Ubuntu:400,700,400italic")
link(rel="icon", type="image/x-icon", href="/favicon.ico") link(rel="icon", type="image/x-icon", href="/favicon.ico")
block title block title
title Hello title 3DUI
body body
nav#nav.navbar.navbar-inverse.navbar-fixed-top(role="navigation") nav#nav.navbar.navbar-inverse.navbar-fixed-top(role="navigation")