I'm working on implementing an event handler for particles that triggers an alert message on a sphere, always facing the camera. I am looking to achieve something similar to this demo (and making sure it works on IE 9+).
Here is the code snippet I have so far: http://jsfiddle.net/praveenv29/cVnKV/11/
var renderer, projector;
var mouseX, mouseY, stats, container;
var objects = [];
var INTERSECTED;
var camera, scene, renderer, material, mesh, cont;
var w1 = 960;
var h1 = 700;
var halfWidth = w1 / 2;
var halfHeigth = h1 / 2;
function init() {
// Initialization code here
}
function animate() {
// Animation logic here
}
function render() {
// Rendering logic here
}
function generateGeometry() {
// Geometry generation here
}
init();
animate();