Comments

Log in with itch.io to leave a comment.

(7 edits) (+1)

Some things to try:

Change how it draws the spirograph:

Open the listener ( control-L or use the Decker -> listener menu ), then type:

spirograph.brush: 2

and hit shift-enter. that will change the brush being used to draw (there are lots of numbers you can try). Or go into the code and change the  line:

c.pattern: colors.blue  

to use a different color (try colors.red, or any number between 0 and 64)

Make it stamp the pattern to an underlying canvas:

  • Add a second canvas widget (Tool -> Widget, then Widgets -> New Canvas)
  • Move it below the spirograph with Edit -> Move to back.
  • Make the spirograph transparent (Widgets -> Show Transparent)
  • Add a button widget and have its script copy the image with: the code:

on click do
  img: spirograph.copy[]
  img: img.map[(38 dict 32}] # changes blue (38) to another color!
  canvas1.paste[img 0,0 1]   # the 1 makes it respect the transparency
end

you can use the listener to make sure the two canvases ovelap exactly:

canvas1.size:spirograph.size  canvas1.pos:spirograph.pos

Want to save your changes? Use file -> save as to save your own version as an .html file on your local computer!

Made with help from ClaudeAI for the Decker fantasy camp 2024.

You can view and edit the source code live with the Card -> Script menu.

Use the Help menu to learn more about Decker!

Do whatever you want with the source code.