Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
new_taobao
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wildfirecode13
new_taobao
Commits
c6a25eef
Commit
c6a25eef
authored
Oct 04, 2020
by
AU-Pro-mac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add new code --15
parent
a6b50d4b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
118 deletions
+24
-118
homePage.js
taobao_mini/client/pages/homePage/homePage.js
+3
-2
output.js
taobao_mini/client/pages/pagecanvas/output.js
+21
-116
No files found.
taobao_mini/client/pages/homePage/homePage.js
View file @
c6a25eef
...
...
@@ -104,12 +104,13 @@ Page({
},
openAnimationTimeout
:
null
,
onAnimationLoadFlag
:
false
,
// 收到 canvas lottie 加载结束的 信息 -- 且等待 开场动画 5s
onAnimationLoadOver
(
msg
=
''
)
{
if
(
msg
===
'lottieReady'
)
{
console
.
log
(
'%creceive canvas lottie ready, onAnimationLoadOver'
,
'color:red;font-weight:bold;font-size:16px;padding: 4px 20px;'
)
console
.
log
(
`%c
${
msg
}
`
,
'color:red;font-weight:bold;font-size:16px;padding: 4px 20px;'
)
if
(
this
.
onAnimationLoadFlag
)
return
clearTimeout
(
this
.
openAnimationTimeout
)
this
.
openAnimationTimeout
=
setTimeout
(()
=>
{
this
.
setData
({
gameShow_timeout
:
false
,
gameType
:
0
})
...
...
@@ -124,7 +125,7 @@ Page({
this
.
openAnimationTimeout
=
setTimeout
(()
=>
{
this
.
setData
({
gameShow_timeout
:
false
,
gameType
:
0
})
setTimeout
(()
=>
{
this
.
setData
({
gameShow
:
false
})
},
350
)
this
.
onAnimationLoadFlag
=
true
// 主要的 授权 => 登陆 => 获取基本信息 开始
this
.
getAuth
()
...
...
taobao_mini/client/pages/pagecanvas/output.js
View file @
c6a25eef
...
...
@@ -1687,40 +1687,6 @@ const resCanvasListCsd = {
/***/
}),
/***/
"./resLottieList.js"
:
/*!**************************!*\
!*** ./resLottieList.js ***!
\**************************/
/*! exports provided: default */
/***/
(
function
(
module
,
__webpack_exports__
,
__webpack_require__
)
{
"use strict"
;
__webpack_require__
.
r
(
__webpack_exports__
);
/* harmony import */
var
_resCanvasList__WEBPACK_IMPORTED_MODULE_0__
=
__webpack_require__
(
/*! ./resCanvasList */
"./resCanvasList.js"
);
const
resLottieList
=
{
// "blueCat":{
// imgUrl:resCanvasList["a7dc39fa-5f6d-4e94-8979-81c4a4aa183f"].url,
// json:BlueCatTexture
// },
// "orengeCat":{
// imgUrl:resCanvasList["72987d74-2fa7-49b9-865d-a0d80c6ed220"].url,
// json:OrengeCatTexture
// },
// "sanhuaCat":{
// imgUrl:resCanvasList["75320997-b466-4161-abab-b03a51ec522b"].url,
// json:SanhuaCatTexture
// },
// "xianluoCat":{
// imgUrl:resCanvasList["de2d1dca-ed1c-4fe0-93ef-684f4b96c87e"].url,
// json:XianluoCatTexture
// }
}
/* harmony default export */
__webpack_exports__
[
"default"
]
=
(
resLottieList
);
/***/
}),
/***/
"./src/Ins.ts"
:
/*!********************!*\
!*** ./src/Ins.ts ***!
...
...
@@ -1832,15 +1798,14 @@ var resCanvasListCsd_1 = __webpack_require__(/*! ../resCanvasListCsd */ "./resCa
var
lottieTexture
=
__webpack_require__
(
/*! ./openAnimation/Texture.json */
"./src/openAnimation/Texture.json"
);
var
lottieTextureCsd_smoke
=
__webpack_require__
(
/*! ./chuansongdai/lottie/smoke/smokeTexture.json */
"./src/chuansongdai/lottie/smoke/smokeTexture.json"
);
var
lottieTextureCsd_light
=
__webpack_require__
(
/*! ./chuansongdai/lottie/light/lightTexture.json */
"./src/chuansongdai/lottie/light/lightTexture.json"
);
var
resLottieList_1
=
__webpack_require__
(
/*! ../resLottieList */
"./resLottieList.js"
);
var
Ins_1
=
__webpack_require__
(
/*! ./Ins */
"./src/Ins.ts"
);
var
initLottie_1
=
__webpack_require__
(
/*! ./initLottie */
"./src/initLottie.ts"
);
var
XxlScene_1
=
__webpack_require__
(
/*! ./xiaoxiaole/XxlScene */
"./src/xiaoxiaole/XxlScene.ts"
);
var
MainScene_1
=
__webpack_require__
(
/*! ./chuansongdai/MainScene */
"./src/chuansongdai/MainScene.ts"
);
var
MainScene_2
=
__webpack_require__
(
/*! ./openAnimation/MainScene */
"./src/openAnimation/MainScene.ts"
);
exports
.
GDispatcher
=
new
FYGE
.
EventDispatcher
();
var
Main
=
(
function
()
{
function
Main
(
canvas
)
{
console
.
time
(
'main.ts constructor'
);
console
.
warn
=
function
()
{
};
var
sysInfo
;
if
(
my
)
{
...
...
@@ -1860,6 +1825,21 @@ var Main = (function () {
self
.
requestID
=
FYGE
.
getRequestAnimationFrame
()(
loop
);
}
}
Main
.
prototype
.
loadLottieFasterAndFaster
=
function
()
{
return
__awaiter
(
this
,
void
0
,
void
0
,
function
()
{
return
__generator
(
this
,
function
(
_a
)
{
switch
(
_a
.
label
)
{
case
0
:
return
[
4
,
this
.
loadImageTextures
(
resCanvasList_1
.
default
)];
case
1
:
_a
.
sent
();
console
.
log
(
'%cloadImageTextures over'
,
'color:red;font-weight:bold;font-size:16px;padding: 4px 20px;'
);
TaoBaoNet_1
.
sendTbNet
(
TaoBaoNet_1
.
TbNetName
.
onload
,
{});
console
.
timeEnd
(
'main.ts constructor'
);
return
[
2
];
}
});
});
};
Main
.
prototype
.
changeGameSence
=
function
(
gameType
)
{
this
.
gameType
=
gameType
;
console
.
log
(
'changeGameSence'
);
...
...
@@ -1915,27 +1895,15 @@ var Main = (function () {
Ins_1
.
Ins
.
stageW
=
this
.
stage
.
viewRect
.
width
;
Ins_1
.
Ins
.
stageH
=
this
.
stage
.
viewRect
.
height
;
console
.
log
(
"舞台宽高:"
,
Ins_1
.
Ins
.
stageW
,
Ins_1
.
Ins
.
stageH
);
resCanvasList
=
Object
.
assign
(
resCanvasList_1
.
default
,
resCanvasListCsd_1
.
default
);
return
[
4
,
RES_1
.
RES
.
loadSparkAssets
(
resCanvasList
)];
return
[
4
,
this
.
loadLottieFasterAndFaster
()];
case
1
:
_a
.
sent
();
console
.
log
(
'resloadingList 加载完毕'
);
return
[
4
,
this
.
loadImageTextures
(
resCanvasList
)];
case
2
:
_a
.
sent
();
return
[
4
,
this
.
loadImageTexturesCsd01
(
resCanvasList
)];
case
3
:
_a
.
sent
();
return
[
4
,
this
.
loadImageTexturesCsd02
(
resCanvasList
)];
case
4
:
_a
.
sent
();
console
.
log
(
'%cloadImageTextures over'
,
'color:red;font-weight:bold;font-size:16px;padding: 4px 20px;'
);
ctrls_1
.
changeScene
(
MainScene_2
.
OpenAni
);
TaoBaoNet_1
.
sendTbNet
(
TaoBaoNet_1
.
TbNetName
.
onload
,
{}
);
return
[
4
,
initLottie_1
.
InitLottie
.
initLottieList
(
resLottieList_1
.
defaul
t
)];
case
5
:
resCanvasList
=
Object
.
assign
(
resCanvasList_1
.
default
,
resCanvasListCsd_1
.
default
);
return
[
4
,
RES_1
.
RES
.
loadSparkAssets
(
resCanvasLis
t
)];
case
2
:
_a
.
sent
();
console
.
log
(
"initLottieList完成"
);
console
.
log
(
'resloadingList 加载完毕'
);
FYGE
.
GDispatcher
.
dispatchEvent
(
"loadEnd"
);
return
[
2
];
}
...
...
@@ -5366,69 +5334,6 @@ var G_EVENT;
})(
G_EVENT
=
exports
.
G_EVENT
||
(
exports
.
G_EVENT
=
{}));
/***/
}),
/***/
"./src/initLottie.ts"
:
/*!***************************!*\
!*** ./src/initLottie.ts ***!
\***************************/
/*! no static exports found */
/***/
(
function
(
module
,
exports
,
__webpack_require__
)
{
"use strict"
;
Object
.
defineProperty
(
exports
,
"__esModule"
,
{
value
:
true
});
exports
.
InitLottie
=
void
0
;
var
InitLottie
;
(
function
(
InitLottie
)
{
function
initLottieList
(
resList
)
{
console
.
log
(
"开始加载lottie资源"
);
var
list
=
[];
for
(
var
key
in
resList
)
{
list
.
push
(
resList
[
key
]);
}
console
.
log
(
list
);
var
p
=
new
Promise
(
function
(
resolve
,
reject
)
{
initLottie
(
function
(
s
)
{
if
(
s
)
{
resolve
();
}
else
{
reject
();
}
},
list
);
});
return
p
;
}
InitLottie
.
initLottieList
=
initLottieList
;
function
initLottie
(
callback
,
arr
)
{
var
count
=
0
;
var
countAll
=
arr
.
length
;
console
.
log
(
countAll
);
if
(
!
countAll
)
callback
(
true
);
var
mark
=
true
;
var
_loop_1
=
function
(
i
)
{
var
textureJson
=
arr
[
i
].
json
;
FYGE
.
GlobalLoader
.
loadImage
(
function
(
s
,
image
)
{
if
(
s
)
{
FYGE
.
createTextureSheet
(
new
FYGE
.
BaseTexture
(
image
),
textureJson
);
}
else
{
mark
=
false
;
}
if
(
++
count
==
countAll
)
callback
(
mark
);
},
arr
[
i
][
"imgUrl"
]);
};
for
(
var
i
=
0
;
i
<
countAll
;
i
++
)
{
_loop_1
(
i
);
}
}
InitLottie
.
initLottie
=
initLottie
;
})(
InitLottie
=
exports
.
InitLottie
||
(
exports
.
InitLottie
=
{}));
/***/
}),
/***/
"./src/openAnimation/MainScene.ts"
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment