Commit 3a782a64 authored by spc's avatar spc

modified: module/RES.ts

parent 4e12bd4e
......@@ -233,6 +233,7 @@ export namespace RES {
*/
export function getRes(str: string)/*: Texture | VideoEntity*/ {
var type = str.substring(str.lastIndexOf(".") + 1, str.length);
console.log(type)
if (type == "png" || type == "jpg") {
return FYGE.TextureCache[str] || null;
}
......
......@@ -629,8 +629,6 @@ const resCanvasList = {
url: 'https://yun.duiba.com.cn/spark/assets/寝室1.e9238ec5e71c328817026128dd0f41fdc65203f4.jpg',
uuid: 'b3c8c187-e5c9-4968-9a00-a118d18ab2fc'
},
"分割xian": {},
"dasdasdasdasd": {},
'2a747211-0210-4215-86a2-a6955b37c45b': {
name: '白色',
ext: '.png',
......
......@@ -84,12 +84,12 @@ export class Main {
Ins.stageW = this.stage.viewRect.width;
Ins.stageH = this.stage.viewRect.height;
console.log("舞台宽高:",Ins.stageW,Ins.stageH)
await RES.loadSparkAssets(resloadingList);
await RES.loadSparkAssets(resCanvasList);
console.log('resloadingList 加载完毕')
changeScene(XxlScene);
await RES.loadSparkAssets(resCanvasList).catch(()=>{
console.log('loadSparkAssets resCanvasList 失败')
});
await RES.loadSparkAssets(resCanvasList)
console.log('resCanvasList 加载完毕')
await InitLottie.initLottieList(resLottieList);
console.log("initLottieList完成")
......
......@@ -17,9 +17,13 @@ export class MainScene extends Scene {
initUi() {
var that = this;
that.initSceneEle();
this.bg = Ins.initSprite("7fcd3fb3-57bd-436a-afca-989b68b6b311")
that.addChild(this.bg)
this.addChild(this.bg);
this.x = (Ins.stageW - 750) >> 1;
this.y = (Ins.stageH - 1624) >> 1;
this.setHexagram(7)
}
......
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