Skip to content

v0.7.0 - the big rewrite

Compare
Choose a tag to compare
@humanbydefinition humanbydefinition released this 25 Jan 20:09
· 11 commits to main since this release

What's Changed

Full Changelog: v0.6.3...v0.7.0

Note

This update contains breaking changes and is not compatible with previous versions unfortunately. The changes necessary to update to v0.7.0 should be manageable. Make sure to check out the updated examples, as well as the Usage section of the Wiki to learn how to use the new API.

I'm very excited to share v0.7.0 with you, which is the biggest update yet, and already feels very close to an eventual v1.0.0. I'm sorry to not support previous versions, but those breaking changes were necessary going forward, and I'm confident that future updates will be less disruptive, as the whole project is much more structured and manageable now.

TypeScript rewrite

The whole library has been rewritten from JavaScript into TypeScript, which offers a lot of benefits. The whole library and it's source code are much more accessible and maintainable now, hopefully making it easier to get into for interested contributors as well. :)

typedoc has also been added to the project to create automated code documentation, which can be found in the /docs folder of this repository. Alongside the Usage section of the Wiki and the given code examples, this auto-generated code documentation is also helpful to learn how p5.asciify now works and how to use it.

New development environment

Previously, p5.asciify was simply bundled using rollup.js, and a live server plugin for VS Code served as my development server. Instead, p5.asciify now uses vite as a development environment, which offers many benefits, acting as a dev server and bundler.

With the addition of vite, a test suite has also been added using vitest, which can be found in the src/tests folder of this library. Currently, it only features a single test file for testing the P5AsciifyGrid class. Any contributions are highly appreciated! :)

To run p5.asciify and tinker with the source code locally, make sure to check out the newly added Contributing section of the Wiki.

New API

As stated in the note at the beginning of these notes, v0.7.0 features a new API and way to interact with p5.asciify, which is why updating from older versions will most likely break existing sketches, if any default settings are being changed.

To learn how to use p5.asciify now, make sure to check out the updated Wiki, and especially the new Usage section. Additionally, the auto-generated code documentation using typedoc can be helpful, which can be found in the /docs folder.

Alongside the updated documentation, the examples have also been updated, which should help additionally to get started using p5.asciify v0.7.0.

Code examples for the new API:

New features

Apart from bringing all the old features back into the new and improved API, there is one new feature, which allows you to re-order, add and remove ascii renderers of different types in the ASCII rendering pipeline.

This feature will be expanded on in the future, opening up the library even more. For example, the brightness-based ascii renderer currently always covers the whole canvas, overlaying potential other ascii renderers, which are being rendered previously. Instead, it will soon be possible to define a given ascii renderer only at a given area, so it's possible for example to have two brightness-based ASCII renderers visibly active, with varying settings, at the same time, at different positions on the grid.

Make sure to check out the Usage section of the Wiki and the typedoc generated /docs to learn more on how to use this feature.

Contributing

Following up on issue #11, I'm happy to finally provide a Contributing Guide in the Wiki. As already indicated, I feel like this library has improved a lot, and is more open to contributors than ever now.

Going forward, I will also create Issues for visibility, and also for other's who might be interested in helping out with them.

I'm happy about any new potential contributors, whether it being by creating issues of any kind (bugs, ideas, requests, ...), or by creating pull requests to improve p5.asciify and making it even better. Soon, I'll also add a contributors section with social links to the README as an incentive for potential contributors.

Removals

The recently introduced text ascii renderer, which was creating a <div> on top of the canvas, which essentially contained the ascii rendering in a copy-able container, has been removed. I felt like it was just a novelty with no real value, only convoluting the code. In a future minor update, a function to export a given frame as txt file will be added instead.

Going forward

With v0.7.0, p5.asciify is now close to being the end product that I imagined when creating the project. I still have a lot of ideas, and am looking forward to making the library compatible with an eventual release of p5.js v2.0. Updates will be more frequent now, and an eventual v1.0.0 release is not too far away I believe. Beyond v1.0.0, I'm also looking forward to continue supporting p5.asciify, and making it better based on your feedback, ideas, and contributions.

Going forward, I'm also confident that there won't be any more breaking changes. If there's stuff that'll be deprecated, it'll be communicated a few versions earlier, like it was the case with previous updates. Sorry again, especially if there are any big projects using p5.asciify, which I am not aware of.


Thanks a lot for reading this far and being part of the journey! :)

cheers
~humanbydefinition