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
69438bc8
Commit
69438bc8
authored
Sep 20, 2022
by
liujiangnan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 滚动条
parent
f54e1001
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
338 additions
and
506 deletions
+338
-506
cartoon_video.fire
assets/cartoon_video/Scene/cartoon_video.fire
+326
-481
cartoon_video.js
assets/cartoon_video/Scene/cartoon_video.js
+12
-24
defaultData.js
assets/cartoon_video/Script/defaultData.js
+0
-1
No files found.
assets/cartoon_video/Scene/cartoon_video.fire
View file @
69438bc8
...
...
@@ -78,25 +78,25 @@
"__id__": 8
},
{
"__id__": 1
0
"__id__": 1
1
},
{
"__id__": 1
2
"__id__": 1
4
},
{
"__id__": 1
4
"__id__": 1
7
}
],
"_active": true,
"_components": [
{
"__id__": 5
2
"__id__": 5
1
},
{
"__id__": 5
3
"__id__": 5
2
},
{
"__id__": 5
4
"__id__": 5
3
}
],
"_prefab": null,
...
...
@@ -381,6 +381,9 @@
"_components": [
{
"__id__": 9
},
{
"__id__": 10
}
],
"_prefab": null,
...
...
@@ -463,6 +466,33 @@
"_atlas": null,
"_id": "1aiDURhp5MDr+ZmFg8uuS5"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 8
},
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags": 2,
"_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": 0,
"_originalHeight": 0,
"_id": "1fR0duml1Co71zj441BZb/"
},
{
"__type__": "cc.Node",
"_name": "bg_video_shadow",
...
...
@@ -474,7 +504,10 @@
"_active": false,
"_components": [
{
"__id__": 11
"__id__": 12
},
{
"__id__": 13
}
],
"_prefab": null,
...
...
@@ -501,7 +534,7 @@
"ctor": "Float64Array",
"array": [
0,
0
,
42.166
,
0,
0,
0,
...
...
@@ -530,7 +563,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
0
"__id__": 1
1
},
"_enabled": true,
"_materials": [
...
...
@@ -557,6 +590,33 @@
"_atlas": null,
"_id": "fflWbs24xI97snvCfwg/Q6"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 11
},
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags": 2,
"_left": 0,
"_right": 0,
"_top": 0,
"_bottom": 103.22800000000001,
"_verticalCenter": 20,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 0,
"_originalHeight": 0,
"_id": "baoENL+MpIHrW+D+PsDUqQ"
},
{
"__type__": "cc.Node",
"_name": "VideoNode",
...
...
@@ -568,7 +628,10 @@
"_active": false,
"_components": [
{
"__id__": 13
"__id__": 15
},
{
"__id__": 16
}
],
"_prefab": null,
...
...
@@ -595,7 +658,7 @@
"ctor": "Float64Array",
"array": [
0,
0
,
57.701
,
0,
0,
0,
...
...
@@ -624,7 +687,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
2
"__id__": 1
4
},
"_enabled": true,
"_resourceType": 0,
...
...
@@ -639,6 +702,33 @@
"_N$keepAspectRatio": true,
"_id": "fce7ZaGl9IwYI1a7QJjapU"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 14
},
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags": 2,
"_left": 0,
"_right": 0,
"_top": 0,
"_bottom": 145.72800000000004,
"_verticalCenter": 20,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 0,
"_originalHeight": 0,
"_id": "1fqYsocEpLwaEFWHsef/gC"
},
{
"__type__": "cc.Node",
"_name": "Controls",
...
...
@@ -648,13 +738,13 @@
},
"_children": [
{
"__id__": 1
5
"__id__": 1
8
}
],
"_active": true,
"_components": [
{
"__id__": 5
1
"__id__": 5
0
}
],
"_prefab": null,
...
...
@@ -710,32 +800,26 @@
"_name": "ProgressBar",
"_objFlags": 0,
"_parent": {
"__id__": 1
4
"__id__": 1
7
},
"_children": [
{
"__id__": 16
},
{
"__id__": 21
"__id__": 19
},
{
"__id__": 2
7
"__id__": 2
4
},
{
"__id__": 3
3
"__id__": 3
1
},
{
"__id__": 3
9
"__id__": 3
8
},
{
"__id__": 42
},
{
"__id__": 44
},
{
"__id__": 46
"__id__": 45
}
],
"_active": true,
...
...
@@ -745,9 +829,6 @@
},
{
"__id__": 49
},
{
"__id__": 50
}
],
"_prefab": null,
...
...
@@ -773,7 +854,7 @@
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
65.20
8
,
65.20
799999999997
,
-580.635,
0,
0,
...
...
@@ -803,17 +884,20 @@
"_name": "bar",
"_objFlags": 0,
"_parent": {
"__id__": 1
5
"__id__": 1
8
},
"_children": [
{
"__id__":
17
"__id__":
20
}
],
"_active": true,
"_components": [
{
"__id__": 20
"__id__": 22
},
{
"__id__": 23
}
],
"_prefab": null,
...
...
@@ -827,7 +911,7 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width":
22
0,
"width":
1
0,
"height": 42
},
"_anchorPoint": {
...
...
@@ -839,7 +923,7 @@
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
-1016.834
,
0
,
14.556,
0,
0,
...
...
@@ -869,16 +953,13 @@
"_name": "bar_tag",
"_objFlags": 0,
"_parent": {
"__id__": 1
6
"__id__": 1
9
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 18
},
{
"__id__": 19
"__id__": 21
}
],
"_prefab": null,
...
...
@@ -904,7 +985,7 @@
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
243.28000000000003
,
38.399000000000015
,
-9.002,
0,
0,
...
...
@@ -934,7 +1015,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__":
17
"__id__":
20
},
"_enabled": true,
"_materials": [
...
...
@@ -961,39 +1042,12 @@
"_atlas": null,
"_id": "42AYfV7WRL06RjstJcX2QQ"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 17
},
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags": 32,
"_left": 0,
"_right": -99.78000000000003,
"_top": 0,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 0,
"_originalHeight": 0,
"_id": "c7R/FpdJRMBbiA2IUg5hOn"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
6
"__id__": 1
9
},
"_enabled": true,
"_materials": [
...
...
@@ -1020,22 +1074,52 @@
"_atlas": null,
"_id": "6aEBayL25NCYjiR2AaURHr"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 19
},
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags": 0,
"_left": 14.937999999999988,
"_right": 0,
"_top": 0,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 0,
"_originalHeight": 0,
"_id": "7310XIrRBLaaz4w9xVlqLd"
},
{
"__type__": "cc.Node",
"_name": "Play",
"_objFlags": 0,
"_parent": {
"__id__": 1
5
"__id__": 1
8
},
"_children": [
{
"__id__": 2
2
"__id__": 2
5
}
],
"_active": true,
"_components": [
{
"__id__": 25
"__id__": 28
},
{
"__id__": 30
}
],
"_prefab": null,
...
...
@@ -1091,16 +1175,16 @@
"_name": "Background",
"_objFlags": 512,
"_parent": {
"__id__": 2
1
"__id__": 2
4
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 2
3
"__id__": 2
6
},
{
"__id__": 2
4
"__id__": 2
7
}
],
"_prefab": null,
...
...
@@ -1156,7 +1240,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 2
2
"__id__": 2
5
},
"_enabled": true,
"_materials": [
...
...
@@ -1188,7 +1272,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 2
2
"__id__": 2
5
},
"_enabled": true,
"alignMode": 0,
...
...
@@ -1215,7 +1299,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 2
1
"__id__": 2
4
},
"_enabled": true,
"_normalMaterial": null,
...
...
@@ -1224,7 +1308,7 @@
"zoomScale": 1.2,
"clickEvents": [
{
"__id__": 2
6
"__id__": 2
9
}
],
"_N$interactable": true,
...
...
@@ -1290,7 +1374,7 @@
"__uuid__": "29158224-f8dd-4661-a796-1ffab537140e"
},
"_N$target": {
"__id__": 2
2
"__id__": 2
5
},
"_id": "a8bWaLdnFKA5ITxJunB2R2"
},
...
...
@@ -1304,22 +1388,52 @@
"handler": "play",
"customEventData": ""
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 24
},
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags": 8,
"_left": -256,
"_right": 0,
"_top": 0,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 0,
"_originalHeight": 0,
"_id": "a0Wqj/VOxJSbxEOgQXycLF"
},
{
"__type__": "cc.Node",
"_name": "Pause",
"_objFlags": 0,
"_parent": {
"__id__": 1
5
"__id__": 1
8
},
"_children": [
{
"__id__":
28
"__id__":
32
}
],
"_active": false,
"_components": [
{
"__id__": 31
"__id__": 35
},
{
"__id__": 37
}
],
"_prefab": null,
...
...
@@ -1375,16 +1489,16 @@
"_name": "Background",
"_objFlags": 512,
"_parent": {
"__id__":
27
"__id__":
31
},
"_children": [],
"_active": true,
"_components": [
{
"__id__":
29
"__id__":
33
},
{
"__id__": 3
0
"__id__": 3
4
}
],
"_prefab": null,
...
...
@@ -1440,7 +1554,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__":
28
"__id__":
32
},
"_enabled": true,
"_materials": [
...
...
@@ -1472,7 +1586,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__":
28
"__id__":
32
},
"_enabled": true,
"alignMode": 0,
...
...
@@ -1499,7 +1613,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__":
27
"__id__":
31
},
"_enabled": true,
"_normalMaterial": null,
...
...
@@ -1508,7 +1622,7 @@
"zoomScale": 1.2,
"clickEvents": [
{
"__id__": 3
2
"__id__": 3
6
}
],
"_N$interactable": true,
...
...
@@ -1564,7 +1678,7 @@
"hoverSprite": null,
"_N$disabledSprite": null,
"_N$target": {
"__id__":
28
"__id__":
32
},
"_id": "94dhG7VhpIZZJp5e+IJuYc"
},
...
...
@@ -1579,180 +1693,17 @@
"customEventData": ""
},
{
"__type__": "cc.
Node
",
"_name": "
Restart
",
"__type__": "cc.
Widget
",
"_name": "",
"_objFlags": 0,
"_parent": {
"__id__": 15
},
"_children": [
{
"__id__": 34
}
],
"_active": false,
"_components": [
{
"__id__": 37
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 209,
"height": 218
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
-1180,
16,
0,
0,
0,
0,
1,
1,
1,
0.5
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "83UkubGDZH6akdMnNGsdIv"
},
{
"__type__": "cc.Node",
"_name": "Background",
"_objFlags": 512,
"_parent": {
"__id__": 33
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 35
},
{
"__id__": 36
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 209,
"height": 218
},
"_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,
0
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "00flnBd/hAfrsdRlgcikeq"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 34
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "16ea0a4c-9fd6-4334-8f5a-56b9ec1673f8"
},
"_type": 0,
"_sizeMode": 2,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "87Yjum3U1A8oQ+vRmXHXQx"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 34
"node": {
"__id__": 31
},
"_enabled": true,
"alignMode":
0
,
"alignMode":
1
,
"_target": null,
"_alignFlags":
45
,
"_left":
0
,
"_alignFlags":
8
,
"_left":
-256
,
"_right": 0,
"_top": 0,
"_bottom": 0,
...
...
@@ -1764,104 +1715,23 @@
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 100,
"_originalHeight": 40,
"_id": "9btc+EKnVIM5/9Qu2GtB38"
},
{
"__type__": "cc.Button",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 33
},
"_enabled": true,
"_normalMaterial": null,
"_grayMaterial": null,
"duration": 0.1,
"zoomScale": 1.2,
"clickEvents": [
{
"__id__": 38
}
],
"_N$interactable": true,
"_N$enableAutoGrayEffect": false,
"_N$transition": 3,
"transition": 3,
"_N$normalColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_N$pressedColor": {
"__type__": "cc.Color",
"r": 211,
"g": 211,
"b": 211,
"a": 255
},
"pressedColor": {
"__type__": "cc.Color",
"r": 211,
"g": 211,
"b": 211,
"a": 255
},
"_N$hoverColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"hoverColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_N$disabledColor": {
"__type__": "cc.Color",
"r": 124,
"g": 124,
"b": 124,
"a": 255
},
"_N$normalSprite": null,
"_N$pressedSprite": null,
"pressedSprite": null,
"_N$hoverSprite": null,
"hoverSprite": null,
"_N$disabledSprite": null,
"_N$target": {
"__id__": 34
},
"_id": "edfm8dGPlEE5rKXtLAJz10"
},
{
"__type__": "cc.ClickEvent",
"target": {
"__id__": 2
},
"component": "",
"_componentId": "280c3rsZJJKnZ9RqbALVwtK",
"handler": "pause",
"customEventData": ""
"_originalWidth": 0,
"_originalHeight": 0,
"_id": "63E/r5Pw5MfYZmJfXTJ6bG"
},
{
"__type__": "cc.Node",
"_name": "CurrentLabel",
"_objFlags": 0,
"_parent": {
"__id__": 1
5
"__id__": 1
8
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 39
},
{
"__id__": 40
},
...
...
@@ -1922,7 +1792,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 3
9
"__id__": 3
8
},
"_enabled": true,
"_materials": [
...
...
@@ -1955,7 +1825,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 3
9
"__id__": 3
8
},
"_enabled": false,
"_color": {
...
...
@@ -1969,112 +1839,47 @@
"_id": "eahGxjR3VJXJU5Vhkwp4DB"
},
{
"__type__": "cc.Node",
"_name": "line",
"_objFlags": 0,
"_parent": {
"__id__": 15
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 43
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 5.56,
"height": 27.72
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
391.962,
2.246,
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": "06dHxapIZKqacYzXLB/bRA"
},
{
"__type__": "cc.Label",
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__":
42
"__id__":
38
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_string": "/",
"_N$string": "/",
"_fontSize": 20,
"_lineHeight": 22,
"_enableWrapText": true,
"_N$file": null,
"_isSystemFontUsed": true,
"_spacingX": 0,
"_batchAsBitmap": false,
"_styleFlags": 0,
"_underlineHeight": 0,
"_N$horizontalAlign": 1,
"_N$verticalAlign": 1,
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "d7oat5Z5hGfblknD9KVvEi"
"alignMode": 1,
"_target": null,
"_alignFlags": 8,
"_left": 0.30600000000004,
"_right": 0,
"_top": 0,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 0,
"_originalHeight": 0,
"_id": "61gB9uattNRoc2heW/lvn5"
},
{
"__type__": "cc.Node",
"_name": "TimeLabel",
"_objFlags": 0,
"_parent": {
"__id__": 1
5
"__id__": 1
8
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 45
"__id__": 43
},
{
"__id__": 44
}
],
"_prefab": null,
...
...
@@ -2130,7 +1935,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 4
4
"__id__": 4
2
},
"_enabled": true,
"_materials": [
...
...
@@ -2158,16 +1963,46 @@
"_N$cacheMode": 0,
"_id": "18+R48nStLcZeo+SIuNJL4"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 42
},
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags": 32,
"_left": 0,
"_right": 23.77800000000002,
"_top": 0,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 0,
"_originalHeight": 0,
"_id": "eaEgqRSfZHC4HlsZG+u5Ih"
},
{
"__type__": "cc.Node",
"_name": "text_tips_left",
"_objFlags": 0,
"_parent": {
"__id__": 1
5
"__id__": 1
8
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 46
},
{
"__id__": 47
}
...
...
@@ -2225,7 +2060,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 4
6
"__id__": 4
5
},
"_enabled": true,
"_materials": [
...
...
@@ -2252,12 +2087,39 @@
"_atlas": null,
"_id": "d1UcG/hPVCMr/y0GjrJIGW"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 45
},
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags": 12,
"_left": -194.52999999999997,
"_right": 0,
"_top": 0,
"_bottom": 176.52800000000002,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 0,
"_originalHeight": 0,
"_id": "dcC8aY8k9PPq4/Ajh4rOUP"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
5
"__id__": 1
8
},
"_enabled": true,
"_materials": [
...
...
@@ -2284,36 +2146,19 @@
"_atlas": null,
"_id": "70MH/+uAVLfpCHqg4yKrpK"
},
{
"__type__": "cc.ProgressBar",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 15
},
"_enabled": true,
"_N$totalLength": 880,
"_N$barSprite": {
"__id__": 20
},
"_N$mode": 0,
"_N$progress": 0,
"_N$reverse": false,
"_id": "862tmetjRItLZQqs3ZtqeQ"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
5
"__id__": 1
8
},
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags": 4,
"_left":
0
,
"_right":
0
,
"_alignFlags": 4
4
,
"_left":
-963.292
,
"_right":
-1093.708
,
"_top": 0,
"_bottom": -629.635,
"_verticalCenter": 0,
...
...
@@ -2324,7 +2169,7 @@
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth":
0
,
"_originalWidth":
2057
,
"_originalHeight": 0,
"_id": "70m+PVzhhBpKXNmtdvKZ+d"
},
...
...
@@ -2333,16 +2178,16 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
4
"__id__": 1
7
},
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags":
0
,
"_left": 0,
"_right": 0,
"_alignFlags":
44
,
"_left":
64
0,
"_right":
64
0,
"_top": 0,
"_bottom": 3
1.42500000000001
,
"_bottom": 3
60
,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
...
...
@@ -2408,31 +2253,31 @@
},
"_enabled": true,
"videoPlayer": {
"__id__": 1
3
"__id__": 1
5
},
"ProgressBar": {
"__id__":
49
"__id__":
18
},
"playButton": {
"__id__": 2
5
"__id__": 2
8
},
"pauseButton": {
"__id__": 3
1
"__id__": 3
5
},
"restartButton": null,
"backButton": null,
"forwardButton": null,
"durationLabel": {
"__id__": 4
5
"__id__": 4
3
},
"currentTimeLabel": {
"__id__":
40
"__id__":
39
},
"barTag": {
"__id__":
17
"__id__":
20
},
"bar": {
"__id__": 1
6
"__id__": 1
9
},
"_id": "ec0d87qy5Eoavi5EqUiZj3"
}
...
...
assets/cartoon_video/Scene/cartoon_video.js
View file @
69438bc8
...
...
@@ -10,7 +10,7 @@ cc.Class({
},
ProgressBar
:
{
default
:
null
,
type
:
cc
.
ProgressBar
type
:
cc
.
Node
},
playButton
:
{
default
:
null
,
...
...
@@ -145,17 +145,14 @@ cc.Class({
this
.
initdDrag
();
},
async
initBg
()
{
const
bgNode
=
cc
.
find
(
'
Canvas/bg
'
);
bgNode
.
scale
=
this
.
_mapScaleMax
;
},
initListener
()
{
},
initdDrag
()
{
const
maxX
=
this
.
ProgressBar
.
node
.
width
;
const
maxX
=
this
.
ProgressBar
.
width
;
const
minX
=
0
;
this
.
barTag
.
off
(
cc
.
Node
.
EventType
.
TOUCH_START
);
this
.
barTag
.
on
(
cc
.
Node
.
EventType
.
TOUCH_START
,
(
e
)
=>
{
console
.
log
(
"
TOUCH_START
"
);
...
...
@@ -198,10 +195,10 @@ cc.Class({
this
.
updateBarByPos
(
this
.
barTag
.
x
);
this
.
triggerInteractive
()
});
this
.
ProgressBar
.
node
.
off
(
cc
.
Node
.
EventType
.
TOUCH_START
);
this
.
ProgressBar
.
node
.
on
(
cc
.
Node
.
EventType
.
TOUCH_START
,
(
e
)
=>
{
this
.
ProgressBar
.
off
(
cc
.
Node
.
EventType
.
TOUCH_START
);
this
.
ProgressBar
.
on
(
cc
.
Node
.
EventType
.
TOUCH_START
,
(
e
)
=>
{
const
pos
=
e
.
getLocation
();
const
pPos
=
this
.
ProgressBar
.
node
.
convertToNodeSpaceAR
(
pos
);
const
pPos
=
this
.
ProgressBar
.
convertToNodeSpaceAR
(
pos
);
const
newX
=
Math
.
min
(
maxX
,
Math
.
max
(
pPos
.
x
,
minX
));
this
.
updateBarByPos
(
newX
);
// console.log("ProgressBar TOUCH_START", newX);
...
...
@@ -211,7 +208,7 @@ cc.Class({
console
.
log
(
"
screen TOUCH_START
"
);
this
.
triggerInteractive
()
});
const
pgBar
=
this
.
ProgressBar
.
node
;
const
pgBar
=
this
.
ProgressBar
;
this
.
tw
=
new
(
function
(){
this
.
_tw
=
cc
.
tween
(
pgBar
).
delay
(
3
).
to
(.
6
,
{
opacity
:
255
...
...
@@ -238,17 +235,8 @@ cc.Class({
pgBar
.
opacity
=
255
;
}
});
// this.tw = cc.tween(this.ProgressBar.node).delay(3).to(.6, {
// opacity: 0
// }).call(() => {
// console.log('This is a callback');
// // this.tw.stop();
// // this.tw.removeSelf()
// // this.tw = null;
// })
},
async
initView
()
{
await
this
.
initBg
();
this
.
initListener
();
},
...
...
@@ -276,7 +264,7 @@ cc.Class({
},
triggerInteractive
()
{
this
.
tw
.
stop
();
this
.
ProgressBar
.
node
.
opacity
=
255
;
this
.
ProgressBar
.
opacity
=
255
;
this
.
tw
.
start
();
},
checkProgressBarStatus
()
{
...
...
@@ -286,11 +274,11 @@ cc.Class({
}
}
else
{
this
.
tw
.
stop
();
this
.
ProgressBar
.
node
.
opacity
=
255
this
.
ProgressBar
.
opacity
=
255
}
},
updateBarByPos
(
newX
)
{
const
maxX
=
this
.
ProgressBar
.
node
.
width
;
const
maxX
=
this
.
ProgressBar
.
width
;
const
minX
=
0
;
const
percent
=
newX
/
maxX
;
...
...
@@ -299,16 +287,16 @@ cc.Class({
this
.
videoPlayer
.
currentTime
=
percent
*
dur
},
updateBarByTime
(
ct
){
this
.
currentTimeLabel
.
string
=
this
.
formatTime
(
ct
);
const
dur
=
this
.
videoPlayer
.
getDuration
();
const
percent
=
ct
/
dur
;
const
maxX
=
this
.
ProgressBar
.
node
.
width
-
20
;
const
maxX
=
this
.
ProgressBar
.
width
-
20
;
const
minX
=
0
;
let
newX
=
percent
*
maxX
;
newX
=
Math
.
min
(
maxX
,
Math
.
max
(
newX
,
minX
));
this
.
barTag
.
x
=
newX
;
this
.
bar
.
width
=
newX
;
this
.
bar
.
x
=
0
-
(
maxX
/
2
);
},
formatTime
(
time
)
{
if
(
time
===
undefined
)
{
...
...
assets/cartoon_video/Script/defaultData.js
View file @
69438bc8
// {"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":"","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","video_url":""}
export
const
defaultData
=
{
...
...
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