替换插屏后,插屏前的那几秒黑屏解决方案~

1.先,修改面板文件application.ejs:
文件地址:
C:\CocosDashboard_1.0.6\resources\.editors\Creator\3.3.0\resources\app.asar.unpacked\builtin\builder\static\build-templates

添加内容:
.then(
() => {
			var wrap_img = document.getElementById("wrap");//移除 初始化背景页面
			if(wrap_img!=null){
						wrap_img.parentNode.removeChild(wrap_img);
					}
			})
 .then(() => onGameStarted(cc, settings));

2.自定义模板:
image
中间添加初始图片

<body>

  <div id="wrap"><img src="load_pic_bg.png" /></div>

  <canvas id="GameCanvas" oncontextmenu="event.preventDefault()" tabindex="0"></canvas>
  <%- include(cocosTemplate, {}) %>
</body>
1赞