Fork me on GitHub Ejecta

A Fast, Open Source JavaScript, Canvas & Audio Implementation for iOS

e·jec·ta, noun – debris that is ejected during the formation of an impact crater

Ejecta is like a Browser without the Browser. It's specially crafted for Games and Animations. It has no DIVs, no Tables, no Forms – only Canvas and Audio elements. This focus makes it fast.

JavaScript code is executed directly by a JavaScript VM (JavaScriptCore), the HTML5 Canvas 2D and WebGL API is implemented in native code with OpenGL, Audio is implemented with OpenAL. Several other APIs (touch, accelerometer, localStorage) behave like those in a real browser.

Many HTML5 Games run out of the box, or with minimal modifications – with better performance, better sound support, Game Center integration and more.

Perfect With Impact, Plays Nice With Others

While Ejecta works nicely with straight forward Canvas animations, it grew out of a project to make the Impact Game Engine work natively on the iPhone. Chances are your Impact games run without modification – apart from controls and screen size – on Ejecta.

Older Ejecta versions (then called iOSImpact) implemented a lot of hacks and shortcuts to make it work. Ejecta mimics the HTML5 APIs more closely and thus works with a variety of Canvas libraries, including CAAT and ThreeJS.

App Store Compatible

The JavaScriptCore API is private on iOS, which means you're not allowed to link to it. Ejecta therefore comes bundled with its own version of the library to circumvent these restrictions. Many games made with Ejecta found their way into the App Store without a problem. Have a look at X-Type, Biolab Disaster, Kitchen Fury, Steamclash or Blockits.

Device Support

Ejecta runs on all iOS devices that support the armv7 instruction set: the iPhone3GS and newer as well as all iPads including the first generation. It supports the retina resolution of all devices and the taller iPhone5 screen size.