Im using three multiple arrays in a project and I have to be able to cross reference them is there anyway I can set more than one bit of data to an element in the array?
For example I have an array called ballArray[] I use it like this:
function createBall(tempPosSize)
{
geometry = new THREE.SphereGeometry(tempPosSize,16,16),
new THREE.MeshLambertMaterial({color: 0xff0000,reflectivity: 0.0});
ball = new THREE.Mesh( geometry, material );
ballArray[i] = ball;
}
Is there a way I can set the [I] element like you would in JSON. So I would have ballArray[i] = {Name : foobar, BallData: ball}?