优化demo

This commit is contained in:
caizhitao
2020-01-12 00:35:56 +08:00
parent 7e197c0892
commit ba90b2170c
6 changed files with 718 additions and 125 deletions

View File

@@ -78,10 +78,10 @@
"_active": true,
"_components": [
{
"__id__": 113
"__id__": 125
},
{
"__id__": 114
"__id__": 126
}
],
"_prefab": null,
@@ -171,7 +171,7 @@
"array": [
0,
0,
393.5138244914885,
492.7684547533456,
0,
0,
0,
@@ -245,13 +245,13 @@
"__id__": 9
},
{
"__id__": 97
"__id__": 109
}
],
"_active": true,
"_components": [
{
"__id__": 112
"__id__": 124
}
],
"_prefab": null,
@@ -428,7 +428,7 @@
},
{
"__type__": "cc.Node",
"_name": "Sliders",
"_name": "Controller",
"_objFlags": 0,
"_parent": {
"__id__": 5
@@ -448,15 +448,18 @@
},
{
"__id__": 78
},
{
"__id__": 95
}
],
"_active": true,
"_components": [
{
"__id__": 95
"__id__": 107
},
{
"__id__": 96
"__id__": 108
}
],
"_prefab": null,
@@ -471,7 +474,7 @@
"_contentSize": {
"__type__": "cc.Size",
"width": 576,
"height": 444
"height": 540
},
"_anchorPoint": {
"__type__": "cc.Vec2",
@@ -1698,7 +1701,7 @@
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
230.40000000000006,
0,
0,
0,
@@ -1877,7 +1880,7 @@
"_N$handle": {
"__id__": 37
},
"_N$progress": 0,
"_N$progress": 1,
"_id": "35YKg9gStEhLErp2N/639Q"
},
{
@@ -1986,8 +1989,8 @@
}
],
"_useOriginalSize": false,
"_string": "0.10 | 26",
"_N$string": "0.10 | 26",
"_string": "1.00 | 255",
"_N$string": "1.00 | 255",
"_fontSize": 40,
"_lineHeight": 40,
"_enableWrapText": true,
@@ -3981,7 +3984,7 @@
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
23.039999999999992,
92.16000000000005,
0,
0,
0,
@@ -4160,7 +4163,7 @@
"_N$handle": {
"__id__": 88
},
"_N$progress": 0.1,
"_N$progress": 0.4,
"_id": "c2uNTLxCdF2oHJ+IS0EBLe"
},
{
@@ -4312,6 +4315,589 @@
"_originalHeight": 0,
"_id": "785zd8XfJMALOKEKNQ7O0m"
},
{
"__type__": "cc.Node",
"_name": "CropAlphaToggle",
"_objFlags": 0,
"_parent": {
"__id__": 9
},
"_children": [
{
"__id__": 96
},
{
"__id__": 99
}
],
"_active": true,
"_components": [
{
"__id__": 106
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 576,
"height": 60
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
-510,
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": "0bSVqNIRdKirxNt6luVamv"
},
{
"__type__": "cc.Node",
"_name": "DescLabel",
"_objFlags": 0,
"_parent": {
"__id__": 95
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 97
},
{
"__id__": 98
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 432,
"height": 40
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 1,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
144,
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": "2a4P++lclCLYLPc4P9YhfR"
},
{
"__type__": "cc.Label",
"_name": "SliderDescLabel<Label>",
"_objFlags": 0,
"node": {
"__id__": 96
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_useOriginalSize": false,
"_string": "裁剪透明区域的光:",
"_N$string": "裁剪透明区域的光:",
"_fontSize": 40,
"_lineHeight": 40,
"_enableWrapText": true,
"_N$file": null,
"_isSystemFontUsed": true,
"_spacingX": 0,
"_batchAsBitmap": false,
"_N$horizontalAlign": 0,
"_N$verticalAlign": 1,
"_N$fontFamily": "Arial",
"_N$overflow": 2,
"_N$cacheMode": 0,
"_id": "d6tUp0/3xLs6nI//wYjaM0"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 96
},
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags": 45,
"_left": 0,
"_right": 0.25,
"_top": 10,
"_bottom": 10,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": false,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 113.38,
"_originalHeight": 50.4,
"_id": "77UPZovv1IvK2+wcVSVh3U"
},
{
"__type__": "cc.Node",
"_name": "Toggle",
"_objFlags": 0,
"_parent": {
"__id__": 95
},
"_children": [
{
"__id__": 100
},
{
"__id__": 102
}
],
"_active": true,
"_components": [
{
"__id__": 104
},
{
"__id__": 105
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 28,
"height": 28
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
158,
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": "b9SyyC/gdCDKY9vdqWEFuE"
},
{
"__type__": "cc.Node",
"_name": "Background",
"_objFlags": 0,
"_parent": {
"__id__": 99
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 101
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 28,
"height": 28
},
"_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": "53uZJPYSJJrr07Weqcqjdo"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 100
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "6827ca32-0107-4552-bab2-dfb31799bb44"
},
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "11SIAqt1BIjZwYIAAj+yu7"
},
{
"__type__": "cc.Node",
"_name": "checkmark",
"_objFlags": 0,
"_parent": {
"__id__": 99
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 103
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 28,
"height": 28
},
"_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": "d7A3s24e5BWIfNNJ0oexhv"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 102
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "90004ad6-2f6d-40e1-93ef-b714375c6f06"
},
"_type": 0,
"_sizeMode": 2,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": false,
"_atlas": null,
"_id": "d2ULg6zxZKs5LVf0/K6jfr"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 99
},
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags": 8,
"_left": 0.75,
"_right": 0,
"_top": 0,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": false,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 0,
"_originalHeight": 0,
"_id": "f39gCrxQlNa7kZ9Ne/c+/b"
},
{
"__type__": "cc.Toggle",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 99
},
"_enabled": true,
"_normalMaterial": {
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
},
"_grayMaterial": null,
"duration": 0.1,
"zoomScale": 1.2,
"clickEvents": [],
"_N$interactable": true,
"_N$enableAutoGrayEffect": false,
"_N$transition": 3,
"transition": 3,
"_N$normalColor": {
"__type__": "cc.Color",
"r": 214,
"g": 214,
"b": 214,
"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__": 100
},
"_N$isChecked": true,
"toggleGroup": null,
"checkMark": {
"__id__": 103
},
"checkEvents": [],
"_id": "7bKEFTsjNDwasqgjeKI1fQ"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 95
},
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags": 40,
"_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": 461.38,
"_originalHeight": 0,
"_id": "efiFYhAgxFpY9khUf6wQ/S"
},
{
"__type__": "cc.Widget",
"_name": "",
@@ -4350,7 +4936,7 @@
"_layoutSize": {
"__type__": "cc.Size",
"width": 576,
"height": 444
"height": 540
},
"_resize": 1,
"_N$layoutType": 2,
@@ -4381,31 +4967,31 @@
},
"_children": [
{
"__id__": 98
"__id__": 110
},
{
"__id__": 100
"__id__": 112
},
{
"__id__": 102
"__id__": 114
},
{
"__id__": 104
"__id__": 116
},
{
"__id__": 106
"__id__": 118
},
{
"__id__": 108
"__id__": 120
}
],
"_active": true,
"_components": [
{
"__id__": 110
"__id__": 122
},
{
"__id__": 111
"__id__": 123
}
],
"_prefab": null,
@@ -4461,13 +5047,13 @@
"_name": "ball_0",
"_objFlags": 0,
"_parent": {
"__id__": 97
"__id__": 109
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 99
"__id__": 111
}
],
"_prefab": null,
@@ -4523,7 +5109,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 98
"__id__": 110
},
"_enabled": true,
"_materials": [
@@ -4555,13 +5141,13 @@
"_name": "cocos_logo",
"_objFlags": 0,
"_parent": {
"__id__": 97
"__id__": 109
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 101
"__id__": 113
}
],
"_prefab": null,
@@ -4617,7 +5203,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 100
"__id__": 112
},
"_enabled": true,
"_materials": [
@@ -4649,13 +5235,13 @@
"_name": "ball_1",
"_objFlags": 0,
"_parent": {
"__id__": 97
"__id__": 109
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 103
"__id__": 115
}
],
"_prefab": null,
@@ -4711,7 +5297,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 102
"__id__": 114
},
"_enabled": true,
"_materials": [
@@ -4743,13 +5329,13 @@
"_name": "video_btn",
"_objFlags": 0,
"_parent": {
"__id__": 97
"__id__": 109
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 105
"__id__": 117
}
],
"_prefab": null,
@@ -4805,7 +5391,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 104
"__id__": 116
},
"_enabled": true,
"_materials": [
@@ -4837,13 +5423,13 @@
"_name": "SystemFont",
"_objFlags": 0,
"_parent": {
"__id__": 97
"__id__": 109
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 107
"__id__": 119
}
],
"_prefab": null,
@@ -4899,7 +5485,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 106
"__id__": 118
},
"_enabled": true,
"_materials": [
@@ -4929,13 +5515,13 @@
"_name": "BmFont",
"_objFlags": 0,
"_parent": {
"__id__": 97
"__id__": 109
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 109
"__id__": 121
}
],
"_prefab": null,
@@ -4991,7 +5577,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 108
"__id__": 120
},
"_enabled": true,
"_materials": [
@@ -5023,7 +5609,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 97
"__id__": 109
},
"_enabled": true,
"alignMode": 1,
@@ -5050,7 +5636,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 97
"__id__": 109
},
"_enabled": true,
"_layoutSize": {