Removed useless buttons from replays...
This commit is contained in:
		
							parent
							
								
									08ca21664d
								
							
						
					
					
						commit
						13485d8e6c
					
				| @ -1,11 +1,17 @@ | |||||||
| extends ./prototype | extends ../../../views/withjs | ||||||
| 
 | 
 | ||||||
| block title | block title | ||||||
|     title #{title} - Prototype - Replay |     title #{title} - Prototype | ||||||
| 
 | 
 | ||||||
| block configjs | block extrajs | ||||||
|  |     script(src="/static/js/prototypetools.min.js") | ||||||
|     script RecommendedCamera = FixedCamera; |     script RecommendedCamera = FixedCamera; | ||||||
|     script var params = params || {}; params.get = params.get || {}; params.get.id = #{id}; |     script var params = params || {}; params.get = params.get || {}; params.get.id = #{id}; | ||||||
| 
 |  | ||||||
| block mainjs |  | ||||||
|     script(src="/static/js/replay.min.js") |     script(src="/static/js/replay.min.js") | ||||||
|  | 
 | ||||||
|  | block extrahead | ||||||
|  |     link(rel="stylesheet" href="/static/css/prototype.css") | ||||||
|  | 
 | ||||||
|  | block content | ||||||
|  |     #main-div.panel-group(style={'margin-top':'10px', 'margin-bottom':'10px'}) | ||||||
|  |         #container(style={'padding': '0px', 'margin': '0px'}, tabindex="1") | ||||||
|  | |||||||
							
								
								
									
										20
									
								
								js/prototype/Coin.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										20
									
								
								js/prototype/Coin.js
									
									
									
									
										vendored
									
									
								
							| @ -54,16 +54,18 @@ Coin.prototype.get = function() { | |||||||
|         if (Coin.total === 9) { |         if (Coin.total === 9) { | ||||||
|             // You got the last coin
 |             // You got the last coin
 | ||||||
|             var music = document.getElementById('music'); |             var music = document.getElementById('music'); | ||||||
|             var wasPlaying = !music.paused; |             if (music !== null) { | ||||||
|             music.pause(); |                 var wasPlaying = !music.paused; | ||||||
|             setTimeout(function() { |                 music.pause(); | ||||||
|                 Coin.lastSound.play(); |  | ||||||
|                 setTimeout(function() { |                 setTimeout(function() { | ||||||
|                     if (wasPlaying) { |                     Coin.lastSound.play(); | ||||||
|                         music.play(); |                     setTimeout(function() { | ||||||
|                     } |                         if (wasPlaying) { | ||||||
|                 }, Coin.lastSound.duration*1000); |                             music.play(); | ||||||
|             }, Coin.nextSound.duration*1000); |                         } | ||||||
|  |                     }, Coin.lastSound.duration*1000); | ||||||
|  |                 }, Coin.nextSound.duration*1000); | ||||||
|  |             } | ||||||
|         } else { |         } else { | ||||||
|             Coin.nextSound = new Audio('/static/data/music/redcoins/' + Coin.total + Coin.extension); |             Coin.nextSound = new Audio('/static/data/music/redcoins/' + Coin.total + Coin.extension); | ||||||
|             Coin.nextSound.preload = "auto"; |             Coin.nextSound.preload = "auto"; | ||||||
|  | |||||||
							
								
								
									
										26
									
								
								js/prototype/replay.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										26
									
								
								js/prototype/replay.js
									
									
									
									
										vendored
									
									
								
							| @ -92,10 +92,10 @@ function initListeners() { | |||||||
|     // document.addEventListener('keydown', function(event) { if (event.keyCode == 27) { stopFullscreen();} }, false);
 |     // document.addEventListener('keydown', function(event) { if (event.keyCode == 27) { stopFullscreen();} }, false);
 | ||||||
| 
 | 
 | ||||||
|     // HTML Bootstrap buttons
 |     // HTML Bootstrap buttons
 | ||||||
|     buttonManager = new ButtonManager(cameras); |     // buttonManager = new ButtonManager(cameras);
 | ||||||
| 
 | 
 | ||||||
|     // Camera selecter for hover and clicking recommendations
 |     // Camera selecter for hover and clicking recommendations
 | ||||||
|     cameraSelecter = new CameraSelecter(renderer, scene, cameras, buttonManager); |     // cameraSelecter = new CameraSelecter(renderer, scene, cameras, buttonManager);
 | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| function fullscreen() { | function fullscreen() { | ||||||
| @ -155,19 +155,19 @@ function stopFullscreen() { | |||||||
| } | } | ||||||
| 
 | 
 | ||||||
| function render() { | function render() { | ||||||
|     cameraSelecter.update(); |     // cameraSelecter.update();
 | ||||||
| 
 | 
 | ||||||
|     // Update recommendations (set raycastable if shown)
 |     // Update recommendations (set raycastable if shown)
 | ||||||
|     var transform = buttonManager.showArrows ? show : hide; |     // var transform = buttonManager.showArrows ? show : hide;
 | ||||||
|     cameras.map(function(camera) { |     // cameras.map(function(camera) {
 | ||||||
|         if (camera instanceof RecommendedCamera) { |     //     if (camera instanceof RecommendedCamera) {
 | ||||||
|             transform(camera); |     //         transform(camera);
 | ||||||
| 
 | 
 | ||||||
|             camera.traverse(function(elt) { |     //         camera.traverse(function(elt) {
 | ||||||
|                 elt.raycastable = buttonManager.showArrows; |     //             elt.raycastable = buttonManager.showArrows;
 | ||||||
|             }); |     //         });
 | ||||||
|         } |     //     }
 | ||||||
|     }); |     // });
 | ||||||
| 
 | 
 | ||||||
|     // Update coins
 |     // Update coins
 | ||||||
|     coins.forEach(function(coin) { coin.update(); }); |     coins.forEach(function(coin) { coin.update(); }); | ||||||
| @ -191,7 +191,7 @@ function render() { | |||||||
|     renderer.render(scene, cameras.mainCamera()); |     renderer.render(scene, cameras.mainCamera()); | ||||||
| 
 | 
 | ||||||
|     // Hide arrows in recommendation
 |     // Hide arrows in recommendation
 | ||||||
|     cameras.map(function(camera) { if (camera instanceof RecommendedCamera) hide(camera); }); |     // cameras.map(function(camera) { if (camera instanceof RecommendedCamera) hide(camera); });
 | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| function animate() { | function animate() { | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user