Menu

1 / 8

What If Every Ruby Object Answered to_art? Building asobi, a Ruby Creative Coding Gem

DEV Community: ruby·Hayato1031·about 11 hours ago
#FKk5sxqI
#devtoruby#devto#dev#asobi_gem#code
Long article (2916 words) — no AI summary yet.
Reading 0:00
15s threshold

Three lines of Ruby — no canvas setup, no draw() loop, zero external dependencies:

require "asobi"

flower = petal . repeat ( 8 ) . in_fan . colored ( :crimson , :navy ) show flower . spin ( every : 8 )

Enter fullscreen mode

Exit fullscreen mode

👉 ▶ Run and edit this flower in the browser Playground (no install, powered by ruby.wasm)

Take a petal, repeat it 8 times, arrange it in a fan, paint it crimson and navy, and spin it every 8 seconds. It reads left to right like an English sentence.

Hi! I'm Myura ( @lit_myura ), a university student in Japan. Earlier this month I released asobi ( "play" in Japanese) — a zero-dependency Ruby creative coding gem for generative art, SVG animations, interactive instruments, and audio-reactive live coding that runs locally or in the browser via WebAssembly ( ruby.wasm ) (latest v0.2.2 , Ruby 3.2+, MIT license).…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.