SVG Dreams Architecture

SVG Dreams library provides ways to generate SVG shapes and animations, connect those shapes with server side scripting to allow developers to keep session, connect with database and more. In the later versions, we plan to add collision detection, keyboard control and multimedia support (html5 audio and video).

1. Shapes

SVG shapes are generated by dedicated classes. Each class extends an abstract named "basicshapeabstract" which keeps the basic common properties and methods of the shapes. All the shape classes include some methods to set or manipulate the features of SVG shapes. addComponent method adds a component to another. Forexample, you should add animation to circle, circle to group and group to SVG. So class hierarchy is based on this addComponent method. Each class which will be added as a component should have a render method. When you add circle to group, the addComponent method in group.class looks for the render method in circle and gets all the related shape tags from that method.

2. Animations

Animation classes generate an animation for a given SVG shape. All the animation classes extend "animateabstract". Animate, AnimateMotion, AnimateTransform and AnimateColor are the animation classes. Animate is capable of changing attributes. AnimateMotion is responsible for the motion of the basic svg shapes. AnimateTransform is responsible for some transformations like scaling or rotating. AnimateColor works with the color of a basic svg shape.

All rights reserved. See license