Ejecta is a fast, open source JavaScript, Canvas & Audio implementation for cross-platform. Think of it as a Browser that can only display a Canvas element.
More info & Documentation: http://impactjs.com/ejecta
Ejecta is published under the MIT Open Source License.
###Setup and Install for Android:
- Install Android NDK first.
- Install Android SDK then Eclipse and ADT OR, Android Studio
cd <your project dir>
then run/path/to/your/android-ndk-r9/ndk-build
to compile libejecta.so and libJavaScriptCore.so- Open in your favourite IDE and build.
Note for Windows users:-
Current branches no longer work on Windows after the OpenGLES update. Please use the older release https://github.com/aogilvie/Ejecta-X/releases/tag/v0.9.9-original
For an example application in the sample
folder, name Ejecta-X.apk
.
For XHR, remember to add <uses-permission android:name="android.permission.INTERNET"/>
to the Android Manifest.
Register for Java Events
Set an event listener on your activity as follows;
((EjectaGLSurfaceView)mGLView).setEjectaEventListener(new EjectaRenderer.EjectaEventListener() {
@Override
public void onCanvasCreated() {
}
});
loadJavaScriptFile(String filename)
Will load a JavaScript file into Ejecta-X. File should be relative from assets/build/<filename>
.
For example to load a file at assets/build/loadme.js
would be;
((EjectaGLSurfaceView)mGLView).loadJavaScriptFile("loadme.js")
Any kind of help is welcomed!
We work from develop
branch and PR into develop
branch. Stable versions are pushed from develop
to master
and then tagged.
Just pick an enchancement (feature) issue or a bug issue from the open issues list. Thanks for your help!