Orbit APIs To Use In Your Movie Movie Controls Stop and play a movie movie.play(); movie.stop(); movie.pause(); Control movie timeline movie.goto(2); // Goto frame 2 movie.goto('10s'); // Goto 10 seconds after start Stage Set background color stage.setBackgroundColor('red'); Set Framerate of the movie (frames per second) stage.setFramerate(30); Freeze and unfreeze the movie stage.freeze(); stage.unfreeze(); Draw a Path Create a new shape with a specified path. shape = new Path(); shape.moveTo(0, 0).lineTo(100, 0); shape.addTo(stage); Use SVG-like paths to create the same shape. Draw a rectangle Overview new Rect(x, y, width, height, cornerRadius) Draw a rectangle, at 0x0 of size 100x100 (still invisible) new Rect(0, 0, 100, 100).addTo(stage); Rectangle, with rounded corners of radius 5px (still invisible) new Rect(0, 0, 100, 100, 5).addTo(stage); Red rectangle with green border, 10px wide (visible) Rectangle with 1px borders of color 0xFFAABB, no fill color Half opaque rectangle of color rgba(100,100,255,0.5) Bitmap
Designing Docs for Developers Last week we re-designed our documentation, primarily in terms of organization and content, but we also made the visual design fit in with our homepage. I decided to write about our experiences to get your feedback to inform future updates and also to share the recipe we came up with for designing docs for developers. What do you think of the results? How do you like to see docs organized and presented? 4 top-level categories3 questions the front-page must answerNo social features or promotional materials It’s a work in progress and we’d love your feedback. Here’s where we started from… The good news was that we knew the very basics of the content were sound – plenty of users are building on our platform using this content. But we could tell something needed to change since we were getting support requests that seemed to point to a difficulty finding the right information with this design. What we did Fewer top-level categories Visual design fitting in with homepage What we didn’t do Next steps
docco Docco is a quick-and-dirty, hundred-line-long, literate-programming-style documentation generator. It produces HTML that displays your comments alongside your code. Comments are passed through Markdown, and code is passed through Pygments syntax highlighting. This page is the result of running Docco against its own source file. If you install Docco, you can run it from the command-line: docco src/*.coffee ...will generate linked HTML documentation for the named source files, saving it into a docs folder. The source for Docco is available on GitHub, and released under the MIT license. To install Docco, first make sure you have Node.js, Pygments (install the latest dev version of Pygments from its Mercurial repo), and CoffeeScript. sudo npm install docco If Node.js doesn't run on your platform, or you'd prefer a more convenient package, get Rocco, the Ruby port that's available as a gem.