Actually running WebGL or Canvas when doing Html5 stuff?

173 views
Skip to first unread message

Cambiata

unread,
Jun 23, 2014, 10:46:26 AM6/23/14
to haxe...@googlegroups.com
I'm planning a Haxe html5 project, and looking into OpenFL, pixi.js and IvanK.js.
They are all WebGL solutions with Canvas fallback, aren't they?
(OpenFL html5 target is built on pixi.js nowadays, isn't it?)

So, how do I at runtime find out if my solution is actually using WebGL (hw accelleration and stuff) or canvas?

Jonas

Sam MacPherson

unread,
Jun 23, 2014, 2:10:49 PM6/23/14
to haxe...@googlegroups.com
pixi.js is WebGL with canvas fallback. Don't know so much about the other two. If you are wanting to do 2D canvas stuff I would recommend taking a look at Phaser. I've been using it for the past little bit, and it works great for getting things done reliably and cross-platform. Phaser is built on pixi.js, and you can specify whether you want canvas rendering or WebGL (or auto detect).

I've got Phaser externs on haxelib: haxelib install phaser

Cambiata

unread,
Jun 23, 2014, 3:16:36 PM6/23/14
to haxe...@googlegroups.com
Thank you, Sam!

Phaser is definitely an option! Cool with the possibility to specify WebGL or canvas!
Will try it out!

J

Confidant

unread,
Jun 24, 2014, 11:45:54 AM6/24/14
to haxe...@googlegroups.com
Maybe you know this but for the record the new HTML5 backend for OpenFL is based on Pixi.js.
Reply all
Reply to author
Forward
0 new messages