/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* SoloGame.js :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: edbernar { if (e.key == 'a') Map.reCreate(true); }) renderer.setAnimationLoop(loop); } static dispose() { Map.dispose(); if (renderer) renderer.dispose(); renderer = null; camera = null; if (scene) { scene.children.forEach(child => { if (child.geometry) child.geometry.dispose(); if (child.material) child.material.dispose(); if (child.texture) child.texture.dispose(); scene.remove(child); }); } scene = null; } }; function loop() { stats.begin(); if (gameEndStatus) // fin du jeu faire les dispose en conséquence console.log('Game end'); controls.update(); Ball.update(); Map.update(); Players.update(); renderer.render(scene, camera); stats.end(); } export { SoloGame };