1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | function createArticlesList() { artListSVC = new ScrollContainer({ scrollview: {direction: Utility.Direction.Y} }); var lines = []; artListSVC.sequenceFrom(lines); for (var i in articles) { var surf = new Surface({ content: '<div class"a-title">' + articles.title + '</div>', size: [undefined, 50], properties: { textAlign: 'left', color: 'black' } }); surf.addClass('article-cell'); surf.addClass('backfaceVisibility'); surf.artIdx = i; surf.pipe(eh); lines.push(surf); } artListSVC.container.addClass('backfaceVisibility'); artListSVC.container.addClass('borderbox'); } |
1 2 3 | var sm = new StateModifier({align:[0.5, 0.5], origin: [0.5, 0.5]}); mainContext.add(sm).add(artListSVC); |
1 2 3 4 5 6 7 8 | Transitionable.registerMethod('tween', TweenTransition); sm.setTransform(Transform.rotateY(Math.PI), {method: 'tween', curve:'linear', duration:10000}, function() { sm.setTransform(Transform.rotateY(2 * Math.PI), {method: 'tween', duration: 10000, curve: 'spring'}); }); |
欢迎光临 电子技术论坛_中国专业的电子工程师学习交流社区-中电网技术论坛 (http://bbs.eccn.com/) | Powered by Discuz! 7.0.0 |