From bc56aa3b8eb5b4e24be3fb68336372396512ba9a Mon Sep 17 00:00:00 2001 From: Thomas FORGIONE Date: Mon, 8 Jun 2015 09:51:30 +0200 Subject: [PATCH] Mouse cursor change when hovering stuff --- js/prototype/Coin.js | 1 + js/prototype/raycasterTools.js | 2 ++ 2 files changed, 3 insertions(+) diff --git a/js/prototype/Coin.js b/js/prototype/Coin.js index f67bac6..1ed2f1c 100644 --- a/js/prototype/Coin.js +++ b/js/prototype/Coin.js @@ -101,6 +101,7 @@ Coin.prototype.get = function() { if (this.mesh) { this.mesh.visible = false; + this.mesh.raycastable = false; } Coin.total ++; Coin.nextSound.play(); diff --git a/js/prototype/raycasterTools.js b/js/prototype/raycasterTools.js index c59268f..4ee610a 100644 --- a/js/prototype/raycasterTools.js +++ b/js/prototype/raycasterTools.js @@ -89,6 +89,8 @@ CameraSelecter.prototype.update = function(event) { } this.prev.go = false; } + + document.getElementById('container').style.cursor = hovered ? "pointer" : "auto"; } CameraSelecter.prototype.click = function(event) {