Improved coin editor
This commit is contained in:
		
							parent
							
								
									5316efcc21
								
							
						
					
					
						commit
						9fba3faaf6
					
				| @ -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 | ||||
| 
 | ||||
|  | ||||
							
								
								
									
										20
									
								
								js/l3d/apps/prototype/coin-viewer/main.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										20
									
								
								js/l3d/apps/prototype/coin-viewer/main.js
									
									
									
									
										vendored
									
									
								
							| @ -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) { | ||||
|  | ||||
										
											
												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) { | ||||
| 
 | ||||
|     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>", | ||||
|         subject: req.body.scene, | ||||
|         subject: req.body.scene + " by " + req.body.name, | ||||
|         text: JSON.stringify(req.body.coins) | ||||
|     }, function(err, message) { | ||||
|         if (err !== null) { | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user