Game Development Reference
In-Depth Information
Drawscript exports code for several platforms, including EaselJS. Because it handles the complex math and code
needed for drawing detailed shapes, you aren't as limited as you might be if you were to write the code yourself.
After you install the extension, open the Drawscript window under Extensions. With it open, make sure you select
the shape you've drawn and click Generate in the Drawscript window. This will generate the necessary code that you
can then copy and bring into your EaselJS project (see Figure 2-4 ).
Figure 2-4. Drawscript in use in Illustrator
The code generated looks a bit different than what you've seen so far when creating graphics. For starters,
it utilizes an API called tiny API that is included in the Graphics class. This is essentially one- or two-letter method
names that act as shortcuts when writing graphics code (see Figure 2-5 ). You can find the complete chart of shortcuts
in the documentation for Graphics .
Figure 2-5. Graphics Tiny API cheat sheet
 
Search WWH ::




Custom Search