psystem-add-particle   xtlang


Defined in:  https://github.com/digego/extempore/tree/v0.8.9/libs/external/particles.xtm

Implementation

(bind-func psystem-add-particle
  (lambda (psys:psystem* x y s xx yy r g b a dur)
    (let ((size (psystem_size psys))
    (free-particle (psystem-particle-check psys 0)))
      (if (= free-particle -1)
    void ;; don't do anything if no free particles
    (begin (psystem-set-particle psys free-particle x y s xx yy r g b a dur)
     void)))))


Back to Index