要使用 Canvas 模式,可以在 build 出来的 main.js 中,修改
var option = {
//width: width,
//height: height,
id: ‘GameCanvas’,
scenes: settings.scenes,
debugMode: settings.debug ? cc.DebugMode.INFO : cc.DebugMode.ERROR,
showFPS: settings.debug,
frameRate: 60,
jsList: jsList,
groupList: settings.groupList,
collisionMatrix: settings.collisionMatrix
};
为
var option = {
//width: width,
//height: height,
id: ‘GameCanvas’,
scenes: settings.scenes,
renderMode: 1, // 强制 Canvas 模式渲染
debugMode: settings.debug ? cc.DebugMode.INFO : cc.DebugMode.ERROR,
showFPS: settings.debug,
frameRate: 60,
jsList: jsList,
groupList: settings.groupList,
collisionMatrix: settings.collisionMatrix
};
https://www.processon.com/i/568c6ea4e4b0e51d149a085f
这个网站解决了大家开始设计阶段的问题,轻量级的各种设计模型,强烈推荐