After a few months of work finally version 3 is available 🎉
So many new features present, I invite you to read the README to find out.
If you would need support for the migration which should be quick and easy, you can ask on our discord server:
https://discord.gg/MVTwrdX3JM
Special Thanks To The New Contributors ❤️
- @saumac made their first contribution in #61
- @HelloNeptune made their first contribution in #100
Migration advice:
// Old version:
const iMesh= new InstancedMesh2(renderer, count, geometry, material);
iMesh.updateInstances((obj, index) => {
obj.position.x += index;
});
// New version
const iMesh= new InstancedMesh2(geometry, material, { capacity: count });
iMesh.addInstances(count, (obj, index) => {
obj.position.x += index;
});// Old version:
const iMesh= new InstancedMesh2(renderer, count, geometry, material);
iMesh.createInstances((obj, index) => {
obj.position.x += index;
});
// New version
const iMesh= new InstancedMesh2(geometry, material, { createEntities: true, capacity: count });
iMesh.addInstances(count, (obj, index) => {
obj.position.x += index;
});capacityis optional- the
updateInstancesmethod now updates (not creates) instances, used for animations - the management of uniforms has been simplified, see the new examples or join our discord server and ask for support
Full Changelog: r2...r3