Cocos2d-html5白色屏幕问题

Cocos2d-html5 white screen issue.

本文关键字:问题 屏幕 白色 Cocos2d-html5      更新时间:2023-09-26

我有cocos2d html5游戏。它在PC和所有浏览器上运行良好,没有错误,但在Tizen平台上,它只显示白色屏幕。看起来所有的更新循环都正常工作,但绘图有问题。启动时,统计信息和背景闪烁片刻,但随后只显示空白的白色屏幕。没有javascript错误。

此行为从2.2版本开始。2.1.5我没有这个问题。

有人能帮我吗?

我刚刚检查了cocos2d html repo(https://github.com/cocos2d/cocos2d-html5/)。

提交在cocos2d/platform/CApplication.js中添加的27f140a13bcd2c4920部分代码

if(cc.Browser.isMobile){
    ...
    cc._addBottomTag();
}
...
cc._addBottomTag = function () {
    var bottom = document.createElement("div");
    bottom.id = "bottom";
    bottom.style.border = bottom.style.margin = bottom.style.padding =    bottom.style.height = bottom.style.lineHeight = bottom.style.fontSize = "0px";
    document.body.appendChild(bottom);
    window.location.href="#bottom";
};

此代码仅针对移动浏览器执行,并导致上述问题。