Compositions in Purple DS are similar to groups in Photoshop or similar programs. However, a composition goes beyond a simple grouping and can be more like a stage within a stage:
All functions of a stage are available within a composition. A composition can have its own list of elements, its own scenes, and its own keyframe animations.
You can use a composition in many use cases. The following are the most common ones:
In the simplest case, a composition is only used to group several elements in order to display them together as a pop-up .
- Advanced interactions
Compositions can significantly increase the ability to interact with a page. For example, a composition can easily be use to crete a scrollable image gallery on a page
- Nested animations
Since their own timeline, complex animations can be implemented with compositions. For instance, this allows for the creation of a flying butterfly that flaps its wings. The butterfly is in an interior composition containing the body of the butterfly. The butterfly's flight curve is animated on the outer stage. The butterfly's wings are animated. (see video tutorial " Purple DS Composer - Animations with Compositions ")
You can find examples of using a composition in the "Picture Gallery" sample, which is provided upon starting the Composer.
You can find our video tutorial on compositions on YouTube: