更新ScrolView的例子,添加滑动事件

This commit is contained in:
leo
2018-06-06 10:36:49 +08:00
parent 7462d276db
commit 6e3552b7d1
32 changed files with 218 additions and 21847 deletions

View File

@@ -45,7 +45,7 @@
"_globalZOrder": 0,
"_opacityModifyRGB": false,
"groupIndex": 0,
"autoReleaseAssets": null
"autoReleaseAssets": false
},
{
"__type__": "cc.Node",
@@ -65,23 +65,23 @@
"__id__": 8
},
{
"__id__": 23
"__id__": 24
},
{
"__id__": 40
"__id__": 42
},
{
"__id__": 57
"__id__": 60
}
],
"_tag": -1,
"_active": true,
"_components": [
{
"__id__": 77
"__id__": 80
},
{
"__id__": 78
"__id__": 81
}
],
"_prefab": null,
@@ -886,11 +886,24 @@
"brake": 0.75,
"elastic": true,
"bounceDuration": 0.23,
"scrollEvents": [],
"scrollEvents": [
{
"__id__": 23
}
],
"cancelInnerEvents": true,
"_N$horizontalScrollBar": null,
"_N$verticalScrollBar": null
},
{
"__type__": "cc.ClickEvent",
"target": {
"__id__": 2
},
"component": "HelloWorld",
"handler": "onEventScrollView",
"customEventData": ""
},
{
"__type__": "cc.Node",
"_name": "vertical",
@@ -900,20 +913,20 @@
},
"_children": [
{
"__id__": 24
"__id__": 25
},
{
"__id__": 30
"__id__": 31
}
],
"_tag": -1,
"_active": true,
"_components": [
{
"__id__": 38
"__id__": 39
},
{
"__id__": 39
"__id__": 40
}
],
"_prefab": null,
@@ -958,24 +971,24 @@
"_name": "scrollBar",
"_objFlags": 0,
"_parent": {
"__id__": 23
"__id__": 24
},
"_children": [
{
"__id__": 25
"__id__": 26
}
],
"_tag": -1,
"_active": true,
"_components": [
{
"__id__": 27
},
{
"__id__": 28
},
{
"__id__": 29
},
{
"__id__": 30
}
],
"_prefab": null,
@@ -1020,14 +1033,14 @@
"_name": "bar",
"_objFlags": 0,
"_parent": {
"__id__": 24
"__id__": 25
},
"_children": [],
"_tag": -1,
"_active": true,
"_components": [
{
"__id__": 26
"__id__": 27
}
],
"_prefab": null,
@@ -1072,7 +1085,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 25
"__id__": 26
},
"_enabled": true,
"_spriteFrame": {
@@ -1098,7 +1111,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 24
"__id__": 25
},
"_enabled": true,
"_scrollView": {
@@ -1109,7 +1122,7 @@
"enableAutoHide": true,
"autoHideTime": 1,
"_N$handle": {
"__id__": 26
"__id__": 27
},
"_N$direction": 1
},
@@ -1118,7 +1131,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 24
"__id__": 25
},
"_enabled": true,
"isAlignOnce": true,
@@ -1144,7 +1157,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 24
"__id__": 25
},
"_enabled": true,
"_spriteFrame": {
@@ -1170,18 +1183,18 @@
"_name": "view",
"_objFlags": 0,
"_parent": {
"__id__": 23
"__id__": 24
},
"_children": [
{
"__id__": 31
"__id__": 32
}
],
"_tag": -1,
"_active": true,
"_components": [
{
"__id__": 37
"__id__": 38
}
],
"_prefab": null,
@@ -1226,21 +1239,21 @@
"_name": "content",
"_objFlags": 0,
"_parent": {
"__id__": 30
"__id__": 31
},
"_children": [
{
"__id__": 32
"__id__": 33
},
{
"__id__": 34
"__id__": 35
}
],
"_tag": -1,
"_active": true,
"_components": [
{
"__id__": 36
"__id__": 37
}
],
"_prefab": null,
@@ -1285,14 +1298,14 @@
"_name": "HelloWorld",
"_objFlags": 0,
"_parent": {
"__id__": 31
"__id__": 32
},
"_children": [],
"_tag": -1,
"_active": true,
"_components": [
{
"__id__": 33
"__id__": 34
}
],
"_prefab": null,
@@ -1337,7 +1350,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 32
"__id__": 33
},
"_enabled": true,
"_spriteFrame": {
@@ -1363,14 +1376,14 @@
"_name": "HelloWorld",
"_objFlags": 0,
"_parent": {
"__id__": 31
"__id__": 32
},
"_children": [],
"_tag": -1,
"_active": true,
"_components": [
{
"__id__": 35
"__id__": 36
}
],
"_prefab": null,
@@ -1415,7 +1428,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 34
"__id__": 35
},
"_enabled": true,
"_spriteFrame": {
@@ -1441,7 +1454,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 31
"__id__": 32
},
"_enabled": true,
"_layoutSize": {
@@ -1472,7 +1485,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 30
"__id__": 31
},
"_enabled": true,
"_type": 0,
@@ -1486,7 +1499,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 23
"__id__": 24
},
"_enabled": true,
"_spriteFrame": {
@@ -1512,11 +1525,11 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 23
"__id__": 24
},
"_enabled": true,
"content": {
"__id__": 31
"__id__": 32
},
"horizontal": false,
"vertical": true,
@@ -1524,13 +1537,26 @@
"brake": 0.75,
"elastic": true,
"bounceDuration": 0.23,
"scrollEvents": [],
"scrollEvents": [
{
"__id__": 41
}
],
"cancelInnerEvents": true,
"_N$horizontalScrollBar": null,
"_N$verticalScrollBar": {
"__id__": 27
"__id__": 28
}
},
{
"__type__": "cc.ClickEvent",
"target": {
"__id__": 2
},
"component": "HelloWorld",
"handler": "onEventScrollView",
"customEventData": ""
},
{
"__type__": "cc.Node",
"_name": "grid",
@@ -1540,17 +1566,17 @@
},
"_children": [
{
"__id__": 41
"__id__": 43
}
],
"_tag": -1,
"_active": true,
"_components": [
{
"__id__": 55
"__id__": 57
},
{
"__id__": 56
"__id__": 58
}
],
"_prefab": null,
@@ -1595,18 +1621,18 @@
"_name": "view",
"_objFlags": 0,
"_parent": {
"__id__": 40
"__id__": 42
},
"_children": [
{
"__id__": 42
"__id__": 44
}
],
"_tag": -1,
"_active": true,
"_components": [
{
"__id__": 54
"__id__": 56
}
],
"_prefab": null,
@@ -1651,12 +1677,9 @@
"_name": "content",
"_objFlags": 0,
"_parent": {
"__id__": 41
"__id__": 43
},
"_children": [
{
"__id__": 43
},
{
"__id__": 45
},
@@ -1668,13 +1691,16 @@
},
{
"__id__": 51
},
{
"__id__": 53
}
],
"_tag": -1,
"_active": true,
"_components": [
{
"__id__": 53
"__id__": 55
}
],
"_prefab": null,
@@ -1719,14 +1745,14 @@
"_name": "HelloWorld",
"_objFlags": 0,
"_parent": {
"__id__": 42
"__id__": 44
},
"_children": [],
"_tag": -1,
"_active": true,
"_components": [
{
"__id__": 44
"__id__": 46
}
],
"_prefab": null,
@@ -1771,7 +1797,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 43
"__id__": 45
},
"_enabled": true,
"_spriteFrame": {
@@ -1797,14 +1823,14 @@
"_name": "HelloWorld",
"_objFlags": 0,
"_parent": {
"__id__": 42
"__id__": 44
},
"_children": [],
"_tag": -1,
"_active": true,
"_components": [
{
"__id__": 46
"__id__": 48
}
],
"_prefab": null,
@@ -1849,7 +1875,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 45
"__id__": 47
},
"_enabled": true,
"_spriteFrame": {
@@ -1875,14 +1901,14 @@
"_name": "HelloWorld",
"_objFlags": 0,
"_parent": {
"__id__": 42
"__id__": 44
},
"_children": [],
"_tag": -1,
"_active": true,
"_components": [
{
"__id__": 48
"__id__": 50
}
],
"_prefab": null,
@@ -1927,7 +1953,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 47
"__id__": 49
},
"_enabled": true,
"_spriteFrame": {
@@ -1953,14 +1979,14 @@
"_name": "HelloWorld",
"_objFlags": 0,
"_parent": {
"__id__": 42
"__id__": 44
},
"_children": [],
"_tag": -1,
"_active": true,
"_components": [
{
"__id__": 50
"__id__": 52
}
],
"_prefab": null,
@@ -2005,7 +2031,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 49
"__id__": 51
},
"_enabled": true,
"_spriteFrame": {
@@ -2031,14 +2057,14 @@
"_name": "HelloWorld",
"_objFlags": 0,
"_parent": {
"__id__": 42
"__id__": 44
},
"_children": [],
"_tag": -1,
"_active": true,
"_components": [
{
"__id__": 52
"__id__": 54
}
],
"_prefab": null,
@@ -2083,7 +2109,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 51
"__id__": 53
},
"_enabled": true,
"_spriteFrame": {
@@ -2109,7 +2135,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 42
"__id__": 44
},
"_enabled": true,
"_layoutSize": {
@@ -2140,7 +2166,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 41
"__id__": 43
},
"_enabled": true,
"_type": 0,
@@ -2154,7 +2180,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 40
"__id__": 42
},
"_enabled": true,
"_spriteFrame": {
@@ -2180,11 +2206,11 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 40
"__id__": 42
},
"_enabled": true,
"content": {
"__id__": 42
"__id__": 44
},
"horizontal": false,
"vertical": true,
@@ -2192,11 +2218,24 @@
"brake": 0.75,
"elastic": true,
"bounceDuration": 0.23,
"scrollEvents": [],
"scrollEvents": [
{
"__id__": 59
}
],
"cancelInnerEvents": true,
"_N$horizontalScrollBar": null,
"_N$verticalScrollBar": null
},
{
"__type__": "cc.ClickEvent",
"target": {
"__id__": 2
},
"component": "HelloWorld",
"handler": "onEventScrollView",
"customEventData": ""
},
{
"__type__": "cc.Node",
"_name": "Btn",
@@ -2206,20 +2245,20 @@
},
"_children": [
{
"__id__": 58
"__id__": 61
},
{
"__id__": 64
"__id__": 67
},
{
"__id__": 70
"__id__": 73
}
],
"_tag": -1,
"_active": true,
"_components": [
{
"__id__": 76
"__id__": 79
}
],
"_prefab": null,
@@ -2264,21 +2303,21 @@
"_name": "btn0",
"_objFlags": 0,
"_parent": {
"__id__": 57
"__id__": 60
},
"_children": [
{
"__id__": 59
"__id__": 62
}
],
"_tag": -1,
"_active": true,
"_components": [
{
"__id__": 61
"__id__": 64
},
{
"__id__": 62
"__id__": 65
}
],
"_prefab": null,
@@ -2323,14 +2362,14 @@
"_name": "Label",
"_objFlags": 0,
"_parent": {
"__id__": 58
"__id__": 61
},
"_children": [],
"_tag": -1,
"_active": true,
"_components": [
{
"__id__": 60
"__id__": 63
}
],
"_prefab": null,
@@ -2375,7 +2414,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 59
"__id__": 62
},
"_enabled": true,
"_useOriginalSize": false,
@@ -2397,7 +2436,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 58
"__id__": 61
},
"_enabled": true,
"_spriteFrame": {
@@ -2423,7 +2462,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 58
"__id__": 61
},
"_enabled": true,
"transition": 2,
@@ -2443,15 +2482,9 @@
},
"duration": 0.1,
"zoomScale": 1.2,
"pressedSprite": {
"__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a"
},
"hoverSprite": {
"__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a"
},
"clickEvents": [
{
"__id__": 63
"__id__": 66
}
],
"_N$interactable": true,
@@ -2473,11 +2506,23 @@
"_N$normalSprite": {
"__uuid__": "f0048c10-f03e-4c97-b9d3-3506e1d58952"
},
"_N$pressedSprite": {
"__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a"
},
"pressedSprite": {
"__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a"
},
"_N$hoverSprite": {
"__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a"
},
"hoverSprite": {
"__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a"
},
"_N$disabledSprite": {
"__uuid__": "29158224-f8dd-4661-a796-1ffab537140e"
},
"_N$target": {
"__id__": 58
"__id__": 61
}
},
{
@@ -2494,21 +2539,21 @@
"_name": "btn1",
"_objFlags": 0,
"_parent": {
"__id__": 57
"__id__": 60
},
"_children": [
{
"__id__": 65
"__id__": 68
}
],
"_tag": -1,
"_active": true,
"_components": [
{
"__id__": 67
"__id__": 70
},
{
"__id__": 68
"__id__": 71
}
],
"_prefab": null,
@@ -2553,14 +2598,14 @@
"_name": "Label",
"_objFlags": 0,
"_parent": {
"__id__": 64
"__id__": 67
},
"_children": [],
"_tag": -1,
"_active": true,
"_components": [
{
"__id__": 66
"__id__": 69
}
],
"_prefab": null,
@@ -2605,7 +2650,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 65
"__id__": 68
},
"_enabled": true,
"_useOriginalSize": false,
@@ -2627,7 +2672,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 64
"__id__": 67
},
"_enabled": true,
"_spriteFrame": {
@@ -2653,7 +2698,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 64
"__id__": 67
},
"_enabled": true,
"transition": 2,
@@ -2673,15 +2718,9 @@
},
"duration": 0.1,
"zoomScale": 1.2,
"pressedSprite": {
"__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a"
},
"hoverSprite": {
"__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a"
},
"clickEvents": [
{
"__id__": 69
"__id__": 72
}
],
"_N$interactable": true,
@@ -2703,11 +2742,23 @@
"_N$normalSprite": {
"__uuid__": "f0048c10-f03e-4c97-b9d3-3506e1d58952"
},
"_N$pressedSprite": {
"__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a"
},
"pressedSprite": {
"__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a"
},
"_N$hoverSprite": {
"__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a"
},
"hoverSprite": {
"__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a"
},
"_N$disabledSprite": {
"__uuid__": "29158224-f8dd-4661-a796-1ffab537140e"
},
"_N$target": {
"__id__": 64
"__id__": 67
}
},
{
@@ -2724,21 +2775,21 @@
"_name": "btn2",
"_objFlags": 0,
"_parent": {
"__id__": 57
"__id__": 60
},
"_children": [
{
"__id__": 71
"__id__": 74
}
],
"_tag": -1,
"_active": true,
"_components": [
{
"__id__": 73
"__id__": 76
},
{
"__id__": 74
"__id__": 77
}
],
"_prefab": null,
@@ -2783,14 +2834,14 @@
"_name": "Label",
"_objFlags": 0,
"_parent": {
"__id__": 70
"__id__": 73
},
"_children": [],
"_tag": -1,
"_active": true,
"_components": [
{
"__id__": 72
"__id__": 75
}
],
"_prefab": null,
@@ -2835,7 +2886,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 71
"__id__": 74
},
"_enabled": true,
"_useOriginalSize": false,
@@ -2857,7 +2908,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 70
"__id__": 73
},
"_enabled": true,
"_spriteFrame": {
@@ -2883,7 +2934,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 70
"__id__": 73
},
"_enabled": true,
"transition": 2,
@@ -2903,15 +2954,9 @@
},
"duration": 0.1,
"zoomScale": 1.2,
"pressedSprite": {
"__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a"
},
"hoverSprite": {
"__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a"
},
"clickEvents": [
{
"__id__": 75
"__id__": 78
}
],
"_N$interactable": true,
@@ -2933,11 +2978,23 @@
"_N$normalSprite": {
"__uuid__": "f0048c10-f03e-4c97-b9d3-3506e1d58952"
},
"_N$pressedSprite": {
"__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a"
},
"pressedSprite": {
"__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a"
},
"_N$hoverSprite": {
"__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a"
},
"hoverSprite": {
"__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a"
},
"_N$disabledSprite": {
"__uuid__": "29158224-f8dd-4661-a796-1ffab537140e"
},
"_N$target": {
"__id__": 70
"__id__": 73
}
},
{
@@ -2954,7 +3011,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 57
"__id__": 60
},
"_enabled": true,
"isAlignOnce": true,
@@ -3003,10 +3060,10 @@
"__id__": 22
},
"vertical": {
"__id__": 39
"__id__": 40
},
"grid": {
"__id__": 56
"__id__": 58
},
"item": {
"__id__": 6

View File

@@ -23,21 +23,24 @@ cc.Class({
this.grid.node.active = false;
var node = this.node.getChildByName(customData);
switch (node.name) {
case 'horizontal': {
this.horizontal.node.active = true;
this.onAddItem(this.horizontal, this.item);
break;
}
case 'vertical': {
this.vertical.node.active = true;
this.onAddItem(this.vertical, this.item);
break;
}
case 'grid': {
this.grid.node.active = true;
this.onAddItem(this.grid, this.item);
break;
}
case 'horizontal':
{
this.horizontal.node.active = true;
this.onAddItem(this.horizontal, this.item);
break;
}
case 'vertical':
{
this.vertical.node.active = true;
this.onAddItem(this.vertical, this.item);
break;
}
case 'grid':
{
this.grid.node.active = true;
this.onAddItem(this.grid, this.item);
break;
}
}
},
@@ -48,8 +51,17 @@ cc.Class({
contentNode.addChild(child);
},
onEventScrollView(event, eventType) {
console.log('eventType=', eventType, cc.ScrollView.EventType);
//当滑动到最后,添加一个
if (cc.ScrollView.EventType.AUTOSCROLL_ENDED_WITH_THRESHOLD == eventType) {
console.log('aa');
this.onAddItem(this.vertical, this.item);
}
},
// called every frame
update: function (dt) {
},
});
});

View File

@@ -1,67 +0,0 @@
#/////////////////////////////////////////////////////////////////////////////
# Fireball Projects
#/////////////////////////////////////////////////////////////////////////////
library/
temp/
local/
build/
#/////////////////////////////////////////////////////////////////////////////
# Logs and databases
#/////////////////////////////////////////////////////////////////////////////
*.log
*.sql
*.sqlite
#/////////////////////////////////////////////////////////////////////////////
# files for debugger
#/////////////////////////////////////////////////////////////////////////////
*.sln
*.csproj
*.pidb
*.unityproj
*.suo
#/////////////////////////////////////////////////////////////////////////////
# OS generated files
#/////////////////////////////////////////////////////////////////////////////
.DS_Store
ehthumbs.db
Thumbs.db
#/////////////////////////////////////////////////////////////////////////////
# exvim files
#/////////////////////////////////////////////////////////////////////////////
*UnityVS.meta
*.err
*.err.meta
*.exvim
*.exvim.meta
*.vimentry
*.vimentry.meta
*.vimproject
*.vimproject.meta
.vimfiles.*/
.exvim.*/
quick_gen_project_*_autogen.bat
quick_gen_project_*_autogen.bat.meta
quick_gen_project_*_autogen.sh
quick_gen_project_*_autogen.sh.meta
.exvim.app
#/////////////////////////////////////////////////////////////////////////////
# webstorm files
#/////////////////////////////////////////////////////////////////////////////
.idea/
#//////////////////////////
# VS Code
#//////////////////////////
.vscode/

View File

@@ -1,2 +0,0 @@
# hello-world
Hello world new project template.

View File

@@ -1,6 +0,0 @@
{
"ver": "1.0.1",
"uuid": "29f52784-2fca-467b-92e7-8fd9ef8c57b7",
"isGroup": false,
"subMetas": {}
}

View File

@@ -1,457 +0,0 @@
[
{
"__type__": "cc.SceneAsset",
"_name": "",
"_objFlags": 0,
"_rawFiles": null,
"scene": {
"__id__": 1
}
},
{
"__type__": "cc.Scene",
"_objFlags": 0,
"_parent": null,
"_children": [
{
"__id__": 2
}
],
"_tag": -1,
"_active": true,
"_components": [],
"_prefab": null,
"_id": "2d2f792f-a40c-49bb-a189-ed176a246e49",
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_cascadeOpacityEnabled": true,
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_contentSize": {
"__type__": "cc.Size",
"width": 0,
"height": 0
},
"_localZOrder": 0,
"_globalZOrder": 0,
"_opacityModifyRGB": false,
"groupIndex": 0,
"autoReleaseAssets": false
},
{
"__type__": "cc.Node",
"_name": "Canvas",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [
{
"__id__": 3
},
{
"__id__": 6
},
{
"__id__": 8
},
{
"__id__": 10
}
],
"_tag": -1,
"_active": true,
"_components": [
{
"__id__": 12
}
],
"_prefab": null,
"_id": "a286bbGknJLZpRpxROV6M94",
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 252,
"g": 252,
"b": 252,
"a": 255
},
"_cascadeOpacityEnabled": true,
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_contentSize": {
"__type__": "cc.Size",
"width": 960,
"height": 640
},
"_rotationX": 0,
"_rotationY": 0,
"_scaleX": 1,
"_scaleY": 1,
"_position": {
"__type__": "cc.Vec2",
"x": 480,
"y": 320
},
"_skewX": 0,
"_skewY": 0,
"_localZOrder": 0,
"_globalZOrder": 0,
"_opacityModifyRGB": false,
"groupIndex": 0
},
{
"__type__": "cc.Node",
"_name": "background",
"_objFlags": 0,
"_parent": {
"__id__": 2
},
"_children": [],
"_tag": -1,
"_active": true,
"_components": [
{
"__id__": 4
},
{
"__id__": 5
}
],
"_prefab": null,
"_id": "e2e0crkOLxGrpMxpbC4iQg1",
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 27,
"g": 38,
"b": 46,
"a": 255
},
"_cascadeOpacityEnabled": true,
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_contentSize": {
"__type__": "cc.Size",
"width": 960,
"height": 640
},
"_rotationX": 0,
"_rotationY": 0,
"_scaleX": 1,
"_scaleY": 1,
"_position": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_skewX": 0,
"_skewY": 0,
"_localZOrder": 0,
"_globalZOrder": 0,
"_opacityModifyRGB": false,
"groupIndex": 0
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 3
},
"_enabled": true,
"isAlignOnce": true,
"_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": 200,
"_originalHeight": 150
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 3
},
"_enabled": true,
"_spriteFrame": {
"__uuid__": "410fb916-8721-4663-bab8-34397391ace7"
},
"_type": 1,
"_sizeMode": 0,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_atlas": null
},
{
"__type__": "cc.Node",
"_name": "cocos",
"_objFlags": 0,
"_parent": {
"__id__": 2
},
"_children": [],
"_tag": -1,
"_active": true,
"_components": [
{
"__id__": 7
}
],
"_prefab": null,
"_id": "c4f30YOS65G64U2TwufdJ+2",
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_cascadeOpacityEnabled": true,
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_contentSize": {
"__type__": "cc.Size",
"width": 195,
"height": 270
},
"_rotationX": 0,
"_rotationY": 0,
"_scaleX": 1,
"_scaleY": 1,
"_position": {
"__type__": "cc.Vec2",
"x": 0,
"y": 50
},
"_skewX": 0,
"_skewY": 0,
"_localZOrder": 0,
"_globalZOrder": 0,
"_opacityModifyRGB": false,
"groupIndex": 0
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 6
},
"_enabled": true,
"_spriteFrame": {
"__uuid__": "31bc895a-c003-4566-a9f3-2e54ae1c17dc"
},
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_atlas": null
},
{
"__type__": "cc.Node",
"_name": "label",
"_objFlags": 0,
"_parent": {
"__id__": 2
},
"_children": [],
"_tag": -1,
"_active": true,
"_components": [
{
"__id__": 9
}
],
"_prefab": null,
"_id": "31f1bH7V69Ajr1iXhluMpTB",
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_cascadeOpacityEnabled": true,
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_contentSize": {
"__type__": "cc.Size",
"width": 147,
"height": 60
},
"_rotationX": 0,
"_rotationY": 0,
"_scaleX": 1,
"_scaleY": 1,
"_position": {
"__type__": "cc.Vec2",
"x": 0,
"y": -180
},
"_skewX": 0,
"_skewY": 0,
"_localZOrder": 0,
"_globalZOrder": 0,
"_opacityModifyRGB": false,
"groupIndex": 0
},
{
"__type__": "cc.Label",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 8
},
"_enabled": true,
"_useOriginalSize": false,
"_actualFontSize": 60,
"_fontSize": 60,
"_lineHeight": 60,
"_enableWrapText": true,
"_N$file": null,
"_isSystemFontUsed": true,
"_spacingX": 0,
"_N$string": "Label",
"_N$horizontalAlign": 1,
"_N$verticalAlign": 1,
"_N$fontFamily": "Arial",
"_N$overflow": 0
},
{
"__type__": "cc.Node",
"_name": "PokerNode",
"_objFlags": 0,
"_parent": {
"__id__": 2
},
"_children": [],
"_tag": -1,
"_active": true,
"_components": [
{
"__id__": 11
}
],
"_prefab": null,
"_id": "24D6gzArZGLIUPotztsjPg",
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_cascadeOpacityEnabled": true,
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_contentSize": {
"__type__": "cc.Size",
"width": 960,
"height": 640
},
"_rotationX": 0,
"_rotationY": 0,
"_scaleX": 1,
"_scaleY": 1,
"_position": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_skewX": 0,
"_skewY": 0,
"_localZOrder": 0,
"_globalZOrder": 0,
"_opacityModifyRGB": false,
"groupIndex": 0
},
{
"__type__": "280c3rsZJJKnZ9RqbALVwtK",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 10
},
"_enabled": true,
"spCardBack": {
"__uuid__": "91402419-4bd7-4177-aa52-92fad83e5a63"
},
"spCardFace": {
"__uuid__": "45260d51-2763-4197-a05d-4840e8d624e4"
}
},
{
"__type__": "cc.Canvas",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 2
},
"_enabled": true,
"_designResolution": {
"__type__": "cc.Size",
"width": 960,
"height": 640
},
"_fitWidth": false,
"_fitHeight": true
}
]

View File

@@ -1,7 +0,0 @@
{
"ver": "1.0.0",
"uuid": "2d2f792f-a40c-49bb-a189-ed176a246e49",
"asyncLoadAssets": false,
"autoReleaseAssets": false,
"subMetas": {}
}

View File

@@ -1,6 +0,0 @@
{
"ver": "1.0.1",
"uuid": "4734c20c-0db8-4eb2-92ea-e692f4d70934",
"isGroup": false,
"subMetas": {}
}

View File

@@ -1,206 +0,0 @@
cc.Class({
extends: cc.Component,
properties: {
spCardBack: {
default: '',
url: cc.Texture2D
},
spCardFace: {
default: '',
url: cc.Texture2D
}
},
// use this for initialization
onLoad: function () {
//显示信息
cc.director.setDisplayStats(true);
//加载为Sprite
this._spCardBack = cc.textureCache.addImage(this.spCardBack);
this._spCardFace = cc.textureCache.addImage(this.spCardFace);
//存储尺寸
this._cardSize = this._spCardFace.getContentSize();
//加载顶点,纹理数据到缓存
this.initVertTexBuffer(true);
this.initVertTexBuffer(false);
//创建glNode
this._glNode = new cc.GLNode();
this.node._sgNode.addChild(this._glNode);
//创建glProgram
this.glProgram = new cc.GLProgram();
var vert = require("shader.card.vert");
var frag = require("shader.card.frag");
this.glProgram.initWithString(vert, frag);
this.glProgram.link();
this.glProgram.updateUniforms();
this.glProgram.UNI_A = gl.getUniformLocation(this.glProgram.getProgram(), "UNI_A");
this.glProgram.UNI_B = gl.getUniformLocation(this.glProgram.getProgram(), "UNI_B");
this.glProgram.UNI_C = gl.getUniformLocation(this.glProgram.getProgram(), "UNI_C");
//默认值
this.UNI_A = 0;
this.UNI_B = 1;
this.UNI_C = 0;
//重写Draw方法
this._glNode.draw = function () {
//启用面剔除
gl.enable(gl.CULL_FACE);
// gl.cullFace(gl.FRONT);//此函数可以使正反面颠倒
this.glProgram.use();
this.glProgram.setUniformsForBuiltins();
this.glProgram.setUniformLocationF32(this.glProgram.UNI_A, this.UNI_A);
this.glProgram.setUniformLocationF32(this.glProgram.UNI_B, this.UNI_B);
this.glProgram.setUniformLocationF32(this.glProgram.UNI_C, this.UNI_C);
//绑定卡背纹理
gl.bindTexture(gl.TEXTURE_2D, this._spCardBack.name);
this.addVertsTexCoord(this._backVertsBuffer, this._backTexsBuffer);
//绑定卡面纹理
gl.bindTexture(gl.TEXTURE_2D, this._spCardFace.name);
this.addVertsTexCoord(this._faceVertsBuffer, this._faceTexsBuffer);
//停止面剔除
gl.disable(gl.CULL_FACE);
}.bind(this);
this.addTouchEvent();
},
addTouchEvent() {
this.node.on(cc.Node.EventType.TOUCH_START, (touch) => {
this.start = touch.getLocation();
this.UNI_C = 0;
});
this.node.on(cc.Node.EventType.TOUCH_MOVE, (touch) => {
var location = touch.getLocation();
//计算触摸点与原点(0,0)连线,过其连线中点,并与连线垂直的直线
//注:以扑克牌左下角为原点,需平移(-180,-70)
// location.x += -180;
// location.y += -70;
//触摸点与原点连线为y=location.y/location.x * x;
//斜率
// var k = location.y / location.x;
//连线中点
// var mid = cc.v2(location.x / 2, location.y / 2);
//已知斜率+过一点y-mid.y=-1/k(x - mid.x)
//1/k*x+y-mid.y-mid.x/k=0 由此可知
// this.UNI_A = 1 / k;
// this.UNI_B = 1;
// this.UNI_C = -mid.y - mid.x / k;
if (location.y - this.start.y > 0) {
this.UNI_C = this.start.y - location.y;
if (this.UNI_C < -400) {
this.UNI_C = -400;
}
} else {
this.UNI_C = 0;
}
console.log('TOUCH_MOVE', this.UNI_C);
});
function end(touch) {
this.UNI_C = 0;
}
// this.node.on(cc.Node.EventType.TOUCH_CANCEL,end,this);
// this.node.on(cc.Node.EventType.TOUCH_END,end,this);
},
initVertTexBuffer: function (isBack) {
//100x100的网格计算顶点位置
var widthDiv = 100;
var heightDiv = 100;
//存放数据的数组
var verts = [];
var texs = [];
//顶点间隔,纹理为竖向,这里横向放置
var durH = this._cardSize.width / heightDiv;
var durW = this._cardSize.height / widthDiv;
for (var i = 1; i <= widthDiv; i++) {
for (var j = 1; j <= heightDiv; j++) {
//计算顶点
var x = (i - 1) * durW;
var y = (j - 1) * durH;
//此处设置六个顶点,作为一个图元
//注意:两个三角形的顶点都要以逆时针顺序设置,开启面剔除之后,逆时针顶点为正面
if (isBack) {
//逆时针
//第一个三角形
verts.push(x); verts.push(y);
verts.push(x + durW); verts.push(y);
verts.push(x + durW); verts.push(y + durH);
//第二个三角形
verts.push(x); verts.push(y);
verts.push(x + durW); verts.push(y + durH);
verts.push(x); verts.push(y + durH);
} else {
//顺时针
//第一个三角形
verts.push(x); verts.push(y);
verts.push(x + durW); verts.push(y + durH);
verts.push(x + durW); verts.push(y);
//第二个三角形
verts.push(x); verts.push(y);
verts.push(x); verts.push(y + durH);
verts.push(x + durW); verts.push(y + durH);
}
}
}
//顶点数量
this._vertsNum = verts.length / 2;
//计算纹理位置
for (var i = 0; i < this._vertsNum; i++) {
var texX = verts[i * 2];
var texY = verts[i * 2 + 1];
//X,Y交换纹理横向
var numY = texX / this._cardSize.height;
var numX = texY / this._cardSize.width;
if (!isBack) numY = 1 - numY; numX = 1 - numX;
texs.push(numX);
texs.push(numY);
};
//顶点Buffer
var vertsBuffer = gl.createBuffer();
gl.bindBuffer(gl.ARRAY_BUFFER, vertsBuffer);
gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(verts), gl.STATIC_DRAW);
gl.bindBuffer(gl.ARRAY_BUFFER, null);
//纹理位置Buffer
var texsBuffer = gl.createBuffer();
gl.bindBuffer(gl.ARRAY_BUFFER, texsBuffer);
gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(texs), gl.STATIC_DRAW);
gl.bindBuffer(gl.ARRAY_BUFFER, null);
//正反面区分
if (isBack) {
this._backVertsBuffer = vertsBuffer.buffer_id;
this._backTexsBuffer = texsBuffer.buffer_id;
}
else {
this._faceVertsBuffer = vertsBuffer.buffer_id;
this._faceTexsBuffer = texsBuffer.buffer_id;
}
},
addVertsTexCoord: function (verts, texs) {
var VERTEX_ATTRIB_FLAG_POSITION = 1
var VERTEX_ATTRIB_FLAG_TEX_COORDS = 4
var VERTEX_ATTRIB_POSITION = 0;
var VERTEX_ATTRIB_TEX_COORDS = 2;
gl.bindBuffer(gl.ARRAY_BUFFER, verts)
gl.vertexAttribPointer(VERTEX_ATTRIB_POSITION, 2, gl.FLOAT, 0, 0, 0)
gl.bindBuffer(gl.ARRAY_BUFFER, texs)
gl.vertexAttribPointer(VERTEX_ATTRIB_TEX_COORDS, 2, gl.FLOAT, 0, 0, 0)
//GL_TRIANGLES是以每三个顶点绘制一个三角形。第一个三角形使用顶点v0,v1,v2,第二个使用v3,v4,v5,以此类推。如果顶点的个数n不是3的倍数那么最后的1个或者2个顶点会被忽略。
gl.drawArrays(gl.TRIANGLES, 0, this._vertsNum)
gl.bindBuffer(gl.ARRAY_BUFFER, 0)
},
// called every frame
update: function (dt) {
},
});

View File

@@ -1,9 +0,0 @@
{
"ver": "1.0.5",
"uuid": "280c3aec-6492-4a9d-9f51-a9b00b570b4a",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}

View File

@@ -1,11 +0,0 @@
module.exports =
`
varying vec2 v_texCoord;
void main()
{
vec4 c = texture2D(CC_Texture0, v_texCoord);
// c.w = 0.5;
gl_FragColor = c;
}
`

View File

@@ -1,9 +0,0 @@
{
"ver": "1.0.5",
"uuid": "f4c3a666-07a0-4986-ac95-4db72fc262a3",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}

View File

@@ -1,71 +0,0 @@
module.exports =
`
attribute vec2 a_texCoord;
varying vec2 v_texCoord;
varying vec4 v_fragmentColor;
attribute vec4 a_color;
//内部变量,运行时为绘制顶点的位置,直接访问gl_Vertex与此相同
attribute vec4 a_position;
uniform float UNI_A = 1;
uniform float UNI_B = 1;
uniform float UNI_C = 0;
uniform float UNI_D = 0;
uniform float UNI_WIDTH=0;
uniform float UNI_HEIGHT=0;
const float PI = 3.1415927;
void main(){
v_texCoord = a_texCoord;
// 坐标
vec4 v = vec4(gl_Vertex);
// 折叠左下角关于直线UNI_A*v.x + UNI_B*v.y + UNI_C = 0对称
vec4 tmp_pos = vec4(0.0, 0.0, 0.0, 0.0);
if(UNI_A*v.x + UNI_B*v.y + UNI_C <= 0){
// 圆弧半径
float r = UNI_D/PI;
// 圆弧分割线C2值
float UNI_C2 = UNI_C + UNI_D*sqrt(pow(UNI_A,2) + pow(UNI_B,2));
//对称区域
if(UNI_A*v.x + UNI_B*v.y + UNI_C2 <= 0){
// 真实对称线C3值
float UNI_C3 = (UNI_C+UNI_C2)/2;
v.z = 2*r;
tmp_pos.x = v.x - 2*UNI_A*((UNI_A*v.x+UNI_B*v.y+UNI_C3)/(pow(UNI_A,2) + pow(UNI_B,2)));
tmp_pos.y = v.y - 2*UNI_B*((UNI_A*v.x+UNI_B*v.y+UNI_C3)/(pow(UNI_A,2) + pow(UNI_B,2)));
v.x = tmp_pos.x;
v.y = tmp_pos.y;
}
//圆弧区域
else{
// 弧长即顶点到L1(UNI_C)的距离
float d = abs((UNI_A*v.x + UNI_B*v.y + UNI_C)/(sqrt(pow(UNI_A,2) + pow(UNI_B,2))));
// 圆心角,C语言sincos等三角函数参数都是弧度这里圆心角直接计算弧度
float angle = (d*PI)/UNI_D;
// 圆弧上一点在XY平面的投影到L1的距离
float D_TO_L1 = r * sin(angle);
// 圆弧上一点到XY平面的距离
float Z_TO_XY = r - r*cos(angle);
//Z坐标
v.z = Z_TO_XY;
//XY坐标,根据斜率计算xy变动值 pow(UNI_B/UNI_A*OFF_SET_X,2) + pow(OFF_SET_X,2) = pow(d - D_TO_L1,2)
float OFF_SET_Y = sqrt(pow(d - D_TO_L1,2)/(1+pow(UNI_B,2)/pow(UNI_A,2)));
float OFF_SET_X = UNI_B/UNI_A*OFF_SET_Y;
v.x+=OFF_SET_X;
v.y+=OFF_SET_Y;
}
}
// 图片置中,以图片中心为锚点计算得出偏移量
v.x+=180;
v.y+=70;
if(UNI_C<-50) {
float len=UNI_C+50;
v.y+=len;
}
v = CC_PMatrix * v;
gl_Position = v;
}`;

View File

@@ -1,9 +0,0 @@
{
"ver": "1.0.5",
"uuid": "35c65738-485d-4a2e-8fb7-d306072d4cb6",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}

View File

@@ -1,6 +0,0 @@
{
"ver": "1.0.1",
"uuid": "7b81d4e8-ec84-4716-968d-500ac1d78a54",
"isGroup": false,
"subMetas": {}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

View File

@@ -1,30 +0,0 @@
{
"ver": "1.0.0",
"uuid": "6aa0aa6a-ebee-4155-a088-a687a6aadec4",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"subMetas": {
"HelloWorld": {
"ver": "1.0.3",
"uuid": "31bc895a-c003-4566-a9f3-2e54ae1c17dc",
"rawTextureUuid": "6aa0aa6a-ebee-4155-a088-a687a6aadec4",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 195,
"height": 270,
"rawWidth": 195,
"rawHeight": 270,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

View File

@@ -1,30 +0,0 @@
{
"ver": "1.0.0",
"uuid": "a8027877-d8d6-4645-97a0-52d4a0123dba",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"subMetas": {
"singleColor": {
"ver": "1.0.3",
"uuid": "410fb916-8721-4663-bab8-34397391ace7",
"rawTextureUuid": "a8027877-d8d6-4645-97a0-52d4a0123dba",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 2,
"height": 2,
"rawWidth": 2,
"rawHeight": 2,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}

View File

@@ -1,5 +0,0 @@
{
"ver": "1.0.1",
"uuid": "4ad7e712-dd88-4141-9530-a651c7d6eac6",
"subMetas": {}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 463 KiB

View File

@@ -1,30 +0,0 @@
{
"ver": "1.0.0",
"uuid": "91402419-4bd7-4177-aa52-92fad83e5a63",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"subMetas": {
"CardBack": {
"ver": "1.0.3",
"uuid": "0e50bee7-ce5a-4ca3-aa3c-a6fa6ed9428d",
"rawTextureUuid": "91402419-4bd7-4177-aa52-92fad83e5a63",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 400,
"height": 600,
"rawWidth": 400,
"rawHeight": 600,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 332 KiB

View File

@@ -1,30 +0,0 @@
{
"ver": "1.0.0",
"uuid": "45260d51-2763-4197-a05d-4840e8d624e4",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"subMetas": {
"CardFace": {
"ver": "1.0.3",
"uuid": "2404bf04-ec77-48b7-ad7a-4f0611571ecf",
"rawTextureUuid": "45260d51-2763-4197-a05d-4840e8d624e4",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 400,
"height": 600,
"rawWidth": 400,
"rawHeight": 600,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,15 +0,0 @@
{
"compilerOptions": {
"target": "es6",
"module": "commonjs",
"experimentalDecorators": true
},
"exclude": [
"node_modules",
".vscode",
"library",
"local",
"settings",
"temp"
]
}

View File

@@ -1,4 +0,0 @@
{
"engine": "cocos2d-html5",
"packages": "packages"
}

View File

@@ -1,13 +0,0 @@
{
"excludeScenes": [],
"orientation": {
"landscapeLeft": true,
"landscapeRight": true,
"portrait": false,
"upsideDown": false
},
"packageName": "org.cocos2d.helloworld",
"startScene": "2d2f792f-a40c-49bb-a189-ed176a246e49",
"title": "hello_world",
"webOrientation": "auto"
}

View File

@@ -1,7 +0,0 @@
{
"excludeScenes": [],
"packageName": "org.cocos2d.helloworld",
"platform": "web-mobile",
"startScene": "2d2f792f-a40c-49bb-a189-ed176a246e49",
"title": "HelloWorld"
}

View File

@@ -1,28 +0,0 @@
{
"collision-matrix": [
[
true
]
],
"excluded-modules": [],
"group-list": [
"default"
],
"start-scene": "current",
"design-resolution-width": 960,
"design-resolution-height": 640,
"fit-width": false,
"fit-height": true,
"use-project-simulator-setting": false,
"simulator-orientation": false,
"use-customize-simulator": false,
"simulator-resolution": {
"width": 960,
"height": 640
},
"cocos-analytics": {
"enable": false,
"appID": "13798",
"appSecret": "959b3ac0037d0f3c2fdce94f8421a9b2"
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

View File

@@ -1,5 +0,0 @@
{
"name": "TEMPLATES.helloworld.name",
"desc": "TEMPLATES.helloworld.desc",
"banner": "template-banner.png"
}