Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cartoon_video
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
template admin
cartoon_video
Commits
f54e1001
Commit
f54e1001
authored
Sep 20, 2022
by
liujiangnan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat
parent
67e1428b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
59 deletions
+4
-59
cartoon_video.js
assets/cartoon_video/Scene/cartoon_video.js
+4
-6
defaultData.js
assets/cartoon_video/Script/defaultData.js
+0
-53
No files found.
assets/cartoon_video/Scene/cartoon_video.js
View file @
f54e1001
import
{
buttonOnceClick
,
buttonOnClick
,
getSpriteFrimeByUrl
,
asyncGetSpriteFrimeByUrl
,
playAudioByUrl
,
asyncLoadDragonBoneAnime
,
asyncDelay
,
setNetImg
}
from
"
../Script/util
"
;
import
{
defaultData
}
from
"
../Script/defaultData
"
;
import
{
defaultData
}
from
"
../Script/defaultData
"
;
cc
.
Class
({
cc
.
Class
({
...
@@ -149,8 +147,6 @@ cc.Class({
...
@@ -149,8 +147,6 @@ cc.Class({
async
initBg
()
{
async
initBg
()
{
const
bgNode
=
cc
.
find
(
'
Canvas/bg
'
);
const
bgNode
=
cc
.
find
(
'
Canvas/bg
'
);
const
sfpr
=
await
asyncGetSpriteFrimeByUrl
(
this
.
data
.
image
);
bgNode
.
getComponent
(
cc
.
Sprite
).
spriteFrame
=
sfpr
;
bgNode
.
scale
=
this
.
_mapScaleMax
;
bgNode
.
scale
=
this
.
_mapScaleMax
;
},
},
...
@@ -258,7 +254,6 @@ cc.Class({
...
@@ -258,7 +254,6 @@ cc.Class({
start
()
{
start
()
{
let
getData
=
this
.
getData
.
bind
(
this
);
let
getData
=
this
.
getData
.
bind
(
this
);
let
getAnswer
;
if
(
window
&&
window
.
courseware
)
{
if
(
window
&&
window
.
courseware
)
{
// console.log('has window');
// console.log('has window');
getData
=
window
.
courseware
.
getData
;
getData
=
window
.
courseware
.
getData
;
...
@@ -347,6 +342,9 @@ cc.Class({
...
@@ -347,6 +342,9 @@ cc.Class({
},
},
play
(){
play
(){
cc
.
find
(
`Canvas/Controls/ProgressBar/text_tips_left`
).
active
=
false
;
cc
.
find
(
`Canvas/bg_empty`
).
active
=
false
;
cc
.
find
(
`Canvas/bg_video_shadow`
).
active
=
true
;
this
.
videoPlayer
.
node
.
active
=
true
;
this
.
videoPlayer
.
node
.
active
=
true
;
this
.
videoPlayer
.
play
();
this
.
videoPlayer
.
play
();
this
.
triggerInteractive
()
this
.
triggerInteractive
()
...
@@ -371,7 +369,7 @@ cc.Class({
...
@@ -371,7 +369,7 @@ cc.Class({
},
},
preload
()
{
preload
()
{
cc
.
assetManager
.
loadAny
(
this
.
data
,
{
cacheAsset
:
true
},
null
,
(
err
,
data
)
=>
{
cc
.
assetManager
.
loadAny
(
{
url
:
this
.
data
.
video_url
}
,
{
cacheAsset
:
true
},
null
,
(
err
,
data
)
=>
{
console
.
log
(
'
preload data,
'
,
data
);
console
.
log
(
'
preload data,
'
,
data
);
// typeof
// typeof
...
...
assets/cartoon_video/Script/defaultData.js
View file @
f54e1001
...
@@ -2,58 +2,5 @@
...
@@ -2,58 +2,5 @@
export
const
defaultData
=
{
export
const
defaultData
=
{
"
imgAni
"
:
{
"
ske
"
:
{
"
url
"
:
"
https://teach.cdn.ireadabc.com/e13afca23d37ba33489c0aaa61a515f5.json
"
,
"
name
"
:
"
川阅阅_ske.json
"
},
"
tex
"
:
{
"
url
"
:
"
https://teach.cdn.ireadabc.com/7afcddbb7f0127613059e574638a9f3e.json
"
,
"
name
"
:
"
川阅阅_tex.json
"
},
"
png
"
:
{
"
url
"
:
"
https://teach.cdn.ireadabc.com/63699fcef6053eef4f58b89dad35af0b.png
"
,
"
name
"
:
"
川阅阅_tex.png
"
}
},
"
tipSwitch
"
:
"
1
"
,
"
tipType
"
:
"
page
"
,
"
tipBg
"
:
"
https://teach.cdn.ireadabc.com/4516be9212c58098c8eebbd7021c8c2a.png
"
,
"
tipPage
"
:
[
{
"
title
"
:
"
这么小的院子里,居然同时有一间书房和一间书院,这家人可真喜欢读书啊。
"
,
"
audio
"
:
"
https://staging-teach.cdn.ireadabc.com/c03129693e6cabf061661fba349fa031.mp3
"
},{
"
title
"
:
"
这么小的院子里,居然同时有一间书房和一间书院,这家人可真喜欢读书啊。
"
,
"
audio
"
:
"
https://staging-teach.cdn.ireadabc.com/c03129693e6cabf061661fba349fa031.mp3
"
},{
"
title
"
:
"
这么小的院子里,居然同时有一间书房和一间书院,这家人可真喜欢读书啊。
"
,
"
audio
"
:
"
https://staging-teach.cdn.ireadabc.com/c03129693e6cabf061661fba349fa031.mp3
"
}
],
"
title
"
:
""
,
"
audio
"
:
""
,
"
audioName
"
:
""
,
"
image
"
:
"
https://teach.cdn.ireadabc.com/efa8d5d75d18379dcac9ee885d6f2980.png
"
,
"
endImgAni
"
:
{
"
ske
"
:
{
"
url
"
:
"
https://teach.cdn.ireadabc.com/8a5825bc51a32f13ddb55d3065d713a9.json
"
,
"
name
"
:
"
动画用图川阅阅奖励_ske.json
"
},
"
tex
"
:
{
"
url
"
:
"
https://teach.cdn.ireadabc.com/c4f5e10343ab1e79eb7407867fc4a85b.json
"
,
"
name
"
:
"
动画用图川阅阅奖励_tex.json
"
},
"
png
"
:
{
"
url
"
:
"
https://teach.cdn.ireadabc.com/bc984a44b7537f051707f662fba3943e.png
"
,
"
name
"
:
"
动画用图川阅阅奖励_tex.png
"
}
},
"
endImgTitle
"
:
"
棒棒的!
"
,
"
points
"
:
""
,
"
tips
"
:
"
匾额写的是这间屋子的名字或屋子最主要的功能
"
,
"
questionScore
"
:
"
15
"
,
"
jumpIdx
"
:
"
2
"
,
"
video_url
"
:
"
https://iplayabc-teach-yun-test.oss-cn-beijing.aliyuncs.com/movie2.mp4
"
"
video_url
"
:
"
https://iplayabc-teach-yun-test.oss-cn-beijing.aliyuncs.com/movie2.mp4
"
}
}
\ No newline at end of file
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