下面以web-mobile为例,在web-mobile下
需求1,修改启动图splash
将splash.xxxxx.png的图片替换成自己的splash图片
需求2,将启动图全屏
在style-mobile.xxxxx.css内找到
#splash {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: #171717 url(./splash.03ce1.png) no-repeat center;
background-size: 40%;
}
修改background-size属性为100%
需求3,去掉进度条
在index.html内找到并注释掉
<div class="progress-bar stripes">
<span style="width: 0%"></span>
</div>
在main.xxxxx.js内
function setLoadingDisplay () {
// Loading splash scene
var splash = document.getElementById('splash');
var progressBar = splash.querySelector('.progress-bar span');
cc.loader.onProgress = function (completedCount, totalCount, item) {
var percent = 100 * completedCount / totalCount;
if (progressBar) {
progressBar.style.width = percent.toFixed(2) + '%';
}
};
splash.style.display = 'block';
progressBar.style.width = '0%';
cc.director.once(cc.Director.EVENT_AFTER_SCENE_LAUNCH, function () {
splash.style.display = 'none';
});
}
将progressBar相关代码注释掉
ps:以上方法不便之处在于每次构建后都需要修改。