For a quick one-and-a-half minute introduction, watch this brief overview video. Then, download the version for Windows or OS X, extract it to your Illustrator plug-ins folder, and spend some time on the documentation page, where you’ll find 10 tutorial videos that total around 25 minutes in length. Thomas Lewis wrote a nice article titled Introducing the Ai to Canvas Plug-In that provides even more background and context.
If you’ve read my blog over the years, you’ve probably heard me talk about the Adobe Illustrator to XAML export plug-in I wrote back in 2005. Well, about four months ago, Thomas and I were chatting at lunch, and he was evangelizing to me about the new canvas element in HTML5. As we talked, it became clear that canvas was an element that could benefit from some tooling. So after lunch, I did a search, and most of the tutorials and information I found used very simplistic smiley faces or basic shapes to demonstrate the canvas features. The light bulb went off, and I wondered if a version of my XAML plug-in could be re-tooled to work with canvas.
If you’re interested in the low-level details about how Ai->Canvas is built, you might enjoy Charles Torre’s interview with me on Channel 9. In the interview, I talk about fun topics like arc-length parameterization that are sure to be a hit at parties. Well…at least the kind of parties I attend. :-) Strike that…I don’t really attend parties…
While we’re on the topic of HTML5, you should also check out the Adobe Illustrator CS5 HTML5 Pack (from Adobe Labs). Their release extends the fantastic SVG support that’s been in Illustrator for years, and it’s great to see a tool like this from Adobe themselves. I can’t wait to see where they take it.
Over the months, I’ve built-up a bunch of test files for the plug-in (over 100). Most of them illustrate very simple features, and they’re not much to look at. Here are a few that might be interesting to folks:
The only file that’s been edited is the Clock example, since it’s no fun looking at a clock that has the wrong time. :-) Otherwise, all of these are directly out of the Ai->Canvas plug-in.
Thank you to everyone who helped test early versions of the plug-in, including many of the companies who created the HTML5-based sites for Beauty of the Web. Your insights absolutely helped to refine the feature-set.
I’d love to hear your feedback about the plug-in so that the next version is even better. Also, if you create any fun projects…even if you’re only using it to export artwork, add a comment along with a URL.
Since the launch of the Ai->Canvas plug-in for Adobe Illustrator a few days ago, I’ve collected a bunch of questions via e-mail, Twitter, blog post comments, and forums. This list should eventually make its way to the official Ai->Canvas project page on MIX Online, but in the meantime, I’ve included a first version of the FAQ in this post. If you have other questions that you’d like addressed on this list, please leave a comment or drop us an e-mail. And thank you for all of the encouragement, blog posts, and tweets!
Q. Why would I ever want to export vector graphics to a HTML5 canvas element when I can just use Illustrator to export to SVG? A. Excellent question! If you’re building a HTML5 application that can do everything with SVG, there’s no reason to use Ai->Canvas (and in that case, you should check out the Adobe Illustrator CS5 HTML5 Pack). However, if you’re building a canvas-based application or game that requires lower-level access and you need to draw more than simple bitmaps, Ai->Canvas makes the job much easier. Without a tool like Ai->Canvas, designers and developers are forced to manually write hundreds of lines of code like: context.bezierCurveTo(5.4, -1.5, 2.7, -1.5, 1.5, -0.5);. No fun at all.
Q. Can I use Ai->Canvas to convert .ai files without installing Adobe Illustrator? A. No. Ai->Canvas is not a file conversion tool. It runs within Illustrator so that it has direct access to the internal representation of your artwork. This enables very high-fidelity output and also simplifies the workflow. If you don’t have Adobe Illustrator and you’d like to try Ai->Canvas, you can download a free 30-day trial
Q. When using Internet Explorer 9 Beta 1, how do I prevent the “blocked content” alert when loading the exported HTML file? A. Choose Internet Options from the Tools menu (or press Alt + X), then click the Advanced tab. Scroll down to the Security section and make sure that “Allow active content to run in files on My Computer*” is checked. After you enable the setting and click OK, restart Internet Explorer for the changes to take effect.
Q. Which versions of Windows does Ai->Canvas work with? A. The PC version of Ai->Canvas works with Windows Vista and Windows 7. Due to some OS-specific function calls, it will not work with Windows XP.
Q. Does Ai->Canvas work with the trial version of Adobe Illustrator? A. Yes. If you’d like to try Ai->Canvas and you don’t have Adobe Illustrator, you can download a free 30-day trial.
Q. In the tutorial videos, the right-click “View source” menu in Internet Explorer 9 Beta 1 brings up Visual Studio 2010. How can I configure the same behavior? A. Press F12 to bring up the developer tools window. Choose File/Customize Internet Explorer view source/Other… Then browse to your Visual Studio folder (usually something like C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE). Select the devenv.exe file and click Open.
Q. Are there plans to release the Ai->Canvas source code? A. We had hoped to provide the source code for the plug-in, but the Adobe Illustrator CS3 SDK License Agreement (EULA) in section 2 appears to prohibit the release of source code. It sounds like it allows object code, but that wouldn’t help anyone who wanted to understand/modify/extend the plug-in.
Q. Why are my international characters lost during export? A. While all text is handled as Unicode within the Ai->Canvas plug-in, it is converted to basic ASCII characters in the output stage. This is a known issue that is on the list to be addressed in a future version.
Q. How can I include complex animation properties when Illustrator CS3/CS4 has a 100-character layer name limit? A. Each property has an equivalent short name that uses fewer characters. For example, the rotate-timing-function property can be shortened to r-t-f, saving 17 characters. Some values also have short versions. For example, origin: center can be shortened to o:c. See the Ai->Canvas Extended Documentation for details.
Q. Is there a way to visualize the timing (easing) functions that are included in the Ai2CanvasAnimation.js file? A. Yes. This HTML file draws a line graph for each of the built-in timing functions. The x-axis represents the input value (from 0.0 – 1.0), and the y-axis represents the output value (from 0.0 – 1.0).
Q. Are there plans to create a version of Ai->Canvas for Inkscape, Fireworks, [fill in app name here]? A. Not at this time. Because the Ai->Canvas plug-in is written using the Adobe Illustrator SDK (software development kit), it is very specific to the internal workings of Illustrator. While the concepts could certainly be re-purposed for other drawing applications, it’s likely that very little of the actual code could be re-used.