From 03072ef67af0623758a660e2cd3fb5e153133efa Mon Sep 17 00:00:00 2001 From: David Thompson Date: Wed, 24 May 2023 08:09:03 -0400 Subject: Update chickadee manual. --- manuals/chickadee/Particles.html | 58 ++++++++++++++++++++-------------------- 1 file changed, 29 insertions(+), 29 deletions(-) (limited to 'manuals/chickadee/Particles.html') diff --git a/manuals/chickadee/Particles.html b/manuals/chickadee/Particles.html index 38943fa..116e2e6 100644 --- a/manuals/chickadee/Particles.html +++ b/manuals/chickadee/Particles.html @@ -1,6 +1,6 @@ - - + --> + - + Particles (The Chickadee Game Toolkit) - - - - - - - - - - - + + + + + + + + + + + - + @@ -84,7 +84,7 @@ ul.no-bullet {list-style: none}

Next: , Previous: , Up: Graphics   [Contents][Index]

-
+

5.3.6 Particles

Effects like smoke, fire, sparks, etc. are often achieved by animating @@ -99,10 +99,10 @@ manipulating particle systems.

Below is an example of a very simple particle system that utilizes nearly all of the default configuration settings:

-
-
(use-modules (chickadee graphics particles))
-(define texture (load-image "particle.png"))
-(define particles (make-particles 2000 #:texture texture))
+
+
(use-modules (chickadee graphics particles))
+(define texture (load-image "particle.png"))
+(define particles (make-particles 2000 #:texture texture))
 

In order to put particles into a particle system, a particle @@ -112,10 +112,10 @@ how many of them to spawn, and for how long they should do it.

Below is an example of an emitter that spawns 16 particles per frame at the coordinates (320, 240):

-
-
(use-modules (chickadee math rect))
-(define emitter (make-particle-emitter (make-rect 0.0 0.0 320.0 240.0) 16))
-(add-particle-emitter particles emitter)
+
+
(use-modules (chickadee math rect))
+(define emitter (make-particle-emitter (make-rect 0.0 0.0 320.0 240.0) 16))
+(add-particle-emitter particles emitter)
 

To see all of the tweakable knobs and switches, read on! @@ -237,10 +237,10 @@ frame.

Procedure: remove-particle-emitter particles emitter
-

Remove emitter to particles +

Remove emitter from particles

-
+

Next: , Previous: , Up: Graphics   [Contents][Index]

-- cgit v1.2.3