完善 demo

This commit is contained in:
SmallMain
2022-06-21 18:18:34 +08:00
parent 3c3245f0a9
commit 6e7dbcb41a
158 changed files with 34534 additions and 43694 deletions

View File

@@ -47,7 +47,7 @@
"versions": {
"import": [
"0dccb646b",
"af549"
"61654"
],
"native": []
}

View File

@@ -13,9 +13,11 @@
"data",
"_parent",
"_scrollView",
"charFont4",
"charFont3",
"charFont2",
"charFont1",
"bitmapFont4",
"bitmapFont3",
"bitmapFont2",
"bitmapFont1"
@@ -222,9 +224,11 @@
"bitmapFont1",
"bitmapFont2",
"bitmapFont3",
"bitmapFont4",
"charFont1",
"charFont2",
"charFont3"
"charFont3",
"charFont4"
],
3,
1,
@@ -233,6 +237,8 @@
1,
1,
1,
1,
1,
1
]
],
@@ -243,6 +249,16 @@
1,
2
],
[
6,
0,
1,
2,
3,
4,
6,
2
],
[
0,
0,
@@ -253,24 +269,6 @@
5,
2
],
[
6,
0,
1,
2,
3,
4,
6,
2
],
[
1,
0,
2,
3,
7,
4
],
[
4,
0,
@@ -295,6 +293,14 @@
9,
7
],
[
1,
0,
2,
3,
7,
4
],
[
1,
0,
@@ -542,6 +548,8 @@
4,
5,
6,
7,
8,
1
]
],
@@ -662,7 +670,7 @@
[
-9,
[
3,
5,
45,
240,
250,
@@ -796,7 +804,7 @@
],
[
[
3,
5,
45,
240,
250,
@@ -815,7 +823,7 @@
]
],
[
1,
2,
"tips",
2,
[
@@ -863,7 +871,7 @@
]
],
[
1,
2,
"no",
4,
[
@@ -906,12 +914,12 @@
]
],
[
1,
2,
"yes",
4,
[
[
5,
4,
"字",
23,
26,
@@ -948,7 +956,7 @@
]
],
[
1,
2,
"no",
4,
[
@@ -991,7 +999,7 @@
]
],
[
1,
2,
"no",
4,
[
@@ -1229,7 +1237,7 @@
8,
"char-mode",
[
-10
-12
],
[
[
@@ -1239,6 +1247,8 @@
],
[
31,
-11,
-10,
-9,
-8,
-7,
@@ -1274,32 +1284,34 @@
9,
"content",
[
-14,
-15,
-16,
-17,
-18,
-19,
-20,
-21
-21,
-22,
-23,
-24,
-25
],
[
[
18,
-11
-13
],
[
19,
1,
2,
1,
30,
20,
-12,
50,
13,
-14,
[
5,
785.815,
503.4
548.04
]
],
[
@@ -1308,7 +1320,7 @@
87.09249999999997,
87.09249999999997,
220,
-13
-15
]
],
[
@@ -1319,7 +1331,7 @@
[
5,
785.815,
503.4
548.04
],
[
0,
@@ -1344,28 +1356,28 @@
"sv",
1,
[
-25,
-26
-29,
-30
],
[
[
-22,
-26,
[
3,
5,
45,
240,
250,
-23
-27
],
[
20,
0,
false,
-24,
-28,
[
6
7
],
7
8
]
],
1,
@@ -1392,28 +1404,28 @@
"scrollBar",
3,
[
-30
-34
],
[
[
-27,
-31,
[
16,
0,
37,
350.07654921020657,
237,
-28
-32
],
[
21,
1,
0,
-29,
-33,
[
4
5
],
5
6
]
],
1,
@@ -1457,11 +1469,11 @@
],
[
[
3,
5,
45,
240,
250,
-31
-35
]
],
[
@@ -1476,12 +1488,12 @@
]
],
[
1,
2,
"tips",
2,
[
[
4,
3,
"使用 Bitmap 缓存模式不断显示随机的 3000 个常用字\n动态图集会回收废弃空间Draw Call 依旧不变",
16,
20,
@@ -1491,14 +1503,14 @@
[
null
],
-32
-36
],
[
6,
17,
95.11500000000001,
30,
-33
50,
-37
]
],
[
@@ -1513,7 +1525,7 @@
],
[
0,
-50,
-70,
0,
0,
0,
@@ -1525,7 +1537,7 @@
]
],
[
1,
2,
"tips",
2,
[
@@ -1541,14 +1553,14 @@
[
null
],
-34
-38
],
[
6,
17,
95.11500000000001,
263.40000000000003,
-35
286.03999999999996,
-39
]
],
[
@@ -1563,7 +1575,7 @@
],
[
0,
-308.40000000000003,
-331.03999999999996,
0,
0,
0,
@@ -1575,11 +1587,11 @@
]
],
[
2,
1,
"label1",
2,
[
-36
-40
],
[
0,
@@ -1589,11 +1601,11 @@
[
5,
58.725,
37.8
32.76
],
[
0,
-108.9,
-119.38,
0,
0,
0,
@@ -1605,10 +1617,10 @@
]
],
[
5,
4,
"Label",
24,
30,
26,
1,
1,
1,
@@ -1618,11 +1630,11 @@
]
],
[
2,
1,
"label2",
2,
[
-37
-41
],
[
0,
@@ -1632,11 +1644,11 @@
[
5,
58.725,
37.8
32.76
],
[
0,
-166.70000000000002,
-165.14,
0,
0,
0,
@@ -1648,10 +1660,10 @@
]
],
[
5,
4,
"Label",
24,
30,
26,
1,
1,
1,
@@ -1661,11 +1673,11 @@
]
],
[
2,
1,
"label3",
2,
[
-38
-42
],
[
0,
@@ -1675,11 +1687,11 @@
[
5,
58.725,
37.8
32.76
],
[
0,
-224.50000000000003,
-210.89999999999998,
0,
0,
0,
@@ -1691,10 +1703,10 @@
]
],
[
5,
4,
"Label",
24,
30,
26,
1,
1,
1,
@@ -1704,11 +1716,54 @@
]
],
[
1,
"label4",
2,
[
-43
],
[
0,
"a0j7wReqhLWIiL84nlII3F",
1
],
[
5,
58.725,
32.76
],
[
0,
-256.65999999999997,
0,
0,
0,
0,
1,
1,
1,
1
]
],
[
4,
"Label",
24,
26,
1,
1,
1,
14,
[
3
]
],
[
1,
"label1",
2,
[
-39
-44
],
[
0,
@@ -1722,7 +1777,7 @@
],
[
0,
-388.40000000000003,
-404.03999999999996,
0,
0,
0,
@@ -1734,7 +1789,7 @@
]
],
[
4,
3,
"Label",
24,
30,
@@ -1744,14 +1799,14 @@
[
null
],
14
16
],
[
2,
1,
"label2",
2,
[
-40
-45
],
[
0,
@@ -1765,7 +1820,7 @@
],
[
0,
-438.40000000000003,
-447.03999999999996,
0,
0,
0,
@@ -1777,7 +1832,7 @@
]
],
[
4,
3,
"Label",
24,
30,
@@ -1787,14 +1842,14 @@
[
null
],
16
18
],
[
2,
1,
"label3",
2,
[
-41
-46
],
[
0,
@@ -1808,7 +1863,7 @@
],
[
0,
-488.40000000000003,
-490.03999999999996,
0,
0,
0,
@@ -1820,7 +1875,7 @@
]
],
[
4,
3,
"Label",
24,
30,
@@ -1830,14 +1885,57 @@
[
null
],
18
20
],
[
1,
"label4",
2,
[
-47
],
[
0,
"06LxFIAa9PdaJ2pzqvz75W",
1
],
[
5,
58.73,
30
],
[
0,
-533.04,
0,
0,
0,
0,
1,
1,
1,
1
]
],
[
3,
"Label",
24,
30,
1,
1,
2,
[
null
],
22
],
[
13,
"bar",
4,
[
-42
-48
],
[
0,
@@ -1859,9 +1957,9 @@
22,
1,
0,
20,
24,
[
3
4
]
],
[
@@ -1869,7 +1967,7 @@
false,
1,
4,
21
25
],
[
24,
@@ -1879,7 +1977,7 @@
null,
3,
2,
22
26
]
],
0,
@@ -1892,21 +1990,27 @@
1,
0,
6,
19,
23,
0,
7,
17,
21,
0,
8,
15,
19,
0,
9,
13,
17,
0,
10,
11,
15,
0,
11,
13,
0,
12,
11,
0,
13,
9,
0,
0,
@@ -1937,10 +2041,10 @@
12,
0,
-5,
7,
14,
0,
-6,
14,
7,
0,
-7,
16,
@@ -1948,8 +2052,14 @@
-8,
18,
0,
-9,
20,
0,
-10,
22,
0,
-1,
23,
27,
0,
0,
3,
@@ -1964,7 +2074,7 @@
4,
0,
-1,
22,
26,
0,
0,
4,
@@ -1973,7 +2083,7 @@
4,
0,
-1,
20,
24,
0,
0,
5,
@@ -2011,15 +2121,21 @@
-1,
21,
0,
-1,
23,
0,
-1,
25,
0,
3,
1,
2,
4,
5,
22,
26,
5,
23,
42
27,
48
],
[
0,
@@ -2030,7 +2146,8 @@
0,
0,
0,
21
0,
25
],
[
-1,
@@ -2038,6 +2155,7 @@
-1,
-1,
-1,
-1,
1,
-1,
1,
@@ -2049,6 +2167,7 @@
0,
0,
0,
0,
1,
0,
2,

View File

@@ -66,9 +66,12 @@ window.__require = function e(t, n, r) {
_this.bitmapFont1 = null;
_this.bitmapFont2 = null;
_this.bitmapFont3 = null;
_this.bitmapFont4 = null;
_this.charFont1 = null;
_this.charFont2 = null;
_this.charFont3 = null;
_this.charFont4 = null;
_this.enChars = "abcdefghijklmnopqrstuvwxyz.,/ 1234567890!@#$%^&*()-=_+`~,./;'<>?;[]{}|";
return _this;
}
CharMode.prototype.onLoad = function() {
@@ -76,16 +79,20 @@ window.__require = function e(t, n, r) {
this.bitmapFont1.string = this.getRandomText(15);
this.bitmapFont2.string = this.getRandomText(15);
this.bitmapFont3.string = this.getRandomText(15);
this.bitmapFont4.string = this.getRandomTextEnglish(30);
this.charFont1.string = this.getRandomText(15);
this.charFont2.string = this.getRandomText(15);
this.charFont3.string = this.getRandomText(15);
this.charFont4.string = this.getRandomTextEnglish(30);
this.schedule(function() {
_this.bitmapFont1.string = _this.getRandomText(15);
_this.bitmapFont2.string = _this.getRandomText(15);
_this.bitmapFont3.string = _this.getRandomText(15);
_this.bitmapFont4.string = _this.getRandomTextEnglish(30);
_this.charFont1.string = _this.getRandomText(15);
_this.charFont2.string = _this.getRandomText(15);
_this.charFont3.string = _this.getRandomText(15);
_this.charFont4.string = _this.getRandomTextEnglish(30);
}, .1);
};
CharMode.prototype.getRandomText = function(length) {
@@ -93,12 +100,19 @@ window.__require = function e(t, n, r) {
while (str.length < length) str += chars_1.chars[Math.floor(Math.random() * chars_1.chars.length)];
return str;
};
CharMode.prototype.getRandomTextEnglish = function(length) {
var str = "";
while (str.length < length) str += this.enChars[Math.floor(Math.random() * this.enChars.length)];
return str;
};
__decorate([ property(cc.Label) ], CharMode.prototype, "bitmapFont1", void 0);
__decorate([ property(cc.Label) ], CharMode.prototype, "bitmapFont2", void 0);
__decorate([ property(cc.Label) ], CharMode.prototype, "bitmapFont3", void 0);
__decorate([ property(cc.Label) ], CharMode.prototype, "bitmapFont4", void 0);
__decorate([ property(cc.Label) ], CharMode.prototype, "charFont1", void 0);
__decorate([ property(cc.Label) ], CharMode.prototype, "charFont2", void 0);
__decorate([ property(cc.Label) ], CharMode.prototype, "charFont3", void 0);
__decorate([ property(cc.Label) ], CharMode.prototype, "charFont4", void 0);
CharMode = __decorate([ ccclass ], CharMode);
return CharMode;
}(cc.Component);

File diff suppressed because one or more lines are too long