planets Posted May 1, 2014 Share Posted May 1, 2014 Hello people, my first post here, so be gentle with my noobness. I was wondering how you can read out a variable or something to be able to know if pixi.js is running in canvas or webgl mode. Is there some var that I can simply read out? What command do I have to read out, to accomplish this? Thanks. Quote Link to comment Share on other sites More sharing options...
bubamara Posted May 1, 2014 Share Posted May 1, 2014 var renderer = new PIXI.autoDetectRenderer(400, 300); if (renderer.type == PIXI.WEBGL_RENDERER) { console.log('Using WebGL'); } else { console.log('Using Canvas'); }; Quote Link to comment Share on other sites More sharing options...
planets Posted May 2, 2014 Author Share Posted May 2, 2014 var renderer = new PIXI.autoDetectRenderer(400, 300);if (renderer.type == PIXI.WEBGL_RENDERER) { console.log('Using WebGL');} else { console.log('Using Canvas');};Thank you. So easy to check. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.