diff options
Diffstat (limited to 'manuals/chickadee/Particles.html')
-rw-r--r-- | manuals/chickadee/Particles.html | 58 |
1 files changed, 29 insertions, 29 deletions
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 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> -<!-- Copyright (C) 2017-2021 David Thompson davet@gnu.org +<!-- Copyright (C) 2017-2023 David Thompson dthompson2@worcester.edu Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 @@ -17,25 +17,25 @@ Foundation Web site at http://www.gnu.org/licenses/fdl.html. The document was typeset with http://www.texinfo.org/ (GNU Texinfo). - --> -<!-- Created by GNU Texinfo 6.7, http://www.gnu.org/software/texinfo/ --> + --> +<!-- Created by GNU Texinfo 6.7, http://www.gnu.org/software/texinfo/ --> <head> -<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> +<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Particles (The Chickadee Game Toolkit)</title> -<meta name="description" content="Particles (The Chickadee Game Toolkit)"> -<meta name="keywords" content="Particles (The Chickadee Game Toolkit)"> -<meta name="resource-type" content="document"> -<meta name="distribution" content="global"> -<meta name="Generator" content="makeinfo"> -<link href="index.html" rel="start" title="Top"> -<link href="Index.html" rel="index" title="Index"> -<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents"> -<link href="Graphics.html" rel="up" title="Graphics"> -<link href="Tile-Maps.html" rel="next" title="Tile Maps"> -<link href="Vector-Paths.html" rel="prev" title="Vector Paths"> +<meta name="description" content="Particles (The Chickadee Game Toolkit)" /> +<meta name="keywords" content="Particles (The Chickadee Game Toolkit)" /> +<meta name="resource-type" content="document" /> +<meta name="distribution" content="global" /> +<meta name="Generator" content="makeinfo" /> +<link href="index.html" rel="start" title="Top" /> +<link href="Index.html" rel="index" title="Index" /> +<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents" /> +<link href="Graphics.html" rel="up" title="Graphics" /> +<link href="Tile-Maps.html" rel="next" title="Tile Maps" /> +<link href="Vector-Paths.html" rel="prev" title="Vector Paths" /> <style type="text/css"> -<!-- +<!-- a.summary-letter {text-decoration: none} blockquote.indentedblock {margin-right: 0em} div.display {margin-left: 3.2em} @@ -72,9 +72,9 @@ ul.no-bullet {list-style: none} } } ---> +--> </style> -<link rel="stylesheet" type="text/css" href="https://dthompson.us/css/dthompson.css"> +<link rel="stylesheet" type="text/css" href="https://dthompson.us/css/dthompson.css" /> </head> @@ -84,7 +84,7 @@ ul.no-bullet {list-style: none} <p> Next: <a href="Tile-Maps.html" accesskey="n" rel="next">Tile Maps</a>, Previous: <a href="Vector-Paths.html" accesskey="p" rel="prev">Vector Paths</a>, Up: <a href="Graphics.html" accesskey="u" rel="up">Graphics</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Index.html" title="Index" rel="index">Index</a>]</p> </div> -<hr> +<hr /> <span id="Particles-1"></span><h4 class="subsection">5.3.6 Particles</h4> <p>Effects like smoke, fire, sparks, etc. are often achieved by animating @@ -99,10 +99,10 @@ manipulating particle systems. <p>Below is an example of a very simple particle system that utilizes nearly all of the default configuration settings: </p> -<div class="example"> -<pre class="example">(use-modules (chickadee graphics particles)) -(define texture (load-image "particle.png")) -(define particles (make-particles 2000 #:texture texture)) +<div class="lisp"> +<pre class="lisp"><span class="syntax-open">(</span><span class="syntax-symbol">use-modules</span> <span class="syntax-open">(</span><span class="syntax-symbol">chickadee</span> <span class="syntax-symbol">graphics</span> <span class="syntax-symbol">particles</span><span class="syntax-close">)</span><span class="syntax-close">)</span> +<span class="syntax-open">(</span><span class="syntax-special">define</span> <span class="syntax-symbol">texture</span> <span class="syntax-open">(</span><span class="syntax-symbol">load-image</span> <span class="syntax-string">"particle.png"</span><span class="syntax-close">)</span><span class="syntax-close">)</span> +<span class="syntax-open">(</span><span class="syntax-special">define</span> <span class="syntax-symbol">particles</span> <span class="syntax-open">(</span><span class="syntax-symbol">make-particles</span> <span class="syntax-symbol">2000</span> <span class="syntax-keyword">#:texture</span> <span class="syntax-symbol">texture</span><span class="syntax-close">)</span><span class="syntax-close">)</span> </pre></div> <p>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. <p>Below is an example of an emitter that spawns 16 particles per frame at the coordinates <code>(320, 240)</code>: </p> -<div class="example"> -<pre class="example">(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) +<div class="lisp"> +<pre class="lisp"><span class="syntax-open">(</span><span class="syntax-symbol">use-modules</span> <span class="syntax-open">(</span><span class="syntax-symbol">chickadee</span> <span class="syntax-symbol">math</span> <span class="syntax-symbol">rect</span><span class="syntax-close">)</span><span class="syntax-close">)</span> +<span class="syntax-open">(</span><span class="syntax-special">define</span> <span class="syntax-symbol">emitter</span> <span class="syntax-open">(</span><span class="syntax-symbol">make-particle-emitter</span> <span class="syntax-open">(</span><span class="syntax-symbol">make-rect</span> <span class="syntax-symbol">0.0</span> <span class="syntax-symbol">0.0</span> <span class="syntax-symbol">320.0</span> <span class="syntax-symbol">240.0</span><span class="syntax-close">)</span> <span class="syntax-symbol">16</span><span class="syntax-close">)</span><span class="syntax-close">)</span> +<span class="syntax-open">(</span><span class="syntax-symbol">add-particle-emitter</span> <span class="syntax-symbol">particles</span> <span class="syntax-symbol">emitter</span><span class="syntax-close">)</span> </pre></div> <p>To see all of the tweakable knobs and switches, read on! @@ -237,10 +237,10 @@ frame. <dl> <dt id="index-remove_002dparticle_002demitter">Procedure: <strong>remove-particle-emitter</strong> <em>particles emitter</em></dt> -<dd><p>Remove <var>emitter</var> to <var>particles</var> +<dd><p>Remove <var>emitter</var> from <var>particles</var> </p></dd></dl> -<hr> +<hr /> <div class="header"> <p> Next: <a href="Tile-Maps.html" accesskey="n" rel="next">Tile Maps</a>, Previous: <a href="Vector-Paths.html" accesskey="p" rel="prev">Vector Paths</a>, Up: <a href="Graphics.html" accesskey="u" rel="up">Graphics</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Index.html" title="Index" rel="index">Index</a>]</p> |