Learning Three.js

or WebGL for Dummies

Three.js Sport Car on iOS at 40fps

This post is about iOS and three.js. It may seem surprising, but iOS supports WebGL since version 4.2. There is a tough limitation tho, it is available only in their advertisment plateform, iAds, not in safari browser. I got a ipad2 so i experimented a bit with three.js on iOS to see what is going on. Most WebGL examples from three.js and tQuery are working nicely on iOS.

The screencast below shows an ipad2 running the car demo we did last week in “Sport Car in WebGL” post. It runs at 40fps on the video. Rather good! Especially when you know the demo isn’t optimized. This car is way too detailed. One could reduce the size of this model by half without loosing much. So on mobile, the Good part is that fps are good. The Bad part is that speed is slower and balanced differently. This unbalanced part worries me a bit i admit. We need to better understand the mobile plateform. But hey, 40fps is quite good, way enougth to make a game!

Experimenting with WebGL on iOS

Yesterday, daeken published a WebGL Enabler for iOS. It enables WebGL in the browser for jailbroken iOS devices. Or if you prefere a less invasive solution, not requiring to jailbreak your devices. You can use WebGL Browser made by Ben Vanik , aka @benvanik on twitter. He is wellknow for WebGL Inspector.

By the way, WebGL Browser and WebGL Enabler, are both based on a similar trick. It has been discovered by Nathan de Vries who told about it in this excelent post. A very good read to understand the underlying details! Unfortuntly this is using an unofficial API… so it is impossible to get it for the apps store unfortunatly.

WebGL Status on Mobile

WebGL is starting to be hot on mobile. blackberry playbook2 got it by default. boot on gecko got it too with firefox mobile. It isn’t enabled on android and iOS tho, the 2 majors. Maybe we will have more info in june with google.io and apple event. google got chrome on android. iOS already got support, this is more a matter of policy. So lets hope google will announce WebGL support for chrome mobile. and apple will announce they accepts WebGL on apps store applications. I am an optimist personn, i hope :)


WebGL is coming hard on mobile. three.js and tQuery already work on it. We need the 2 majors mobile OS to support it tho. It think having it on android and ios would significantly change WebGL landscape. Meanwhile you can already play with it, and do minigames with it, thus be ready when needed :)

That’s all to today folks. Have fun :)