Selecting rendering engine

How do you select which rendering engine to use in cocos2d-js?

I understand there’re options between HTML5 vs Canvas. Can you force the use of one vs another?

Thanks!

You can force it in project.json of your project

{
    "debugMode" : 0,
    "showFPS" : false,
    "frameRate" : 60,
    "id" : "gameCanvas",
    "renderMode" : 1,
    "engineDir":"frameworks/cocos2d-html5",

    "modules" : ["core"],

    "jsList" : [
    ]
}

The renderMode value:

0: automatic
1: Canvas
2: WebGL (when it’s possible)

Regarding the current status of webgl, even if it have been supported on latest android system, but the performance and render result vary in devices and browsers, and after testing, we decide to use canvas render mode on android all the time (even if you select webgl). And iOS 8 will start to support webgl, we will test it and maybe activated it for iOS 8

Awesome info! Thanks pandamicro.