From 9fba3faaf63944e8609dba29e314b1702079d6e4 Mon Sep 17 00:00:00 2001 From: Thomas FORGIONE Date: Thu, 23 Jul 2015 11:48:19 +0200 Subject: [PATCH] Improved coin editor --- .../prototype/views/prototype_viewer.jade | 4 + js/l3d/apps/prototype/coin-viewer/main.js | 20 +- js/l3d/src/scenes/createCoins.js | 330 +++++++++++++++++- posts/coin-info/index.js | 4 +- 4 files changed, 353 insertions(+), 5 deletions(-) diff --git a/controllers/prototype/views/prototype_viewer.jade b/controllers/prototype/views/prototype_viewer.jade index 0a65f56..504030b 100644 --- a/controllers/prototype/views/prototype_viewer.jade +++ b/controllers/prototype/views/prototype_viewer.jade @@ -8,3 +8,7 @@ block mainjs script Recommendation = L3D.ArrowRecommendation; script(src="/static/js/coinviewer.min.js") + +block extrabutton + button#save.btn.btn-primary.navbar-btn(style={'margin-right': '10px', 'margin-bottom':'10px'}, onclick="saveCoins();") Save coins + diff --git a/js/l3d/apps/prototype/coin-viewer/main.js b/js/l3d/apps/prototype/coin-viewer/main.js index ae5c5f2..76349cf 100644 --- a/js/l3d/apps/prototype/coin-viewer/main.js +++ b/js/l3d/apps/prototype/coin-viewer/main.js @@ -107,6 +107,8 @@ function initThreeElements() { 0.01, 100000, renderer, container ); + camera1.collisions = false; + } function initCanvases() { @@ -137,7 +139,12 @@ function initModels() { // Init recommendations recommendations = initMainScene(camera1, scene, coins, clickableObjects, []); - // Erase coins and recommendations + for (i = 0; i < coins.length; i++) { + coins[i].rotating = true; + clickableObjects.push(coins[i]); + } + + // Erase recommendations for (i =0; i < recommendations.length; i++) recommendations[i].traverse(function(obj) {obj.visible = false;}); recommendations = []; @@ -162,9 +169,18 @@ function initListeners() { // onclick function(c, x, y, event) { - if (event.button !== 2) + if (event.button !== 2) { + + if (c !== undefined && c.object instanceof Coin) + glob = c.object; + else + glob = null; + + console.log(glob); return; + } + if (c !== undefined) { if (c.object instanceof Coin) { diff --git a/js/l3d/src/scenes/createCoins.js b/js/l3d/src/scenes/createCoins.js index 706fa9c..99de73e 100644 --- a/js/l3d/src/scenes/createCoins.js +++ b/js/l3d/src/scenes/createCoins.js @@ -1 +1,329 @@ -L3D.createBobombCoins = function() { return [{coin:new Coin(22.280706560196638,13.725108184127997,32.63987169581496), id:0},{coin:new Coin(33.68386996752998,9.149049511822032,-18.87096639845466), id:1},{coin:new Coin(33.31162234976524,12.32414579919045,-6.836946838344371), id:2},{coin:new Coin(-6.542226291552578,12.307520787648738,-3.8865111962674517), id:3},{coin:new Coin(-17.588830805070085,23.841405751686263,-15.642444636400247), id:4},{coin:new Coin(-24.3381283859254,23.146296197160247,5.94668262444435), id:5},{coin:new Coin(-28.08790862463989,23.535010121780253,9.705135663221972), id:6},{coin:new Coin(-29.379335879791288,29.636026393280783,19.362115621994782), id:7},{coin:new Coin(-8.706913128046958,21.207848302770593,27.483816887890935), id:8},{coin:new Coin(-24.72548063753392,20.591109464902217,34.0541482945568), id:9},{coin:new Coin(6.07341534686721,12.796185940101592,17.78236645564636), id:10},{coin:new Coin(1.3769013661958112,13.438915583917735,26.790071227243793), id:11},{coin:new Coin(-1.1822337085425594,8.418877442833525,-24.963898514897572), id:12},{coin:new Coin(4.357016920017262,8.472802125274415,-30.529199236505924), id:13},{coin:new Coin(7.075416030408761,11.236188008723378,-28.279153104743983), id:14},{coin:new Coin(-17.85785378833318,13.42081721395066,-32.92376411375154), id:15},{coin:new Coin(-21.894165638010683,11.814166555266736,-5.255205616513877), id:16},{coin:new Coin(-36.585502580792195,12.88813264657535,6.356283347349125), id:17},{coin:new Coin(-17.22580655861263,23.787648282246952,-10.519501738826268), id:18},{coin:new Coin(-11.658290156106773,14.96199347508685,5.941345304662627), id:19},{coin:new Coin(-25.78117011943424,26.43994174870813,30.057819724644368), id:20},{coin:new Coin(-37.46335021251167,18.01317284378782,8.350450287883726), id:21},{coin:new Coin(30.641812668973245,13.456701531305129,8.78531092401407), id:22}];};L3D.createMountainCoins = function() { return [{coin:new Coin(-26.77972359627476,-19.23929063656664,23.6807547145596), id:0},{coin:new Coin(-24.921450642761087,-18.790469255696,12.598715548243229), id:1},{coin:new Coin(-27.462924457464283,-2.307453076982202,27.675888071372412), id:2},{coin:new Coin(-23.805440095101684,-0.1719164638306439,14.159121596734865), id:3},{coin:new Coin(-20.56923064468872,6.566093724474566,3.2759960140734043), id:4},{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(21.091926256689682,-17.4804758756722,19.756887434097596), id:18},{coin:new Coin(-26.076074016668006,-18.87840571816059,32.002286013087854), id:19},{coin:new Coin(1.8429647422443338,-2.455198049692979,-10.80308353746292), id:20},{coin:new Coin(-6.21747892581496,-0.5257501180103216,-16.89711795671381), id:21},{coin:new Coin(-24.44604455849146,-17.33125811800214,-21.788293355322484), id:22},{coin:new Coin(-21.49095086819052,3.7275512296245252,-8.44226482363607), id:23}];};L3D.createPeachCoins = function() { return [{coin:new Coin(-5.235079904099125,0.07417208986595411,-8.599114448384936), id:0},{coin:new Coin(-5.413573667252937,0.19509035740202668,-1.1941904950328774), id:1},{coin:new Coin(1.6988486739201933,0.4340094146515885,-8.231743908517105), id:2},{coin:new Coin(4.059418339215546,-0.39753959647229464,-3.743007737798272), id:3},{coin:new Coin(5.359520735057971,-1.0460829831125231,-5.929936710590241), id:4},{coin:new Coin(5.176978197016111,0.13802808132114674,-11.171963735389133), id:5},{coin:new Coin(3.4171209844522807,-0.3115318913043405,-7.849159339922742), id:6},{coin:new Coin(6.41062656545732,-0.03964424070287551,-6.445933178302108), id:7},{coin:new Coin(-0.02228694178575394,-0.15414844320311738,-1.4228652604536483), id:8},{coin:new Coin(8.757734361004703,-0.29458111538940124,-3.3125913130702878), id:9},{coin:new Coin(8.302585268565899,0.5007248161435802,-9.477574353301717), id:10},{coin:new Coin(1.0403238273317053,0.5157597438067554,-5.758876821657185), id:11},{coin:new Coin(-3.911676426275694,0.6629865621989456,-11.94799528543801), id:12},{coin:new Coin(0.4006795688979661,2.73126733573882,-8.621849519941263), id:13},{coin:new Coin(-1.1567000602429496,0.1828061701367549,-2.667327870723106), id:14},{coin:new Coin(2.3493996403524253,2.933219948717814,-9.746003678221635), id:15}];};L3D.createWhompCoins = function() { return [{coin:new Coin(-2.4157344935197114,1.017684060480547,-10.032591045262926), id:0},{coin:new Coin(-7.341855309456012,1.1322896589120628,-9.769992599277385), id:1},{coin:new Coin(-7.374331362558681,1.071547044674478,-0.9477389539605262), id:2},{coin:new Coin(-5.531214982794241,2.702752805023566,1.0736370269223623), id:3},{coin:new Coin(-5.925659207559994,2.6735848591423297,6.201237637253563), id:4},{coin:new Coin(-1.478378056568923,8.03301224261664,7.95776331451268), id:5},{coin:new Coin(-3.686901895813493,9.163140436197086,0.6166726517030389), id:6},{coin:new Coin(6.339153235208609,2.6318224943463466,-6.90745566001803), id:7},{coin:new Coin(-4.840844060245297,2.643852426502599,-6.93916012316247), id:8},{coin:new Coin(-1.2058237342540437,5.90897251643025,-4.322584118335105), id:9},{coin:new Coin(8.382969423873579,5.877715896795154,0.8559640468694069), id:10},{coin:new Coin(3.46998114130984,11.923929408851594,0.6137825641039436), id:11},{coin:new Coin(3.4371863972100134,8.112582596318575,-1.0093070710469552), id:12},{coin:new Coin(5.894548538781485,5.8943079704392645,4.81148179622459), id:13},{coin:new Coin(9.330045462937534,1.2651897609824323,3.0471521646724025), id:14},{coin:new Coin(5.354169622560676,5.932807029059612,-1.2963396047827296), id:15},{coin:new Coin(3.267000322138261,8.101398508812348,4.364560415205406), id:16},{coin:new Coin(-3.6671752808717626,2.6944515363902846,8.992233386085244), id:17},{coin:new Coin(1.3251238380535852,5.915046469714194,4.084935001469486), id:18},{coin:new Coin(-3.1695195141885413,5.3435578992270685,2.4975385711013085), id:19},{coin:new Coin(-5.39267342545507,2.7397917960977662,4.542043994699594), id:20},{coin:new Coin(-6.439756017669449,0.9834415739967381,2.1812912475789505), id:21},{coin:new Coin(1.3054180709194472,5.827111832823774,-3.0174796591889828), id:22},{coin:new Coin(-2.9068088519798336,2.4384097235035496,-5.419457981107549), id:23}];}; +L3D.createBobombCoins = function() { return [ + {coin:new Coin(-26.77972359627476,-19.23929063656664,23.6807547145596), id:0}, + {coin:new Coin(-24.921450642761087,-18.790469255696,12.598715548243229), id:1}, + {coin:new Coin(-27.462924457464283,-2.307453076982202,27.675888071372412), id:2}, + {coin:new Coin(-23.805440095101684,-0.1719164638306439,14.159121596734865), id:3}, + {coin:new Coin(-20.56923064468872,6.566093724474566,3.2759960140734043), id:4}, + {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(21.091926256689682,-17.4804758756722,19.756887434097596), id:18}, + {coin:new Coin(-26.076074016668006,-18.87840571816059,32.002286013087854), id:19}, + {coin:new Coin(1.8429647422443338,-2.455198049692979,-10.80308353746292), id:20}, + {coin:new Coin(-6.21747892581496,-0.5257501180103216,-16.89711795671381), id:21}, + {coin:new Coin(-21.49095086819052,3.7275512296245252,-8.44226482363607), id:22}, + {coin:new Coin(-26.77972359627476,-19.23929063656664,23.6807547145596), id:23}, + {coin:new Coin(-24.921450642761087,-18.790469255696,12.598715548243229), id:24}, + {coin:new Coin(-27.462924457464283,-2.307453076982202,27.675888071372412), id:25}, + {coin:new Coin(-23.805440095101684,-0.1719164638306439,14.159121596734865), id:26}, + {coin:new Coin(-20.56923064468872,6.566093724474566,3.2759960140734043), id:27}, + {coin:new Coin(-25.840046212444445,3.0154379627539645,-12.129077180554676), id:28}, + {coin:new Coin(-0.12415848898914678,-17.24941169186156,-24.089012115869895), id:29}, + {coin:new Coin(20.648080318582544,-17.306545828389865,-14.154882378054586), id:30}, + {coin:new Coin(-10.369619229139987,22.97033964184665,7.926012599432754), id:31}, + {coin:new Coin(-17.40703956405811,18.42114835252625,9.379360551126528), id:32}, + {coin:new Coin(-16.003631234123016,18.504382214049656,-9.02703983024753), id:33}, + {coin:new Coin(5.466352142045469,12.823046543316853,-5.71501482514302), id:34}, + {coin:new Coin(5.577967875069705,3.1178514503821235,-1.6601071460354084), id:35}, + {coin:new Coin(22.806035443552588,-3.0971670654445695,18.953290393314937), id:36}, + {coin:new Coin(-6.700701005799521,-1.2267676080840322,28.07123771418613), id:37}, + {coin:new Coin(4.055603794907487,3.025509693082835,12.990565917776475), id:38}, + {coin:new Coin(2.4669988262462175,11.025589439642443,17.30534563503105), id:39}, + {coin:new Coin(12.51818382505787,-9.440727474351826,8.645243996001899), id:40}, + {coin:new Coin(21.091926256689682,-17.4804758756722,19.756887434097596), id:41}, + {coin:new Coin(-26.076074016668006,-18.87840571816059,32.002286013087854), id:42}, + {coin:new Coin(1.8429647422443338,-2.455198049692979,-10.80308353746292), id:43}, + {coin:new Coin(-6.21747892581496,-0.5257501180103216,-16.89711795671381), id:44}, + {coin:new Coin(-21.49095086819052,3.7275512296245252,-8.44226482363607), id:45}, + {coin:new Coin(-7.1956859118199334,20.99455926472716,0.39343041817335256), id:46}, + {coin:new Coin(-11.326709391448512,21.953858407023805,2.6729871546312998), id:47}, + {coin:new Coin(-14.58598309525653,22.806713675854727,4.568200569926353), id:48}, + {coin:new Coin(-8.603785339194546,25.062399119985514,4.48232206645006), id:49}, + {coin:new Coin(-11.815100786173247,18.466863109134373,10.128654272554414), id:50}, + {coin:new Coin(-12.287271723363244,18.50228976812093,5.26621678915277), id:51}, + {coin:new Coin(-17.220480098677484,19.47976935335984,2.9799902027464245), id:52}, + {coin:new Coin(-10.674099520815707,19.346742690346296,16.93799634481946), id:53}, + {coin:new Coin(-8.639340307313672,17.692716982078288,15.259729023727008), id:54}, + {coin:new Coin(4.02346630222203,3.4336965169129283,3.1679443942435466), id:55}, + {coin:new Coin(6.290686214265615,11.806255003988033,1.5636193947234425), id:56}, + {coin:new Coin(2.233761057975329,-1.446823000016173,22.993089068680725), id:57}, + {coin:new Coin(4.107791889233733,9.515492698376526,10.617241670921304), id:58}, + {coin:new Coin(4.107791889233733,9.515492698376526,10.617241670921304), id:59}, + {coin:new Coin(4.655803290894976,9.262740729301786,12.124831282000333), id:60}, + {coin:new Coin(2.8554688549084712,9.97580560061152,17.33100769801678), id:61}, + {coin:new Coin(2.8554688549084712,9.97580560061152,17.33100769801678), id:62}, + {coin:new Coin(5.847746047986065,9.759240680469746,-0.3481826858222927), id:63}, + {coin:new Coin(9.24608339412142,-2.0739994580633447,1.397081592489799), id:64}, + {coin:new Coin(15.978225737202049,-12.555909289569446,-2.544415095587984), id:65}, + {coin:new Coin(20.602359244606333,-18.578212012875266,-3.709413959526993), id:66}, + {coin:new Coin(21.481883153040474,-19.84520127953089,-5.935726448733311), id:67}, + {coin:new Coin(9.624753116227113,-17.30756271726202,-10.359104979485439), id:68}, + {coin:new Coin(14.134128647177151,-17.746409040509437,-16.78932437453356), id:69}, + {coin:new Coin(-8.755271572959066,-7.6507235940364975,-16.199127652743055), id:70}, + {coin:new Coin(2.5192303065667567,-19.82819988785104,-7.3369260979084645), id:71}, + {coin:new Coin(-7.933545152437814,-11.270707826446072,-14.883187568269117), id:72}, + {coin:new Coin(-8.586747513048572,-11.26562950649283,-15.659690838058127), id:73}, + {coin:new Coin(-8.586747513048572,-11.26562950649283,-15.659690838058127), id:74}, + {coin:new Coin(-7.022727886702514,-11.27285726596609,-15.712138822238375), id:75}, + {coin:new Coin(-14.154724198037664,-14.403426075695087,-9.873076641728474), id:76}, + {coin:new Coin(-14.154724198037664,-14.403426075695087,-9.873076641728474), id:77}, + {coin:new Coin(-15.716916979988882,-18.423093747206085,-15.472213704667796), id:78}, + {coin:new Coin(-24.480069450971794,-17.442577902786574,-20.749219217152703), id:79}, + {coin:new Coin(-25.627967486101515,-18.32832757288443,-20.660993293064273), id:80}, + {coin:new Coin(4.3201251132637655,-17.460792435122254,-17.02033011304245), id:81}, + {coin:new Coin(-16.296321109266703,-16.343353356378277,18.07293963067476), id:82}, + {coin:new Coin(-20.172973006076457,-13.100614083179892,-0.49832953806372876), id:83}, + {coin:new Coin(-20.06547322464019,-18.95241746748273,-0.5845240203285288), id:84}, + {coin:new Coin(-21.70749176079847,-19.491501271302553,18.677850729222257), id:85}, + {coin:new Coin(-22.94001390713069,-16.1031390600699,28.133383230855085), id:86}, + {coin:new Coin(-22.94001390713069,-16.1031390600699,28.133383230855085), id:87}, + {coin:new Coin(-22.754665667080385,-16.884639064171605,28.119639649805954), id:88}, + {coin:new Coin(-17.29769085333132,-17.151818042801608,30.793589950883455), id:89}, + {coin:new Coin(4.852943329227945,-17.535873997327858,26.102584332535134), id:90}, + {coin:new Coin(1.0024613992947051,-14.58630886241466,27.719814437881144), id:91}, + {coin:new Coin(2.1932612207691617,-15.395461057611403,25.829152965347365), id:92} +];}; + +L3D.createMountainCoins = function() { return [ + {coin:new Coin(-26.77972359627476,-19.23929063656664,23.6807547145596), id:0}, + {coin:new Coin(-24.921450642761087,-18.790469255696,12.598715548243229), id:1}, + {coin:new Coin(-27.462924457464283,-2.307453076982202,27.675888071372412), id:2}, + {coin:new Coin(-23.805440095101684,-0.1719164638306439,14.159121596734865), id:3}, + {coin:new Coin(-20.56923064468872,6.566093724474566,3.2759960140734043), id:4}, + {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(21.091926256689682,-17.4804758756722,19.756887434097596), id:18}, + {coin:new Coin(-26.076074016668006,-18.87840571816059,32.002286013087854), id:19}, + {coin:new Coin(1.8429647422443338,-2.455198049692979,-10.80308353746292), id:20}, + {coin:new Coin(-6.21747892581496,-0.5257501180103216,-16.89711795671381), id:21}, + {coin:new Coin(-21.49095086819052,3.7275512296245252,-8.44226482363607), id:22}, + {coin:new Coin(-26.77972359627476,-19.23929063656664,23.6807547145596), id:23}, + {coin:new Coin(-24.921450642761087,-18.790469255696,12.598715548243229), id:24}, + {coin:new Coin(-27.462924457464283,-2.307453076982202,27.675888071372412), id:25}, + {coin:new Coin(-23.805440095101684,-0.1719164638306439,14.159121596734865), id:26}, + {coin:new Coin(-20.56923064468872,6.566093724474566,3.2759960140734043), id:27}, + {coin:new Coin(-25.840046212444445,3.0154379627539645,-12.129077180554676), id:28}, + {coin:new Coin(-0.12415848898914678,-17.24941169186156,-24.089012115869895), id:29}, + {coin:new Coin(20.648080318582544,-17.306545828389865,-14.154882378054586), id:30}, + {coin:new Coin(-10.369619229139987,22.97033964184665,7.926012599432754), id:31}, + {coin:new Coin(-17.40703956405811,18.42114835252625,9.379360551126528), id:32}, + {coin:new Coin(-16.003631234123016,18.504382214049656,-9.02703983024753), id:33}, + {coin:new Coin(5.466352142045469,12.823046543316853,-5.71501482514302), id:34}, + {coin:new Coin(5.577967875069705,3.1178514503821235,-1.6601071460354084), id:35}, + {coin:new Coin(22.806035443552588,-3.0971670654445695,18.953290393314937), id:36}, + {coin:new Coin(-6.700701005799521,-1.2267676080840322,28.07123771418613), id:37}, + {coin:new Coin(4.055603794907487,3.025509693082835,12.990565917776475), id:38}, + {coin:new Coin(2.4669988262462175,11.025589439642443,17.30534563503105), id:39}, + {coin:new Coin(12.51818382505787,-9.440727474351826,8.645243996001899), id:40}, + {coin:new Coin(21.091926256689682,-17.4804758756722,19.756887434097596), id:41}, + {coin:new Coin(-26.076074016668006,-18.87840571816059,32.002286013087854), id:42}, + {coin:new Coin(1.8429647422443338,-2.455198049692979,-10.80308353746292), id:43}, + {coin:new Coin(-6.21747892581496,-0.5257501180103216,-16.89711795671381), id:44}, + {coin:new Coin(-21.49095086819052,3.7275512296245252,-8.44226482363607), id:45}, + {coin:new Coin(-7.1956859118199334,20.99455926472716,0.39343041817335256), id:46}, + {coin:new Coin(-11.326709391448512,21.953858407023805,2.6729871546312998), id:47}, + {coin:new Coin(-14.58598309525653,22.806713675854727,4.568200569926353), id:48}, + {coin:new Coin(-8.603785339194546,25.062399119985514,4.48232206645006), id:49}, + {coin:new Coin(-11.815100786173247,18.466863109134373,10.128654272554414), id:50}, + {coin:new Coin(-12.787271723363242,18.40228976812093,5.566216789152769), id:51}, + {coin:new Coin(-17.220480098677484,19.47976935335984,2.9799902027464245), id:52}, + {coin:new Coin(-10.674099520815707,19.346742690346296,16.93799634481946), id:53}, + {coin:new Coin(-8.639340307313672,17.692716982078288,15.259729023727008), id:54}, + {coin:new Coin(4.3234663022220285,3.4336965169129283,3.1679443942435466), id:55}, + {coin:new Coin(6.290686214265615,11.806255003988033,1.5636193947234425), id:56}, + {coin:new Coin(2.233761057975329,-1.446823000016173,22.993089068680725), id:57}, + {coin:new Coin(4.107791889233733,9.515492698376526,10.617241670921304), id:58}, + {coin:new Coin(4.107791889233733,9.515492698376526,10.617241670921304), id:59}, + {coin:new Coin(4.655803290894976,9.262740729301786,12.124831282000333), id:60}, + {coin:new Coin(2.8554688549084712,9.97580560061152,17.33100769801678), id:61}, + {coin:new Coin(2.8554688549084712,9.97580560061152,17.33100769801678), id:62}, + {coin:new Coin(6.047746047986064,9.759240680469746,-0.3481826858222927), id:63}, + {coin:new Coin(9.24608339412142,-2.0739994580633447,1.397081592489799), id:64}, + {coin:new Coin(15.978225737202049,-12.555909289569446,-2.544415095587984), id:65}, + {coin:new Coin(20.602359244606333,-18.578212012875266,-3.709413959526993), id:66}, + {coin:new Coin(21.481883153040474,-19.84520127953089,-5.935726448733311), id:67}, + {coin:new Coin(9.624753116227113,-17.30756271726202,-10.359104979485439), id:68}, + {coin:new Coin(14.134128647177151,-17.746409040509437,-16.78932437453356), id:69}, + {coin:new Coin(-8.755271572959066,-7.6507235940364975,-16.199127652743055), id:70}, + {coin:new Coin(2.5192303065667567,-19.82819988785104,-7.3369260979084645), id:71}, + {coin:new Coin(-7.022727886702514,-11.872857265966088,-15.712138822238375), id:72}, + {coin:new Coin(-14.154724198037664,-15.003426075695085,-9.873076641728474), id:73}, + {coin:new Coin(-15.716916979988882,-18.423093747206085,-15.472213704667796), id:74}, + {coin:new Coin(-24.480069450971794,-17.442577902786574,-20.749219217152703), id:75}, + {coin:new Coin(-25.627967486101515,-18.32832757288443,-20.660993293064273), id:76}, + {coin:new Coin(4.3201251132637655,-17.460792435122254,-17.02033011304245), id:77}, + {coin:new Coin(-16.496321109266706,-16.343353356378277,18.07293963067476), id:78}, + {coin:new Coin(-20.172973006076457,-13.100614083179892,-0.49832953806372876), id:79}, + {coin:new Coin(-20.06547322464019,-18.95241746748273,-0.5845240203285288), id:80}, + {coin:new Coin(-22.007491760798473,-19.591501271302555,18.477850729222254), id:81}, + {coin:new Coin(-22.854665667080386,-16.884639064171605,28.119639649805954), id:82}, + {coin:new Coin(-17.29769085333132,-17.151818042801608,30.993589950883457), id:83}, + {coin:new Coin(4.852943329227945,-17.535873997327858,26.102584332535134), id:84}, + {coin:new Coin(2.593261220769162,-15.395461057611403,25.829152965347365), id:85}, + {coin:new Coin(-6.908562178033699,32.80106638936682,4.85365533648689), id:86}, + {coin:new Coin(21.09827595444349,-3.544890014535089,25.492155941505793), id:87}, + {coin:new Coin(16.890530158892666,-2.9712184775053916,-5.31585260818673), id:88}, + {coin:new Coin(14.107465999362226,-17.690143074622444,-17.093440580580573), id:89}, + {coin:new Coin(-1.2285753132761636,-17.811003980753824,-9.999557691760348), id:90}, + {coin:new Coin(-22.966307554027534,-18.600790327401057,28.597315707603894), id:91}, + {coin:new Coin(-24.07237635277186,-18.934481721030046,8.57395700519537), id:92}, + {coin:new Coin(-20.722934565692547,-7.118167856354356,7.974377074791513), id:93}, + {coin:new Coin(20.16171428333035,-18.034131078406492,18.098055278822137), id:94}, + {coin:new Coin(24.259986388961835,-12.319846691054217,4.917763469897616), id:95}, + {coin:new Coin(-19.245096366069788,-0.8405834573654645,28.57153151038993), id:96}, + {coin:new Coin(8.896627505662142,-2.0950174205636345,-4.0364039672340954), id:97}, + {coin:new Coin(-9.172914017885867,20.94860963300559,-0.9781739897586929), id:98}, + {coin:new Coin(-14.972191966124155,18.298176200945555,14.287562424465513), id:99}, + {coin:new Coin(5.798547877411441,12.137776538305882,-1.3372812572900314), id:100}, + {coin:new Coin(-20.232460477765102,17.280387232905237,-7.149223019820442), id:101} +];}; + +L3D.createPeachCoins = function() { return [ + {coin:new Coin(-5.235079904099125,0.07417208986595411,-8.599114448384936), id:0}, + {coin:new Coin(-5.413573667252937,0.19509035740202668,-1.1941904950328774), id:1}, + {coin:new Coin(1.6988486739201933,0.4340094146515885,-8.231743908517105), id:2}, + {coin:new Coin(4.059418339215546,-0.39753959647229464,-3.743007737798272), id:3}, + {coin:new Coin(5.359520735057971,-1.0460829831125231,-5.929936710590241), id:4}, + {coin:new Coin(3.4171209844522807,-0.3115318913043405,-7.849159339922742), id:5}, + {coin:new Coin(6.41062656545732,-0.03964424070287551,-6.445933178302108), id:6}, + {coin:new Coin(-0.02228694178575394,-0.15414844320311738,-1.4228652604536483), id:7}, + {coin:new Coin(8.757734361004703,-0.29458111538940124,-3.3125913130702878), id:8}, + {coin:new Coin(8.302585268565899,0.5007248161435802,-9.477574353301717), id:9}, + {coin:new Coin(1.0403238273317053,0.5157597438067554,-5.758876821657185), id:10}, + {coin:new Coin(-3.911676426275694,0.6629865621989456,-11.94799528543801), id:11}, + {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} +];}; + +L3D.createWhompCoins = function() { return [ + {coin:new Coin(-2.4157344935197114,1.017684060480547,-10.032591045262926), id:0}, + {coin:new Coin(-7.341855309456012,1.1322896589120628,-9.769992599277385), id:1}, + {coin:new Coin(-7.374331362558681,1.071547044674478,-0.9477389539605262), id:2}, + {coin:new Coin(-5.531214982794241,2.702752805023566,1.0736370269223623), id:3}, + {coin:new Coin(-5.925659207559994,2.6735848591423297,6.201237637253563), id:4}, + {coin:new Coin(-3.686901895813493,9.163140436197086,0.6166726517030389), id:5}, + {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} +];}; + + diff --git a/posts/coin-info/index.js b/posts/coin-info/index.js index 91bc2d1..92d233e 100644 --- a/posts/coin-info/index.js +++ b/posts/coin-info/index.js @@ -4,9 +4,9 @@ var Log = require('../../lib/NodeLog.js'); module.exports.index = function(req, res) { mail.send({ - from: req.body.name + " ", + from: req.body.name + " <" + req.body.name + "@toto.tata>", to: "Thomas ", - subject: req.body.scene, + subject: req.body.scene + " by " + req.body.name, text: JSON.stringify(req.body.coins) }, function(err, message) { if (err !== null) {