Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

IOS HTML Canvas or CSS3 3D Transforms

IOS HTML Canvas or CSS3 3D Transforms

Problem

On the IOS platform:

The HTML5 Canvas element is not hardware accelerated. CSS3 3D Transforms (example: translate3d) are hardware accelerated.

Looking to create a 2d game for IOS using HTML/JavaScript with PhoneGap, should I consider using just the DOM with CSS3?

Has anyone tried this? Are there any benchmarks?

Problem courtesy of: Patrick Lorio

Solution

I also had this concern when building my own 2D game. I initially had problems with animation performance on iOS but I solved it with CSS3 3D transformations. I didn't try Canvas but I really didn't need to once the proper CSS was applied. And the performance remained good with PhoneGap under both iOS and Android versions. Some older Android devices are somewhat slow but I don't think Canvas would help with that either.

As for benchmarking, I did find this which shows both Canvas and CSS3 transitions with images: http://www.spielzeugz.de/html5/compare/

Solution courtesy of: RichApps

Discussion

View additional discussion.



This post first appeared on CSS3 Recipes - The Solution To All Your Style Problems, please read the originial post: here

Share the post

IOS HTML Canvas or CSS3 3D Transforms

×

Subscribe to Css3 Recipes - The Solution To All Your Style Problems

Get updates delivered right to your inbox!

Thank you for your subscription

×