Check out my latest project at this link: maison.whiteplay.fr
I'm currently working on creating a 3D PacMan game. In my code, I am using mesh to construct the level, but I'm facing performance issues due to the large number of individual bubble objects that need to be eaten by the player to win. Is it possible to optimize these bubbles using the same technology (mesh)? If so, how can I implement it?
Take a look at a snippet of my code below:
var geometrySphere = new THREE.SphereGeometry(5, 32, 32);
var bille = function(x,z){
this.bille = new THREE.Mesh(
geometrySphere,
new THREE.MeshBasicMaterial({color: 0xffff00})
);
this.bille.position.x = (x-15.5) * 100;
this.bille.position.y = 100;
this.bille.position.z = (z-15.5) * 100;
scene.add(this.bille);
}
Thank you for taking the time to read this! If you have any suggestions or tips on improving my code, feel free to share them with me :)