Commit a8e20c38 authored by 邱旭's avatar 邱旭

init

parent 5ec0fba6
......@@ -30,8 +30,7 @@ const { version } = JSON.parse(fs.readFileSync("./package.json", "utf-8"));
watchResChange();
const options = {
// input: "src/Main.ts",
input: "src/index.ts",
input: "src/Main.ts",
cache: true,
output: [
{
......@@ -85,7 +84,7 @@ rollup.watch(options);
*/
function watchResChange() {
const skinUrl = "./resource/skin.json";
fs.watchFile(skinUrl, { persistent: true, interval: 2000 }, (curr, prev) => {
fs.watchFile(skinUrl, { persistent: true, interval: 2000 }, () => {
const skinDataAll = fs.readFileSync(skinUrl)
const endFile = `export const SkinJson = ${skinDataAll}`;
fs.writeFileSync("./src/SkinJson.ts", endFile);
......
......@@ -51,7 +51,6 @@ export class Main {
true, //视窗居中裁切
false,//不定高,定宽适配
sysInfo && sysInfo.pixelRatio || window.devicePixelRatio || 1,//分辨率
{ antialias: true }
);
this.canvas = canvas; // 赋值下,为了下面的destroy的cancelAnimationFrame
......@@ -113,8 +112,6 @@ export class Main {
return;
}
Tools.checkPermission();
await Promise.all([
Texture.fromUrl("https://yun.duiba.com.cn/aurora/assets/923bcdee2d54f39797fb1cc5a79ab84da1bbe972.jpg"),
Texture.fromUrl("https://yun.duiba.com.cn/aurora/assets/92856abbb6293e863708fa2c0ea3556cf9b2afaa.jpg"),
......@@ -201,10 +198,10 @@ export class Main {
// 全局事件置空
GDispatcher.removeAllEventListener();
// //淘宝环境网络数据记录清
// destroyTbNetData();
//
// // 网络数据记录清空
// destroyWebNetData();
// 淘宝环境网络数据记录清
destroyTbNetData();
// 网络数据记录清空
destroyWebNetData();
}
}
......@@ -112,43 +112,6 @@ export class Tools {
return success && data.isVip;
}
/**
* 询问权限用
*/
public static async checkPermission() {
//@ts-ignore
var tbMy = my
if (!tbMy) return;
if (FYGE.osType == "ios") return;
//@ts-ignore
const { cloud } = getApp();
//测试地址//到时云存储传一个小json,,改路径
var url = "cloud://8105858AA48FED3F15CB94186ED0D5E7//feileJump.doHelp.json";
//获取临时地址
var urls = await cloud.file.getTempFileURL({ fileId: [url] })
url = urls[0].url.replace('-internal', '');
tbMy.downloadFile({
url: url,
success(res) {
var i = res.apFilePath;
tbMy.getFileSystemManager().readFile({
filePath: i,
// encoding: "utf8",
success: function (r) {
},
fail: function (res) {
}
})
},
fail(res) {
},
});
}
/************ 其他 ************/
/**
* 修改皮肤上的文本对齐方式,原先默认是左的,多汗行的时候计算有误,待查
......
console.log(11111);
console.log(new Date(__buildDate__));
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment