* 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.
This pull request proposes an additional subsection in the documentation explaining to Windows users how they can obtain the FFmpeg, dvisvgm, POV-Ray, Blender, rsvg-convert, Inkscape, ImageMagick and LaTeX/XeLaTex dependencies.
* Remove redundant brackets
* Various hlint fixes
* Remove unused language pragrams and other fixes
* Use addStatic more consistently in examples
* Rename remaining usages of sceneAnimation to scene
ImageMagick version 7 provides command 'magick' (as well as legacy 'convert'), is readily available on Windows but is not, currently, readily available on Ubuntu.
On Windows, the name of ImageMagick's `convert` utility clashes with Microsoft's `C:\Windows\System32\convert.exe` utility. Using `magick`, if available, avoids the conflict.
For clarity and to be command name-agnostic, the raster option name is changed from 'convert' (the command) to 'imagemagick' (the name of the software).
For consistency with the version 7 command name, references in the code to 'convert' are changed to 'magick', throughout.