html换装游戏代码,index.html DIY属于你的长安印象
html, body {
-ms-touch-action: none;
background: #E2BC89;
padding: 0;
border: 0;
margin: 0;
height: 100%;
/*background-image: url(./resource/assets/Image/body_bg.png)*/
}
.miva{
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
border: 15px solid #fff;
background: #fff;
color: #ffffff;
display: block;
text-align: center;
width: 95%;
}
.
tip-save {
position: absolute;
top: 480px;
width: 190px;
left: 25%;
pointer-events: none;
}
.over-btn-group{
width: 80px;
position: absolute;
bottom: 30px;
left: 25px;
}
html frame
.over-btn-group img{
width: 100%;
margin: 5px 0;
}
0xE2BC89
function isHidden(doc) {
}
data-entry-class="Main"
data-orientation="portrait"
data-scale-mode="showAll"
data-frame-rate="60"
data-content-width="640"
data-content-height="1136"
data-multi-fingered="2"
data-show-fps="false" data-show-log="false"
data-show-fps-> var loadScript = function (list, callback) {
var loaded = 0;
var loadNext = function () {
loadSingleScript(list[loaded], function () {
loaded++;
if (loaded >= list.length) {
callback();
}
else {
loadNext();
}
})
};
loadNext();
var loadSingleScript = function (src, callback) {
var s = ateElement('script');
s.async = false;
s.src = src;
s.addEventListener('load', function () {
veChild(s);
callback();
}, false);
document.body.appendChild(s);
};
var xhr = new XMLHttpRequest();
xhr.open('GET', './manifest.json?v=' + Math.random(), true);
xhr.addEventListener("load", function () {
var manifest = JSON.sponse);
var list = at(manifest.game);
loadScript(list, function () {
/**
* {
* "renderMode":, //Engine rendering mode, "canvas" or "webgl"
* "audioType": 0 //Use the audio type, 0: default, 2: web audio, 3: audio
* "antialias": //Whether the anti-aliasing is enabled in WebGL mode, true: on, false: off, defaults to false * "calculateCanvasScaleFactor": //a function return canvas scale factor
* }
**/
egret.runEgret({ renderMode: "webgl", audioType: 0, calculateCanvasScaleFactor:function(context) { var backingStore = context.backingStorePixelRatio ||
context.webkitBackingStorePixelRatio ||
context.msBackingStorePixelRatio ||
context.oBackingStorePixelRatio ||
context.backingStorePixelRatio || 1;
return (window.devicePixelRatio || 1) / backingStore;
});
});
xhr.send(null);⼀键复制
编辑
Web IDE
原始数据
按⾏查看
历史

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。