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
|
||||
title #{title} - Prototype - Replay
|
||||
title #{title} - Prototype
|
||||
|
||||
block configjs
|
||||
block extrajs
|
||||
script(src="/static/js/prototypetools.min.js")
|
||||
script RecommendedCamera = FixedCamera;
|
||||
script var params = params || {}; params.get = params.get || {}; params.get.id = #{id};
|
||||
|
||||
block mainjs
|
||||
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")
|
||||
|
|
|
@ -54,6 +54,7 @@ Coin.prototype.get = function() {
|
|||
if (Coin.total === 9) {
|
||||
// You got the last coin
|
||||
var music = document.getElementById('music');
|
||||
if (music !== null) {
|
||||
var wasPlaying = !music.paused;
|
||||
music.pause();
|
||||
setTimeout(function() {
|
||||
|
@ -64,6 +65,7 @@ Coin.prototype.get = function() {
|
|||
}
|
||||
}, Coin.lastSound.duration*1000);
|
||||
}, Coin.nextSound.duration*1000);
|
||||
}
|
||||
} else {
|
||||
Coin.nextSound = new Audio('/static/data/music/redcoins/' + Coin.total + Coin.extension);
|
||||
Coin.nextSound.preload = "auto";
|
||||
|
|
|
@ -92,10 +92,10 @@ function initListeners() {
|
|||
// document.addEventListener('keydown', function(event) { if (event.keyCode == 27) { stopFullscreen();} }, false);
|
||||
|
||||
// HTML Bootstrap buttons
|
||||
buttonManager = new ButtonManager(cameras);
|
||||
// buttonManager = new ButtonManager(cameras);
|
||||
|
||||
// Camera selecter for hover and clicking recommendations
|
||||
cameraSelecter = new CameraSelecter(renderer, scene, cameras, buttonManager);
|
||||
// cameraSelecter = new CameraSelecter(renderer, scene, cameras, buttonManager);
|
||||
}
|
||||
|
||||
function fullscreen() {
|
||||
|
@ -155,19 +155,19 @@ function stopFullscreen() {
|
|||
}
|
||||
|
||||
function render() {
|
||||
cameraSelecter.update();
|
||||
// cameraSelecter.update();
|
||||
|
||||
// Update recommendations (set raycastable if shown)
|
||||
var transform = buttonManager.showArrows ? show : hide;
|
||||
cameras.map(function(camera) {
|
||||
if (camera instanceof RecommendedCamera) {
|
||||
transform(camera);
|
||||
// var transform = buttonManager.showArrows ? show : hide;
|
||||
// cameras.map(function(camera) {
|
||||
// if (camera instanceof RecommendedCamera) {
|
||||
// transform(camera);
|
||||
|
||||
camera.traverse(function(elt) {
|
||||
elt.raycastable = buttonManager.showArrows;
|
||||
});
|
||||
}
|
||||
});
|
||||
// camera.traverse(function(elt) {
|
||||
// elt.raycastable = buttonManager.showArrows;
|
||||
// });
|
||||
// }
|
||||
// });
|
||||
|
||||
// Update coins
|
||||
coins.forEach(function(coin) { coin.update(); });
|
||||
|
@ -191,7 +191,7 @@ function render() {
|
|||
renderer.render(scene, cameras.mainCamera());
|
||||
|
||||
// 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() {
|
||||
|
|
Loading…
Reference in New Issue