Improved coin editor
This commit is contained in:
parent
5316efcc21
commit
9fba3faaf6
|
@ -8,3 +8,7 @@ block mainjs
|
||||||
script Recommendation = L3D.ArrowRecommendation;
|
script Recommendation = L3D.ArrowRecommendation;
|
||||||
|
|
||||||
script(src="/static/js/coinviewer.min.js")
|
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
|
||||||
|
|
||||||
|
|
|
@ -107,6 +107,8 @@ function initThreeElements() {
|
||||||
0.01, 100000, renderer, container
|
0.01, 100000, renderer, container
|
||||||
);
|
);
|
||||||
|
|
||||||
|
camera1.collisions = false;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function initCanvases() {
|
function initCanvases() {
|
||||||
|
@ -137,7 +139,12 @@ function initModels() {
|
||||||
// Init recommendations
|
// Init recommendations
|
||||||
recommendations = initMainScene(camera1, scene, coins, clickableObjects, []);
|
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++)
|
for (i =0; i < recommendations.length; i++)
|
||||||
recommendations[i].traverse(function(obj) {obj.visible = false;});
|
recommendations[i].traverse(function(obj) {obj.visible = false;});
|
||||||
recommendations = [];
|
recommendations = [];
|
||||||
|
@ -162,9 +169,18 @@ function initListeners() {
|
||||||
// onclick
|
// onclick
|
||||||
function(c, x, y, event) {
|
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;
|
return;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
if (c !== undefined) {
|
if (c !== undefined) {
|
||||||
|
|
||||||
if (c.object instanceof Coin) {
|
if (c.object instanceof Coin) {
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -4,9 +4,9 @@ var Log = require('../../lib/NodeLog.js');
|
||||||
module.exports.index = function(req, res) {
|
module.exports.index = function(req, res) {
|
||||||
|
|
||||||
mail.send({
|
mail.send({
|
||||||
from: req.body.name + " <dragonrock.django@gmail.com>",
|
from: req.body.name + " <" + req.body.name + "@toto.tata>",
|
||||||
to: "Thomas <thomas.forgione@gmail.com>",
|
to: "Thomas <thomas.forgione@gmail.com>",
|
||||||
subject: req.body.scene,
|
subject: req.body.scene + " by " + req.body.name,
|
||||||
text: JSON.stringify(req.body.coins)
|
text: JSON.stringify(req.body.coins)
|
||||||
}, function(err, message) {
|
}, function(err, message) {
|
||||||
if (err !== null) {
|
if (err !== null) {
|
||||||
|
|
Loading…
Reference in New Issue