HTML5 Canvas 2D Library
 

start Library Method

Short Description: Starts the currently defined Animation

Signature: taccgl.start ([s])
Class: taccgl Class
 

Starts running of the currently defined animation.

Normally (if the parameter s is not used in the way discussed below) the library automatically shows an epilepsy warning on the first invocation of this method, like

EPILEPSY WARNING, READ BEFORE VIEWING THE FOLLOWING ANIMATIONS, BEFORE USING A VIDEO GAME SYSTEM, BEFORE PROGRAMMING, WATCHING AND PUTTING ANIMATIONS ONLINE

MEDICAL RESEARCH INDICATES A SMALL PERCENTAGE OF THE POPULATION MAY EXPERIENCE EPILEPTIC SEIZURES OR SEIZURE-LIKE SYMPTOMS EXPOSED TO CERTAIN STIMULI, INCLUDING, WITHOUT LIMITATION, LIGHT PATTERNS, FLASHING LIGHTS OR CERTAIN PATTERNS OF BACKGROUND ON A TELEVISION SCREEN, OR VIDEO MONITOR. EXPOSURE TO THESE STIMULI WHILE PLAYING VIDEO GAMES OR WATCHING ANIMATIONS MAY INDUCE AN EPILEPTIC SEIZURE OR SEIZURE LIKE SYMPTOMS IN THESE INDIVIDUALS. CERTAIN CONDITIONS MAY INDUCE EPILEPTIC SYMPTOMS EVEN IN PERSONS WHO HAVE NO PRIOR HISTORY OF SEIZURES OF EPILEPSY. IF YOU EXPERIENCE ANY OF THE FOLLOWING SYMPTOMS WHILE PLAYING A VIDEO GAME OR WATCH ANIMATIONS --- DIZZINESS, ALTERED VISION, EYE OR MUSCLE TWITCHES, LOSS OF AWARENESS, DISORIENTATION, AND INVOLUNTARY MOVEMENT OR CONVULSIONS --- IMMEDIATELY DISCONTINUE USE AND CONSULT YOUR PHYSICAN BEFORE PLAY OR WATCHING ANIMATIONS.

See W3C guidelines on this topic. Please be aware of this problem and design your animations accordingly. Take into account that even if taccgl™ displays the message for you it might not work well because some people e.g. children might not carefully read or understand the message (see W3C guidelines).

When evaluating and testing animations bear in mind that animations look and operate differently on different clients, e.g. animations might appear bumpy because frames are lost due to a slow client or the size of the drawing canvas might dynamically change while an animation is running, based on the performance of the client. See Restrictions. Also note that a running animation and its transitions can still be updated while running and changes might take effect without calling start again, see Animations and Transitions, section Updating an Animation and following. It is also a good idea to use stop and begin before an animation to ensure that no unwanted transitions get run in parallel.

You can suppress the warning by passing the string 'no epilepsy warning' as string parameter s to this start function: taccgl.start('no epilepsy warning').

Customizing the Warning Message

You can customize the warning text by assigning the new text to the variable taccgl_epwarning. You can also customize the CSS style of the warning box or the HTML of the warning box by overriding the taccgl.epWarningStyle and taccgl.epWarningText methods of taccgl™. Both methods must return a string; the first method must return the style, the second method must return the HTML. For example taccgl.epWarningStyle=function () { return "position:fixed; width:700px; top:20px; left:20px; z-index:10000;display:none;background-color:white; padding:20px; border: ridge 3px silver"; } sets the default style.

Next Page:taccgl.restart - Restarts the current animation from the beginning
Previous Page: taccgl.begin - Starts definition of a new animation
Please Add a Comment or Question, click here!