We recommend that you use one of our templates to get started.
alba.params.seed to seed your project’s randomness.
window.innerHeight to set the size of the canvas, and set the second dimension by multiplying or dividing by the aspectRatio.
window.devicePixelRatio to detect the pixel density of a user’s device
alba.setMetadata(traits) to set metadata, passing an object with key/value pairs.
alba.setComplete(true) when you’re done drawing to capture the image output.
Your project needs to be combined into a single script, then copy and added in the Artist Dashboard. Alba’s focus is on purely code-based projects, so to ensure that your work is 100% reproducible on-chain, there is no ability to make external API calls, or upload HTML files, pre-rendered images, or other assets.
When you save your code on Alba:
gzip to save on space and upload costs.
There is a cost calculator in the Artist Dashboard where you can get an estimate on the upload cost of your script.
Alba currently supports releasing projects of any size. However, our dashboard only supports launching projects which are under 24kb after compression. If your project is larger than that, you won’t be able to deploy your project on your own right now, but reach out to us in Discord and we can help publish it in multiple chunks.
In addition to any library dependencies you select while setting up your project, we automatically inject two Alba scripts into your project: