Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
ngt_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
ngt_video
Commits
178f8af5
Commit
178f8af5
authored
Oct 03, 2022
by
liujiangnan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat
parent
d124eef9
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
260 additions
and
10 deletions
+260
-10
ngt_video.fire
assets/ngt_video/Scene/ngt_video.fire
+222
-3
ngt_video.js
assets/ngt_video/Scene/ngt_video.js
+31
-0
defaultData.js
assets/ngt_video/Script/defaultData.js
+7
-7
No files found.
assets/ngt_video/Scene/ngt_video.fire
View file @
178f8af5
...
@@ -88,18 +88,24 @@
...
@@ -88,18 +88,24 @@
},
},
{
{
"__id__": 27
"__id__": 27
},
{
"__id__": 68
},
{
"__id__": 71
}
}
],
],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__":
68
"__id__":
73
},
},
{
{
"__id__":
69
"__id__":
74
},
},
{
{
"__id__": 7
0
"__id__": 7
5
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -2950,6 +2956,219 @@
...
@@ -2950,6 +2956,219 @@
"_originalHeight": 0,
"_originalHeight": 0,
"_id": "f5gcAGvK9KippwSm0/nY0t"
"_id": "f5gcAGvK9KippwSm0/nY0t"
},
},
{
"__type__": "cc.Node",
"_name": "animBg",
"_objFlags": 0,
"_parent": {
"__id__": 2
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 69
},
{
"__id__": 70
}
],
"_prefab": null,
"_opacity": 185,
"_color": {
"__type__": "cc.Color",
"r": 0,
"g": 0,
"b": 0,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 1280,
"height": 720
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
0,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "14L4i2m6ZD24UgGwR7NNxD"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 68
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "a23235d1-15db-4b95-8439-a2e005bfff91"
},
"_type": 0,
"_sizeMode": 0,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "71KfAgv19HdbcREO4u/KmL"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 68
},
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags": 45,
"_left": 0,
"_right": 0,
"_top": 0,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 100,
"_originalHeight": 100,
"_id": "035e2yGXlAcrfazCmdJtBV"
},
{
"__type__": "cc.Node",
"_name": "animNode",
"_objFlags": 0,
"_parent": {
"__id__": 2
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 72
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 0,
"height": 0
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
542.906,
-288.373,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "31T1oXDolK7oP0sFvKMrL6"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 71
},
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags": 36,
"_left": 0,
"_right": 97.09400000000005,
"_top": 0,
"_bottom": 71.62700000000001,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 0,
"_originalHeight": 0,
"_id": "7aavS8E3NGFJ/0PcwEczEI"
},
{
{
"__type__": "cc.Canvas",
"__type__": "cc.Canvas",
"_name": "",
"_name": "",
...
...
assets/ngt_video/Scene/ngt_video.js
View file @
178f8af5
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
({
...
@@ -299,6 +301,35 @@ cc.Class({
...
@@ -299,6 +301,35 @@ cc.Class({
});
});
},
},
async
initView
()
{
async
initView
()
{
cc
.
find
(
`Canvas/bg_title/title`
).
getComponent
(
cc
.
Label
).
string
=
this
.
data
.
title
;
// 提示音频和动画
if
(
this
.
data
.
tipSwitch
==
1
)
{
const
animBg
=
cc
.
find
(
"
Canvas/animBg
"
);
const
animNode
=
cc
.
find
(
"
Canvas/animNode
"
);
animBg
.
active
=
true
;
animNode
.
active
=
true
;
await
asyncLoadDragonBoneAnime
(
animNode
,
{
skeJsonData
:
this
.
data
.
imgAni
.
ske
,
texJsonData
:
this
.
data
.
imgAni
.
tex
,
texPngData
:
this
.
data
.
imgAni
.
png
});
const
animaNode
=
animNode
[
'
animaNode
'
];
// animaNode.y = -80;
const
db
=
animaNode
.
getComponent
(
dragonBones
.
ArmatureDisplay
);
let
anis
=
db
.
getAnimationNames
(
"
armatureName
"
);
db
.
playAnimation
(
anis
[
0
],
0
);
playAudioByUrl
(
this
.
data
.
audio
,
()
=>
{
cc
.
tween
(
animaNode
).
to
(
0.2
,
{
x
:
1000
}).
call
(()
=>
{
animBg
.
active
=
false
;
animNode
.
active
=
false
;
}).
start
();
});
}
this
.
initListener
();
this
.
initListener
();
},
},
...
...
assets/ngt_video/Script/defaultData.js
View file @
178f8af5
...
@@ -3,19 +3,19 @@
...
@@ -3,19 +3,19 @@
export
const
defaultData
=
{
export
const
defaultData
=
{
"
title
"
:
"
Hello Apples
"
,
"
title
"
:
"
Hello Apples
"
,
"
tipSwitch
"
:
1
,
"
tipSwitch
"
:
1
,
"
audio
"
:
""
,
"
audio
"
:
"
https://staging-teach.cdn.ireadabc.com/c03129693e6cabf061661fba349fa031.mp3
"
,
"
imgAni
"
:
{
"
imgAni
"
:
{
"
ske
"
:
{
"
ske
"
:
{
"
url
"
:
"
https://teach.cdn.ireadabc.com/
8a5825bc51a32f13ddb55d3065d713a9
.json
"
,
"
url
"
:
"
https://teach.cdn.ireadabc.com/
e13afca23d37ba33489c0aaa61a515f5
.json
"
,
"
name
"
:
"
动画用图川阅阅奖励
_ske.json
"
"
name
"
:
"
川阅阅
_ske.json
"
},
},
"
tex
"
:
{
"
tex
"
:
{
"
url
"
:
"
https://teach.cdn.ireadabc.com/
c4f5e10343ab1e79eb7407867fc4a85b
.json
"
,
"
url
"
:
"
https://teach.cdn.ireadabc.com/
7afcddbb7f0127613059e574638a9f3e
.json
"
,
"
name
"
:
"
动画用图川阅阅奖励
_tex.json
"
"
name
"
:
"
川阅阅
_tex.json
"
},
},
"
png
"
:
{
"
png
"
:
{
"
url
"
:
"
https://teach.cdn.ireadabc.com/
bc984a44b7537f051707f662fba3943e
.png
"
,
"
url
"
:
"
https://teach.cdn.ireadabc.com/
63699fcef6053eef4f58b89dad35af0b
.png
"
,
"
name
"
:
"
动画用图川阅阅奖励
_tex.png
"
"
name
"
:
"
川阅阅
_tex.png
"
}
}
},
},
"
video_url
"
:
"
http://staging-teach.cdn.ireadabc.com/1dde63cee33e4445fbab13297479e733.mp4
"
"
video_url
"
:
"
http://staging-teach.cdn.ireadabc.com/1dde63cee33e4445fbab13297479e733.mp4
"
...
...
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