ScrollLayer

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

ScrollLayer

编辑/纠错

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

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

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

Concepts

兼容性:

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

操作方法:

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

调用语法示例:

$('#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
2D scroll layer for cocos2d-iphone apps
Objective-CC
 branch: master 

Update README

latest commit a0eb9b95e3
@fictorial 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

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

 

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

posted on 2015-04-15 16:05  沉淀2014  阅读(185)  评论(0编辑  收藏  举报

导航