- Add primitive_libs/ with modular primitive loading (core, math, image, color, color_ops, filters, geometry, drawing, blending, arrays, ascii) - Effects now explicitly declare dependencies via (require-primitives "...") - Convert ascii-fx-zone from hardcoded special form to loadable primitive - Add _is_symbol/_is_keyword helpers for duck typing to support both sexp_effects.parser.Symbol and artdag.sexp.parser.Symbol classes - Auto-inject _interp and _env for primitives that need them - Remove silent error swallowing in cell_effect evaluation Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
12 lines
299 B
Common Lisp
12 lines
299 B
Common Lisp
;; Rotate effect - rotates image
|
|
|
|
(require-primitives "geometry")
|
|
|
|
(define-effect rotate
|
|
:params (
|
|
(angle :type int :default 0 :range [-360 360])
|
|
(speed :type int :default 0 :desc "rotation per second")
|
|
)
|
|
(let ((total-angle (+ angle (* speed t))))
|
|
(rotate-img frame total-angle)))
|