I’ve put together some CSS transitions that I’ve created in the past on this demo. It uses JS initially to set up the elements and the right CSS properties. After that all the looping animation is handled by CSS transitions. You’re gonna need a WebKit based browser to view this demo.
I have just updated my Cube Defense Demo to work in both WebGL enabled WebKit and FireFox. It is still 10-20fps slower compared to WebKit, but hey, at least it works! I would like to thank those who emailed me tips on making it compatible for both.
To share my experience, these are some of the things I had to change to make it work for WebKit and FireFox:
• Use UNSIGNED_SHORT instead of UNSIGNED_BYTE • Use CanvasUnsignedShortArray instead of CanvasUnsignedByteArray • For FireFox, use WebGLFloatArray instead of CanvasFloatArray. This will make things faster. • ARRAY_BUFFER rather than ELEMENT_ARRAY_BUFFER
• “clearDepth” for WebKit, “clearDepthf” for FireFox
• In “bindBuffer” function use null instead of 0
If you have anything else to add, share your thoughts! *Update: (November 18th, 09)
This is a little outdated now, so I crossed out some irrelevent stuff. Also, in the lastest WebKit, anything that was CanvasXXXXXArray is now WebGLXXXXXArray.
This is a playable demo of a game I’ve been working on with WebGL. As per usual, this will only run in WebKit Nightlies build. No bias or anything, but WebGL runs too slow for the game to work in FireFox Minefield. (It will work in both WebGL enalbed WebKit and Firefox, but WebKit will perform better.) This is also my first take on trying to make a tower defense style game, so don’t expect too much.
PhoneGap AIR Simulator is specifically made for testing PhoneGap projects, and go beyond Apple’s iPhone simulator as well as supporting Android application development and Blackberry. As this is an Adobe AIR application, it can run on Mac, Windows and Linux.
One of the key feature is the accelerometer console powered by Papervision. You can tilt/rotate a virtual iPhone in 3D space which passes simulated X/Y/Z accelerometer value to the navigator in phonegap.js. Above screenshot is a sample demo game that I made with HTML/javascript/CSS and PhoneGap which you can try out in the simulator demo below. Tilt The simulator also detects certain PhoneGap javascript methods such as “vibrate()” or “sound()” which gets translated into an action in AIR.
In the near future, we are adding:
- Geolocation console - uses Google Maps API to simulate GPS values
- Firebug Lite integration
These downloads are only to show work in progress and is not ready for actual testing of PhoneGap projects, but stay tuned fore more updates!