reanimate/docs
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Paul Gardiner ed1c0ba6c1
Hierarchical sprites and objects (#269)
* Separate sprite creation from adding to scene

This is work towards supporting hierarchical sprites and objects:
the Sprite data definition is updated to include it's generator and
a new function newSpritePart is added to create a sprite without
adding the generator to the scene, making it invisible. Later commits
will provide a way for sprites created by newSpritePart to be used
in the definitions of other sprites.

* Support use of one sprite within another

This is work towards supporting hierarchical sprites and objects.
A new function, renderSprite, is defined that exposes its generator
in the form of a Frame context that can be used in the definitions
of other sprites.

Some internal types have had to be changed to support renderSprite. The
frame context created by renderSprite runs the sprite's generator, and must
supply the scene duration to it, and so the frame type has had to be updated
also to be dependent on the scene duration. In turn, a sprite's effects
mapping needs to be able to interpret a frame context in the implementation
of spriteModify, and so the effects mapping has also had to be made
dependent on the scene duration.

* Support use of objects within hierarchical sprites

Allow use of objects as leaves within a hierarchically
defined sprite. Two new functions are added:

  The function newObjectPart creates an object, not immediately
  added to the scene, so invisible even after calls to oShow, and
  mainfesting only if used within the definition of a sprite.

  The function renderObject exposes the generator of the object's
  internal sprite in the form of a frame context that can be used
  in the definitions of other sprites.

* Add example script showing use of newObjectPart and renderObject

This is a slightly contrived example, chosen to show an animation that
is difficult to contruct other than hiearchically. Two strings are placed
one over the other. They are shown using oDraw which requires their being
Objects. The overlapping strings are faded out, which requires
opacity to be applied at the group level: fading each individually would
lead to the lower string becoming visible through the upper one as opacity
is decreased.
2022-06-02 15:40:56 +02:00
..
changelog Add chalkduster to changelog. 2020-10-07 13:48:09 +08:00
gifs Hierarchical sprites and objects (#269) 2022-06-02 15:40:56 +02:00
changelog-2020-10.md Add chalkduster to changelog. 2020-10-07 13:48:09 +08:00
changelog.md Add monthly changelog entries to docs. (#176) 2020-10-05 15:35:19 +08:00
discord_bot.md Discord bot article (#111) 2020-07-16 22:55:34 +08:00
fix.css Docs: Don't justify navigation. 2020-09-20 09:31:36 +08:00
font_catalogue.md How-To article about the LaTeX font catalogue (#174) 2020-10-04 00:17:15 +08:00
font_script.hs How-To: Use system fonts (#175) 2020-10-05 11:43:15 +08:00
font_system.md How-To: Use system fonts (#175) 2020-10-05 11:43:15 +08:00
fonts.md Draft article about fonts (#95) 2020-06-24 22:02:09 +08:00
gen_doc_gifs.sh Add documentation for 'withViewBox'. 2020-05-14 10:07:05 +08:00
glue_tut.md LaTeX and objects tutorial (#156) 2020-09-20 09:08:18 +08:00
index.md Add documentation on obtaining dependencies on Windows 2021-10-17 10:13:42 +08:00
introduction.md Fix doc references. 2021-07-04 23:23:46 +08:00
morphology.md Feature morph (#62) 2020-05-14 15:14:29 +08:00
requirements.txt Feature morph (#62) 2020-05-14 15:14:29 +08:00
showcase_colortheory.md Use https when possible. 2020-10-01 14:40:05 +08:00
tut_equation.md Typo: text is left-aligned. 2021-03-11 14:59:16 +08:00
voice.md Make video sizes responsive. 2020-06-15 14:37:28 +08:00