http://www.oschina.net/p/scrolllayer

ScrollLayer

编辑/纠错

分享到: 
 
已用    +1
收藏 +12

4月18日 武汉 源创会开始报名,送华为开发板

ScrollLayer 是一个用于 cocos2d-iphone 应用上的屏幕滚动组件。

兼容性:

兼容iOS(Mobile Safari)/Android(Webkit)/PC(IE除外),其它未考证

操作方法:

在所支持的Touch设备上,用手指按住图片区域,然后向右(或向下)华丽丽地一拖,随即松开手指。Yeah~

调用语法示例:

  1. $('#J_Gallery').scrollLayer({
       direction:'X', //方向。X代表水平方向,Y代表垂直方向
        wrapEl:'.wrap', //外层容器。用来overflow遮罩的层
        touchEl:'.holder', //touch层容器。用来包裹列表内层元素的层
        childEl:'li', //内层元素。用来放图的层
       margin:5, //间距。以实际元素间距为准
        speed:0.95, //加速度。一般取0.9-1之间
        prevent:true //阻止超链接默认事件
    });

已知问题&待改进:

  • 个别低配置Android设备上(HTC HERO G3)响应有些迟滞。
  • 暂没有开发图片自动对准功能。

演示:http://www.smbey0nd.com/demo/lab/scrolllayer/demo.html

fictorial / ScrollLayer

Watch7 Fork1

2D scroll layer for cocos2d-iphone apps — More...

master分支代码最近更新:2012-05-12

下载zip

 
 

ScrollLayer 的 demo的连接貌似有问题,是个色情网站。。...

铂金小猪 发表于3年前 ,最后回答(3年前):红薯»

  • 4回答
  • 0投票
  • 279浏览

更多ScrollLayer的问题 »

 
 
 
 
https://github.com/fictorial/ScrollLayer
 

HTTPS clone URL

You can clone with HTTPS orSubversion.

Clone in DesktopDownload ZIP

2D scroll layer for cocos2d-iphone apps
Objective-CC
 branch: master 

Update README

latest commit a0eb9b95e3

 fictorial authored on May 12, 2012

README.md

ScrollLayer

A scrollable layer for cocos2d-iphone apps.

This is very simple and does not do much. I recommend you usehttps://github.com/cocos2d/cocos2d-iphone-extensions/tree/master/Extensions/CCScrollLayerinstead for real work.

Features

  • scrolling in 2D;
  • velocity ("inertial scrolling");
  • clipping (your layer doesn't have to use the entire window bounds).

Compatibility

Developed against cocos2d-iphone v1.0.0rc3.

History

There is a chaotic thread about a scrolling layer implementation for cocos2d-iphone apps. There's a ton of patches and bug reports. I gave up trying to follow that thread and decided to code my own version.

Future

I plan on creating a simple UITableView-like layer based on this code.

Concepts

Author

Brian Hammond brian@fictorial.com (http://fictorial.com)

License

Copyright (c) 2011 Fictorial LLC.

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.

https://github.com/igorkotkovets/ios-cocos2d-scroll

 

HTTPS clone URL

You can clone with HTTPS orSubversion.

Clone in DesktopDownload ZIP

A scroll layer for cocos2d-ios lib for iphone.
Objective-CC
 branch: master 

Cocos2d scroll updated 

latest commit bfaa4cc7dd

 Igor Kotkovets authored on Nov 12, 2012
  src Cocos2d scroll updated 2 years ago

ScrollLayer的更多相关文章

  1. [翻译] JTNumberScrollAnimatedView

    JTNumberScrollAnimatedView 本人视频教程系类   iOS中CALayer的使用 效果: Use JTNumberScrollAnimatedView for have a n ...

  2. iOS核心动画高级技巧之图层变换和专用图层(二)

    iOS核心动画高级技巧之CALayer(一) iOS核心动画高级技巧之图层变换和专用图层(二)iOS核心动画高级技巧之核心动画(三)iOS核心动画高级技巧之性能(四)iOS核心动画高级技巧之动画总结( ...

  3. cocos2dx基础篇(14) 滚动视图CCScrollView

    [3.x]     (1)去掉 "CC"     (2)滚动方向         > CCScrollViewDirection 改为强枚举 ScrollView::Dire ...

  4. iOS之CAScrollLayer属性简介和使用

    1.CAScrollLayer的简介 CAScrollLayer用于显示一个滑动图层的一部分,可以确定滑动方向和可视区域面积,限制不滑出区域外!相关属性如下:其中 /* Scroll the cont ...

随机推荐

  1. 生成heap dump

    在查看内存泄露以及对内存问题中,要dump出当前内存堆存储快照,便于分析.有几种方法可以做,简介如下 一.intellij IDEA 由于我用的是intellij IDEA,所以没有介绍Eclipse ...

  2. HA集群中namenode连接不上journalnode,导致namenode启动不了

    查看日志发现一下的错误: 2018-10-08 15:29:26,373 FATAL org.apache.hadoop.hdfs.server.namenode.FSEditLog: Error: ...

  3. 剑指Offer - 九度1373 - 整数中1出现的次数(从1到n整数中1出现的次数)

    剑指Offer - 九度1373 - 整数中1出现的次数(从1到n整数中1出现的次数)2014-02-05 23:03 题目描述: 亲们!!我们的外国友人YZ这几天总是睡不好,初中奥数里有一个题目一直 ...

  4. 通过slf4j/log4j的MDC/NDC 实现日志追踪

    在分布式系统或者较为复杂的系统中,我们希望可以看到一个客户请求的处理过程所涉及到的所有子系统\模块的处理日志. 由于slf4j/log4j基本是日志记录的标准组件,所以slf4j/log4j成为了我的 ...

  5. Canvas 图片绕边旋转的小动画

    /** * 图片绕边旋转的小动画 */ function initDemo10() { var canvas = document.getElementById("demo10") ...

  6. 孤荷凌寒自学python第四天 安装python的其它IDE环境

    孤荷凌寒自学python第四天 安装python的其它IDE环境 (完整学习过程屏幕记录视频地址在文末) 因为是完全的新手,对python环境搭建完全一无所知,因此,可真是大费周章才配置了其它多个Id ...

  7. ctags+cscope替换sourceinsight

    背景 windows环境开发+linux交叉编译的开发模式,代码阅读和编写都用的source-insight. 除了检索,跳转,工程构建等方面,sourceinsight自带了一些宏语言,可以轻松实现 ...

  8. JavaWeb笔记(七)Filter&Listener

    Filter 实现Filter接口 一般用于完成通用的操作,如:登陆验证.统一编码处理.敏感字符过滤等 执行流程 执行过滤器 执行放行后的资源 继续执行过滤器放行代码下的代码 配置 拦截路径配置 注解 ...

  9. PHP面向对象练习2

    思路:构造函数完成数据库连接,增删改一个方法,查询一条记录一个方法,查询多条一个方法,sql执行失败则返回提示,并交出sql语句方便查错 代码: <?class dbcontroll{ priv ...

  10. Redux & React & react-redux

    Redux Redux & React & react-redux https://redux.js.org/ https://redux.js.org/api https://red ...