humanbydefinition / p5.asciify

Apply real-time ASCII conversion to your favorite WebGL p5.js sketches instantly.
MIT License
27 stars 2 forks source link

Updated source to ES6 syntax #6

Closed humanbydefinition closed 2 months ago

humanbydefinition commented 2 months ago

It finally clicked and I managed to rewrite the whole thing in ES6 syntax without much issues. With that done, rollup.js has been set up as a bundler with some nice plugins, making the development und bundling process easier. The shader files in the source are now stored in .frag/.vert files for easier access and not as strings in the source anymore.

With rollup.js and some of it's plugins in place, the bundled p5.asciify add-on library also has shrunk in size! :) Will be made in the next release, but can technically already be accessed in this repo already when this merge is done.. A release on the Releases page will follow soon.

Most of the source code now contains docstrings and should generally be easier to get into.

Also, a bug has been fixed where p5.asciify would crash when a color palette effect has been added. Color palette effects generally work now, but I'll have to do more testing with multiple color palette effects being applied at the same time. Will also be released with v0.0.9, but can technically already be accessed when downloading the library file in dist/ from the repo.