Important: This repository is no longer maintained
Issues and pull requests will no longer be addressed. However, the doors are always open to add maintainers.
Please have a look at alternatives such as Crosswalk or Cocoon.
Ejecta-X
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.
How to use
###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
Sample
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.
Native Events
Register for Java Events
Set an event listener on your activity as follows;
((EjectaGLSurfaceView)mGLView).setEjectaEventListener(new EjectaRenderer.EjectaEventListener() {
@Override
public void onCanvasCreated() {
}
});
Native APIs
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")
Commit to Ejecta-X
Workflow
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.
Where to start?
Just pick an enchancement (feature) issue or a bug issue from the open issues list. Thanks for your help!