logoalt Hacker News

heyitsgarrettyesterday at 4:57 PM3 repliesview on HN

Oh thanks for sharing this! I love asesprite, procreate, pico8 and had this idea for programmable brushes bonking around my head for years now. Recently took some time between projects to put it together.

MOSS is a drawing toy where each brush is a tiny script that knows about every pixel on the canvas. You define how it paints with noise, randomness, patterns, stroke speed, pressure, and every touch executes the code.

So you can have a brush that scatters pixels like a real spray can or one that stamps shapes that mutate as you drag. Or perspective lines that actually converge. Or a fill bucket with smart gap awareness (I called it "Fill of my Dreams" and added to the brush list).

Happy to share brush code in the comments or explore ideas together. There's a (?) in the bottom right toolbar with API docs, and a prompt copy at the bottom if you wanted to work with the API through an agent.


Replies

Lambdanautyesterday at 7:07 PM

I love how fun this is. It has so much personality. Definitely can see the pico8 and aseprite inspiration.

I think what could be really interesting is some procedural generation brushes... Like a brush that generates a random city-scape as you draw it. That sounds so exciting..

Maybe using wave function collapse:

> https://nathanmcoleman.com/projects/wavecollapse/

azeirahyesterday at 9:29 PM

I wrote a program that has programmable brushes about ten years ago, it's a bit different from moss in that it has a physics simulation underneath rather than a sort of shader, but I've always thought this kind of approach has a lot of potential.

It feels _amazing_ to draw a bird in a single stroke!

Maybe this can give you some inspiration!

https://laura.fm/generative-art/wind/wind.html

show 1 reply
squokkoyesterday at 10:10 PM

Is this open source? Is there a GitHub repo?