scittle 2025-09-11

Put this here as well, >.<

<html>
  <head>
    <script src="" type="application/javascript"></script>
  </head>
  <body>
    <script src=""></script>
    <script type="application/x-scittle">
      (defn setup
       [p]
       (.createCanvas p 400 400))

      (defn draw
       [p]
       (.background p 220)
       (dotimes [i 6]
        (let [t (* 0.001 (.getTime (js/Date.)))
              t0 (+ (* i 2 js/Math.PI 0.1666) t)
              t1 (+ (* (inc i) 2 js/Math.PI 0.1666) t)]
         (.line p
          (+ 200 (* 150 (js/Math.cos t0)))
          (+ 200 (* 150 (js/Math.sin t0)))
          (+ 200 (* 150 (js/Math.cos t1)))
          (+ 200 (* 150 (js/Math.sin t1)))))))

      ;; go!
      (-> (fn [p]
           (js/Object.assign p (clj->js {:setup (partial setup p)
                                         :draw (partial draw p)})))
       (js/p5.))
    </script>
  </body>
</html>

Super-nice. simple_smile

--- btw, how do we pronounce 'scittle'? So I can say it right when I tell my loved ones about this hack. 🙂

like skittle

🆒, thanks!