1 Star 0 Fork 9

steven123 / SuperScrollView

forked from 周不移 / SuperScrollView 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

使用Cocos Creator开发游戏时,经常会用到ScrollView,来做列表显示。但是经常会碰到一系列的问题,比如:

  1. 加载显示非常多(比如200+个)子item时,刚开始有明显的卡顿。
  2. DrawCall会很高。

为此我尝试写了份自己优化的ScrollView,适用于ScrollView的content的Layout Type为Vertical,Horizontal,Grid,不能为None。 要配合SuperListItem一起使用,Item的预制体绑定的脚本要继承SuperListItem。具体可以看Demo

主要的优化点有:

  1. 分帧加载子Item,以解决加载大量item时的卡顿现象。
  2. 对众多子item做DrawCall优化,有效降低DrawCall。
  3. 可以滚动到指定item(通过索引去指定Item),使指定item显示在ScrollView视图中间。
  4. 使用简单,哈哈哈···,只需要外部调用setData就可以了

git地址为
https://gitee.com/zzhcodes/superscrollview

后续还会继续优化,欢迎大佬们拍砖~

MIT License Copyright (c) 2021 Umbrella1024 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

针对 Cocos Creator ScrollView 优化 展开 收起
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
1
https://gitee.com/lingyun123_admin/superscrollview.git
git@gitee.com:lingyun123_admin/superscrollview.git
lingyun123_admin
superscrollview
SuperScrollView
master

搜索帮助

14c37bed 8189591 565d56ea 8189591