diff --git a/controllers/before-begin/views/index.jade b/controllers/before-begin/views/index.jade index 2a90289..4a3d3a1 100644 --- a/controllers/before-begin/views/index.jade +++ b/controllers/before-begin/views/index.jade @@ -3,10 +3,11 @@ extends ../../../views/base.jade block content h1 Now, things are getting serious p. - You completed the tutorial ! Now, things are getting serious. There - will be three scenes coming to you. Your mission is simple : you have - to find the 8 red coins. There may be recommendations like the ones you - saw in the tutorial : they are here to help you to move around. Use - them if they help you, ignore them if they seem useless. + You have successfully completed the tutorial ! Now, things are getting + serious. You will be prompted with three successive scenes, each of + which containing 8 red coins. Your mission is simple: you have to + collect the 8 red coins. There may be recommendations like the ones you + saw in the tutorial : they are here to help you navigate in the scene. + Use them or ignore them at your convenience. p You can start when you're ready ! diff --git a/controllers/intro/views/index.jade b/controllers/intro/views/index.jade index 0a9547c..59ae013 100644 --- a/controllers/intro/views/index.jade +++ b/controllers/intro/views/index.jade @@ -2,13 +2,12 @@ extends ../../../views/base.jade block content h1 Welcome ! - p This game will be in four steps : + p This study consists in four consecutive steps : ol - li We'll ask you a little information so we can know you a little. - li Then, you will try a tutorial of a 3D interface. - li When you finish the tutorial, the main part will start. There will be 3 scenes and you will be asked to complete tasks. - li Once you finished, there will be a short questionnary so we can know what you think of our interface. - + li Enter some personal information that we will use for statistics purposes + li Complete a tutorial to learn how to use the 3D navigation interface + li Play a game in which you have to find coins hidden in a 3D world. You need to play the game in 3 different scenes. + li Complete a short questionnary to give us feedback on the 3D navigation interface h2#start block extrajs diff --git a/js/l3d/apps/prototype/tutorial/TutorialSteps.js b/js/l3d/apps/prototype/tutorial/TutorialSteps.js index 297e7bb..9666af9 100644 --- a/js/l3d/apps/prototype/tutorial/TutorialSteps.js +++ b/js/l3d/apps/prototype/tutorial/TutorialSteps.js @@ -75,7 +75,7 @@ var TutorialSteps = function(tutoCamera, scene, coins, onWindowResize, container justclick:true }, { - text: "Recommendations can be displayed as 3D arrows, or as viewports", + text: "Recommendations can be displayed as 3D arrows like the one you just saw, or as viewports like this one", justclick: false }, { @@ -157,6 +157,12 @@ TutorialSteps.prototype.nextStep = function() { this.camera.shouldLock = true; this.camera.onPointerLockChange(); } + + // Block camera + for (var key in camera.motion) { + camera.motion[key] = false; + } + Coin.domElement.style.display = ""; Coin.max = 1; Coin.update(); diff --git a/js/l3d/src/scenes/createCoins.js b/js/l3d/src/scenes/createCoins.js index eb1da79..885dddc 100644 --- a/js/l3d/src/scenes/createCoins.js +++ b/js/l3d/src/scenes/createCoins.js @@ -18,50 +18,31 @@ L3D.createBobombCoins = function() { return [ {coin:new Coin(-25.78117011943424,26.43994174870813,30.057819724644368), id:16}, {coin:new Coin(-37.46335021251167,18.01317284378782,8.350450287883726), id:17}, {coin:new Coin(30.641812668973245,13.456701531305129,8.78531092401407), id:18}, - {coin:new Coin(22.280706560196638,13.725108184127997,32.63987169581496), id:19}, - {coin:new Coin(33.68386996752998,9.149049511822032,-18.87096639845466), id:20}, - {coin:new Coin(33.31162234976524,12.32414579919045,-6.836946838344371), id:21}, - {coin:new Coin(-6.542226291552578,12.307520787648738,-3.8865111962674517), id:22}, - {coin:new Coin(-17.588830805070085,23.841405751686263,-15.642444636400247), id:23}, - {coin:new Coin(-28.08790862463989,23.535010121780253,9.705135663221972), id:24}, - {coin:new Coin(-29.379335879791288,29.636026393280783,19.362115621994782), id:25}, - {coin:new Coin(-8.706913128046958,21.207848302770593,27.483816887890935), id:26}, - {coin:new Coin(-24.72548063753392,20.591109464902217,34.0541482945568), id:27}, - {coin:new Coin(6.07341534686721,12.796185940101592,17.78236645564636), id:28}, - {coin:new Coin(4.357016920017262,8.472802125274415,-30.529199236505924), id:29}, - {coin:new Coin(7.075416030408761,11.236188008723378,-28.279153104743983), id:30}, - {coin:new Coin(-17.85785378833318,13.42081721395066,-32.92376411375154), id:31}, - {coin:new Coin(-21.894165638010683,11.814166555266736,-5.255205616513877), id:32}, - {coin:new Coin(-17.22580655861263,23.787648282246952,-10.519501738826268), id:33}, - {coin:new Coin(-11.658290156106773,14.96199347508685,5.941345304662627), id:34}, - {coin:new Coin(-25.78117011943424,26.43994174870813,30.057819724644368), id:35}, - {coin:new Coin(-37.46335021251167,18.01317284378782,8.350450287883726), id:36}, - {coin:new Coin(30.641812668973245,13.456701531305129,8.78531092401407), id:37}, - {coin:new Coin(34.99690318172231,6.599314283860151,-19.51747437058566), id:38}, - {coin:new Coin(39.78548920384964,8.504766617451741,-10.92760447388268), id:39}, - {coin:new Coin(-2.597109598251529,8.486971700465249,-24.582584510999702), id:40}, - {coin:new Coin(5.805447133294366,8.693790412992014,-35.94597942222797), id:41}, - {coin:new Coin(3.848839227682862,10.057495260813212,-28.91957364641709), id:42}, - {coin:new Coin(-34.91410097274436,12.948256334605215,4.639977902891882), id:43}, - {coin:new Coin(-17.580776942006928,12.158645450855936,-2.00530419124142), id:44}, - {coin:new Coin(-23.633086203984814,20.946576756366067,-7.724484122444523), id:45}, - {coin:new Coin(12.060059346958012,8.454084767964286,-3.1277304735459244), id:46}, - {coin:new Coin(14.36250035919264,8.73166126857175,1.4477492534911822), id:47}, - {coin:new Coin(-16.218272307448657,16.936996249183704,8.964553311468345), id:48}, - {coin:new Coin(-14.787118771841405,22.28956331520163,5.701170858620489), id:49}, - {coin:new Coin(-19.49674968718237,16.823373907723905,3.00129002841727), id:50}, - {coin:new Coin(-18.274615486675373,18.11169567980372,5.413192710005695), id:51}, - {coin:new Coin(-40.05855121079914,16.296361694121863,24.89608565964226), id:52}, - {coin:new Coin(2.085287403927479,12.313014580177642,24.716973896402656), id:53}, - {coin:new Coin(10.084140015471446,8.393366602594998,26.82201810514725), id:54}, - {coin:new Coin(7.369218514755171,8.386909613073172,25.59443057728086), id:55}, - {coin:new Coin(19.54661324732174,12.517796184205938,22.909169932036246), id:56}, - {coin:new Coin(-13.279393664666722,27.159104129475203,25.15379848363141), id:57}, - {coin:new Coin(-6.466792705490424,17.217423390347943,16.66922516489268), id:58}, - {coin:new Coin(-23.90730055520542,21.2916198624003,5.675908440265029), id:59}, - {coin:new Coin(-33.63971840380508,12.692441946606664,-23.501869637528955), id:60}, - {coin:new Coin(-33.189652720672896,19.481560373595773,19.21235891953393), id:61}, - {coin:new Coin(-15.465717624639543,27.567776547579495,23.421347833030055), id:62} + {coin:new Coin(34.99690318172231,6.599314283860151,-19.51747437058566), id:19}, + {coin:new Coin(39.78548920384964,8.504766617451741,-10.92760447388268), id:20}, + {coin:new Coin(-2.597109598251529,8.486971700465249,-24.582584510999702), id:21}, + {coin:new Coin(5.805447133294366,8.693790412992014,-35.94597942222797), id:22}, + {coin:new Coin(3.848839227682862,10.057495260813212,-28.91957364641709), id:23}, + {coin:new Coin(-34.91410097274436,12.948256334605215,4.639977902891882), id:24}, + {coin:new Coin(-17.580776942006928,12.158645450855936,-2.00530419124142), id:25}, + {coin:new Coin(-23.633086203984814,20.946576756366067,-7.724484122444523), id:26}, + {coin:new Coin(12.060059346958012,8.454084767964286,-3.1277304735459244), id:27}, + {coin:new Coin(14.36250035919264,8.73166126857175,1.4477492534911822), id:28}, + {coin:new Coin(-16.218272307448657,16.936996249183704,8.964553311468345), id:29}, + {coin:new Coin(-14.787118771841405,22.28956331520163,5.701170858620489), id:30}, + {coin:new Coin(-19.49674968718237,16.823373907723905,3.00129002841727), id:31}, + {coin:new Coin(-18.274615486675373,18.11169567980372,5.413192710005695), id:32}, + {coin:new Coin(-40.05855121079914,16.296361694121863,24.89608565964226), id:33}, + {coin:new Coin(2.085287403927479,12.313014580177642,24.716973896402656), id:34}, + {coin:new Coin(10.084140015471446,8.393366602594998,26.82201810514725), id:35}, + {coin:new Coin(7.369218514755171,8.386909613073172,25.59443057728086), id:36}, + {coin:new Coin(19.54661324732174,12.517796184205938,22.909169932036246), id:37}, + {coin:new Coin(-13.279393664666722,27.159104129475203,25.15379848363141), id:38}, + {coin:new Coin(-6.466792705490424,17.217423390347943,16.66922516489268), id:39}, + {coin:new Coin(-23.90730055520542,21.2916198624003,5.675908440265029), id:40}, + {coin:new Coin(-33.63971840380508,12.692441946606664,-23.501869637528955), id:41}, + {coin:new Coin(-33.189652720672896,19.481560373595773,19.21235891953393), id:42}, + {coin:new Coin(-15.465717624639543,27.567776547579495,23.421347833030055), id:43} ];}; L3D.createMountainCoins = function() { return [ @@ -73,98 +54,67 @@ L3D.createMountainCoins = function() { return [ {coin:new Coin(-25.840046212444445,3.0154379627539645,-12.129077180554676), id:5}, {coin:new Coin(-0.12415848898914678,-17.24941169186156,-24.089012115869895), id:6}, {coin:new Coin(20.648080318582544,-17.306545828389865,-14.154882378054586), id:7}, - {coin:new Coin(-10.369619229139987,22.97033964184665,7.926012599432754), id:8}, - {coin:new Coin(-17.40703956405811,18.42114835252625,9.379360551126528), id:9}, - {coin:new Coin(-16.003631234123016,18.504382214049656,-9.02703983024753), id:10}, - {coin:new Coin(5.466352142045469,12.823046543316853,-5.71501482514302), id:11}, - {coin:new Coin(5.577967875069705,3.1178514503821235,-1.6601071460354084), id:12}, - {coin:new Coin(22.806035443552588,-3.0971670654445695,18.953290393314937), id:13}, - {coin:new Coin(-6.700701005799521,-1.2267676080840322,28.07123771418613), id:14}, - {coin:new Coin(4.055603794907487,3.025509693082835,12.990565917776475), id:15}, - {coin:new Coin(2.4669988262462175,11.025589439642443,17.30534563503105), id:16}, - {coin:new Coin(12.51818382505787,-9.440727474351826,8.645243996001899), id:17}, - {coin:new Coin(-26.076074016668006,-18.87840571816059,32.002286013087854), id:18}, - {coin:new Coin(1.8429647422443338,-2.455198049692979,-10.80308353746292), id:19}, - {coin:new Coin(-6.21747892581496,-0.5257501180103216,-16.89711795671381), id:20}, - {coin:new Coin(-21.49095086819052,3.7275512296245252,-8.44226482363607), id:21}, - {coin:new Coin(-26.77972359627476,-19.23929063656664,23.6807547145596), id:22}, - {coin:new Coin(-24.921450642761087,-18.790469255696,12.598715548243229), id:23}, - {coin:new Coin(-27.462924457464283,-2.307453076982202,27.675888071372412), id:24}, - {coin:new Coin(-23.805440095101684,-0.1719164638306439,14.159121596734865), id:25}, - {coin:new Coin(-20.56923064468872,6.566093724474566,3.2759960140734043), id:26}, - {coin:new Coin(-25.840046212444445,3.0154379627539645,-12.129077180554676), id:27}, - {coin:new Coin(-0.12415848898914678,-17.24941169186156,-24.089012115869895), id:28}, - {coin:new Coin(20.648080318582544,-17.306545828389865,-14.154882378054586), id:29}, - {coin:new Coin(-10.369619229139987,22.97033964184665,7.926012599432754), id:30}, - {coin:new Coin(-17.40703956405811,18.42114835252625,9.379360551126528), id:31}, - {coin:new Coin(-16.003631234123016,18.504382214049656,-9.02703983024753), id:32}, - {coin:new Coin(5.466352142045469,12.823046543316853,-5.71501482514302), id:33}, - {coin:new Coin(5.577967875069705,3.1178514503821235,-1.6601071460354084), id:34}, - {coin:new Coin(22.806035443552588,-3.0971670654445695,18.953290393314937), id:35}, - {coin:new Coin(-6.700701005799521,-1.2267676080840322,28.07123771418613), id:36}, - {coin:new Coin(4.055603794907487,3.025509693082835,12.990565917776475), id:37}, - {coin:new Coin(2.4669988262462175,11.025589439642443,17.30534563503105), id:38}, - {coin:new Coin(12.51818382505787,-9.440727474351826,8.645243996001899), id:39}, - {coin:new Coin(-26.076074016668006,-18.87840571816059,32.002286013087854), id:40}, - {coin:new Coin(1.8429647422443338,-2.455198049692979,-10.80308353746292), id:41}, - {coin:new Coin(-6.21747892581496,-0.5257501180103216,-16.89711795671381), id:42}, - {coin:new Coin(-21.49095086819052,3.7275512296245252,-8.44226482363607), id:43}, - {coin:new Coin(-7.1956859118199334,20.99455926472716,0.39343041817335256), id:44}, - {coin:new Coin(-11.326709391448512,21.953858407023805,2.6729871546312998), id:45}, - {coin:new Coin(-14.58598309525653,22.806713675854727,4.568200569926353), id:46}, - {coin:new Coin(-8.603785339194546,25.062399119985514,4.48232206645006), id:47}, - {coin:new Coin(-11.815100786173247,18.466863109134373,10.128654272554414), id:48}, - {coin:new Coin(-12.787271723363242,18.40228976812093,5.566216789152769), id:49}, - {coin:new Coin(-17.220480098677484,19.47976935335984,2.9799902027464245), id:50}, - {coin:new Coin(-10.674099520815707,19.346742690346296,16.93799634481946), id:51}, - {coin:new Coin(-8.639340307313672,17.692716982078288,15.259729023727008), id:52}, - {coin:new Coin(4.3234663022220285,3.4336965169129283,3.1679443942435466), id:53}, - {coin:new Coin(6.290686214265615,11.806255003988033,1.5636193947234425), id:54}, - {coin:new Coin(2.233761057975329,-1.446823000016173,22.993089068680725), id:55}, - {coin:new Coin(4.107791889233733,9.515492698376526,10.617241670921304), id:56}, - {coin:new Coin(4.107791889233733,9.515492698376526,10.617241670921304), id:57}, - {coin:new Coin(4.655803290894976,9.262740729301786,12.124831282000333), id:58}, - {coin:new Coin(2.8554688549084712,9.97580560061152,17.33100769801678), id:59}, - {coin:new Coin(2.8554688549084712,9.97580560061152,17.33100769801678), id:60}, - {coin:new Coin(6.047746047986064,9.759240680469746,-0.3481826858222927), id:61}, - {coin:new Coin(9.24608339412142,-2.0739994580633447,1.397081592489799), id:62}, - {coin:new Coin(15.978225737202049,-12.555909289569446,-2.544415095587984), id:63}, - {coin:new Coin(20.602359244606333,-18.578212012875266,-3.709413959526993), id:64}, - {coin:new Coin(21.481883153040474,-19.84520127953089,-5.935726448733311), id:65}, - {coin:new Coin(9.624753116227113,-17.30756271726202,-10.359104979485439), id:66}, - {coin:new Coin(-8.755271572959066,-7.6507235940364975,-16.199127652743055), id:67}, - {coin:new Coin(2.5192303065667567,-19.82819988785104,-7.3369260979084645), id:68}, - {coin:new Coin(-7.022727886702514,-11.872857265966088,-15.712138822238375), id:69}, - {coin:new Coin(-14.154724198037664,-15.003426075695085,-9.873076641728474), id:70}, - {coin:new Coin(-15.716916979988882,-18.423093747206085,-15.472213704667796), id:71}, - {coin:new Coin(-24.480069450971794,-17.442577902786574,-20.749219217152703), id:72}, - {coin:new Coin(4.3201251132637655,-17.460792435122254,-17.02033011304245), id:73}, - {coin:new Coin(-16.496321109266706,-16.343353356378277,18.07293963067476), id:74}, - {coin:new Coin(-20.172973006076457,-13.100614083179892,-0.49832953806372876), id:75}, - {coin:new Coin(-20.06547322464019,-18.95241746748273,-0.5845240203285288), id:76}, - {coin:new Coin(-22.007491760798473,-19.591501271302555,18.477850729222254), id:77}, - {coin:new Coin(-22.854665667080386,-16.884639064171605,28.119639649805954), id:78}, - {coin:new Coin(-17.29769085333132,-17.151818042801608,30.993589950883457), id:79}, - {coin:new Coin(4.852943329227945,-17.535873997327858,26.102584332535134), id:80}, - {coin:new Coin(2.593261220769162,-15.395461057611403,25.829152965347365), id:81}, - {coin:new Coin(-6.908562178033699,32.80106638936682,4.85365533648689), id:82}, - {coin:new Coin(21.09827595444349,-3.544890014535089,25.492155941505793), id:83}, - {coin:new Coin(16.890530158892666,-2.9712184775053916,-5.31585260818673), id:84}, - {coin:new Coin(-1.2285753132761636,-17.811003980753824,-9.999557691760348), id:85}, - {coin:new Coin(-24.07237635277186,-18.934481721030046,8.57395700519537), id:86}, - {coin:new Coin(-20.722934565692547,-7.118167856354356,7.974377074791513), id:87}, - {coin:new Coin(20.16171428333035,-18.034131078406492,18.098055278822137), id:88}, - {coin:new Coin(24.259986388961835,-12.319846691054217,4.917763469897616), id:89}, - {coin:new Coin(-19.245096366069788,-0.8405834573654645,28.57153151038993), id:90}, - {coin:new Coin(8.896627505662142,-2.0950174205636345,-4.0364039672340954), id:91}, - {coin:new Coin(-9.172914017885867,20.94860963300559,-0.9781739897586929), id:92}, - {coin:new Coin(-14.972191966124155,18.298176200945555,14.287562424465513), id:93}, - {coin:new Coin(5.798547877411441,12.137776538305882,-1.3372812572900314), id:94}, - {coin:new Coin(-20.232460477765102,17.280387232905237,-7.149223019820442), id:95}, - {coin:new Coin(28.585469214270816,-5.216478965606472,17.548380390046493), id:96}, - {coin:new Coin(13.559937473254282,-17.718591633441097,-16.649117259984816), id:97}, - {coin:new Coin(16.930705171759417,-3.323889301031676,16.024660211914526), id:98}, - {coin:new Coin(-14.466017654387972,9.437335214635507,23.3708374112292), id:99} + {coin:new Coin(-16.003631234123016,18.504382214049656,-9.02703983024753), id:8}, + {coin:new Coin(5.577967875069705,3.1178514503821235,-1.6601071460354084), id:9}, + {coin:new Coin(22.806035443552588,-3.0971670654445695,18.953290393314937), id:10}, + {coin:new Coin(-6.700701005799521,-1.2267676080840322,28.07123771418613), id:11}, + {coin:new Coin(4.055603794907487,3.025509693082835,12.990565917776475), id:12}, + {coin:new Coin(2.4669988262462175,11.025589439642443,17.30534563503105), id:13}, + {coin:new Coin(12.51818382505787,-9.440727474351826,8.645243996001899), id:14}, + {coin:new Coin(-26.076074016668006,-18.87840571816059,32.002286013087854), id:15}, + {coin:new Coin(1.8429647422443338,-2.455198049692979,-10.80308353746292), id:16}, + {coin:new Coin(-6.21747892581496,-0.5257501180103216,-16.89711795671381), id:17}, + {coin:new Coin(-21.49095086819052,3.7275512296245252,-8.44226482363607), id:18}, + {coin:new Coin(-14.58598309525653,22.806713675854727,4.568200569926353), id:19}, + {coin:new Coin(-8.603785339194546,25.062399119985514,4.48232206645006), id:20}, + {coin:new Coin(-11.815100786173247,18.466863109134373,10.128654272554414), id:21}, + {coin:new Coin(-12.787271723363242,18.40228976812093,5.566216789152769), id:22}, + {coin:new Coin(-17.220480098677484,19.47976935335984,2.9799902027464245), id:23}, + {coin:new Coin(-10.674099520815707,19.346742690346296,16.93799634481946), id:24}, + {coin:new Coin(-8.639340307313672,17.692716982078288,15.259729023727008), id:25}, + {coin:new Coin(4.3234663022220285,3.4336965169129283,3.1679443942435466), id:26}, + {coin:new Coin(6.290686214265615,11.806255003988033,1.5636193947234425), id:27}, + {coin:new Coin(2.233761057975329,-1.446823000016173,22.993089068680725), id:28}, + {coin:new Coin(4.107791889233733,9.515492698376526,10.617241670921304), id:29}, + {coin:new Coin(4.655803290894976,9.262740729301786,12.124831282000333), id:30}, + {coin:new Coin(2.8554688549084712,9.97580560061152,17.33100769801678), id:31}, + {coin:new Coin(6.047746047986064,9.759240680469746,-0.3481826858222927), id:32}, + {coin:new Coin(9.24608339412142,-2.0739994580633447,1.397081592489799), id:33}, + {coin:new Coin(15.978225737202049,-12.555909289569446,-2.544415095587984), id:34}, + {coin:new Coin(20.602359244606333,-18.578212012875266,-3.709413959526993), id:35}, + {coin:new Coin(21.481883153040474,-19.84520127953089,-5.935726448733311), id:36}, + {coin:new Coin(9.624753116227113,-17.30756271726202,-10.359104979485439), id:37}, + {coin:new Coin(-8.755271572959066,-7.6507235940364975,-16.199127652743055), id:38}, + {coin:new Coin(2.5192303065667567,-19.82819988785104,-7.3369260979084645), id:39}, + {coin:new Coin(-7.022727886702514,-11.872857265966088,-15.712138822238375), id:40}, + {coin:new Coin(-14.154724198037664,-15.003426075695085,-9.873076641728474), id:41}, + {coin:new Coin(-15.716916979988882,-18.423093747206085,-15.472213704667796), id:42}, + {coin:new Coin(-24.480069450971794,-17.442577902786574,-20.749219217152703), id:43}, + {coin:new Coin(4.3201251132637655,-17.460792435122254,-17.02033011304245), id:44}, + {coin:new Coin(-16.496321109266706,-16.343353356378277,18.07293963067476), id:45}, + {coin:new Coin(-20.172973006076457,-13.100614083179892,-0.49832953806372876), id:46}, + {coin:new Coin(-20.06547322464019,-18.95241746748273,-0.5845240203285288), id:47}, + {coin:new Coin(-22.007491760798473,-19.591501271302555,18.477850729222254), id:48}, + {coin:new Coin(-22.854665667080386,-16.884639064171605,28.119639649805954), id:49}, + {coin:new Coin(-17.29769085333132,-17.151818042801608,30.993589950883457), id:50}, + {coin:new Coin(4.852943329227945,-17.535873997327858,26.102584332535134), id:51}, + {coin:new Coin(2.593261220769162,-15.395461057611403,25.829152965347365), id:52}, + {coin:new Coin(-6.908562178033699,32.80106638936682,4.85365533648689), id:53}, + {coin:new Coin(21.09827595444349,-3.544890014535089,25.492155941505793), id:54}, + {coin:new Coin(16.890530158892666,-2.9712184775053916,-5.31585260818673), id:55}, + {coin:new Coin(-1.2285753132761636,-17.811003980753824,-9.999557691760348), id:56}, + {coin:new Coin(-24.07237635277186,-18.934481721030046,8.57395700519537), id:57}, + {coin:new Coin(-20.722934565692547,-7.118167856354356,7.974377074791513), id:58}, + {coin:new Coin(20.561714283330357,-18.6341310784065,18.39805527882214), id:59}, + {coin:new Coin(24.259986388961835,-12.319846691054217,4.917763469897616), id:60}, + {coin:new Coin(-19.245096366069788,-0.8405834573654645,28.57153151038993), id:61}, + {coin:new Coin(8.896627505662142,-2.0950174205636345,-4.0364039672340954), id:62}, + {coin:new Coin(-9.172914017885867,20.94860963300559,-0.9781739897586929), id:63}, + {coin:new Coin(-20.232460477765102,17.280387232905237,-7.149223019820442), id:64}, + {coin:new Coin(28.585469214270816,-5.216478965606472,17.548380390046493), id:65}, + {coin:new Coin(13.559937473254282,-17.718591633441097,-16.649117259984816), id:66}, + {coin:new Coin(16.930705171759417,-3.323889301031676,16.024660211914526), id:67}, + {coin:new Coin(-14.466017654387972,9.437335214635507,23.3708374112292), id:68} ];}; L3D.createPeachCoins = function() { return [ @@ -183,47 +133,32 @@ L3D.createPeachCoins = function() { return [ {coin:new Coin(0.4006795688979661,2.73126733573882,-8.621849519941263), id:12}, {coin:new Coin(-1.1567000602429496,0.1828061701367549,-2.667327870723106), id:13}, {coin:new Coin(2.3493996403524253,2.933219948717814,-9.746003678221635), id:14}, - {coin:new Coin(-5.235079904099125,0.07417208986595411,-8.599114448384936), id:15}, - {coin:new Coin(-5.413573667252937,0.19509035740202668,-1.1941904950328774), id:16}, - {coin:new Coin(1.6988486739201933,0.4340094146515885,-8.231743908517105), id:17}, - {coin:new Coin(4.059418339215546,-0.39753959647229464,-3.743007737798272), id:18}, - {coin:new Coin(5.359520735057971,-1.0460829831125231,-5.929936710590241), id:19}, - {coin:new Coin(3.4171209844522807,-0.3115318913043405,-7.849159339922742), id:20}, - {coin:new Coin(6.41062656545732,-0.03964424070287551,-6.445933178302108), id:21}, - {coin:new Coin(-0.02228694178575394,-0.15414844320311738,-1.4228652604536483), id:22}, - {coin:new Coin(8.757734361004703,-0.29458111538940124,-3.3125913130702878), id:23}, - {coin:new Coin(8.302585268565899,0.5007248161435802,-9.477574353301717), id:24}, - {coin:new Coin(1.0403238273317053,0.5157597438067554,-5.758876821657185), id:25}, - {coin:new Coin(-3.911676426275694,0.6629865621989456,-11.94799528543801), id:26}, - {coin:new Coin(0.4006795688979661,2.73126733573882,-8.621849519941263), id:27}, - {coin:new Coin(-1.1567000602429496,0.1828061701367549,-2.667327870723106), id:28}, - {coin:new Coin(2.3493996403524253,2.933219948717814,-9.746003678221635), id:29}, - {coin:new Coin(1.6284936230963587,1.0700991700466012,-8.233756483213208), id:30}, - {coin:new Coin(0.8305866793484089,0.3868270229656463,-8.168979242471513), id:31}, - {coin:new Coin(3.702537417257961,-0.7039890131781925,-3.3737023929373584), id:32}, - {coin:new Coin(7.074425111212573,-1.7161022225132794,-0.12831816415053726), id:33}, - {coin:new Coin(1.3410467484809172,-0.8393585053751593,-6.114677390816905), id:34}, - {coin:new Coin(-1.9009579901289306,2.2052128135729396,-8.774087650346281), id:35}, - {coin:new Coin(-4.1062114100261145,-0.5212143749458535,-11.706921113910104), id:36}, - {coin:new Coin(-2.970948124863709,-1.172944637817793,-8.604431155541283), id:37}, - {coin:new Coin(-2.426469598129824,2.072137600699806,-12.218729718965506), id:38}, - {coin:new Coin(0.7794664249340597,2.7925839439404854,-10.302177482332139), id:39}, - {coin:new Coin(5.233981068386757,1.9710415796271412,-12.274504680729338), id:40}, - {coin:new Coin(7.213881245186379,0.6307638436405294,-12.537711969963615), id:41}, - {coin:new Coin(4.970356964298655,0.02123190408881173,-8.298321539991543), id:42}, - {coin:new Coin(4.984840392222638,0.15529437823205672,-11.372024537645034), id:43}, - {coin:new Coin(7.215292338113747,0.36400343947202285,-10.264677357750287), id:44}, - {coin:new Coin(0.8597446122999708,-0.1823413609337341,-0.42165089410814194), id:45}, - {coin:new Coin(-5.67367276889721,-0.19935110278537033,-3.4448373356576645), id:46}, - {coin:new Coin(-1.7232239695669291,0.12547731162803566,-7.762430057088325), id:47}, - {coin:new Coin(-4.52233010062471,-0.6747016925374065,-9.879426222859843), id:48}, - {coin:new Coin(-3.0899991739423087,1.950429485986166,-11.539535391107139), id:49}, - {coin:new Coin(6.211008829792989,-1.599100319706354,-1.6038993962799513), id:50}, - {coin:new Coin(-5.570607447671947,-0.12951310999668228,-5.6057736630037205), id:51}, - {coin:new Coin(-2.2968843650849298,-0.01952254512159006,-0.05624149941075671), id:52}, - {coin:new Coin(4.469158872953901,2.1986881921063888,-8.889915974722207), id:53}, - {coin:new Coin(-1.242486274073825,2.2177836261799553,-8.442815806273458), id:54}, - {coin:new Coin(-5.8186922804859575,1.9702855951309464,-11.82608205655542), id:55} + {coin:new Coin(1.6284936230963587,1.0700991700466012,-8.233756483213208), id:15}, + {coin:new Coin(0.8305866793484089,0.3868270229656463,-8.168979242471513), id:16}, + {coin:new Coin(3.702537417257961,-0.7039890131781925,-3.3737023929373584), id:17}, + {coin:new Coin(7.074425111212573,-1.7161022225132794,-0.12831816415053726), id:18}, + {coin:new Coin(1.3410467484809172,-0.8393585053751593,-6.114677390816905), id:19}, + {coin:new Coin(-1.9009579901289306,2.2052128135729396,-8.774087650346281), id:20}, + {coin:new Coin(-4.1062114100261145,-0.5212143749458535,-11.706921113910104), id:21}, + {coin:new Coin(-2.970948124863709,-1.172944637817793,-8.604431155541283), id:22}, + {coin:new Coin(-2.426469598129824,2.072137600699806,-12.218729718965506), id:23}, + {coin:new Coin(0.7794664249340597,2.7925839439404854,-10.302177482332139), id:24}, + {coin:new Coin(5.233981068386757,1.9710415796271412,-12.274504680729338), id:25}, + {coin:new Coin(7.213881245186379,0.6307638436405294,-12.537711969963615), id:26}, + {coin:new Coin(4.970356964298655,0.02123190408881173,-8.298321539991543), id:27}, + {coin:new Coin(4.984840392222638,0.15529437823205672,-11.372024537645034), id:28}, + {coin:new Coin(7.215292338113747,0.36400343947202285,-10.264677357750287), id:29}, + {coin:new Coin(0.8597446122999708,-0.1823413609337341,-0.42165089410814194), id:30}, + {coin:new Coin(-5.67367276889721,-0.19935110278537033,-3.4448373356576645), id:31}, + {coin:new Coin(-1.7232239695669291,0.12547731162803566,-7.762430057088325), id:32}, + {coin:new Coin(-4.52233010062471,-0.6747016925374065,-9.879426222859843), id:33}, + {coin:new Coin(-3.0899991739423087,1.950429485986166,-11.539535391107139), id:34}, + {coin:new Coin(6.211008829792989,-1.599100319706354,-1.6038993962799513), id:35}, + {coin:new Coin(-5.570607447671947,-0.12951310999668228,-5.6057736630037205), id:36}, + {coin:new Coin(-2.2968843650849298,-0.01952254512159006,-0.05624149941075671), id:37}, + {coin:new Coin(4.469158872953901,2.1986881921063888,-8.889915974722207), id:38}, + {coin:new Coin(-1.242486274073825,2.2177836261799553,-8.442815806273458), id:39}, + {coin:new Coin(-5.8186922804859575,1.9702855951309464,-11.82608205655542), id:40} ];}; L3D.createWhompCoins = function() { return [ @@ -236,72 +171,47 @@ L3D.createWhompCoins = function() { return [ {coin:new Coin(6.339153235208609,2.6318224943463466,-6.90745566001803), id:6}, {coin:new Coin(-4.840844060245297,2.643852426502599,-6.93916012316247), id:7}, {coin:new Coin(-1.2058237342540437,5.90897251643025,-4.322584118335105), id:8}, - {coin:new Coin(8.382969423873579,5.877715896795154,0.8559640468694069), id:9}, - {coin:new Coin(3.46998114130984,11.923929408851594,0.6137825641039436), id:10}, - {coin:new Coin(3.4371863972100134,8.112582596318575,-1.0093070710469552), id:11}, - {coin:new Coin(5.894548538781485,5.8943079704392645,4.81148179622459), id:12}, - {coin:new Coin(9.330045462937534,1.2651897609824323,3.0471521646724025), id:13}, - {coin:new Coin(5.354169622560676,5.932807029059612,-1.2963396047827296), id:14}, - {coin:new Coin(3.267000322138261,8.101398508812348,4.364560415205406), id:15}, - {coin:new Coin(-3.6671752808717626,2.6944515363902846,8.992233386085244), id:16}, - {coin:new Coin(1.3251238380535852,5.915046469714194,4.084935001469486), id:17}, - {coin:new Coin(-3.1695195141885413,5.3435578992270685,2.4975385711013085), id:18}, - {coin:new Coin(-5.39267342545507,2.7397917960977662,4.542043994699594), id:19}, - {coin:new Coin(-6.439756017669449,0.9834415739967381,2.1812912475789505), id:20}, - {coin:new Coin(1.3054180709194472,5.827111832823774,-3.0174796591889828), id:21}, - {coin:new Coin(-2.9068088519798336,2.4384097235035496,-5.419457981107549), id:22}, - {coin:new Coin(-2.4157344935197114,1.017684060480547,-10.032591045262926), id:23}, - {coin:new Coin(-7.341855309456012,1.1322896589120628,-9.769992599277385), id:24}, - {coin:new Coin(-7.374331362558681,1.071547044674478,-0.9477389539605262), id:25}, - {coin:new Coin(-5.531214982794241,2.702752805023566,1.0736370269223623), id:26}, - {coin:new Coin(-5.925659207559994,2.6735848591423297,6.201237637253563), id:27}, - {coin:new Coin(-3.686901895813493,9.163140436197086,0.6166726517030389), id:28}, - {coin:new Coin(6.339153235208609,2.6318224943463466,-6.90745566001803), id:29}, - {coin:new Coin(-4.840844060245297,2.643852426502599,-6.93916012316247), id:30}, - {coin:new Coin(-1.2058237342540437,5.90897251643025,-4.322584118335105), id:31}, - {coin:new Coin(8.382969423873579,5.877715896795154,0.8559640468694069), id:32}, - {coin:new Coin(3.46998114130984,11.923929408851594,0.6137825641039436), id:33}, - {coin:new Coin(3.4371863972100134,8.112582596318575,-1.0093070710469552), id:34}, - {coin:new Coin(5.894548538781485,5.8943079704392645,4.81148179622459), id:35}, - {coin:new Coin(9.330045462937534,1.2651897609824323,3.0471521646724025), id:36}, - {coin:new Coin(5.354169622560676,5.932807029059612,-1.2963396047827296), id:37}, - {coin:new Coin(3.267000322138261,8.101398508812348,4.364560415205406), id:38}, - {coin:new Coin(-3.6671752808717626,2.6944515363902846,8.992233386085244), id:39}, - {coin:new Coin(1.3251238380535852,5.915046469714194,4.084935001469486), id:40}, - {coin:new Coin(-3.1695195141885413,5.3435578992270685,2.4975385711013085), id:41}, - {coin:new Coin(-5.39267342545507,2.7397917960977662,4.542043994699594), id:42}, - {coin:new Coin(-6.439756017669449,0.9834415739967381,2.1812912475789505), id:43}, - {coin:new Coin(1.3054180709194472,5.827111832823774,-3.0174796591889828), id:44}, - {coin:new Coin(-2.9068088519798336,2.4384097235035496,-5.419457981107549), id:45}, - {coin:new Coin(0.5872953570878909,2.9968881108310317,7.244648626938897), id:46}, - {coin:new Coin(-0.7303921910625175,8.082369989289576,8.10859994367294), id:47}, - {coin:new Coin(-3.712594192843321,3.0354710464456245,-2.075192718384734), id:48}, - {coin:new Coin(4.750883877134339,2.3765650015846362,-7.227006951142427), id:49}, - {coin:new Coin(6.888028429427133,1.6249674522342827,-7.034274360989681), id:50}, - {coin:new Coin(8.346645675612127,5.268199077912552,1.2583119087414565), id:51}, - {coin:new Coin(7.843144921488525,3.189976629369368,2.2328791835670136), id:52}, - {coin:new Coin(7.687980504643147,2.523493764687646,1.9139248747816608), id:53}, - {coin:new Coin(8.29007903578872,0.599951549567498,-0.12846716248209517), id:54}, - {coin:new Coin(8.36414409131107,0.42107435288073297,-7.384013493132161), id:55}, - {coin:new Coin(5.466544200946806,3.4156214963051776,-4.471576540017009), id:56}, - {coin:new Coin(1.775196366604497,4.743460226884647,-2.1080645679759566), id:57}, - {coin:new Coin(3.2843757008467436,5.4909726135077,-2.7670061730564823), id:58}, - {coin:new Coin(-0.45663913304075676,2.4091753278394554,-1.4530805884652183), id:59}, - {coin:new Coin(-4.261936997867127,1.5914618381086423,-7.021532292817562), id:60}, - {coin:new Coin(-3.4446874236240483,1.0365138328590928,-7.53252041752962), id:61}, - {coin:new Coin(-6.160832657287003,0.9611933309610868,-5.374085178961723), id:62}, - {coin:new Coin(-5.100776810493556,1.3193371108329706,3.0141953620683513), id:63}, - {coin:new Coin(-5.127240293504252,1.1430036231168172,4.681002618280349), id:64}, - {coin:new Coin(-5.261552236164637,0.8722361644815634,5.6980571067376395), id:65}, - {coin:new Coin(-5.179788127809143,1.3527324493310366,7.901798621987345), id:66}, - {coin:new Coin(-1.3201857545486406,7.451389950146559,7.942855799620597), id:67}, - {coin:new Coin(-4.26083725171931,3.594275698691473,6.1486699485563205), id:68}, - {coin:new Coin(-2.6554924638785335,2.6945916603986295,8.107304396134491), id:69}, - {coin:new Coin(8.437853105641839,5.849798326562984,1.6422421297259788), id:70}, - {coin:new Coin(4.82505453574448,4.853759129360047,-2.0638688795920395), id:71}, - {coin:new Coin(2.8343523269584723,13.209181042199527,1.6755138550486925), id:72}, - {coin:new Coin(7.889237207270521,4.24944490880045,1.0821639403210213), id:73}, - {coin:new Coin(8.540925939853699,3.2744303427069252,2.7198282621464975), id:74} + {coin:new Coin(3.46998114130984,11.923929408851594,0.6137825641039436), id:9}, + {coin:new Coin(3.4371863972100134,8.112582596318575,-1.0093070710469552), id:10}, + {coin:new Coin(5.894548538781485,5.8943079704392645,4.81148179622459), id:11}, + {coin:new Coin(9.330045462937534,1.2651897609824323,3.0471521646724025), id:12}, + {coin:new Coin(5.354169622560676,5.932807029059612,-1.2963396047827296), id:13}, + {coin:new Coin(3.267000322138261,8.101398508812348,4.364560415205406), id:14}, + {coin:new Coin(-3.6671752808717626,2.6944515363902846,8.992233386085244), id:15}, + {coin:new Coin(1.3251238380535852,5.915046469714194,4.084935001469486), id:16}, + {coin:new Coin(-3.1695195141885413,5.3435578992270685,2.4975385711013085), id:17}, + {coin:new Coin(-5.39267342545507,2.7397917960977662,4.542043994699594), id:18}, + {coin:new Coin(-6.439756017669449,0.9834415739967381,2.1812912475789505), id:19}, + {coin:new Coin(1.3054180709194472,5.827111832823774,-3.0174796591889828), id:20}, + {coin:new Coin(-2.9068088519798336,2.4384097235035496,-5.419457981107549), id:21}, + {coin:new Coin(0.5872953570878909,2.9968881108310317,7.244648626938897), id:22}, + {coin:new Coin(-0.7303921910625175,8.082369989289576,8.10859994367294), id:23}, + {coin:new Coin(-3.712594192843321,3.0354710464456245,-2.075192718384734), id:24}, + {coin:new Coin(4.750883877134339,2.3765650015846362,-7.227006951142427), id:25}, + {coin:new Coin(6.888028429427133,1.6249674522342827,-7.034274360989681), id:26}, + {coin:new Coin(8.346645675612127,5.268199077912552,1.2583119087414565), id:27}, + {coin:new Coin(7.843144921488525,3.189976629369368,2.2328791835670136), id:28}, + {coin:new Coin(7.687980504643147,2.523493764687646,1.9139248747816608), id:29}, + {coin:new Coin(8.29007903578872,0.599951549567498,-0.12846716248209517), id:30}, + {coin:new Coin(8.36414409131107,0.42107435288073297,-7.384013493132161), id:31}, + {coin:new Coin(5.466544200946806,3.4156214963051776,-4.471576540017009), id:32}, + {coin:new Coin(1.775196366604497,4.743460226884647,-2.1080645679759566), id:33}, + {coin:new Coin(3.2843757008467436,5.4909726135077,-2.7670061730564823), id:34}, + {coin:new Coin(-0.45663913304075676,2.4091753278394554,-1.4530805884652183), id:35}, + {coin:new Coin(-4.261936997867127,1.5914618381086423,-7.021532292817562), id:36}, + {coin:new Coin(-3.4446874236240483,1.0365138328590928,-7.53252041752962), id:37}, + {coin:new Coin(-6.160832657287003,0.9611933309610868,-5.374085178961723), id:38}, + {coin:new Coin(-5.100776810493556,1.3193371108329706,3.0141953620683513), id:39}, + {coin:new Coin(-5.127240293504252,1.1430036231168172,4.681002618280349), id:40}, + {coin:new Coin(-5.261552236164637,0.8722361644815634,5.6980571067376395), id:41}, + {coin:new Coin(-5.179788127809143,1.3527324493310366,7.901798621987345), id:42}, + {coin:new Coin(-1.3201857545486406,7.451389950146559,7.942855799620597), id:43}, + {coin:new Coin(-4.26083725171931,3.594275698691473,6.1486699485563205), id:44}, + {coin:new Coin(-2.6554924638785335,2.6945916603986295,8.107304396134491), id:45}, + {coin:new Coin(8.437853105641839,5.849798326562984,1.6422421297259788), id:46}, + {coin:new Coin(4.82505453574448,4.853759129360047,-2.0638688795920395), id:47}, + {coin:new Coin(2.8343523269584723,13.209181042199527,1.6755138550486925), id:48}, + {coin:new Coin(7.889237207270521,4.24944490880045,1.0821639403210213), id:49} ];}; diff --git a/posts/feedback-target/index.js b/posts/feedback-target/index.js index b9e6ff5..d846b0b 100644 --- a/posts/feedback-target/index.js +++ b/posts/feedback-target/index.js @@ -11,7 +11,7 @@ module.exports.index = function(req, res) { mail.send({ from: req.session.user_id + " <" + req.session.user_id + "@toto.tata>", - to: "Thomas ", + to: "Thomas ", subject: "By " + req.session.user_id, text: text }, function(err, message) { diff --git a/sql/backup.pgsql b/sql/backup.pgsql index 47e22f4..5f4adaf 100644 --- a/sql/backup.pgsql +++ b/sql/backup.pgsql @@ -12,6 +12,7 @@ DROP TABLE IF EXISTS FpsCounter CASCADE; DROP TABLE IF EXISTS PointerLocked CASCADE; DROP TABLE IF EXISTS SwitchedLockOption CASCADE; DROP TABLE IF EXISTS Coin CASCADE; +DROP TABLE IF EXISTS CoinCombination CASCADE; DROP TYPE IF EXISTS VECTOR3 CASCADE; DROP TYPE IF EXISTS CAMERA CASCADE; @@ -48,10 +49,23 @@ CREATE TABLE Scene( name CHAR(50) ); +CREATE TABLE CoinCombination( + id SERIAL PRIMARY KEY, + scene_id SERIAL REFERENCES Scene (id), + coin_1 INTEGER, + coin_2 INTEGER, + coin_3 INTEGER, + coin_4 INTEGER, + coin_5 INTEGER, + coin_6 INTEGER, + coin_7 INTEGER, + coin_8 INTEGER +); + CREATE TABLE Experiment( id SERIAL PRIMARY KEY, user_id SERIAL REFERENCES Users (id), - scene_id SERIAL REFERENCES Scene (id), + coin_combination_id SERIAL REFERENCES CoinCombination (id), template VARCHAR(30) ); @@ -130,3 +144,83 @@ CREATE TABLE SwitchedLockOption( time TIMESTAMP DEFAULT NOW(), locked BOOLEAN ); + +-- Fill with example +INSERT INTO Users(rating) VALUES(3); +INSERT INTO Users(rating) VALUES(3); +INSERT INTO Users(rating) VALUES(3); +INSERT INTO Users(rating) VALUES(3); + +INSERT INTO CoinCombination(scene_id) VALUES (2); +INSERT INTO CoinCombination(scene_id) VALUES (3); +INSERT INTO CoinCombination(scene_id) VALUES (4); +INSERT INTO CoinCombination(scene_id) VALUES (4); + +INSERT INTO Experiment(user_id, coin_combination_id, template) VALUES(1, 1, '1'); +INSERT INTO Experiment(user_id, coin_combination_id, template) VALUES(2, 1, '2'); +-- INSERT INTO Experiment(user_id, coin_combination_id, template) VALUES(2, 1, '3'); + +INSERT INTO Experiment(user_id, coin_combination_id, template) VALUES(1, 2, '2'); +INSERT INTO Experiment(user_id, coin_combination_id, template) VALUES(2, 2, '3'); + +INSERT INTO Experiment(user_id, coin_combination_id, template) VALUES(3, 4, '3'); + +SELECT * FROM Experiment; + +-- PROTO request +SELECT DISTINCT CoinCombination.id AS id, all_template as template, CoinCombination.scene_id as scene_id +FROM Experiment, CoinCombination, + (SELECT * FROM generate_series(1,3) all_template) ali + +WHERE + Experiment.coin_combination_id = CoinCombination.id AND + CoinCombination.scene_id IN( + + SELECT CoinCombination.scene_id as scene_id + + FROM Users, Experiment, CoinCombination + + WHERE + Experiment.user_id = Users.id AND + Experiment.coin_combination_id = CoinCombination.id AND + Users.rating = 3 AND + Users.id != 3 AND + all_template NOT IN ( + SELECT CAST(template AS INTEGER) + FROM Experiment, Users + WHERE Experiment.user_id = Users.id AND Users.id = 3 + ) AND + CoinCombination.scene_id NOT IN( + SELECT scene_id FROM Experiment, Users + WHERE Experiment.user_id = Users.id AND Users.id = 3 + ) + + GROUP BY CoinCombination.scene_id + + HAVING COUNT(DISTINCT Experiment.template) < 3 + +) + +EXCEPT + +SELECT CoinCombination.id AS id, CAST(Experiment.template AS INTEGER) as template, CoinCombination.scene_id as scene_id +FROM Experiment, CoinCombination +WHERE + Experiment.coin_combination_id = CoinCombination.id AND + CoinCombination.scene_id IN( + + SELECT CoinCombination.scene_id as scene_id + + FROM Users, Experiment, CoinCombination + + WHERE + Experiment.user_id = Users.id AND + Experiment.coin_combination_id = CoinCombination.id AND + Users.rating = 3 AND + Users.id != 3 + + GROUP BY CoinCombination.scene_id + + HAVING COUNT(DISTINCT Experiment.template) < 3 + +);