Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Amazing UI with CSS and Anima.js
Search
fwdays
March 05, 2013
Programming
0
1.2k
Amazing UI with CSS and Anima.js
fwdays
March 05, 2013
Tweet
Share
More Decks by fwdays
See All by fwdays
Symfony best practices и не только Олег Зинченко
fwdays
0
2.1k
Beyond Testing Михаил Боднарчук
fwdays
0
780
Yii2 - на пути от Alpha до GA. Взгляд с практической стороны Александр Бордун
fwdays
0
1.9k
Laravel 4: простота во всем. Евгений Косинский
fwdays
0
980
Маленькая библиотека для большой компании. Антон Шевчук
fwdays
0
3.8k
Phalcon. Что нового? Александр Торош
fwdays
0
1.1k
Выбираем поисковик умом головы. Андрей Аксенов
fwdays
0
1.4k
Past, Present, and Future: The Evolution of PHP Development. Nate Abele
fwdays
0
780
Функциональный тулчейн Nix
fwdays
1
470
Other Decks in Programming
See All in Programming
monorepo の Go テストをはやくした〜い!~最小の依存解決への道のり~ / faster-testing-of-monorepos
convto
2
470
なぜあの開発者はDevRelに伴走し続けるのか / Why Does That Developer Keep Running Alongside DevRel?
nrslib
3
400
大規模アプリのDIフレームワーク刷新戦略 ~過去最大規模の並行開発を止めずにアプリ全体に導入するまで~
mot_techtalk
1
430
SpecKitでどこまでできる? コストはどれくらい?
leveragestech
0
690
Domain-centric? Why Hexagonal, Onion, and Clean Architecture Are Answers to the Wrong Question
olivergierke
2
820
登壇は dynamic! な営みである / speech is dynamic
da1chi
0
300
階層構造を表現するデータ構造とリファクタリング 〜1年で10倍成長したプロダクトの変化と課題〜
yuhisatoxxx
3
1k
チームの境界をブチ抜いていけ
tokai235
0
160
Software Architecture
hschwentner
6
2.3k
バッチ処理を「状態の記録」から「事実の記録」へ
panda728
PRO
0
150
NixOS + Kubernetesで構築する自宅サーバーのすべて
ichi_h3
0
640
そのpreloadは必要?見過ごされたpreloadが技術的負債として爆発した日
mugitti9
2
3.3k
Featured
See All Featured
GitHub's CSS Performance
jonrohan
1032
470k
How to Ace a Technical Interview
jacobian
280
24k
How To Stay Up To Date on Web Technology
chriscoyier
791
250k
How to train your dragon (web standard)
notwaldorf
96
6.3k
[RailsConf 2023] Rails as a piece of cake
palkan
57
5.9k
Bootstrapping a Software Product
garrettdimon
PRO
307
110k
Imperfection Machines: The Place of Print at Facebook
scottboms
269
13k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
132
19k
Music & Morning Musume
bryan
46
6.8k
The Straight Up "How To Draw Better" Workshop
denniskardys
238
140k
Faster Mobile Websites
deanohume
310
31k
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
Transcript
Amazing UI with CSS and anima.js Yehor Lvivski @lvivski www.lvivski.com
Programmers love their code.
Languages • Haskell, Scala, Erlang, Clojure • Java, C#, Objective-C
• Ruby, Python, PHP • Javascript
Patterns MVC 1970s MVVM 2010s ... MV* 2050s
VIEW
VIEW
None
None
None
Xerox PARC 1979
None
35 years since 1979
None
None
None
None
Javascript + CSS
CSS has everything • 3Dtransforms • Transitions • Animations •
Events
CSS has limitations
CSS, Bad parts • Not easy to stop animation once
started • You have to deal with percent • Limited user control
anima.js github.com / lvivski / anima
Stats • 25kB (4kB minified and gziped) • 4 weeks
of development • 2 week after public release • ≈600 stargazers
Animation loop
API
API var world = anima.js(); var world = anima.css();
var item = world.add( document .querySelector("div") ); item.animate(...).css();
.animate() item.animate({ translate: [x, y, z],
duration: 500, ease: 'ease-‐in-‐out-‐quad', delay: 100 })
Method chaining item.animate(...) .animate(...) .animate(...) .infinite()
Parallel animations item.animate( [ { translate: [x,
y, z], duration: 500 }, ... ] )
How it works
None
Matrix matrix3d( 1, 0, 0, 0, 0,
1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1 )
Scale & Translate matrix3d( sX, 0,
0, 0, 0, sY, 0, 0, 0, 0, sZ, 0, tX, tY, tZ, 1 )
Rotate matrix3d( cos(Y)cos(Z), cos(X)cos(Z)
+sin(X)sin(Y)cos(Z), sin(X)sin(Z) -‐cos(X)sin(Y)cos(Z), 0, ... )
Multiply
None
Decomposition
None
Matrix decomposition • A×B≠B×A • scale×rotate×translate
Pull Requests
Thanks @lvivski