yomotsu / three-particle-fire

52 stars 15 forks source link

Three 143 compatibility #2

Closed vincentfretin closed 2 years ago

vincentfretin commented 2 years ago

This shader is lit :D thank you for writing it. I added compatibility with latest threejs. Extending the constructor the way you did previously didn't work anymore with latest threejs version, I guess since threejs moved to ES6 code, the generated commonjs code bundled with threejs wasn't the same. I used a simple function that return the augmented instance, it's normally the same as before. I had to rename the uniform texture to something else, I chose map, texture seems to be a reserved keyword now, I had an error like it was a function to be called... THREE.Math alias was removed in latest version, you need to use THREE.MathUtils. Geometry.addAttribute doesn't exist anymore, you need to use Geometry.setAttribute now.

yomotsu commented 2 years ago

Thanks for your contribution! I'll take a look at the changes.👀

yomotsu commented 2 years ago

@vincentfretin the updated version has been released on NPM! Thanks again

vincentfretin commented 2 years ago

That's great! Not all maintainers are still active after 5 years of the initial release. I'm glad you took a look at it and merged it. I did an aframe component of it but not currently released, I'll probably add the package now as a dependency instead of copying the code, and publish it later with some other components I'm working on.