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.1k
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
1.9k
Beyond Testing Михаил Боднарчук
fwdays
0
710
Yii2 - на пути от Alpha до GA. Взгляд с практической стороны Александр Бордун
fwdays
0
1.7k
Laravel 4: простота во всем. Евгений Косинский
fwdays
0
900
Маленькая библиотека для большой компании. Антон Шевчук
fwdays
0
3.7k
Phalcon. Что нового? Александр Торош
fwdays
0
1k
Выбираем поисковик умом головы. Андрей Аксенов
fwdays
0
1.3k
Past, Present, and Future: The Evolution of PHP Development. Nate Abele
fwdays
0
700
Функциональный тулчейн Nix
fwdays
1
420
Other Decks in Programming
See All in Programming
.NET のための通信フレームワーク MagicOnion 入門 / Introduction to MagicOnion
mayuki
1
1.7k
Figma Dev Modeで変わる!Flutterの開発体験
watanave
0
140
Click-free releases & the making of a CLI app
oheyadam
2
120
Laravel や Symfony で手っ取り早く OpenAPI のドキュメントを作成する
azuki
2
120
subpath importsで始めるモック生活
10tera
0
310
NSOutlineView何もわからん:( 前編 / I Don't Understand About NSOutlineView :( Pt. 1
usagimaru
0
340
flutterkaigi_2024.pdf
kyoheig3
0
150
AI時代におけるSRE、 あるいはエンジニアの生存戦略
pyama86
6
1.2k
とにかくAWS GameDay!AWSは世界の共通言語! / Anyway, AWS GameDay! AWS is the world's lingua franca!
seike460
PRO
1
890
Macとオーディオ再生 2024/11/02
yusukeito
0
370
CSC509 Lecture 12
javiergs
PRO
0
160
ローコードSaaSのUXを向上させるためのTypeScript
taro28
1
630
Featured
See All Featured
No one is an island. Learnings from fostering a developers community.
thoeni
19
3k
A Philosophy of Restraint
colly
203
16k
Code Review Best Practice
trishagee
64
17k
Fantastic passwords and where to find them - at NoRuKo
philnash
50
2.9k
Building Better People: How to give real-time feedback that sticks.
wjessup
364
19k
Teambox: Starting and Learning
jrom
133
8.8k
Designing the Hi-DPI Web
ddemaree
280
34k
How To Stay Up To Date on Web Technology
chriscoyier
788
250k
Git: the NoSQL Database
bkeepers
PRO
427
64k
5 minutes of I Can Smell Your CMS
philhawksworth
202
19k
Docker and Python
trallard
40
3.1k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
42
9.2k
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