mirror of
https://github.com/568071718/creator-collection-view
synced 2025-04-12 04:11:03 +00:00
init
This commit is contained in:
commit
3c1e00b887
3
.gitignore
vendored
Normal file
3
.gitignore
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
|
||||||
|
|
||||||
|
*.DS_Store
|
201
LICENSE
Normal file
201
LICENSE
Normal file
@ -0,0 +1,201 @@
|
|||||||
|
Apache License
|
||||||
|
Version 2.0, January 2004
|
||||||
|
http://www.apache.org/licenses/
|
||||||
|
|
||||||
|
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||||
|
|
||||||
|
1. Definitions.
|
||||||
|
|
||||||
|
"License" shall mean the terms and conditions for use, reproduction,
|
||||||
|
and distribution as defined by Sections 1 through 9 of this document.
|
||||||
|
|
||||||
|
"Licensor" shall mean the copyright owner or entity authorized by
|
||||||
|
the copyright owner that is granting the License.
|
||||||
|
|
||||||
|
"Legal Entity" shall mean the union of the acting entity and all
|
||||||
|
other entities that control, are controlled by, or are under common
|
||||||
|
control with that entity. For the purposes of this definition,
|
||||||
|
"control" means (i) the power, direct or indirect, to cause the
|
||||||
|
direction or management of such entity, whether by contract or
|
||||||
|
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||||
|
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||||
|
|
||||||
|
"You" (or "Your") shall mean an individual or Legal Entity
|
||||||
|
exercising permissions granted by this License.
|
||||||
|
|
||||||
|
"Source" form shall mean the preferred form for making modifications,
|
||||||
|
including but not limited to software source code, documentation
|
||||||
|
source, and configuration files.
|
||||||
|
|
||||||
|
"Object" form shall mean any form resulting from mechanical
|
||||||
|
transformation or translation of a Source form, including but
|
||||||
|
not limited to compiled object code, generated documentation,
|
||||||
|
and conversions to other media types.
|
||||||
|
|
||||||
|
"Work" shall mean the work of authorship, whether in Source or
|
||||||
|
Object form, made available under the License, as indicated by a
|
||||||
|
copyright notice that is included in or attached to the work
|
||||||
|
(an example is provided in the Appendix below).
|
||||||
|
|
||||||
|
"Derivative Works" shall mean any work, whether in Source or Object
|
||||||
|
form, that is based on (or derived from) the Work and for which the
|
||||||
|
editorial revisions, annotations, elaborations, or other modifications
|
||||||
|
represent, as a whole, an original work of authorship. For the purposes
|
||||||
|
of this License, Derivative Works shall not include works that remain
|
||||||
|
separable from, or merely link (or bind by name) to the interfaces of,
|
||||||
|
the Work and Derivative Works thereof.
|
||||||
|
|
||||||
|
"Contribution" shall mean any work of authorship, including
|
||||||
|
the original version of the Work and any modifications or additions
|
||||||
|
to that Work or Derivative Works thereof, that is intentionally
|
||||||
|
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||||
|
or by an individual or Legal Entity authorized to submit on behalf of
|
||||||
|
the copyright owner. For the purposes of this definition, "submitted"
|
||||||
|
means any form of electronic, verbal, or written communication sent
|
||||||
|
to the Licensor or its representatives, including but not limited to
|
||||||
|
communication on electronic mailing lists, source code control systems,
|
||||||
|
and issue tracking systems that are managed by, or on behalf of, the
|
||||||
|
Licensor for the purpose of discussing and improving the Work, but
|
||||||
|
excluding communication that is conspicuously marked or otherwise
|
||||||
|
designated in writing by the copyright owner as "Not a Contribution."
|
||||||
|
|
||||||
|
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||||
|
on behalf of whom a Contribution has been received by Licensor and
|
||||||
|
subsequently incorporated within the Work.
|
||||||
|
|
||||||
|
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||||
|
this License, each Contributor hereby grants to You a perpetual,
|
||||||
|
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||||
|
copyright license to reproduce, prepare Derivative Works of,
|
||||||
|
publicly display, publicly perform, sublicense, and distribute the
|
||||||
|
Work and such Derivative Works in Source or Object form.
|
||||||
|
|
||||||
|
3. Grant of Patent License. Subject to the terms and conditions of
|
||||||
|
this License, each Contributor hereby grants to You a perpetual,
|
||||||
|
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||||
|
(except as stated in this section) patent license to make, have made,
|
||||||
|
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||||
|
where such license applies only to those patent claims licensable
|
||||||
|
by such Contributor that are necessarily infringed by their
|
||||||
|
Contribution(s) alone or by combination of their Contribution(s)
|
||||||
|
with the Work to which such Contribution(s) was submitted. If You
|
||||||
|
institute patent litigation against any entity (including a
|
||||||
|
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||||
|
or a Contribution incorporated within the Work constitutes direct
|
||||||
|
or contributory patent infringement, then any patent licenses
|
||||||
|
granted to You under this License for that Work shall terminate
|
||||||
|
as of the date such litigation is filed.
|
||||||
|
|
||||||
|
4. Redistribution. You may reproduce and distribute copies of the
|
||||||
|
Work or Derivative Works thereof in any medium, with or without
|
||||||
|
modifications, and in Source or Object form, provided that You
|
||||||
|
meet the following conditions:
|
||||||
|
|
||||||
|
(a) You must give any other recipients of the Work or
|
||||||
|
Derivative Works a copy of this License; and
|
||||||
|
|
||||||
|
(b) You must cause any modified files to carry prominent notices
|
||||||
|
stating that You changed the files; and
|
||||||
|
|
||||||
|
(c) You must retain, in the Source form of any Derivative Works
|
||||||
|
that You distribute, all copyright, patent, trademark, and
|
||||||
|
attribution notices from the Source form of the Work,
|
||||||
|
excluding those notices that do not pertain to any part of
|
||||||
|
the Derivative Works; and
|
||||||
|
|
||||||
|
(d) If the Work includes a "NOTICE" text file as part of its
|
||||||
|
distribution, then any Derivative Works that You distribute must
|
||||||
|
include a readable copy of the attribution notices contained
|
||||||
|
within such NOTICE file, excluding those notices that do not
|
||||||
|
pertain to any part of the Derivative Works, in at least one
|
||||||
|
of the following places: within a NOTICE text file distributed
|
||||||
|
as part of the Derivative Works; within the Source form or
|
||||||
|
documentation, if provided along with the Derivative Works; or,
|
||||||
|
within a display generated by the Derivative Works, if and
|
||||||
|
wherever such third-party notices normally appear. The contents
|
||||||
|
of the NOTICE file are for informational purposes only and
|
||||||
|
do not modify the License. You may add Your own attribution
|
||||||
|
notices within Derivative Works that You distribute, alongside
|
||||||
|
or as an addendum to the NOTICE text from the Work, provided
|
||||||
|
that such additional attribution notices cannot be construed
|
||||||
|
as modifying the License.
|
||||||
|
|
||||||
|
You may add Your own copyright statement to Your modifications and
|
||||||
|
may provide additional or different license terms and conditions
|
||||||
|
for use, reproduction, or distribution of Your modifications, or
|
||||||
|
for any such Derivative Works as a whole, provided Your use,
|
||||||
|
reproduction, and distribution of the Work otherwise complies with
|
||||||
|
the conditions stated in this License.
|
||||||
|
|
||||||
|
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||||
|
any Contribution intentionally submitted for inclusion in the Work
|
||||||
|
by You to the Licensor shall be under the terms and conditions of
|
||||||
|
this License, without any additional terms or conditions.
|
||||||
|
Notwithstanding the above, nothing herein shall supersede or modify
|
||||||
|
the terms of any separate license agreement you may have executed
|
||||||
|
with Licensor regarding such Contributions.
|
||||||
|
|
||||||
|
6. Trademarks. This License does not grant permission to use the trade
|
||||||
|
names, trademarks, service marks, or product names of the Licensor,
|
||||||
|
except as required for reasonable and customary use in describing the
|
||||||
|
origin of the Work and reproducing the content of the NOTICE file.
|
||||||
|
|
||||||
|
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||||
|
agreed to in writing, Licensor provides the Work (and each
|
||||||
|
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||||
|
implied, including, without limitation, any warranties or conditions
|
||||||
|
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||||
|
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||||
|
appropriateness of using or redistributing the Work and assume any
|
||||||
|
risks associated with Your exercise of permissions under this License.
|
||||||
|
|
||||||
|
8. Limitation of Liability. In no event and under no legal theory,
|
||||||
|
whether in tort (including negligence), contract, or otherwise,
|
||||||
|
unless required by applicable law (such as deliberate and grossly
|
||||||
|
negligent acts) or agreed to in writing, shall any Contributor be
|
||||||
|
liable to You for damages, including any direct, indirect, special,
|
||||||
|
incidental, or consequential damages of any character arising as a
|
||||||
|
result of this License or out of the use or inability to use the
|
||||||
|
Work (including but not limited to damages for loss of goodwill,
|
||||||
|
work stoppage, computer failure or malfunction, or any and all
|
||||||
|
other commercial damages or losses), even if such Contributor
|
||||||
|
has been advised of the possibility of such damages.
|
||||||
|
|
||||||
|
9. Accepting Warranty or Additional Liability. While redistributing
|
||||||
|
the Work or Derivative Works thereof, You may choose to offer,
|
||||||
|
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||||
|
or other liability obligations and/or rights consistent with this
|
||||||
|
License. However, in accepting such obligations, You may act only
|
||||||
|
on Your own behalf and on Your sole responsibility, not on behalf
|
||||||
|
of any other Contributor, and only if You agree to indemnify,
|
||||||
|
defend, and hold each Contributor harmless for any liability
|
||||||
|
incurred by, or claims asserted against, such Contributor by reason
|
||||||
|
of your accepting any such warranty or additional liability.
|
||||||
|
|
||||||
|
END OF TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
APPENDIX: How to apply the Apache License to your work.
|
||||||
|
|
||||||
|
To apply the Apache License to your work, attach the following
|
||||||
|
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||||
|
replaced with your own identifying information. (Don't include
|
||||||
|
the brackets!) The text should be enclosed in the appropriate
|
||||||
|
comment syntax for the file format. We also recommend that a
|
||||||
|
file or class name and description of purpose be included on the
|
||||||
|
same "printed page" as the copyright notice for easier
|
||||||
|
identification within third-party archives.
|
||||||
|
|
||||||
|
Copyright 2024 568071718@qq.com
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
5
README.md
Normal file
5
README.md
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
# YXCollectionView
|
||||||
|
|
||||||
|
* [Cocos Store](https://store.cocos.com/app/detail/6249)
|
||||||
|
|
||||||
|
* [更新日志](https://gitee.com/568071718/creator-collection-view/tags)
|
53
list-2x/.gitignore
vendored
Executable file
53
list-2x/.gitignore
vendored
Executable file
@ -0,0 +1,53 @@
|
|||||||
|
#/////////////////////////////////////////////////////////////////////////////
|
||||||
|
# Fireball Projects
|
||||||
|
#/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
/library/
|
||||||
|
/temp/
|
||||||
|
/local/
|
||||||
|
/build/
|
||||||
|
native
|
||||||
|
#/////////////////////////////////////////////////////////////////////////////
|
||||||
|
# npm files
|
||||||
|
#/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
npm-debug.log
|
||||||
|
node_modules/
|
||||||
|
|
||||||
|
#/////////////////////////////////////////////////////////////////////////////
|
||||||
|
# Logs and databases
|
||||||
|
#/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
*.log
|
||||||
|
*.sql
|
||||||
|
*.sqlite
|
||||||
|
|
||||||
|
#/////////////////////////////////////////////////////////////////////////////
|
||||||
|
# files for debugger
|
||||||
|
#/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
*.sln
|
||||||
|
*.csproj
|
||||||
|
*.pidb
|
||||||
|
*.unityproj
|
||||||
|
*.suo
|
||||||
|
|
||||||
|
#/////////////////////////////////////////////////////////////////////////////
|
||||||
|
# OS generated files
|
||||||
|
#/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
.DS_Store
|
||||||
|
ehthumbs.db
|
||||||
|
Thumbs.db
|
||||||
|
|
||||||
|
#/////////////////////////////////////////////////////////////////////////////
|
||||||
|
# WebStorm files
|
||||||
|
#/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
.idea/
|
||||||
|
|
||||||
|
#//////////////////////////
|
||||||
|
# VS Code files
|
||||||
|
#//////////////////////////
|
||||||
|
|
||||||
|
.vscode/
|
13
list-2x/assets/common-cells.meta
Normal file
13
list-2x/assets/common-cells.meta
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
{
|
||||||
|
"ver": "1.1.3",
|
||||||
|
"uuid": "22383302-b592-44d1-b41d-afd4d2949ce4",
|
||||||
|
"importer": "folder",
|
||||||
|
"isBundle": false,
|
||||||
|
"bundleName": "",
|
||||||
|
"priority": 1,
|
||||||
|
"compressionType": {},
|
||||||
|
"optimizeHotUpdate": {},
|
||||||
|
"inlineSpriteFrames": {},
|
||||||
|
"isRemoteBundle": {},
|
||||||
|
"subMetas": {}
|
||||||
|
}
|
335
list-2x/assets/common-cells/shape-label-cell.prefab
Normal file
335
list-2x/assets/common-cells/shape-label-cell.prefab
Normal file
@ -0,0 +1,335 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"__type__": "cc.Prefab",
|
||||||
|
"_name": "",
|
||||||
|
"_objFlags": 0,
|
||||||
|
"_native": "",
|
||||||
|
"data": {
|
||||||
|
"__id__": 1
|
||||||
|
},
|
||||||
|
"optimizationPolicy": 0,
|
||||||
|
"asyncLoadAssets": false,
|
||||||
|
"readonly": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "cc.Node",
|
||||||
|
"_name": "shape-label-cell",
|
||||||
|
"_objFlags": 0,
|
||||||
|
"_parent": null,
|
||||||
|
"_children": [
|
||||||
|
{
|
||||||
|
"__id__": 2
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__id__": 6
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"_active": true,
|
||||||
|
"_components": [],
|
||||||
|
"_prefab": {
|
||||||
|
"__id__": 9
|
||||||
|
},
|
||||||
|
"_opacity": 255,
|
||||||
|
"_color": {
|
||||||
|
"__type__": "cc.Color",
|
||||||
|
"r": 255,
|
||||||
|
"g": 255,
|
||||||
|
"b": 255,
|
||||||
|
"a": 255
|
||||||
|
},
|
||||||
|
"_contentSize": {
|
||||||
|
"__type__": "cc.Size",
|
||||||
|
"width": 200,
|
||||||
|
"height": 200
|
||||||
|
},
|
||||||
|
"_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": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "cc.Node",
|
||||||
|
"_name": "shape",
|
||||||
|
"_objFlags": 0,
|
||||||
|
"_parent": {
|
||||||
|
"__id__": 1
|
||||||
|
},
|
||||||
|
"_children": [],
|
||||||
|
"_active": true,
|
||||||
|
"_components": [
|
||||||
|
{
|
||||||
|
"__id__": 3
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__id__": 4
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"_prefab": {
|
||||||
|
"__id__": 5
|
||||||
|
},
|
||||||
|
"_opacity": 255,
|
||||||
|
"_color": {
|
||||||
|
"__type__": "cc.Color",
|
||||||
|
"r": 83,
|
||||||
|
"g": 109,
|
||||||
|
"b": 125,
|
||||||
|
"a": 255
|
||||||
|
},
|
||||||
|
"_contentSize": {
|
||||||
|
"__type__": "cc.Size",
|
||||||
|
"width": 200,
|
||||||
|
"height": 200
|
||||||
|
},
|
||||||
|
"_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": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "cc.Widget",
|
||||||
|
"_name": "",
|
||||||
|
"_objFlags": 0,
|
||||||
|
"node": {
|
||||||
|
"__id__": 2
|
||||||
|
},
|
||||||
|
"_enabled": true,
|
||||||
|
"alignMode": 2,
|
||||||
|
"_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": 0,
|
||||||
|
"_originalHeight": 0,
|
||||||
|
"_id": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "cc.Sprite",
|
||||||
|
"_name": "",
|
||||||
|
"_objFlags": 0,
|
||||||
|
"node": {
|
||||||
|
"__id__": 2
|
||||||
|
},
|
||||||
|
"_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": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "cc.PrefabInfo",
|
||||||
|
"root": {
|
||||||
|
"__id__": 1
|
||||||
|
},
|
||||||
|
"asset": {
|
||||||
|
"__id__": 0
|
||||||
|
},
|
||||||
|
"fileId": "2csXz9tJJAZadXoIqoXSsJ",
|
||||||
|
"sync": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "cc.Node",
|
||||||
|
"_name": "label",
|
||||||
|
"_objFlags": 0,
|
||||||
|
"_parent": {
|
||||||
|
"__id__": 1
|
||||||
|
},
|
||||||
|
"_children": [],
|
||||||
|
"_active": true,
|
||||||
|
"_components": [
|
||||||
|
{
|
||||||
|
"__id__": 7
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"_prefab": {
|
||||||
|
"__id__": 8
|
||||||
|
},
|
||||||
|
"_opacity": 255,
|
||||||
|
"_color": {
|
||||||
|
"__type__": "cc.Color",
|
||||||
|
"r": 255,
|
||||||
|
"g": 255,
|
||||||
|
"b": 255,
|
||||||
|
"a": 255
|
||||||
|
},
|
||||||
|
"_contentSize": {
|
||||||
|
"__type__": "cc.Size",
|
||||||
|
"width": 50.05,
|
||||||
|
"height": 50.4
|
||||||
|
},
|
||||||
|
"_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": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "cc.Label",
|
||||||
|
"_name": "",
|
||||||
|
"_objFlags": 0,
|
||||||
|
"node": {
|
||||||
|
"__id__": 6
|
||||||
|
},
|
||||||
|
"_enabled": true,
|
||||||
|
"_materials": [
|
||||||
|
{
|
||||||
|
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"_srcBlendFactor": 770,
|
||||||
|
"_dstBlendFactor": 771,
|
||||||
|
"_string": "123",
|
||||||
|
"_N$string": "123",
|
||||||
|
"_fontSize": 30,
|
||||||
|
"_lineHeight": 40,
|
||||||
|
"_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": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "cc.PrefabInfo",
|
||||||
|
"root": {
|
||||||
|
"__id__": 1
|
||||||
|
},
|
||||||
|
"asset": {
|
||||||
|
"__id__": 0
|
||||||
|
},
|
||||||
|
"fileId": "21Z/Loit1FuYHTkvdmDCvj",
|
||||||
|
"sync": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "cc.PrefabInfo",
|
||||||
|
"root": {
|
||||||
|
"__id__": 1
|
||||||
|
},
|
||||||
|
"asset": {
|
||||||
|
"__id__": 0
|
||||||
|
},
|
||||||
|
"fileId": "",
|
||||||
|
"sync": false
|
||||||
|
}
|
||||||
|
]
|
9
list-2x/assets/common-cells/shape-label-cell.prefab.meta
Normal file
9
list-2x/assets/common-cells/shape-label-cell.prefab.meta
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"ver": "1.3.2",
|
||||||
|
"uuid": "8fa9c17d-2552-411c-9848-7b16bf0208a8",
|
||||||
|
"importer": "prefab",
|
||||||
|
"optimizationPolicy": "AUTO",
|
||||||
|
"asyncLoadAssets": false,
|
||||||
|
"readonly": false,
|
||||||
|
"subMetas": {}
|
||||||
|
}
|
13
list-2x/assets/home.meta
Normal file
13
list-2x/assets/home.meta
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
{
|
||||||
|
"ver": "1.1.3",
|
||||||
|
"uuid": "d1f44971-4e4c-498a-b1a6-7ec63f89ca8b",
|
||||||
|
"importer": "folder",
|
||||||
|
"isBundle": false,
|
||||||
|
"bundleName": "",
|
||||||
|
"priority": 1,
|
||||||
|
"compressionType": {},
|
||||||
|
"optimizeHotUpdate": {},
|
||||||
|
"inlineSpriteFrames": {},
|
||||||
|
"isRemoteBundle": {},
|
||||||
|
"subMetas": {}
|
||||||
|
}
|
386
list-2x/assets/home/home.fire
Normal file
386
list-2x/assets/home/home.fire
Normal file
@ -0,0 +1,386 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"__type__": "cc.SceneAsset",
|
||||||
|
"_name": "",
|
||||||
|
"_objFlags": 0,
|
||||||
|
"_native": "",
|
||||||
|
"scene": {
|
||||||
|
"__id__": 1
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "cc.Scene",
|
||||||
|
"_objFlags": 0,
|
||||||
|
"_parent": null,
|
||||||
|
"_children": [
|
||||||
|
{
|
||||||
|
"__id__": 2
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"_active": true,
|
||||||
|
"_components": [],
|
||||||
|
"_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,
|
||||||
|
"y": 0
|
||||||
|
},
|
||||||
|
"_trs": {
|
||||||
|
"__type__": "TypedArray",
|
||||||
|
"ctor": "Float64Array",
|
||||||
|
"array": [
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
1,
|
||||||
|
1,
|
||||||
|
1,
|
||||||
|
1
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"_is3DNode": true,
|
||||||
|
"_groupIndex": 0,
|
||||||
|
"groupIndex": 0,
|
||||||
|
"autoReleaseAssets": false,
|
||||||
|
"_id": "4d9576dd-d871-436d-9711-395150fe11ee"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "cc.Node",
|
||||||
|
"_name": "Canvas",
|
||||||
|
"_objFlags": 0,
|
||||||
|
"_parent": {
|
||||||
|
"__id__": 1
|
||||||
|
},
|
||||||
|
"_children": [
|
||||||
|
{
|
||||||
|
"__id__": 3
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__id__": 5
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"_active": true,
|
||||||
|
"_components": [
|
||||||
|
{
|
||||||
|
"__id__": 8
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__id__": 9
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__id__": 10
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"_prefab": null,
|
||||||
|
"_opacity": 255,
|
||||||
|
"_color": {
|
||||||
|
"__type__": "cc.Color",
|
||||||
|
"r": 255,
|
||||||
|
"g": 255,
|
||||||
|
"b": 255,
|
||||||
|
"a": 255
|
||||||
|
},
|
||||||
|
"_contentSize": {
|
||||||
|
"__type__": "cc.Size",
|
||||||
|
"width": 960,
|
||||||
|
"height": 640
|
||||||
|
},
|
||||||
|
"_anchorPoint": {
|
||||||
|
"__type__": "cc.Vec2",
|
||||||
|
"x": 0.5,
|
||||||
|
"y": 0.5
|
||||||
|
},
|
||||||
|
"_trs": {
|
||||||
|
"__type__": "TypedArray",
|
||||||
|
"ctor": "Float64Array",
|
||||||
|
"array": [
|
||||||
|
480,
|
||||||
|
320,
|
||||||
|
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": "a5esZu+45LA5mBpvttspPD"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "cc.Node",
|
||||||
|
"_name": "Main Camera",
|
||||||
|
"_objFlags": 0,
|
||||||
|
"_parent": {
|
||||||
|
"__id__": 2
|
||||||
|
},
|
||||||
|
"_children": [],
|
||||||
|
"_active": true,
|
||||||
|
"_components": [
|
||||||
|
{
|
||||||
|
"__id__": 4
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"_prefab": null,
|
||||||
|
"_opacity": 255,
|
||||||
|
"_color": {
|
||||||
|
"__type__": "cc.Color",
|
||||||
|
"r": 255,
|
||||||
|
"g": 255,
|
||||||
|
"b": 255,
|
||||||
|
"a": 255
|
||||||
|
},
|
||||||
|
"_contentSize": {
|
||||||
|
"__type__": "cc.Size",
|
||||||
|
"width": 960,
|
||||||
|
"height": 640
|
||||||
|
},
|
||||||
|
"_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": "e1WoFrQ79G7r4ZuQE3HlNb"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "cc.Camera",
|
||||||
|
"_name": "",
|
||||||
|
"_objFlags": 0,
|
||||||
|
"node": {
|
||||||
|
"__id__": 3
|
||||||
|
},
|
||||||
|
"_enabled": true,
|
||||||
|
"_cullingMask": 4294967295,
|
||||||
|
"_clearFlags": 7,
|
||||||
|
"_backgroundColor": {
|
||||||
|
"__type__": "cc.Color",
|
||||||
|
"r": 0,
|
||||||
|
"g": 0,
|
||||||
|
"b": 0,
|
||||||
|
"a": 255
|
||||||
|
},
|
||||||
|
"_depth": -1,
|
||||||
|
"_zoomRatio": 1,
|
||||||
|
"_targetTexture": null,
|
||||||
|
"_fov": 60,
|
||||||
|
"_orthoSize": 10,
|
||||||
|
"_nearClip": 1,
|
||||||
|
"_farClip": 4096,
|
||||||
|
"_ortho": true,
|
||||||
|
"_rect": {
|
||||||
|
"__type__": "cc.Rect",
|
||||||
|
"x": 0,
|
||||||
|
"y": 0,
|
||||||
|
"width": 1,
|
||||||
|
"height": 1
|
||||||
|
},
|
||||||
|
"_renderStages": 1,
|
||||||
|
"_alignWithScreen": true,
|
||||||
|
"_id": "81GN3uXINKVLeW4+iKSlim"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "cc.Node",
|
||||||
|
"_name": "list",
|
||||||
|
"_objFlags": 0,
|
||||||
|
"_parent": {
|
||||||
|
"__id__": 2
|
||||||
|
},
|
||||||
|
"_children": [],
|
||||||
|
"_active": true,
|
||||||
|
"_components": [
|
||||||
|
{
|
||||||
|
"__id__": 6
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"_prefab": null,
|
||||||
|
"_opacity": 255,
|
||||||
|
"_color": {
|
||||||
|
"__type__": "cc.Color",
|
||||||
|
"r": 255,
|
||||||
|
"g": 255,
|
||||||
|
"b": 255,
|
||||||
|
"a": 255
|
||||||
|
},
|
||||||
|
"_contentSize": {
|
||||||
|
"__type__": "cc.Size",
|
||||||
|
"width": 400,
|
||||||
|
"height": 600
|
||||||
|
},
|
||||||
|
"_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": "0783nLyzRLIb74nyA86bgq"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "62dc08kS7dIiIYJEawwSV8U",
|
||||||
|
"_name": "",
|
||||||
|
"_objFlags": 0,
|
||||||
|
"node": {
|
||||||
|
"__id__": 5
|
||||||
|
},
|
||||||
|
"_enabled": true,
|
||||||
|
"mask": true,
|
||||||
|
"scrollEnabled": true,
|
||||||
|
"wheelScrollEnabled": true,
|
||||||
|
"scrollDirection": 1,
|
||||||
|
"mode": 0,
|
||||||
|
"preloadNodesLimitPerFrame": 2,
|
||||||
|
"frameInterval": 1,
|
||||||
|
"recycleInterval": 1,
|
||||||
|
"registerCellForEditor": [
|
||||||
|
{
|
||||||
|
"__id__": 7
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"_id": "c6OeMxzjlE/okCBJxHaOEk"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "_yx_editor_register_cell_info",
|
||||||
|
"prefab": {
|
||||||
|
"__uuid__": "8fa9c17d-2552-411c-9848-7b16bf0208a8"
|
||||||
|
},
|
||||||
|
"identifier": "cell",
|
||||||
|
"comp": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "cc.Canvas",
|
||||||
|
"_name": "",
|
||||||
|
"_objFlags": 0,
|
||||||
|
"node": {
|
||||||
|
"__id__": 2
|
||||||
|
},
|
||||||
|
"_enabled": true,
|
||||||
|
"_designResolution": {
|
||||||
|
"__type__": "cc.Size",
|
||||||
|
"width": 960,
|
||||||
|
"height": 640
|
||||||
|
},
|
||||||
|
"_fitWidth": false,
|
||||||
|
"_fitHeight": true,
|
||||||
|
"_id": "59Cd0ovbdF4byw5sbjJDx7"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "cc.Widget",
|
||||||
|
"_name": "",
|
||||||
|
"_objFlags": 0,
|
||||||
|
"node": {
|
||||||
|
"__id__": 2
|
||||||
|
},
|
||||||
|
"_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": 0,
|
||||||
|
"_originalHeight": 0,
|
||||||
|
"_id": "29zXboiXFBKoIV4PQ2liTe"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "9c45eiLP5NAxIVn+btZm8W1",
|
||||||
|
"_name": "",
|
||||||
|
"_objFlags": 0,
|
||||||
|
"node": {
|
||||||
|
"__id__": 2
|
||||||
|
},
|
||||||
|
"_enabled": true,
|
||||||
|
"listComp": {
|
||||||
|
"__id__": 6
|
||||||
|
},
|
||||||
|
"_id": "560cKL+1lFIZFZSgoBz8At"
|
||||||
|
}
|
||||||
|
]
|
8
list-2x/assets/home/home.fire.meta
Normal file
8
list-2x/assets/home/home.fire.meta
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"ver": "1.3.2",
|
||||||
|
"uuid": "4d9576dd-d871-436d-9711-395150fe11ee",
|
||||||
|
"importer": "scene",
|
||||||
|
"asyncLoadAssets": false,
|
||||||
|
"autoReleaseAssets": false,
|
||||||
|
"subMetas": {}
|
||||||
|
}
|
59
list-2x/assets/home/home.ts
Normal file
59
list-2x/assets/home/home.ts
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
// Learn TypeScript:
|
||||||
|
// - https://docs.cocos.com/creator/2.4/manual/en/scripting/typescript.html
|
||||||
|
// Learn Attribute:
|
||||||
|
// - https://docs.cocos.com/creator/2.4/manual/en/scripting/reference/attributes.html
|
||||||
|
// Learn life-cycle callbacks:
|
||||||
|
// - https://docs.cocos.com/creator/2.4/manual/en/scripting/life-cycle-callbacks.html
|
||||||
|
|
||||||
|
import { YXCollectionView } from "../lib/yx-collection-view";
|
||||||
|
import { YXTableLayout } from "../lib/yx-table-layout";
|
||||||
|
|
||||||
|
const { ccclass, property } = cc._decorator;
|
||||||
|
|
||||||
|
class Data {
|
||||||
|
id: number
|
||||||
|
}
|
||||||
|
|
||||||
|
@ccclass
|
||||||
|
export default class NewClass extends cc.Component {
|
||||||
|
|
||||||
|
@property(YXCollectionView)
|
||||||
|
listComp: YXCollectionView = null
|
||||||
|
|
||||||
|
testData: Data[] = []
|
||||||
|
|
||||||
|
protected start(): void {
|
||||||
|
|
||||||
|
// 绑定数据源
|
||||||
|
this.listComp.numberOfItems = () => this.testData.length
|
||||||
|
this.listComp.cellForItemAt = (indexPath, collectionView) => {
|
||||||
|
const rowData = this.testData[indexPath.item]
|
||||||
|
const cell = collectionView.dequeueReusableCell(`cell`)
|
||||||
|
cell.getChildByName('label').getComponent(cc.Label).string = `${indexPath}`
|
||||||
|
return cell
|
||||||
|
}
|
||||||
|
|
||||||
|
// 确定布局方案
|
||||||
|
let layout = new YXTableLayout()
|
||||||
|
layout.spacing = 20
|
||||||
|
layout.itemSize = new cc.Size(400, 100)
|
||||||
|
this.listComp.layout = layout
|
||||||
|
|
||||||
|
this.receivedData()
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 模拟收到数据
|
||||||
|
*/
|
||||||
|
receivedData() {
|
||||||
|
this.testData = []
|
||||||
|
for (let index = 0; index < 1000; index++) {
|
||||||
|
let data = new Data()
|
||||||
|
data.id = index
|
||||||
|
this.testData.push(data)
|
||||||
|
}
|
||||||
|
|
||||||
|
// 刷新列表
|
||||||
|
this.listComp.reloadData()
|
||||||
|
}
|
||||||
|
}
|
10
list-2x/assets/home/home.ts.meta
Normal file
10
list-2x/assets/home/home.ts.meta
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
"ver": "1.1.0",
|
||||||
|
"uuid": "9c45e88b-3f93-40c4-8567-f9bb599bc5b5",
|
||||||
|
"importer": "typescript",
|
||||||
|
"isPlugin": false,
|
||||||
|
"loadPluginInWeb": true,
|
||||||
|
"loadPluginInNative": true,
|
||||||
|
"loadPluginInEditor": false,
|
||||||
|
"subMetas": {}
|
||||||
|
}
|
13
list-2x/assets/lib.meta
Normal file
13
list-2x/assets/lib.meta
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
{
|
||||||
|
"ver": "1.1.3",
|
||||||
|
"uuid": "1c87e019-389f-4b4e-a02d-708e2ae0e462",
|
||||||
|
"importer": "folder",
|
||||||
|
"isBundle": false,
|
||||||
|
"bundleName": "",
|
||||||
|
"priority": 1,
|
||||||
|
"compressionType": {},
|
||||||
|
"optimizeHotUpdate": {},
|
||||||
|
"inlineSpriteFrames": {},
|
||||||
|
"isRemoteBundle": {},
|
||||||
|
"subMetas": {}
|
||||||
|
}
|
1436
list-2x/assets/lib/yx-collection-view.ts
Normal file
1436
list-2x/assets/lib/yx-collection-view.ts
Normal file
File diff suppressed because it is too large
Load Diff
10
list-2x/assets/lib/yx-collection-view.ts.meta
Normal file
10
list-2x/assets/lib/yx-collection-view.ts.meta
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
"ver": "1.1.0",
|
||||||
|
"uuid": "62dc0f24-4bb7-4888-8609-11ac30495f14",
|
||||||
|
"importer": "typescript",
|
||||||
|
"isPlugin": false,
|
||||||
|
"loadPluginInWeb": true,
|
||||||
|
"loadPluginInNative": true,
|
||||||
|
"loadPluginInEditor": false,
|
||||||
|
"subMetas": {}
|
||||||
|
}
|
114
list-2x/assets/lib/yx-table-layout.ts
Normal file
114
list-2x/assets/lib/yx-table-layout.ts
Normal file
@ -0,0 +1,114 @@
|
|||||||
|
import { YXBinaryLayout, YXCollectionView, YXIndexPath, YXLayoutAttributes } from "./yx-collection-view";
|
||||||
|
|
||||||
|
|
||||||
|
enum _yx_table_layout_alignment {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 单元节点相对列表居中
|
||||||
|
*/
|
||||||
|
CENTER,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 单元节点紧靠列表左侧
|
||||||
|
*/
|
||||||
|
LEFT,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 单元节点紧靠列表右侧
|
||||||
|
*/
|
||||||
|
RIGHT,
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 想要了解自定义布局的,可以看看这个类,这个类实现了一个基础的 table view 的布局样式,相对来说比较简单
|
||||||
|
*
|
||||||
|
* - 支持不同的节点大小
|
||||||
|
* - 支持调整对齐方式
|
||||||
|
* - 不支持分区布局
|
||||||
|
* - 不支持水平方向滚动,仅支持垂直方向滚动
|
||||||
|
* - 不支持多列布局,仅支持单列布局
|
||||||
|
* - 支持调整上下边距/间距
|
||||||
|
*/
|
||||||
|
export class YXTableLayout extends YXBinaryLayout {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 单元格大小
|
||||||
|
*/
|
||||||
|
itemSize: cc.Size | ((indexPath: YXIndexPath, layout: YXTableLayout, collectionView: YXCollectionView) => cc.Size) = new cc.Size(100, 100)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 间距
|
||||||
|
*/
|
||||||
|
spacing: number = 0
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 上边距
|
||||||
|
*/
|
||||||
|
top: number = 0
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 下边距
|
||||||
|
*/
|
||||||
|
bottom: number = 0
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 对齐方式
|
||||||
|
*/
|
||||||
|
alignment: _yx_table_layout_alignment = YXTableLayout.Alignment.CENTER
|
||||||
|
static Alignment = _yx_table_layout_alignment
|
||||||
|
|
||||||
|
prepare(collectionView: YXCollectionView): void {
|
||||||
|
// 设置列表的滚动方向
|
||||||
|
if (collectionView.scrollDirection == YXCollectionView.ScrollDirection.HORIZONTAL) {
|
||||||
|
cc.warn(`YXTableLayout 只支持垂直方向排列`)
|
||||||
|
}
|
||||||
|
collectionView.scrollView.horizontal = false
|
||||||
|
collectionView.scrollView.vertical = true
|
||||||
|
|
||||||
|
let contentSize = collectionView.node.getContentSize()
|
||||||
|
let attrs = []
|
||||||
|
|
||||||
|
let maxY = this.top
|
||||||
|
|
||||||
|
// 获取列表内一共需要展示多少数据
|
||||||
|
let numberOfItems = collectionView.getNumberOfItems(0)
|
||||||
|
for (let row = 0; row < numberOfItems; row++) {
|
||||||
|
|
||||||
|
// 生成对应的 indexPath,并通过 indexPath 获取节点大小
|
||||||
|
// 这里是不支持分区所以不考虑 section 的情况,section 默认就是 0,支持的分区的情况可以回头看 flow-layout 的实现
|
||||||
|
let indexPath = new YXIndexPath(0, row)
|
||||||
|
let itemSize = this.itemSize instanceof Function ? this.itemSize(indexPath, this, collectionView) : this.itemSize
|
||||||
|
|
||||||
|
// 生成布局属性对象,并按照 table view 的规则确定好节点的位置
|
||||||
|
let attributes = new YXLayoutAttributes(indexPath)
|
||||||
|
attributes.frame = new cc.Rect()
|
||||||
|
attributes.frame.size = itemSize
|
||||||
|
attributes.frame.y = maxY + (row > 0 ? this.spacing : 0)
|
||||||
|
attributes.frame.x = 0
|
||||||
|
if (this.alignment == _yx_table_layout_alignment.RIGHT) {
|
||||||
|
attributes.frame.x = (contentSize.width - attributes.frame.width)
|
||||||
|
}
|
||||||
|
if (this.alignment == _yx_table_layout_alignment.CENTER) {
|
||||||
|
attributes.frame.x = (contentSize.width - attributes.frame.width) * 0.5
|
||||||
|
}
|
||||||
|
attrs.push(attributes)
|
||||||
|
maxY = attributes.frame.yMax
|
||||||
|
}
|
||||||
|
|
||||||
|
maxY += this.bottom
|
||||||
|
|
||||||
|
// 保存起来给列表组件使用
|
||||||
|
this.attributes = attrs
|
||||||
|
|
||||||
|
// 确定滚动范围的总大小
|
||||||
|
contentSize.height = Math.max(contentSize.height, maxY)
|
||||||
|
this.contentSize = contentSize
|
||||||
|
}
|
||||||
|
|
||||||
|
initOffset(collectionView: YXCollectionView): void {
|
||||||
|
// 首次更新数据,滚动至列表顶部
|
||||||
|
collectionView.scrollView.scrollToTop()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
10
list-2x/assets/lib/yx-table-layout.ts.meta
Normal file
10
list-2x/assets/lib/yx-table-layout.ts.meta
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
"ver": "1.1.0",
|
||||||
|
"uuid": "5f2b7203-9892-41ce-a233-17f1824d0dd8",
|
||||||
|
"importer": "typescript",
|
||||||
|
"isPlugin": false,
|
||||||
|
"loadPluginInWeb": true,
|
||||||
|
"loadPluginInNative": true,
|
||||||
|
"loadPluginInEditor": false,
|
||||||
|
"subMetas": {}
|
||||||
|
}
|
32073
list-2x/creator.d.ts
vendored
Normal file
32073
list-2x/creator.d.ts
vendored
Normal file
File diff suppressed because it is too large
Load Diff
15
list-2x/jsconfig.json
Executable file
15
list-2x/jsconfig.json
Executable file
@ -0,0 +1,15 @@
|
|||||||
|
{
|
||||||
|
"compilerOptions": {
|
||||||
|
"target": "es6",
|
||||||
|
"module": "commonjs",
|
||||||
|
"experimentalDecorators": true
|
||||||
|
},
|
||||||
|
"exclude": [
|
||||||
|
"node_modules",
|
||||||
|
".vscode",
|
||||||
|
"library",
|
||||||
|
"local",
|
||||||
|
"settings",
|
||||||
|
"temp"
|
||||||
|
]
|
||||||
|
}
|
8
list-2x/project.json
Executable file
8
list-2x/project.json
Executable file
@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"engine": "cocos-creator-js",
|
||||||
|
"packages": "packages",
|
||||||
|
"name": "list-2x",
|
||||||
|
"id": "ad2910f0-61a5-4082-95be-098c958b8cb0",
|
||||||
|
"version": "2.4.13",
|
||||||
|
"isNew": false
|
||||||
|
}
|
1
list-2x/settings/project.json
Normal file
1
list-2x/settings/project.json
Normal file
@ -0,0 +1 @@
|
|||||||
|
{}
|
6
list-2x/settings/services.json
Normal file
6
list-2x/settings/services.json
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"game": {
|
||||||
|
"name": "未知游戏",
|
||||||
|
"appid": "UNKNOW"
|
||||||
|
}
|
||||||
|
}
|
19
list-2x/tsconfig.json
Normal file
19
list-2x/tsconfig.json
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
{
|
||||||
|
"compilerOptions": {
|
||||||
|
"module": "commonjs",
|
||||||
|
"lib": [ "es2015", "es2017", "dom" ],
|
||||||
|
"target": "es5",
|
||||||
|
"experimentalDecorators": true,
|
||||||
|
"skipLibCheck": true,
|
||||||
|
"outDir": "temp/vscode-dist",
|
||||||
|
"forceConsistentCasingInFileNames": true
|
||||||
|
},
|
||||||
|
"exclude": [
|
||||||
|
"node_modules",
|
||||||
|
"library",
|
||||||
|
"local",
|
||||||
|
"temp",
|
||||||
|
"build",
|
||||||
|
"settings"
|
||||||
|
]
|
||||||
|
}
|
@ -0,0 +1,2 @@
|
|||||||
|
[InternetShortcut]
|
||||||
|
URL=https://docs.cocos.com/creator/manual/en/scripting/setup.html#custom-script-template
|
5
list-3x/.creator/default-meta.json
Normal file
5
list-3x/.creator/default-meta.json
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"image": {
|
||||||
|
"type": "sprite-frame"
|
||||||
|
}
|
||||||
|
}
|
24
list-3x/.gitignore
vendored
Normal file
24
list-3x/.gitignore
vendored
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
|
||||||
|
#///////////////////////////
|
||||||
|
# Cocos Creator 3D Project
|
||||||
|
#///////////////////////////
|
||||||
|
library/
|
||||||
|
temp/
|
||||||
|
local/
|
||||||
|
build/
|
||||||
|
profiles/
|
||||||
|
native
|
||||||
|
#//////////////////////////
|
||||||
|
# NPM
|
||||||
|
#//////////////////////////
|
||||||
|
node_modules/
|
||||||
|
|
||||||
|
#//////////////////////////
|
||||||
|
# VSCode
|
||||||
|
#//////////////////////////
|
||||||
|
.vscode/
|
||||||
|
|
||||||
|
#//////////////////////////
|
||||||
|
# WebStorm
|
||||||
|
#//////////////////////////
|
||||||
|
.idea/
|
9
list-3x/assets/common-cells.meta
Normal file
9
list-3x/assets/common-cells.meta
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"ver": "1.2.0",
|
||||||
|
"importer": "directory",
|
||||||
|
"imported": true,
|
||||||
|
"uuid": "22474814-fac5-49b1-aece-dfc04017fc3f",
|
||||||
|
"files": [],
|
||||||
|
"subMetas": {},
|
||||||
|
"userData": {}
|
||||||
|
}
|
416
list-3x/assets/common-cells/shape-label-cell.prefab
Normal file
416
list-3x/assets/common-cells/shape-label-cell.prefab
Normal file
@ -0,0 +1,416 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"__type__": "cc.Prefab",
|
||||||
|
"_name": "shape-label-cell",
|
||||||
|
"_objFlags": 0,
|
||||||
|
"__editorExtras__": {},
|
||||||
|
"_native": "",
|
||||||
|
"data": {
|
||||||
|
"__id__": 1
|
||||||
|
},
|
||||||
|
"optimizationPolicy": 0,
|
||||||
|
"persistent": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "cc.Node",
|
||||||
|
"_name": "shape-label-cell",
|
||||||
|
"_objFlags": 0,
|
||||||
|
"__editorExtras__": {},
|
||||||
|
"_parent": null,
|
||||||
|
"_children": [
|
||||||
|
{
|
||||||
|
"__id__": 2
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__id__": 10
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"_active": true,
|
||||||
|
"_components": [
|
||||||
|
{
|
||||||
|
"__id__": 16
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"_prefab": {
|
||||||
|
"__id__": 18
|
||||||
|
},
|
||||||
|
"_lpos": {
|
||||||
|
"__type__": "cc.Vec3",
|
||||||
|
"x": 0,
|
||||||
|
"y": 0,
|
||||||
|
"z": 0
|
||||||
|
},
|
||||||
|
"_lrot": {
|
||||||
|
"__type__": "cc.Quat",
|
||||||
|
"x": 0,
|
||||||
|
"y": 0,
|
||||||
|
"z": 0,
|
||||||
|
"w": 1
|
||||||
|
},
|
||||||
|
"_lscale": {
|
||||||
|
"__type__": "cc.Vec3",
|
||||||
|
"x": 1,
|
||||||
|
"y": 1,
|
||||||
|
"z": 1
|
||||||
|
},
|
||||||
|
"_mobility": 0,
|
||||||
|
"_layer": 33554432,
|
||||||
|
"_euler": {
|
||||||
|
"__type__": "cc.Vec3",
|
||||||
|
"x": 0,
|
||||||
|
"y": 0,
|
||||||
|
"z": 0
|
||||||
|
},
|
||||||
|
"_id": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "cc.Node",
|
||||||
|
"_name": "shape",
|
||||||
|
"_objFlags": 0,
|
||||||
|
"__editorExtras__": {},
|
||||||
|
"_parent": {
|
||||||
|
"__id__": 1
|
||||||
|
},
|
||||||
|
"_children": [],
|
||||||
|
"_active": true,
|
||||||
|
"_components": [
|
||||||
|
{
|
||||||
|
"__id__": 3
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__id__": 5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__id__": 7
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"_prefab": {
|
||||||
|
"__id__": 9
|
||||||
|
},
|
||||||
|
"_lpos": {
|
||||||
|
"__type__": "cc.Vec3",
|
||||||
|
"x": 0,
|
||||||
|
"y": 0,
|
||||||
|
"z": 0
|
||||||
|
},
|
||||||
|
"_lrot": {
|
||||||
|
"__type__": "cc.Quat",
|
||||||
|
"x": 0,
|
||||||
|
"y": 0,
|
||||||
|
"z": 0,
|
||||||
|
"w": 1
|
||||||
|
},
|
||||||
|
"_lscale": {
|
||||||
|
"__type__": "cc.Vec3",
|
||||||
|
"x": 1,
|
||||||
|
"y": 1,
|
||||||
|
"z": 1
|
||||||
|
},
|
||||||
|
"_mobility": 0,
|
||||||
|
"_layer": 33554432,
|
||||||
|
"_euler": {
|
||||||
|
"__type__": "cc.Vec3",
|
||||||
|
"x": 0,
|
||||||
|
"y": 0,
|
||||||
|
"z": 0
|
||||||
|
},
|
||||||
|
"_id": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "cc.UITransform",
|
||||||
|
"_name": "",
|
||||||
|
"_objFlags": 0,
|
||||||
|
"__editorExtras__": {},
|
||||||
|
"node": {
|
||||||
|
"__id__": 2
|
||||||
|
},
|
||||||
|
"_enabled": true,
|
||||||
|
"__prefab": {
|
||||||
|
"__id__": 4
|
||||||
|
},
|
||||||
|
"_contentSize": {
|
||||||
|
"__type__": "cc.Size",
|
||||||
|
"width": 400,
|
||||||
|
"height": 200
|
||||||
|
},
|
||||||
|
"_anchorPoint": {
|
||||||
|
"__type__": "cc.Vec2",
|
||||||
|
"x": 0.5,
|
||||||
|
"y": 0.5
|
||||||
|
},
|
||||||
|
"_id": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "cc.CompPrefabInfo",
|
||||||
|
"fileId": "38Ctl8rrVBIIzUsgoEVl18"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "cc.Sprite",
|
||||||
|
"_name": "",
|
||||||
|
"_objFlags": 0,
|
||||||
|
"__editorExtras__": {},
|
||||||
|
"node": {
|
||||||
|
"__id__": 2
|
||||||
|
},
|
||||||
|
"_enabled": true,
|
||||||
|
"__prefab": {
|
||||||
|
"__id__": 6
|
||||||
|
},
|
||||||
|
"_customMaterial": null,
|
||||||
|
"_srcBlendFactor": 2,
|
||||||
|
"_dstBlendFactor": 4,
|
||||||
|
"_color": {
|
||||||
|
"__type__": "cc.Color",
|
||||||
|
"r": 56,
|
||||||
|
"g": 81,
|
||||||
|
"b": 85,
|
||||||
|
"a": 255
|
||||||
|
},
|
||||||
|
"_spriteFrame": {
|
||||||
|
"__uuid__": "7d8f9b89-4fd1-4c9f-a3ab-38ec7cded7ca@f9941",
|
||||||
|
"__expectedType__": "cc.SpriteFrame"
|
||||||
|
},
|
||||||
|
"_type": 0,
|
||||||
|
"_fillType": 0,
|
||||||
|
"_sizeMode": 0,
|
||||||
|
"_fillCenter": {
|
||||||
|
"__type__": "cc.Vec2",
|
||||||
|
"x": 0,
|
||||||
|
"y": 0
|
||||||
|
},
|
||||||
|
"_fillStart": 0,
|
||||||
|
"_fillRange": 0,
|
||||||
|
"_isTrimmedMode": true,
|
||||||
|
"_useGrayscale": false,
|
||||||
|
"_atlas": null,
|
||||||
|
"_id": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "cc.CompPrefabInfo",
|
||||||
|
"fileId": "e5z4rNsp5IqKHKYrZmbbGr"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "cc.Widget",
|
||||||
|
"_name": "",
|
||||||
|
"_objFlags": 0,
|
||||||
|
"__editorExtras__": {},
|
||||||
|
"node": {
|
||||||
|
"__id__": 2
|
||||||
|
},
|
||||||
|
"_enabled": true,
|
||||||
|
"__prefab": {
|
||||||
|
"__id__": 8
|
||||||
|
},
|
||||||
|
"_alignFlags": 45,
|
||||||
|
"_target": null,
|
||||||
|
"_left": 0,
|
||||||
|
"_right": 0,
|
||||||
|
"_top": 0,
|
||||||
|
"_bottom": 0,
|
||||||
|
"_horizontalCenter": 0,
|
||||||
|
"_verticalCenter": 0,
|
||||||
|
"_isAbsLeft": true,
|
||||||
|
"_isAbsRight": true,
|
||||||
|
"_isAbsTop": true,
|
||||||
|
"_isAbsBottom": true,
|
||||||
|
"_isAbsHorizontalCenter": true,
|
||||||
|
"_isAbsVerticalCenter": true,
|
||||||
|
"_originalWidth": 100,
|
||||||
|
"_originalHeight": 100,
|
||||||
|
"_alignMode": 1,
|
||||||
|
"_lockFlags": 45,
|
||||||
|
"_id": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "cc.CompPrefabInfo",
|
||||||
|
"fileId": "16YuS9Y1RIHL3+RkLAY9ri"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "cc.PrefabInfo",
|
||||||
|
"root": {
|
||||||
|
"__id__": 1
|
||||||
|
},
|
||||||
|
"asset": {
|
||||||
|
"__id__": 0
|
||||||
|
},
|
||||||
|
"fileId": "50E3C8mxhHcLBLSMVIqx2D",
|
||||||
|
"instance": null,
|
||||||
|
"targetOverrides": null,
|
||||||
|
"nestedPrefabInstanceRoots": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "cc.Node",
|
||||||
|
"_name": "label",
|
||||||
|
"_objFlags": 0,
|
||||||
|
"__editorExtras__": {},
|
||||||
|
"_parent": {
|
||||||
|
"__id__": 1
|
||||||
|
},
|
||||||
|
"_children": [],
|
||||||
|
"_active": true,
|
||||||
|
"_components": [
|
||||||
|
{
|
||||||
|
"__id__": 11
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__id__": 13
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"_prefab": {
|
||||||
|
"__id__": 15
|
||||||
|
},
|
||||||
|
"_lpos": {
|
||||||
|
"__type__": "cc.Vec3",
|
||||||
|
"x": 0,
|
||||||
|
"y": 0,
|
||||||
|
"z": 0
|
||||||
|
},
|
||||||
|
"_lrot": {
|
||||||
|
"__type__": "cc.Quat",
|
||||||
|
"x": 0,
|
||||||
|
"y": 0,
|
||||||
|
"z": 0,
|
||||||
|
"w": 1
|
||||||
|
},
|
||||||
|
"_lscale": {
|
||||||
|
"__type__": "cc.Vec3",
|
||||||
|
"x": 1,
|
||||||
|
"y": 1,
|
||||||
|
"z": 1
|
||||||
|
},
|
||||||
|
"_mobility": 0,
|
||||||
|
"_layer": 33554432,
|
||||||
|
"_euler": {
|
||||||
|
"__type__": "cc.Vec3",
|
||||||
|
"x": 0,
|
||||||
|
"y": 0,
|
||||||
|
"z": 0
|
||||||
|
},
|
||||||
|
"_id": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "cc.UITransform",
|
||||||
|
"_name": "",
|
||||||
|
"_objFlags": 0,
|
||||||
|
"__editorExtras__": {},
|
||||||
|
"node": {
|
||||||
|
"__id__": 10
|
||||||
|
},
|
||||||
|
"_enabled": true,
|
||||||
|
"__prefab": {
|
||||||
|
"__id__": 12
|
||||||
|
},
|
||||||
|
"_contentSize": {
|
||||||
|
"__type__": "cc.Size",
|
||||||
|
"width": 63.37689490176152,
|
||||||
|
"height": 50.4
|
||||||
|
},
|
||||||
|
"_anchorPoint": {
|
||||||
|
"__type__": "cc.Vec2",
|
||||||
|
"x": 0.5,
|
||||||
|
"y": 0.5
|
||||||
|
},
|
||||||
|
"_id": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "cc.CompPrefabInfo",
|
||||||
|
"fileId": "227SaOS3lF15buT8rVMsrU"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "cc.Label",
|
||||||
|
"_name": "",
|
||||||
|
"_objFlags": 0,
|
||||||
|
"__editorExtras__": {},
|
||||||
|
"node": {
|
||||||
|
"__id__": 10
|
||||||
|
},
|
||||||
|
"_enabled": true,
|
||||||
|
"__prefab": {
|
||||||
|
"__id__": 14
|
||||||
|
},
|
||||||
|
"_customMaterial": null,
|
||||||
|
"_srcBlendFactor": 2,
|
||||||
|
"_dstBlendFactor": 4,
|
||||||
|
"_color": {
|
||||||
|
"__type__": "cc.Color",
|
||||||
|
"r": 255,
|
||||||
|
"g": 255,
|
||||||
|
"b": 255,
|
||||||
|
"a": 255
|
||||||
|
},
|
||||||
|
"_string": "label",
|
||||||
|
"_horizontalAlign": 1,
|
||||||
|
"_verticalAlign": 1,
|
||||||
|
"_actualFontSize": 34.59375,
|
||||||
|
"_fontSize": 30,
|
||||||
|
"_fontFamily": "Arial",
|
||||||
|
"_lineHeight": 40,
|
||||||
|
"_overflow": 0,
|
||||||
|
"_enableWrapText": true,
|
||||||
|
"_font": null,
|
||||||
|
"_isSystemFontUsed": true,
|
||||||
|
"_spacingX": 0,
|
||||||
|
"_isItalic": false,
|
||||||
|
"_isBold": false,
|
||||||
|
"_isUnderline": false,
|
||||||
|
"_underlineHeight": 2,
|
||||||
|
"_cacheMode": 0,
|
||||||
|
"_id": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "cc.CompPrefabInfo",
|
||||||
|
"fileId": "452rD9FHJNEZN1iBdm4Ra3"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "cc.PrefabInfo",
|
||||||
|
"root": {
|
||||||
|
"__id__": 1
|
||||||
|
},
|
||||||
|
"asset": {
|
||||||
|
"__id__": 0
|
||||||
|
},
|
||||||
|
"fileId": "db55RKuw1JC52K7YOxNE+s",
|
||||||
|
"instance": null,
|
||||||
|
"targetOverrides": null,
|
||||||
|
"nestedPrefabInstanceRoots": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "cc.UITransform",
|
||||||
|
"_name": "",
|
||||||
|
"_objFlags": 0,
|
||||||
|
"__editorExtras__": {},
|
||||||
|
"node": {
|
||||||
|
"__id__": 1
|
||||||
|
},
|
||||||
|
"_enabled": true,
|
||||||
|
"__prefab": {
|
||||||
|
"__id__": 17
|
||||||
|
},
|
||||||
|
"_contentSize": {
|
||||||
|
"__type__": "cc.Size",
|
||||||
|
"width": 400,
|
||||||
|
"height": 200
|
||||||
|
},
|
||||||
|
"_anchorPoint": {
|
||||||
|
"__type__": "cc.Vec2",
|
||||||
|
"x": 0.5,
|
||||||
|
"y": 0.5
|
||||||
|
},
|
||||||
|
"_id": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "cc.CompPrefabInfo",
|
||||||
|
"fileId": "65OHSX1lBN0p7gbe3Wj+iU"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "cc.PrefabInfo",
|
||||||
|
"root": {
|
||||||
|
"__id__": 1
|
||||||
|
},
|
||||||
|
"asset": {
|
||||||
|
"__id__": 0
|
||||||
|
},
|
||||||
|
"fileId": "aanzQWNlJP9JX9MJIPpZk7",
|
||||||
|
"targetOverrides": null
|
||||||
|
}
|
||||||
|
]
|
13
list-3x/assets/common-cells/shape-label-cell.prefab.meta
Normal file
13
list-3x/assets/common-cells/shape-label-cell.prefab.meta
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
{
|
||||||
|
"ver": "1.1.45",
|
||||||
|
"importer": "prefab",
|
||||||
|
"imported": true,
|
||||||
|
"uuid": "c8b689a4-ae47-4041-8c9c-7298939e76be",
|
||||||
|
"files": [
|
||||||
|
".json"
|
||||||
|
],
|
||||||
|
"subMetas": {},
|
||||||
|
"userData": {
|
||||||
|
"syncNodeName": "shape-label-cell"
|
||||||
|
}
|
||||||
|
}
|
9
list-3x/assets/home.meta
Normal file
9
list-3x/assets/home.meta
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"ver": "1.2.0",
|
||||||
|
"importer": "directory",
|
||||||
|
"imported": true,
|
||||||
|
"uuid": "46e5f5cb-a3ef-4dd6-a3e0-f2475af0089d",
|
||||||
|
"files": [],
|
||||||
|
"subMetas": {},
|
||||||
|
"userData": {}
|
||||||
|
}
|
576
list-3x/assets/home/home.scene
Normal file
576
list-3x/assets/home/home.scene
Normal file
@ -0,0 +1,576 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"__type__": "cc.SceneAsset",
|
||||||
|
"_name": "home",
|
||||||
|
"_objFlags": 0,
|
||||||
|
"__editorExtras__": {},
|
||||||
|
"_native": "",
|
||||||
|
"scene": {
|
||||||
|
"__id__": 1
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "cc.Scene",
|
||||||
|
"_name": "home",
|
||||||
|
"_objFlags": 0,
|
||||||
|
"__editorExtras__": {},
|
||||||
|
"_parent": null,
|
||||||
|
"_children": [
|
||||||
|
{
|
||||||
|
"__id__": 2
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"_active": true,
|
||||||
|
"_components": [],
|
||||||
|
"_prefab": {
|
||||||
|
"__id__": 13
|
||||||
|
},
|
||||||
|
"_lpos": {
|
||||||
|
"__type__": "cc.Vec3",
|
||||||
|
"x": 0,
|
||||||
|
"y": 0,
|
||||||
|
"z": 0
|
||||||
|
},
|
||||||
|
"_lrot": {
|
||||||
|
"__type__": "cc.Quat",
|
||||||
|
"x": 0,
|
||||||
|
"y": 0,
|
||||||
|
"z": 0,
|
||||||
|
"w": 1
|
||||||
|
},
|
||||||
|
"_lscale": {
|
||||||
|
"__type__": "cc.Vec3",
|
||||||
|
"x": 1,
|
||||||
|
"y": 1,
|
||||||
|
"z": 1
|
||||||
|
},
|
||||||
|
"_mobility": 0,
|
||||||
|
"_layer": 1073741824,
|
||||||
|
"_euler": {
|
||||||
|
"__type__": "cc.Vec3",
|
||||||
|
"x": 0,
|
||||||
|
"y": 0,
|
||||||
|
"z": 0
|
||||||
|
},
|
||||||
|
"autoReleaseAssets": false,
|
||||||
|
"_globals": {
|
||||||
|
"__id__": 14
|
||||||
|
},
|
||||||
|
"_id": "5d2f3c26-c7d2-48bd-bd13-ca5aa20a93c4"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "cc.Node",
|
||||||
|
"_name": "Canvas",
|
||||||
|
"_objFlags": 0,
|
||||||
|
"__editorExtras__": {},
|
||||||
|
"_parent": {
|
||||||
|
"__id__": 1
|
||||||
|
},
|
||||||
|
"_children": [
|
||||||
|
{
|
||||||
|
"__id__": 3
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__id__": 5
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"_active": true,
|
||||||
|
"_components": [
|
||||||
|
{
|
||||||
|
"__id__": 9
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__id__": 10
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__id__": 11
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__id__": 12
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"_prefab": null,
|
||||||
|
"_lpos": {
|
||||||
|
"__type__": "cc.Vec3",
|
||||||
|
"x": 640,
|
||||||
|
"y": 360.00000000000006,
|
||||||
|
"z": 0
|
||||||
|
},
|
||||||
|
"_lrot": {
|
||||||
|
"__type__": "cc.Quat",
|
||||||
|
"x": 0,
|
||||||
|
"y": 0,
|
||||||
|
"z": 0,
|
||||||
|
"w": 1
|
||||||
|
},
|
||||||
|
"_lscale": {
|
||||||
|
"__type__": "cc.Vec3",
|
||||||
|
"x": 1,
|
||||||
|
"y": 1,
|
||||||
|
"z": 1
|
||||||
|
},
|
||||||
|
"_mobility": 0,
|
||||||
|
"_layer": 33554432,
|
||||||
|
"_euler": {
|
||||||
|
"__type__": "cc.Vec3",
|
||||||
|
"x": 0,
|
||||||
|
"y": 0,
|
||||||
|
"z": 0
|
||||||
|
},
|
||||||
|
"_id": "beI88Z2HpFELqR4T5EMHpg"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "cc.Node",
|
||||||
|
"_name": "Camera",
|
||||||
|
"_objFlags": 0,
|
||||||
|
"__editorExtras__": {},
|
||||||
|
"_parent": {
|
||||||
|
"__id__": 2
|
||||||
|
},
|
||||||
|
"_children": [],
|
||||||
|
"_active": true,
|
||||||
|
"_components": [
|
||||||
|
{
|
||||||
|
"__id__": 4
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"_prefab": null,
|
||||||
|
"_lpos": {
|
||||||
|
"__type__": "cc.Vec3",
|
||||||
|
"x": 0,
|
||||||
|
"y": 0,
|
||||||
|
"z": 1000
|
||||||
|
},
|
||||||
|
"_lrot": {
|
||||||
|
"__type__": "cc.Quat",
|
||||||
|
"x": 0,
|
||||||
|
"y": 0,
|
||||||
|
"z": 0,
|
||||||
|
"w": 1
|
||||||
|
},
|
||||||
|
"_lscale": {
|
||||||
|
"__type__": "cc.Vec3",
|
||||||
|
"x": 1,
|
||||||
|
"y": 1,
|
||||||
|
"z": 1
|
||||||
|
},
|
||||||
|
"_mobility": 0,
|
||||||
|
"_layer": 1073741824,
|
||||||
|
"_euler": {
|
||||||
|
"__type__": "cc.Vec3",
|
||||||
|
"x": 0,
|
||||||
|
"y": 0,
|
||||||
|
"z": 0
|
||||||
|
},
|
||||||
|
"_id": "ebFwiq8gBFaYpqYbdoDODe"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "cc.Camera",
|
||||||
|
"_name": "",
|
||||||
|
"_objFlags": 0,
|
||||||
|
"__editorExtras__": {},
|
||||||
|
"node": {
|
||||||
|
"__id__": 3
|
||||||
|
},
|
||||||
|
"_enabled": true,
|
||||||
|
"__prefab": null,
|
||||||
|
"_projection": 0,
|
||||||
|
"_priority": 0,
|
||||||
|
"_fov": 45,
|
||||||
|
"_fovAxis": 0,
|
||||||
|
"_orthoHeight": 481.3008130081301,
|
||||||
|
"_near": 0,
|
||||||
|
"_far": 1000,
|
||||||
|
"_color": {
|
||||||
|
"__type__": "cc.Color",
|
||||||
|
"r": 0,
|
||||||
|
"g": 0,
|
||||||
|
"b": 0,
|
||||||
|
"a": 255
|
||||||
|
},
|
||||||
|
"_depth": 1,
|
||||||
|
"_stencil": 0,
|
||||||
|
"_clearFlags": 7,
|
||||||
|
"_rect": {
|
||||||
|
"__type__": "cc.Rect",
|
||||||
|
"x": 0,
|
||||||
|
"y": 0,
|
||||||
|
"width": 1,
|
||||||
|
"height": 1
|
||||||
|
},
|
||||||
|
"_aperture": 19,
|
||||||
|
"_shutter": 7,
|
||||||
|
"_iso": 0,
|
||||||
|
"_screenScale": 1,
|
||||||
|
"_visibility": 1108344832,
|
||||||
|
"_targetTexture": null,
|
||||||
|
"_postProcess": null,
|
||||||
|
"_usePostProcess": false,
|
||||||
|
"_cameraType": -1,
|
||||||
|
"_trackingType": 0,
|
||||||
|
"_id": "63WIch3o5BEYRlXzTT0oWc"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "cc.Node",
|
||||||
|
"_name": "list",
|
||||||
|
"_objFlags": 0,
|
||||||
|
"__editorExtras__": {},
|
||||||
|
"_parent": {
|
||||||
|
"__id__": 2
|
||||||
|
},
|
||||||
|
"_children": [],
|
||||||
|
"_active": true,
|
||||||
|
"_components": [
|
||||||
|
{
|
||||||
|
"__id__": 6
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__id__": 7
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"_prefab": null,
|
||||||
|
"_lpos": {
|
||||||
|
"__type__": "cc.Vec3",
|
||||||
|
"x": 0,
|
||||||
|
"y": 0,
|
||||||
|
"z": 0
|
||||||
|
},
|
||||||
|
"_lrot": {
|
||||||
|
"__type__": "cc.Quat",
|
||||||
|
"x": 0,
|
||||||
|
"y": 0,
|
||||||
|
"z": 0,
|
||||||
|
"w": 1
|
||||||
|
},
|
||||||
|
"_lscale": {
|
||||||
|
"__type__": "cc.Vec3",
|
||||||
|
"x": 1,
|
||||||
|
"y": 1,
|
||||||
|
"z": 1
|
||||||
|
},
|
||||||
|
"_mobility": 0,
|
||||||
|
"_layer": 33554432,
|
||||||
|
"_euler": {
|
||||||
|
"__type__": "cc.Vec3",
|
||||||
|
"x": 0,
|
||||||
|
"y": 0,
|
||||||
|
"z": 0
|
||||||
|
},
|
||||||
|
"_id": "d1/dCc9yNJ44lI4TRGfy4z"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "cc.UITransform",
|
||||||
|
"_name": "",
|
||||||
|
"_objFlags": 0,
|
||||||
|
"__editorExtras__": {},
|
||||||
|
"node": {
|
||||||
|
"__id__": 5
|
||||||
|
},
|
||||||
|
"_enabled": true,
|
||||||
|
"__prefab": null,
|
||||||
|
"_contentSize": {
|
||||||
|
"__type__": "cc.Size",
|
||||||
|
"width": 400,
|
||||||
|
"height": 700
|
||||||
|
},
|
||||||
|
"_anchorPoint": {
|
||||||
|
"__type__": "cc.Vec2",
|
||||||
|
"x": 0.5,
|
||||||
|
"y": 0.5
|
||||||
|
},
|
||||||
|
"_id": "315xpp6rxGVIpwfAByHAu2"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "f94cbxum3xAsomhVNW1piY0",
|
||||||
|
"_name": "",
|
||||||
|
"_objFlags": 0,
|
||||||
|
"__editorExtras__": {},
|
||||||
|
"node": {
|
||||||
|
"__id__": 5
|
||||||
|
},
|
||||||
|
"_enabled": true,
|
||||||
|
"__prefab": null,
|
||||||
|
"mask": true,
|
||||||
|
"scrollEnabled": true,
|
||||||
|
"wheelScrollEnabled": true,
|
||||||
|
"scrollDirection": 1,
|
||||||
|
"mode": 0,
|
||||||
|
"preloadNodesLimitPerFrame": 2,
|
||||||
|
"frameInterval": 1,
|
||||||
|
"recycleInterval": 1,
|
||||||
|
"registerCellForEditor": [
|
||||||
|
{
|
||||||
|
"__id__": 8
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"_id": "540sP7RuVMr66Fyji3wiJs"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "_yx_editor_register_cell_info",
|
||||||
|
"prefab": {
|
||||||
|
"__uuid__": "c8b689a4-ae47-4041-8c9c-7298939e76be",
|
||||||
|
"__expectedType__": "cc.Prefab"
|
||||||
|
},
|
||||||
|
"identifier": "cell",
|
||||||
|
"comp": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "cc.UITransform",
|
||||||
|
"_name": "",
|
||||||
|
"_objFlags": 0,
|
||||||
|
"__editorExtras__": {},
|
||||||
|
"node": {
|
||||||
|
"__id__": 2
|
||||||
|
},
|
||||||
|
"_enabled": true,
|
||||||
|
"__prefab": null,
|
||||||
|
"_contentSize": {
|
||||||
|
"__type__": "cc.Size",
|
||||||
|
"width": 1280,
|
||||||
|
"height": 720
|
||||||
|
},
|
||||||
|
"_anchorPoint": {
|
||||||
|
"__type__": "cc.Vec2",
|
||||||
|
"x": 0.5,
|
||||||
|
"y": 0.5
|
||||||
|
},
|
||||||
|
"_id": "d6rUX5yfhMlKoWX2bSbawx"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "cc.Canvas",
|
||||||
|
"_name": "",
|
||||||
|
"_objFlags": 0,
|
||||||
|
"__editorExtras__": {},
|
||||||
|
"node": {
|
||||||
|
"__id__": 2
|
||||||
|
},
|
||||||
|
"_enabled": true,
|
||||||
|
"__prefab": null,
|
||||||
|
"_cameraComponent": {
|
||||||
|
"__id__": 4
|
||||||
|
},
|
||||||
|
"_alignCanvasWithScreen": true,
|
||||||
|
"_id": "12O/ljcVlEqLmVm3U2gEOQ"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "cc.Widget",
|
||||||
|
"_name": "",
|
||||||
|
"_objFlags": 0,
|
||||||
|
"__editorExtras__": {},
|
||||||
|
"node": {
|
||||||
|
"__id__": 2
|
||||||
|
},
|
||||||
|
"_enabled": true,
|
||||||
|
"__prefab": null,
|
||||||
|
"_alignFlags": 45,
|
||||||
|
"_target": null,
|
||||||
|
"_left": 0,
|
||||||
|
"_right": 0,
|
||||||
|
"_top": 5.684341886080802e-14,
|
||||||
|
"_bottom": 5.684341886080802e-14,
|
||||||
|
"_horizontalCenter": 0,
|
||||||
|
"_verticalCenter": 0,
|
||||||
|
"_isAbsLeft": true,
|
||||||
|
"_isAbsRight": true,
|
||||||
|
"_isAbsTop": true,
|
||||||
|
"_isAbsBottom": true,
|
||||||
|
"_isAbsHorizontalCenter": true,
|
||||||
|
"_isAbsVerticalCenter": true,
|
||||||
|
"_originalWidth": 0,
|
||||||
|
"_originalHeight": 0,
|
||||||
|
"_alignMode": 2,
|
||||||
|
"_lockFlags": 0,
|
||||||
|
"_id": "c5V1EV8IpMtrIvY1OE9t2u"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "f5a88umqwxKvohw3IWqZkJR",
|
||||||
|
"_name": "",
|
||||||
|
"_objFlags": 0,
|
||||||
|
"__editorExtras__": {},
|
||||||
|
"node": {
|
||||||
|
"__id__": 2
|
||||||
|
},
|
||||||
|
"_enabled": true,
|
||||||
|
"__prefab": null,
|
||||||
|
"listComp": {
|
||||||
|
"__id__": 7
|
||||||
|
},
|
||||||
|
"_id": "acPDbfi09KmLOkYo+Irf3Y"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "cc.PrefabInfo",
|
||||||
|
"root": null,
|
||||||
|
"asset": null,
|
||||||
|
"fileId": "5d2f3c26-c7d2-48bd-bd13-ca5aa20a93c4",
|
||||||
|
"instance": null,
|
||||||
|
"targetOverrides": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "cc.SceneGlobals",
|
||||||
|
"ambient": {
|
||||||
|
"__id__": 15
|
||||||
|
},
|
||||||
|
"shadows": {
|
||||||
|
"__id__": 16
|
||||||
|
},
|
||||||
|
"_skybox": {
|
||||||
|
"__id__": 17
|
||||||
|
},
|
||||||
|
"fog": {
|
||||||
|
"__id__": 18
|
||||||
|
},
|
||||||
|
"octree": {
|
||||||
|
"__id__": 19
|
||||||
|
},
|
||||||
|
"skin": {
|
||||||
|
"__id__": 20
|
||||||
|
},
|
||||||
|
"lightProbeInfo": {
|
||||||
|
"__id__": 21
|
||||||
|
},
|
||||||
|
"bakedWithStationaryMainLight": false,
|
||||||
|
"bakedWithHighpLightmap": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "cc.AmbientInfo",
|
||||||
|
"_skyColorHDR": {
|
||||||
|
"__type__": "cc.Vec4",
|
||||||
|
"x": 0,
|
||||||
|
"y": 0,
|
||||||
|
"z": 0,
|
||||||
|
"w": 0.520833125
|
||||||
|
},
|
||||||
|
"_skyColor": {
|
||||||
|
"__type__": "cc.Vec4",
|
||||||
|
"x": 0,
|
||||||
|
"y": 0,
|
||||||
|
"z": 0,
|
||||||
|
"w": 0.520833125
|
||||||
|
},
|
||||||
|
"_skyIllumHDR": 20000,
|
||||||
|
"_skyIllum": 20000,
|
||||||
|
"_groundAlbedoHDR": {
|
||||||
|
"__type__": "cc.Vec4",
|
||||||
|
"x": 0,
|
||||||
|
"y": 0,
|
||||||
|
"z": 0,
|
||||||
|
"w": 0
|
||||||
|
},
|
||||||
|
"_groundAlbedo": {
|
||||||
|
"__type__": "cc.Vec4",
|
||||||
|
"x": 0,
|
||||||
|
"y": 0,
|
||||||
|
"z": 0,
|
||||||
|
"w": 0
|
||||||
|
},
|
||||||
|
"_skyColorLDR": {
|
||||||
|
"__type__": "cc.Vec4",
|
||||||
|
"x": 0.2,
|
||||||
|
"y": 0.5,
|
||||||
|
"z": 0.8,
|
||||||
|
"w": 1
|
||||||
|
},
|
||||||
|
"_skyIllumLDR": 20000,
|
||||||
|
"_groundAlbedoLDR": {
|
||||||
|
"__type__": "cc.Vec4",
|
||||||
|
"x": 0.2,
|
||||||
|
"y": 0.2,
|
||||||
|
"z": 0.2,
|
||||||
|
"w": 1
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "cc.ShadowsInfo",
|
||||||
|
"_enabled": false,
|
||||||
|
"_type": 0,
|
||||||
|
"_normal": {
|
||||||
|
"__type__": "cc.Vec3",
|
||||||
|
"x": 0,
|
||||||
|
"y": 1,
|
||||||
|
"z": 0
|
||||||
|
},
|
||||||
|
"_distance": 0,
|
||||||
|
"_shadowColor": {
|
||||||
|
"__type__": "cc.Color",
|
||||||
|
"r": 76,
|
||||||
|
"g": 76,
|
||||||
|
"b": 76,
|
||||||
|
"a": 255
|
||||||
|
},
|
||||||
|
"_maxReceived": 4,
|
||||||
|
"_size": {
|
||||||
|
"__type__": "cc.Vec2",
|
||||||
|
"x": 512,
|
||||||
|
"y": 512
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "cc.SkyboxInfo",
|
||||||
|
"_envLightingType": 0,
|
||||||
|
"_envmapHDR": null,
|
||||||
|
"_envmap": null,
|
||||||
|
"_envmapLDR": null,
|
||||||
|
"_diffuseMapHDR": null,
|
||||||
|
"_diffuseMapLDR": null,
|
||||||
|
"_enabled": false,
|
||||||
|
"_useHDR": true,
|
||||||
|
"_editableMaterial": null,
|
||||||
|
"_reflectionHDR": null,
|
||||||
|
"_reflectionLDR": null,
|
||||||
|
"_rotationAngle": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "cc.FogInfo",
|
||||||
|
"_type": 0,
|
||||||
|
"_fogColor": {
|
||||||
|
"__type__": "cc.Color",
|
||||||
|
"r": 200,
|
||||||
|
"g": 200,
|
||||||
|
"b": 200,
|
||||||
|
"a": 255
|
||||||
|
},
|
||||||
|
"_enabled": false,
|
||||||
|
"_fogDensity": 0.3,
|
||||||
|
"_fogStart": 0.5,
|
||||||
|
"_fogEnd": 300,
|
||||||
|
"_fogAtten": 5,
|
||||||
|
"_fogTop": 1.5,
|
||||||
|
"_fogRange": 1.2,
|
||||||
|
"_accurate": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "cc.OctreeInfo",
|
||||||
|
"_enabled": false,
|
||||||
|
"_minPos": {
|
||||||
|
"__type__": "cc.Vec3",
|
||||||
|
"x": -1024,
|
||||||
|
"y": -1024,
|
||||||
|
"z": -1024
|
||||||
|
},
|
||||||
|
"_maxPos": {
|
||||||
|
"__type__": "cc.Vec3",
|
||||||
|
"x": 1024,
|
||||||
|
"y": 1024,
|
||||||
|
"z": 1024
|
||||||
|
},
|
||||||
|
"_depth": 8
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "cc.SkinInfo",
|
||||||
|
"_enabled": false,
|
||||||
|
"_blurRadius": 0.01,
|
||||||
|
"_sssIntensity": 3
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "cc.LightProbeInfo",
|
||||||
|
"_giScale": 1,
|
||||||
|
"_giSamples": 1024,
|
||||||
|
"_bounces": 2,
|
||||||
|
"_reduceRinging": 0,
|
||||||
|
"_showProbe": true,
|
||||||
|
"_showWireframe": true,
|
||||||
|
"_showConvex": false,
|
||||||
|
"_data": null,
|
||||||
|
"_lightProbeSphereVolume": 1
|
||||||
|
}
|
||||||
|
]
|
11
list-3x/assets/home/home.scene.meta
Normal file
11
list-3x/assets/home/home.scene.meta
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
"ver": "1.1.45",
|
||||||
|
"importer": "scene",
|
||||||
|
"imported": true,
|
||||||
|
"uuid": "5d2f3c26-c7d2-48bd-bd13-ca5aa20a93c4",
|
||||||
|
"files": [
|
||||||
|
".json"
|
||||||
|
],
|
||||||
|
"subMetas": {},
|
||||||
|
"userData": {}
|
||||||
|
}
|
53
list-3x/assets/home/home.ts
Normal file
53
list-3x/assets/home/home.ts
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
import { _decorator, Component, Label, math, Node } from 'cc';
|
||||||
|
import { YXCollectionView } from '../lib/yx-collection-view';
|
||||||
|
import { YXTableLayout } from '../lib/yx-table-layout';
|
||||||
|
const { ccclass, property } = _decorator;
|
||||||
|
|
||||||
|
class Data {
|
||||||
|
id: number
|
||||||
|
}
|
||||||
|
|
||||||
|
@ccclass('home')
|
||||||
|
export class home extends Component {
|
||||||
|
|
||||||
|
@property(YXCollectionView)
|
||||||
|
listComp: YXCollectionView = null
|
||||||
|
|
||||||
|
testData: Data[] = []
|
||||||
|
|
||||||
|
protected start(): void {
|
||||||
|
|
||||||
|
// 绑定数据源
|
||||||
|
this.listComp.numberOfItems = () => this.testData.length
|
||||||
|
this.listComp.cellForItemAt = (indexPath, collectionView) => {
|
||||||
|
const rowData = this.testData[indexPath.item]
|
||||||
|
const cell = collectionView.dequeueReusableCell(`cell`)
|
||||||
|
cell.getChildByName('label').getComponent(Label).string = `${indexPath}`
|
||||||
|
return cell
|
||||||
|
}
|
||||||
|
|
||||||
|
// 确定布局方案
|
||||||
|
let layout = new YXTableLayout()
|
||||||
|
layout.spacing = 20
|
||||||
|
layout.itemSize = new math.Size(400, 100)
|
||||||
|
this.listComp.layout = layout
|
||||||
|
|
||||||
|
this.receivedData()
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 模拟收到数据
|
||||||
|
*/
|
||||||
|
receivedData() {
|
||||||
|
this.testData = []
|
||||||
|
for (let index = 0; index < 1000; index++) {
|
||||||
|
let data = new Data()
|
||||||
|
data.id = index
|
||||||
|
this.testData.push(data)
|
||||||
|
}
|
||||||
|
|
||||||
|
// 刷新列表
|
||||||
|
this.listComp.reloadData()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
9
list-3x/assets/home/home.ts.meta
Normal file
9
list-3x/assets/home/home.ts.meta
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"ver": "4.0.23",
|
||||||
|
"importer": "typescript",
|
||||||
|
"imported": true,
|
||||||
|
"uuid": "f5a88ba6-ab0c-4abe-8870-dc85aa664251",
|
||||||
|
"files": [],
|
||||||
|
"subMetas": {},
|
||||||
|
"userData": {}
|
||||||
|
}
|
9
list-3x/assets/lib.meta
Normal file
9
list-3x/assets/lib.meta
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"ver": "1.2.0",
|
||||||
|
"importer": "directory",
|
||||||
|
"imported": true,
|
||||||
|
"uuid": "bf1ca834-a556-4dcc-a699-1a5c368bda61",
|
||||||
|
"files": [],
|
||||||
|
"subMetas": {},
|
||||||
|
"userData": {}
|
||||||
|
}
|
1445
list-3x/assets/lib/yx-collection-view.ts
Normal file
1445
list-3x/assets/lib/yx-collection-view.ts
Normal file
File diff suppressed because it is too large
Load Diff
9
list-3x/assets/lib/yx-collection-view.ts.meta
Normal file
9
list-3x/assets/lib/yx-collection-view.ts.meta
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"ver": "4.0.23",
|
||||||
|
"importer": "typescript",
|
||||||
|
"imported": true,
|
||||||
|
"uuid": "f94cbc6e-9b7c-40b2-89a1-54d5b5a62634",
|
||||||
|
"files": [],
|
||||||
|
"subMetas": {},
|
||||||
|
"userData": {}
|
||||||
|
}
|
115
list-3x/assets/lib/yx-table-layout.ts
Normal file
115
list-3x/assets/lib/yx-table-layout.ts
Normal file
@ -0,0 +1,115 @@
|
|||||||
|
import { math, UITransform, warn } from "cc";
|
||||||
|
import { YXBinaryLayout, YXCollectionView, YXIndexPath, YXLayoutAttributes } from "./yx-collection-view";
|
||||||
|
|
||||||
|
|
||||||
|
enum _yx_table_layout_alignment {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 单元节点相对列表居中
|
||||||
|
*/
|
||||||
|
CENTER,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 单元节点紧靠列表左侧
|
||||||
|
*/
|
||||||
|
LEFT,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 单元节点紧靠列表右侧
|
||||||
|
*/
|
||||||
|
RIGHT,
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 想要了解自定义布局的,可以看看这个类,这个类实现了一个基础的 table view 的布局样式,相对来说比较简单
|
||||||
|
*
|
||||||
|
* - 支持不同的节点大小
|
||||||
|
* - 支持调整对齐方式
|
||||||
|
* - 不支持分区布局
|
||||||
|
* - 不支持水平方向滚动,仅支持垂直方向滚动
|
||||||
|
* - 不支持多列布局,仅支持单列布局
|
||||||
|
* - 支持调整上下边距/间距
|
||||||
|
*/
|
||||||
|
export class YXTableLayout extends YXBinaryLayout {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 单元格大小
|
||||||
|
*/
|
||||||
|
itemSize: math.Size | ((indexPath: YXIndexPath, layout: YXTableLayout, collectionView: YXCollectionView) => math.Size) = new math.Size(100, 100)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 间距
|
||||||
|
*/
|
||||||
|
spacing: number = 0
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 上边距
|
||||||
|
*/
|
||||||
|
top: number = 0
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 下边距
|
||||||
|
*/
|
||||||
|
bottom: number = 0
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 对齐方式
|
||||||
|
*/
|
||||||
|
alignment: _yx_table_layout_alignment = YXTableLayout.Alignment.CENTER
|
||||||
|
static Alignment = _yx_table_layout_alignment
|
||||||
|
|
||||||
|
prepare(collectionView: YXCollectionView): void {
|
||||||
|
// 设置列表的滚动方向
|
||||||
|
if (collectionView.scrollDirection == YXCollectionView.ScrollDirection.HORIZONTAL) {
|
||||||
|
warn(`YXTableLayout 只支持垂直方向排列`)
|
||||||
|
}
|
||||||
|
collectionView.scrollView.horizontal = false
|
||||||
|
collectionView.scrollView.vertical = true
|
||||||
|
|
||||||
|
let contentSize = collectionView.node.getComponent(UITransform).contentSize.clone()
|
||||||
|
let attrs = []
|
||||||
|
|
||||||
|
let maxY = this.top
|
||||||
|
|
||||||
|
// 获取列表内一共需要展示多少数据
|
||||||
|
let numberOfItems = collectionView.getNumberOfItems(0)
|
||||||
|
for (let row = 0; row < numberOfItems; row++) {
|
||||||
|
|
||||||
|
// 生成对应的 indexPath,并通过 indexPath 获取节点大小
|
||||||
|
// 这里是不支持分区所以不考虑 section 的情况,section 默认就是 0,支持的分区的情况可以回头看 flow-layout 的实现
|
||||||
|
let indexPath = new YXIndexPath(0, row)
|
||||||
|
let itemSize = this.itemSize instanceof Function ? this.itemSize(indexPath, this, collectionView) : this.itemSize
|
||||||
|
|
||||||
|
// 生成布局属性对象,并按照 table view 的规则确定好节点的位置
|
||||||
|
let attributes = new YXLayoutAttributes(indexPath)
|
||||||
|
attributes.frame = new math.Rect()
|
||||||
|
attributes.frame.size = itemSize
|
||||||
|
attributes.frame.y = maxY + (row > 0 ? this.spacing : 0)
|
||||||
|
attributes.frame.x = 0
|
||||||
|
if (this.alignment == _yx_table_layout_alignment.RIGHT) {
|
||||||
|
attributes.frame.x = (contentSize.width - attributes.frame.width)
|
||||||
|
}
|
||||||
|
if (this.alignment == _yx_table_layout_alignment.CENTER) {
|
||||||
|
attributes.frame.x = (contentSize.width - attributes.frame.width) * 0.5
|
||||||
|
}
|
||||||
|
attrs.push(attributes)
|
||||||
|
maxY = attributes.frame.yMax
|
||||||
|
}
|
||||||
|
|
||||||
|
maxY += this.bottom
|
||||||
|
|
||||||
|
// 保存起来给列表组件使用
|
||||||
|
this.attributes = attrs
|
||||||
|
|
||||||
|
// 确定滚动范围的总大小
|
||||||
|
contentSize.height = Math.max(contentSize.height, maxY)
|
||||||
|
this.contentSize = contentSize
|
||||||
|
}
|
||||||
|
|
||||||
|
initOffset(collectionView: YXCollectionView): void {
|
||||||
|
// 首次更新数据,滚动至列表顶部
|
||||||
|
collectionView.scrollView.scrollToTop()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
9
list-3x/assets/lib/yx-table-layout.ts.meta
Normal file
9
list-3x/assets/lib/yx-table-layout.ts.meta
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"ver": "4.0.23",
|
||||||
|
"importer": "typescript",
|
||||||
|
"imported": true,
|
||||||
|
"uuid": "0187d4ab-fbb6-44aa-8c36-b5709f3dbff4",
|
||||||
|
"files": [],
|
||||||
|
"subMetas": {},
|
||||||
|
"userData": {}
|
||||||
|
}
|
7
list-3x/package.json
Executable file
7
list-3x/package.json
Executable file
@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"name": "list-3x",
|
||||||
|
"uuid": "d21c5c56-bc81-481d-b241-7ce394501071",
|
||||||
|
"creator": {
|
||||||
|
"version": "3.8.0"
|
||||||
|
}
|
||||||
|
}
|
3
list-3x/settings/v2/packages/builder.json
Normal file
3
list-3x/settings/v2/packages/builder.json
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"__version__": "1.3.6"
|
||||||
|
}
|
23
list-3x/settings/v2/packages/cocos-service.json
Normal file
23
list-3x/settings/v2/packages/cocos-service.json
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
{
|
||||||
|
"__version__": "3.0.7",
|
||||||
|
"game": {
|
||||||
|
"name": "未知游戏",
|
||||||
|
"app_id": "UNKNOW",
|
||||||
|
"c_id": "0"
|
||||||
|
},
|
||||||
|
"appConfigMaps": [
|
||||||
|
{
|
||||||
|
"app_id": "UNKNOW",
|
||||||
|
"config_id": "abc178"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"configs": [
|
||||||
|
{
|
||||||
|
"app_id": "UNKNOW",
|
||||||
|
"config_id": "abc178",
|
||||||
|
"config_name": "Default",
|
||||||
|
"config_remarks": "",
|
||||||
|
"services": []
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
3
list-3x/settings/v2/packages/device.json
Normal file
3
list-3x/settings/v2/packages/device.json
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"__version__": "1.0.1"
|
||||||
|
}
|
150
list-3x/settings/v2/packages/engine.json
Normal file
150
list-3x/settings/v2/packages/engine.json
Normal file
@ -0,0 +1,150 @@
|
|||||||
|
{
|
||||||
|
"__version__": "1.0.7",
|
||||||
|
"modules": {
|
||||||
|
"cache": {
|
||||||
|
"base": {
|
||||||
|
"_value": true
|
||||||
|
},
|
||||||
|
"graphcis": {
|
||||||
|
"_value": true
|
||||||
|
},
|
||||||
|
"gfx-webgl": {
|
||||||
|
"_value": true
|
||||||
|
},
|
||||||
|
"gfx-webgl2": {
|
||||||
|
"_value": true
|
||||||
|
},
|
||||||
|
"animation": {
|
||||||
|
"_value": true
|
||||||
|
},
|
||||||
|
"skeletal-animation": {
|
||||||
|
"_value": false
|
||||||
|
},
|
||||||
|
"3d": {
|
||||||
|
"_value": false
|
||||||
|
},
|
||||||
|
"2d": {
|
||||||
|
"_value": true
|
||||||
|
},
|
||||||
|
"xr": {
|
||||||
|
"_value": false
|
||||||
|
},
|
||||||
|
"ui": {
|
||||||
|
"_value": true
|
||||||
|
},
|
||||||
|
"particle": {
|
||||||
|
"_value": false
|
||||||
|
},
|
||||||
|
"physics": {
|
||||||
|
"_value": false,
|
||||||
|
"_option": "physics-ammo"
|
||||||
|
},
|
||||||
|
"physics-ammo": {
|
||||||
|
"_value": false
|
||||||
|
},
|
||||||
|
"physics-cannon": {
|
||||||
|
"_value": false
|
||||||
|
},
|
||||||
|
"physics-physx": {
|
||||||
|
"_value": false
|
||||||
|
},
|
||||||
|
"physics-builtin": {
|
||||||
|
"_value": false
|
||||||
|
},
|
||||||
|
"physics-2d": {
|
||||||
|
"_value": true,
|
||||||
|
"_option": "physics-2d-box2d"
|
||||||
|
},
|
||||||
|
"physics-2d-box2d": {
|
||||||
|
"_value": false
|
||||||
|
},
|
||||||
|
"physics-2d-builtin": {
|
||||||
|
"_value": false
|
||||||
|
},
|
||||||
|
"intersection-2d": {
|
||||||
|
"_value": true
|
||||||
|
},
|
||||||
|
"primitive": {
|
||||||
|
"_value": false
|
||||||
|
},
|
||||||
|
"profiler": {
|
||||||
|
"_value": true
|
||||||
|
},
|
||||||
|
"occlusion-query": {
|
||||||
|
"_value": false
|
||||||
|
},
|
||||||
|
"geometry-renderer": {
|
||||||
|
"_value": false
|
||||||
|
},
|
||||||
|
"debug-renderer": {
|
||||||
|
"_value": false
|
||||||
|
},
|
||||||
|
"particle-2d": {
|
||||||
|
"_value": true
|
||||||
|
},
|
||||||
|
"audio": {
|
||||||
|
"_value": true
|
||||||
|
},
|
||||||
|
"video": {
|
||||||
|
"_value": true
|
||||||
|
},
|
||||||
|
"webview": {
|
||||||
|
"_value": true
|
||||||
|
},
|
||||||
|
"tween": {
|
||||||
|
"_value": true
|
||||||
|
},
|
||||||
|
"websocket": {
|
||||||
|
"_value": false
|
||||||
|
},
|
||||||
|
"websocket-server": {
|
||||||
|
"_value": false
|
||||||
|
},
|
||||||
|
"terrain": {
|
||||||
|
"_value": false
|
||||||
|
},
|
||||||
|
"light-probe": {
|
||||||
|
"_value": false
|
||||||
|
},
|
||||||
|
"tiled-map": {
|
||||||
|
"_value": true
|
||||||
|
},
|
||||||
|
"spine": {
|
||||||
|
"_value": true
|
||||||
|
},
|
||||||
|
"dragon-bones": {
|
||||||
|
"_value": true
|
||||||
|
},
|
||||||
|
"marionette": {
|
||||||
|
"_value": false
|
||||||
|
},
|
||||||
|
"custom-pipeline": {
|
||||||
|
"_value": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"includeModules": [
|
||||||
|
"2d",
|
||||||
|
"animation",
|
||||||
|
"audio",
|
||||||
|
"base",
|
||||||
|
"dragon-bones",
|
||||||
|
"gfx-webgl",
|
||||||
|
"gfx-webgl2",
|
||||||
|
"intersection-2d",
|
||||||
|
"particle-2d",
|
||||||
|
"physics-2d-box2d",
|
||||||
|
"profiler",
|
||||||
|
"spine",
|
||||||
|
"tiled-map",
|
||||||
|
"tween",
|
||||||
|
"ui",
|
||||||
|
"video",
|
||||||
|
"webview"
|
||||||
|
],
|
||||||
|
"noDeprecatedFeatures": {
|
||||||
|
"value": false,
|
||||||
|
"version": ""
|
||||||
|
},
|
||||||
|
"flags": {}
|
||||||
|
}
|
||||||
|
}
|
23
list-3x/settings/v2/packages/information.json
Normal file
23
list-3x/settings/v2/packages/information.json
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
{
|
||||||
|
"__version__": "1.0.0",
|
||||||
|
"information": {
|
||||||
|
"customSplash": {
|
||||||
|
"id": "customSplash",
|
||||||
|
"label": "customSplash",
|
||||||
|
"enable": true,
|
||||||
|
"customSplash": {
|
||||||
|
"complete": false,
|
||||||
|
"form": "https://creator-api.cocos.com/api/form/show?sid=9fcf74f056ee5fdb06fa23517bdcc30a"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"removeSplash": {
|
||||||
|
"id": "removeSplash",
|
||||||
|
"label": "removeSplash",
|
||||||
|
"enable": true,
|
||||||
|
"removeSplash": {
|
||||||
|
"complete": false,
|
||||||
|
"form": "https://creator-api.cocos.com/api/form/show?sid=9fcf74f056ee5fdb06fa23517bdcc30a"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
3
list-3x/settings/v2/packages/program.json
Normal file
3
list-3x/settings/v2/packages/program.json
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"__version__": "1.0.3"
|
||||||
|
}
|
3
list-3x/settings/v2/packages/project.json
Normal file
3
list-3x/settings/v2/packages/project.json
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"__version__": "1.0.5"
|
||||||
|
}
|
9
list-3x/tsconfig.json
Normal file
9
list-3x/tsconfig.json
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
/* Base configuration. Do not edit this field. */
|
||||||
|
"extends": "./temp/tsconfig.cocos.json",
|
||||||
|
|
||||||
|
/* Add your custom configuration here. */
|
||||||
|
"compilerOptions": {
|
||||||
|
"strict": false
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user