Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Three.js Object pool
// function removeObject (object, pool) {
// var tempObj;
// for (var i = 0; i < pool.length; i++) {
// if ( pool[i] === object ) {
// pool.activeLength --;
// canvas.scene.remove( pool[i] );
// tempObj = pool[i];
// pool[pool[i]] = pool[pool.length - 1];
// return;
// }
// }
// }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment