HaXe Actors
From dis-Emi-A
The Actor system is a standardized way of interfacing and creating visual actors: display elements which have a variety of sequences/animations and traits/properties. Actors have these features:
- implemented as widgets (useful for placement)
- define a standard interface to switch animation sequences
- allow multiple instances with distinct colours/behaviours
- reside within an animation framework strong control over timing/pausing
Included in the library is a small collection of Actors, though this is anticipated to grow as any new project in the library will make use of actors. The actors are written in a special M4 haXe. (The actors can also be written in plain HX, though it would be tedious.)
Contents |
Using Actors
The UseActor demo in the app-tutorial folder shows a simple use of an actor. Simply click around, on/off eye, with/without Control. You can view the source code here.
Refer to HaXe_Library_Tutorials for instructions on building tutorial samples.
For use as FX refer to HaXe FX Builder
Actor Library
The lib/ui/anim/lib directory contains all the included actors.
Creating Actors
Creating actors is not quite as easy as using them, but it isn't too hard. You'll need the full DHLIB package, not just the haxelib installed form.
The Simple actor is meant as a quick demo of the basic features. You can view the instructional code as part of the dhlib package, or online here.
About Bones
Bones are special types of actors which are holders for other actors. They typically define a kind of animation pattern to apply to the other actor as a whole and therefore can be used with any actor.
