Hey all!
I’m excited to announce that klank.dev is now open-source and has undergone many changes and improvements over the past few weeks.
-
klank.dev
and its major supporting libraries, includingpurescript-behaviors
,purescript-audio-behaviors
, andpurescript-painting
are now updated to use PureScript 0.14.0 and Halogen v6. - The website klank.dev is no longer an online sandbox. Rather, it is automatically built from the GitHub repo and points to several examples. All of these examples can be served locally in hot-reload mode by running
npm run start
and built by runningnpm run build
. I usesurge
to publish the pages from thedist
directory and it works well. - There are a host of API additions and improvements, including support for pixel-level image manipulation and the webcam via
Graphics.Painting
.
The decision to move from a browser-based sandbox to an open-source repo was based on several factors:
- As it was became clear that
klank
would never need to manage user profiles or pass around sensitive data, there was no point in keeping it closed-source. - Folks have been building more ambitious projects with klank, and the online sandbox’s compile times were getting way too long. Furthermore, one of the common uses of klank is in practice rooms with poor internet connections, which makes it hard to use the online version. Now, projects can be split across multiple files, and webpack hot reloading often takes less than a second for small changes.
- Ultimately,
klank
is a tool for creation, not sandboxing and publishing. No homegrown sandbox will ever be as good as VSCode oremacs
, and no homegrown publishing system will ever be as good as Netlify or Surge. So I decided to focus on the essential - artistic creation - and develop clear & simple tooling practices for editing and publishing. I found that this has sped me up immensely in my own creative process.
I hope you get a chance to clone the repo and build some of the examples! I think you’ll enjoy playing around with them, and I’d love to hear & see what you make with klank. Also, if you have any recommendations for klank
or any of the supporting libraries in its ecosystem, please don’t hesitate to open a GitHub issue and/or make a PR.