Skip to content

Commit

Permalink
Merge branch 'master' of github.com:3dseals/Ejecta-X
Browse files Browse the repository at this point in the history
Conflicts:
	sources/ejecta/EJApp.cpp
	sources/ejecta/EJApp.h
	sources/ejecta/EJUtils/EJBindingTouchInput.h
  • Loading branch information
3dseals committed Oct 23, 2013
2 parents 1d96dad + 09c3ca5 commit b064dbf
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 9 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ Android:
4. run ndk-build complie libejecta.so and libJavaScriptCore.so
5. run eclipse for android apk.

For an example application in the `App` folder, rename `Ejecta-android.apk`.
For an example application in the `sample` folder, name `Ejecta-X.apk`.
6 changes: 3 additions & 3 deletions project/android/assets/build/ejecta.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ self = window = this;

// The native Image, Audio, HttpRequest and LocalStorage class mimic the real elements
window.Image = Ejecta.Image;
//window.Audio = Ejecta.Audio;
//window.XMLHttpRequest = Ejecta.HttpRequest;
//window.localStorage = new Ejecta.LocalStorage();
window.Audio = Ejecta.Audio;
window.XMLHttpRequest = Ejecta.HttpRequest;
window.localStorage = new Ejecta.LocalStorage();


// Set up a "fake" HTMLElement
Expand Down
15 changes: 10 additions & 5 deletions project/android/assets/build/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,15 +62,20 @@ var animate = function() {
// The vertical touch position controls the number of curves;
// horizontal controls the line width
var maxCurves = 70;
// document.addEventListener( 'touchmove', function( ev ) {
// ctx.lineWidth = (ev.touches[0].pageX/w) * 20;
// maxCurves = Math.floor((ev.touches[0].pageY/h) * curves.length);
// }, false );
document.addEventListener( 'touchmove', function( ev ) {
ctx.lineWidth = (ev.touches[0].pageX/w) * 20;
maxCurves = Math.floor((ev.touches[0].pageY/h) * curves.length);
}, false );


ctx.fillStyle = '#000000';
ctx.fillRect( 0, 0, w, h );

ctx.globalAlpha = 0.5;
ctx.lineWidth = 2;
setInterval( animate, 16 );
setInterval( animate, 16 );

//test XMLHttpRequest
var request = new XMLHttpRequest()
request.open("GET","www.google.com");
request.send()
Binary file added sample/Ejecta-X.apk
Binary file not shown.
Binary file removed sample/Ejecta-X.apk_
Binary file not shown.

0 comments on commit b064dbf

Please sign in to comment.