Skip to content

Choose a tag to compare

@agargaro agargaro released this 23 Mar 12:09
· 60 commits to master since this release

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 ❤️

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;
});
  • capacity is optional
  • the updateInstances method 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