ã¯ããã«
æ·±ãå€ã§ããã ææãããæãéšå±ãæšè£œã®çªããçªãæããŸããã 圌ã¯ã©ããããããããŒãããã¯ãéãã³ã§ç§ã®æšè£œã®ããŒãã«ãååã«ç §ãããŸããã§ããã ããã§ãç§ã¯æºã®ã©ã³ãã«æã䌞ã°ããŠç¹ç¯ãããŸããã
Webéçºã«é¢ããèšäºãšã©ã€ãã©ãªã®ãªã¹ããå«ãããã¹ããã¡ã€ã«ãã³ã³ãã¥ãŒã¿ãŒã§éãããŸããã 圌ã¯åžžã«æ°ããããŒã¿ã§æŽæ°ãããŠããŸããã
ãããæ¢ããŠã
...ãã®æ¥ãããèãã¯é ã«æµ®ããã ãã
ãã®äžã§ãcss-animationãšã¯äœããååšããã©ã€ãã©ãªïŒcss / jsïŒãåŠã³ãä»ã®ãµã€ãããæ¢è£œã®ãœãªã¥ãŒã·ã§ã³ã®ãªã¹ããååŸããweb-animationã®æ°ãããã¯ãããžãŒã«ã€ããŠåŠã³ãŸãã
ããã§ã¯å§ããŸãããã
CSSã¢ãã¡ãŒã·ã§ã³
CSSã¢ãã¡ãŒã·ã§ã³ã¯ããµã€ãã掻æ§åããããã®Webãã¯ãããžãŒã®ãšã¡ã©ã«ãã§ãã ããã䜿çšãããšãJavaScriptã䜿çšããã«ãªããžã§ã¯ãã®çŸããæ»ãããªé·ç§»ïŒè²ã®å€æŽããµã€ãºå€æŽãªã©ïŒãäœæã§ããŸãã
CSS-TransitionsãšCSS-Animationsã§æ§æãããŸãã
é·ç§»ã䜿çšãããšãcss-propertiesãå€æŽãããšãã«ã¢ãã¡ãŒã·ã§ã³ã®é床ãå¶åŸ¡ã§ããŸãã
ã¢ãã¡ãŒã·ã§ã³ã䜿çšãããšãããã€ãã®äžéé·ç§»ãå«ãããè€éãªã¢ãã¡ãŒã·ã§ã³ãäœæã§ããŸãã
ãšãã§ã¯ããäœæãããšãã¯ãCSSå€æãšã³ã³ãã³ãã®ç䌌èŠçŽ ïŒç䌌èŠçŽ ïŒããã䜿çšãããŸãã
å€æã䜿çšãããšãDOMèŠçŽ ãã¹ã±ãŒãªã³ã°ãå転ã移åãåŸæã§ããŸãã
ååŸã®ã³ã³ãã³ãæ¬äŒŒèŠçŽ ã䜿çšãããšãhtmlãå€æŽããã«ãèŠçŽ ã®ååŸã«ïŒcssãä»ããŠïŒã³ã³ãã³ããè¿œå ã§ããŸãã
ã€ã³ã¿ãŒãããã«ã¯ ãCSS-TransitionsãCSS-AnimationsãCSS-Transformsããã³content pseudo-elementsã®åèŠçŽ ã詳现ã«èª¬æããŸããã ããããå®å šã«ã«ããŒããŠããèšäºããããŸã ã
- Javascript.ruããã®CSSé·ç§»ã«ã€ããŠ
- Mozillaããã¥ã¡ã³ãã®CSS-Transitionsã«ã€ã㊠ã
- Mozillaããã¥ã¡ã³ãã®CSSã¢ãã¡ãŒã·ã§ã³ã«ã€ã㊠ã
- Frontenderã®CSSã¢ãã¡ãŒã·ã§ã³ã«ã€ã㊠ã
- è±èªã®SmashingMagazineã®CSSã¢ãã¡ãŒã·ã§ã³ã«ã€ã㊠ã
- html5bookã®CSSã¢ãã¡ãŒã·ã§ã³ ã
- è±èªã®CSS-tricksããã®CSS-Transformã«ã€ããŠ
- Mozillaããã¥ã¡ã³ãã®è±èªã®CSS-Transformã«ã€ã㊠ã
- Habrã§ã®CSSå€æã«ã€ããŠ
- habrã®æ¬äŒŒèŠçŽ ã«ã€ããŠ
ãã©ãŠã¶ãµããŒãïŒ
- CSSãçæããæ¬äŒŒèŠçŽ ã®ã³ã³ãã³ã ã
- CSS3 2Då€æ
- CSSãã©ã³ãžã·ã§ã³
- CSSã¢ãã¡ãŒã·ã§ã³
ã¯ãã¹ãã©ãŠã¶CSSã¢ãã¡ãŒã·ã§ã³ïŒããŒãã¬ãŒã ïŒãäœæããããã®ã©ãããŒïŒ
- jQuery.Keyframes ;
- ã³ã¡ã³ãã®ãªãã·ã§ã³ã
CSSã¢ãã¡ãŒã·ã§ã³ã®ãã³ã
ïŒ ã¢ãã¡ãŒã·ã§ã³ã¯ããŠãŒã¶ãŒãšã€ã³ã¿ãŒãã§ã€ã¹éã®çžäºäœçšãæ¹åããããã«ã®ã¿äœ¿çšããŠãã ããã
ã€ã³ã¿ãŒãã§ã€ã¹ã®ã¢ãã¡ãŒã·ã§ã³ã¯ãããã°ã©ã ãšãŠãŒã¶ãŒéã®ã³ãã¥ãã±ãŒã·ã§ã³ãæ¹åããããã«ã®ã¿äœ¿çšããå¿ èŠããããŸãã ãããçŸãããããŸãã¯çããããã ãã«è²Œãä»ããªãã§ãã ããã äºåã«ååã«æ€èšããå¿ èŠããããŸãã
æ€çŽ¢ã§ãããã¯ãéããšããã£ãŒã«ããã¿ã€ãã«ãããã³ãã¿ã³ãç°ãªãé床ã§ç°ãªãã¢ãã¡ãŒã·ã§ã³ã衚瀺ããå ŽåããããŸãã ã€ã³ã¿ãŒãã§ã€ã¹ã®æŒ«ç»ã®ããã«ã ããã«ãããäžå¿«æãšäžäŸ¿ããçããŸãã
ããã«ã倧éã®ã¢ãã¡ãŒã·ã§ã³ã䜿çšãããšãGPUã§åå¥ã«åŠçãããšããŠãããã©ãŠã¶ã®é床ãäœäžãå§ããå ŽåããããŸãã
ïŒ å¯èœãªå Žåã¯åžžã«ãã¢ãã¡ãŒã·ã§ã³ã«ããã©ãŒãã³ã¹CSSããããã£ã䜿çšããŸã
cssããããã£ãå€æŽãããšããã©ãŠã¶ã¯DOMã衚瀺ãã4ã€ã®æ®µéïŒ ã¹ã¿ã€ã« ã ã¬ã€ã¢ãŠã ã ãã€ã³ã ã ã³ã³ããžããã® åèšç® ïŒãå®è¡ããŸã ã
ã¹ã¿ã€ã«ã®èšç®ïŒã¹ã¿ã€ã«ã®åèšç®ïŒ-ãã¹ãŠã®CSSã«ãŒã«ãšåDOMèŠçŽ ã®æçµã¹ã¿ã€ã«ã®èšç®ãåæããŸãã
ã¬ã€ã¢ãŠã ïŒã¬ã€ã¢ãŠãïŒã®åèšç® -ç»é¢äžã®èŠçŽ ã®äœçœ®ããµã€ãºããã®ä»ã®äž»èŠããŒã¿ã®æ±ºå®ã
æç» ïŒãã€ã³ãïŒ-èŠçŽ ã®ãã¹ãŠã®èŠèŠçéšåã®åºåïŒè²ãããã¹ããµã€ãºããã©ã³ããç»åã圱ãªã©ïŒã
ã¬ã€ã¢ãŠã ïŒè€åïŒ-æç»ããããã¹ãŠã®èŠçŽ ãåäžã®æ§æã«çµã¿ç«ãŠãããŸãã
ã¹ã¿ã€ã«ã®èšç®ãã¬ã€ã¢ãŠãã®åèšç®ïŒã¬ã€ã¢ãŠãïŒããã³æç»ïŒãã€ã³ãïŒã¯ãã³ã³ããžããïŒã¬ã€ã¢ãŠãïŒãããå€ãã®ãªãœãŒã¹ãæ¶è²»ããŸãã
ããšãã°ãcssãããã㣠" transformïŒtranslate "ã®å Žåããã¹ãŠã®å€æŽãçºçããè¿œå ã®äžå¯èŠã¬ã€ã€ãŒãäœæãããŸãã ã¬ã€ã¢ãŠã段éã§åŠçããïŒé£æ¥ããèŠçŽ ãã·ããããã«äžå¯èŠã®è¿œå ã¬ã€ã€ãŒã§ïŒãCPUã§ã¯ãªãGPUã§å®è¡ãããŸãã GPUã䜿çšããããšã«ãããå€æŽã¯é 延ãªãã¹ã ãŒãºã«è¡ãããŸãã ããªãã¯ãããªã§ãããèŠãããšãã§ããŸãã
ã¢ãã¡ãŒã·ã§ã³äžã«CPUã®ä»£ããã«GPUã䜿çšããããšã¯ãäžå€®ããã»ã¹ã®ãªãœãŒã¹ãéãããŠããæºåž¯é»è©±ãã¿ãã¬ããã§ç¹ã«å¹æçã§ãã
cssããããã£ã«ã¯ã衚瀺ã®4ã€ã®æ®µéãçµããã®ãšã1ã€ãŸãã¯2ã€ã®æ®µéãçµããã®ããããŸãã ããããç¥ããã¢ãã¡ãŒã·ã§ã³ã§ããããé©åã«é©çšããå¿ èŠããããŸãã ããšãã°ãäžéšã®DOMãªããžã§ã¯ãã®ãé«ãããå€æŽããå Žåããã©ãŠã¶ã¯ã¹ã¿ã€ã«ãã¬ã€ã¢ãŠãããã€ã³ããã³ã³ããžããã®åèšç®ãè¡ãå¿ èŠããããŸããããã«ãããä»ã®ããŒãžèŠçŽ ã移åããå¯èœæ§ãããããã§ãããµã€ãºããã³ãã®ä»ã®ãã©ã¡ãŒã¿ãŒã
ãªã³ã«ãŒãŸãã¯Paint + CompositeãééããCSSããããã£ã®ã¿ã䜿çšããããã«ããŠãã ãã ã
- å€æïŒå転;
- å€æïŒã¹ã±ãŒã«;
- å€æïŒç¿»èš³ã
- äžéæ床;
- è²ã
é¢é£è³æïŒ
- 衚瀺ã¹ããããæã€CSSãããã㣠ã
- äžè¬çã«äœ¿çšãããcssãããã㣠ã
- Chromeã§ã®é«éã¬ã³ããªã³ã° ã
- ã¢ãã¡ãŒã·ã§ã³ãããçç£çã«ããæ¹æ³ ã
- Googleã®çç£çãªèŠèŠåã«ã€ã㊠ã
- leftããã³translateXã䜿çšããã¢ãã¡ãŒã·ã§ã³ãã¹ã ã
- ãªã¿ã¯èªã®Yandexã®ããŒããŠã§ã¢ã¢ã¯ã»ã©ã¬ãŒã·ã§ã³ã«ã€ããŠ
- Chromeã§ã®GPUé«éåæã«ã€ã㊠ã
ïŒ will-changeã䜿çšããŠã¢ãã¡ãŒã·ã§ã³ãè³¢ãæé©åãã
æ¯èŒçæè¿ç»å Žããcss-property- will-change ã ããã䜿çšãããšãç¹å®ã®ããããã£ãå€æŽãããã¢ãã¡ãŒã·ã§ã³ãéå§ããåã«ãã®èšç®ãæé©åããå¿ èŠãããããšããã©ãŠã¶ãŒã«äŒããããšãã§ããŸãã
Will-changeã®å€ã¯æ¬¡ã®ãšããã§ãã
- auto-ãã©ãŠã¶ã®ããã©ã«ãã¢ã¯ã·ã§ã³/匷å¶æé©åã®ãªã»ããã
- scroll-position-ç¹å®ã®èŠçŽ ã®ã¹ã¯ããŒã«ããŒã®ã¢ãã¡ãŒã·ã§ã³/å€æŽãæåŸ ããŸãã
- ã³ã³ãã³ã -ç¹å®ã®èŠçŽ ã®ã³ã³ãã³ãã®ã¢ãã¡ãŒã·ã§ã³/å€æŽãæåŸ ããŸãã
- custom-ident -CSSããããã£ã®ã³ã³ãåºåããªã¹ãã
ããªããæžãå ŽåïŒ
.text { will-change: opacity; -webkit-transition: opactiy 0.5s ease; -moz-transition: opactiy 0.5s ease; -o-transition: opactiy 0.5s ease; transition: opactiy 0.5s ease; } .text:hover { opacity:0.6; }
ãã®ãã©ãŠã¶ã¯ãäºåã«ã.textãã®ã¢ãã¡ãŒã·ã§ã³ãæé©åããããšããŸãã
æé©åã¯RAMã®äžéšãå ãããããäžéšã®Webéçºè ã¯ãå€æŽãæ¿å ¥ããæ¹ããããã§ã¯ãªããã¢ãã¡ãŒã·ã§ã³ã®éå§åãå®äºåŸ-åé€ã®æ¹ãè¯ãããšãå®éšçã«çºèŠããŸããã ãããè¡ããªããšã99ïŒ ã®æéãã®ã¢ãã¡ãŒã·ã§ã³ã䜿çšãããŠããªããŠãããµã€ãã¯è¿œå ã®ã¡ã¢ãªãå æããŸãã ãã®ãããªå€æŽã®è¿œå ãšåé€ã¯ãjavascriptã䜿çšããŠè¡ãããŸãã
ã¢ãã¡ãŒã·ã§ã³ãé »ç¹ã«åŒã³åºãããèŠçŽ ããµã€ãã«å«ãŸããŠããå Žåãã¹ã¿ã€ã«ã§ããã«æå¿ã®å€æŽãæå®ããããšã¯è«ççã§ãã
ãã©ãŠã¶ãµããŒãïŒ
- Chrome 36+;
- Firefox 36以éã
- Opera 26+;
- Android 36以éã
- SafariãIEãiOS-ãããïŒ3æ22æ¥çŸåšïŒã
ã¬ãã¥ãŒçšã®èšäºïŒ
- OperaDevããã®å€æŽã«é¢ãããã¹ãŠ ã
- Mozillaããã¥ã¡ã³ãã®æå¿ã®å€æŽã«ã€ã㊠ã
- CSS-tricksã®will-changeã«ã€ã㊠ã
- èŠæ Œå€æŽã®èª¬æ ã
ïŒ ã¢ãã¡ãŒã·ã§ã³ã®é床ãè³¢ãéžæãã
ãŠãŒã¶ãŒã€ã³ã¿ãŒãã§ã€ã¹ã«ããŸããŸãªçš®é¡ã®å¹æãå®è£ ããå Žåãå®è¡é床ãæ£ããéžæããå¿ èŠããããŸãã ããšãã°ããã€ã¢ãã°ã¯éããšãã«äžåºŠã«ãã£ãããšã¹ã ãŒãºã«éããéãããšãã«ããã«é¢ããå¿ èŠããããŸãïŒã¿ã¹ã¯ãå®äºããåŸããŠãŒã¶ãŒã¯ãããã¢ãããŠã£ã³ããŠããã°ããéããŸãïŒã å¹³åããŠãã¢ãã¡ãŒã·ã§ã³ã¯500ããªç§ãè¶ ããŠã¯ãªããŸããã
ïŒ ããã±ãŒãžã§èªã¿åãããã³æŽæ°æäœãåéãã
ããã¯ã§ããŸããïŒ
var b1=document.getElementById('box1'); var b2=document.getElementById('box2'); var b3=document.getElementById('box3'); var b2W=b2.offsetWidth; b2.style.left=b2W+'px'; var b3W=b3.offsetWidth; b3.style.left=b3W+'px'; b1.style.left='0';
ãããŠãããå¿ èŠã§ãïŒ
var b1=document.getElementById('box1'); var b2=document.getElementById('box2'); var b3=document.getElementById('box3'); var b2W=b2.offsetWidth; var b3W=b3.offsetWidth; b2.style.left=b2W+'px'; b3.style.left=b3W+'px'; b1.style.left='0';
ãªãã§ïŒ
éå»ã®ãã³ããèªãã å Žåãç»é¢ã«ããŒã¿ã衚瀺ãããšãã«ããã©ãŠã¶ãŒã¯ã¹ã¿ã€ã«ã®èšç®ãã¬ã€ã¢ãŠãã®èšç®ãã¬ã³ããªã³ã°ãã¬ã€ã¢ãŠãã®4ã€ã®è¡šç€ºæ®µéãçµãããšãåŠã³ãŸããã
æªãäŸã§ã¯ãã var b3W = b3.offsetWidth; ãããã³ã var b3W = b3.offsetWidth; ãã®è¡ã§ã¬ã€ã¢ãŠãã2ååèšç®ãããŸãããã®åã«cssããããã£ïŒå·ŠïŒãå€æŽãããããã§ãã åã«ãŠã³ãããªããšãcssããããã£ã®æ°ããå€ã圱é¿ããå¯èœæ§ãããããããã©ãŠã¶ã¯ãoffsetWidthããæ£ç¢ºã«å€æã§ããŸããã
èªã¿åãããã³æŽæ°æäœãã°ã«ãŒãåããŠãã ããïŒ
è¿œå è³æïŒ
- ã¬ã€ã¢ãŠãã®åèšç®ã«ã€ããŠ
- CSSãã³ã
- ãã©ãŠã¶ãŒã§ã®ã¬ã³ããªã³ã°ã«é¢ããå€ããŠäŸ¿å©ãªã¡ã¢ ã
ïŒ ãã©ãŠã¶ããŒã¹ã®éçºè ããŒã«ã䜿çšããŠã¢ãã¡ãŒã·ã§ã³ããã¹ããã
å¥åŠãªããšã§ããããã®éãã£ãšããã©ãŠã¶ã§ã¢ãã¡ãŒã·ã§ã³ããã¹ãããããšã«ã€ããŠã®è³æã«åºããããŸããã§ããã ãããããã®ãããã¯ã¯å¥ã®èšäºã«å€ããŸãã
ãã©ãŠã¶ã§éçºè ããŒã«ã䜿çšãããšãä¿®æ£ãå¿ èŠãªãªãœãŒã¹éçŽåã®ã¢ãã¡ãŒã·ã§ã³æäœãèŠã€ããããšãã§ããŸãã ã ãã圌ããšäžç·ã«ã¢ãã¡ãŒã·ã§ã³ããã¹ãããŠãã ããïŒ
ãã®ãã³ãã§ã¯ãã¢ãã¡ãŒã·ã§ã³ããã¹ãããããã®ããã€ãã®ãã©ãŠã¶ãŒã®æ©èœã«ã€ããŠç°¡åã«èª¬æããŸãã
Google Chrome
Chromeã§ã¢ãã¡ãŒã·ã§ã³ããããã°ããã®ãæåã§ãã éçºè ã®ããŒã«ããŒãã¿ã€ã ã©ã€ã³ãã«ã¯ä»¥äžããããŸãã
- 衚瀺æäœã®ããã¿ã€ã ã©ã€ã³ã
- åã¹ãããã®ãµã€ãã®ã°ã©ãã£ãã¯ãã£ã¹ãïŒã¹ã¯ãªãŒã³ã·ã§ããïŒã
- 衚瀺ã¹ãããã®è©³çŽ°ãªã¹ãã
- åã¹ãããã§ã®åèšçšŒåæéã
- å段éã®è©³çŽ°ãªèª¬æã
- ã¬ã³ããªã³ã°ããã»ã¹ã®ãããã¡ã€ãªã³ã°ã
- ãã®ä»ã®ãã€ããŒãªæ©èœã
Google Chromeã®ãããã°æ å ±ã§ã¯ãã©ã®æäœãæé©åããå¿ èŠãããããã©ã®æäœãé©åã«æ©èœããããããããŸãã 圌ã®ãã³ãã«ã¯ãä¿®æ£æ¹æ³ã«é¢ããèšäºãžã®ãªã³ã¯ããããŸãã ä»ã®ãã©ãŠã¶ã§ã¯ãããèŠãŠããŸããã
ãµãã¡ãª
Safariã§ã¯ãã¢ãã¡ãŒã·ã§ã³ã¯[ã¬ã€ã¢ãŠããšã¬ã³ããªã³ã°]ã»ã¯ã·ã§ã³ã®[ã¿ã€ã ã©ã€ã³]ã¿ãã§è©äŸ¡ãããŸãã
ã¿ã€ã ã©ã€ã³ã®äžã®ãããã¯ã§ã¯ããµã€ãã衚瀺ããç¹å®ã®æ®µéããã€çŸãããã確èªã§ããŸãã äžã®ãããã¯ã«ã¯ãå®è¡é åºã衚瀺ãããŸãã ããã¬ãŒã ã®ã¬ã³ããªã³ã°ããµãã»ã¯ã·ã§ã³ã§ãåã¹ããŒãžã«é¢ãã詳现æ å ±ãååŸããŸãã
Safariã§ã¯ãã¢ãã¡ãŒã·ã§ã³åã®é ããå°ãæçãªããã«æããŸããã Google Chromeãšã¯ç°ãªããæ¹åããããã®ãã³ãã¯ãããŸããã
Mozilla Firefox
ã¢ãã¡ãŒã·ã§ã³ã®ãã¹ãã«ã¯æé©ã§ã¯ãããŸããã ã¢ãã¡ãŒã·ã§ã³ã®ãã¹ãŠã®æé ãšãã®é åºã®ãããã¯ãå«ãã¿ã€ã ã©ã€ã³ããããŸãã æé ã®è©³çŽ°ãæ¬ èœããŠããŸãã
Firefoxã¯ãhtmlããã³ãµã€ãããã©ãŒãã³ã¹ã®è§£æããã»ã¹ïŒã¬ããŒãžã³ã¬ã¯ã·ã§ã³æäœã®å®è¡ãhtml / xmlã®è§£æãCC Graphã®åæžãªã©ïŒã®ãã¹ãã«é©ããŠããŸãã
ïŒ requestAnimationFrameé¢æ°ã䜿çšãã
以åã¯ãjsã§ã¢ãã¡ãŒã·ã§ã³ãäœæãããšãã«ãsetInterval / setTimeoutã䜿çšããŠããŸããã ç¹°ãè¿ãééïŒ1000ms / 60ïŒfpsïŒ= 16.7msãçæ³çïŒãèšå®ãããšãã§ã¯ããããªã¬ãŒããŸããã ãã®ãœãªã¥ãŒã·ã§ã³ã«ã¯å€ãã®æ¬ ç¹ããããŸããã
- ããŒãžãéã¢ã¯ãã£ããªã¿ãã«ããå ŽåãåŒãç¶ãæ©èœããã³ã³ãã¥ãŒã¿ãŒãªãœãŒã¹ã浪費ããŸãã
- ãã®æ©èœã¯ãã³ã³ãã¥ãŒã¿ãŒãå¿ èŠãšãããšåæã«ç»é¢ãåæç»ããå¿ èŠã¯ãããŸããã ãããã£ãŠãããã€ã¹/ PCã¯è¿œå ã®ãªãœãŒã¹ã䜿çšããŠãã¢ãã¡ãŒã·ã§ã³ãç»é¢æŽæ°ã®é »åºŠãšåæãããå¿ èŠããããŸãã
- jsã¯ã·ã³ã°ã«ã¹ã¬ããã§ãããã¢ãã¡ãŒã·ã§ã³ãçºçããã¯ãã®ç¬éã«å¥ã®æäœãå®è¡ãããå¯èœæ§ããããããã¢ãã¡ãŒã·ã§ã³ã¯åçž®ããå¯èœæ§ããããŸãã
幞ããªããšã«ãæè¡ã¯æ¢ãŸããŸããã ãããã®åé¡ã解決ããããã«ã requestAnimationFrameé¢æ°ãèæ¡ãããŸããã ãã®å©ç¹ïŒ
- éã¢ã¯ãã£ããªã¿ãã§ã¯ãã¢ãã¡ãŒã·ã§ã³ãåæ¢ããŠã³ã³ãã¥ãŒã¿ãŒãªãœãŒã¹ïŒã¡ã¢ãªãCPUãGPUãããã³ããããªãŒæ¶è²»ïŒãç¯çŽãããŸãã
- æç»ïŒåæç»ïŒã®é床ã¯ãç»é¢ã®ãªãã¬ãã·ã¥ã¬ãŒãã«åãããŠèª¿æŽãããã³ã³ãã¥ãŒã¿ãŒã®æºåãæŽã£ããšãã«ã®ã¿å®è¡ãããŸãã
- éãè² è·ã®äžã§FPSãæžãããŠãããããªãŒãšã³ã³ãã¥ãŒã¿ãŒã®ãªãœãŒã¹ãç¯çŽããŸãã
- ãã¹ãŠã®ã¢ãã¡ãŒã·ã§ã³ã1ã€ã®ãã©ãŠã¶ã®åæç»ã«çµåãããŸãïŒåå¥ã«å®è¡ãããŸããïŒãããã«ããããªãœãŒã¹æ¶è²»ãåæžããã衚瀺ãé«éåãããŸãã
æ°ãããœãªã¥ãŒã·ã§ã³ã®ãã€ãã¹é¢ïŒ
- ãã©ãŠã¶ããšã«ç°ãªãAPIã䜿çšãããŸãïŒããªãã£ã«ã§è§£æ±ºãããŸãïŒã
- FPSã¢ãã¡ãŒã·ã§ã³ãå¶åŸ¡ããããšã¯å°é£ã§ãïŒãã¯ã©ã³ããã䜿çšããå Žåã®ã¿ïŒã
- ãã¹ãŠã®ãã©ãŠã¶ãæ°ãããã¯ãããžãŒããµããŒãããŠããããã§ã¯ãããŸããããã®ãããå€ãããŒãžã§ã³ã§ã¯åãsetIntervalïŒIE10 +ïŒã䜿çšãããŸãã
- ãã¹ãŠã®èšç®ã¯16.7 mcã§è¡ãå¿ èŠããããŸãïŒããã§ã¯ååã§ã¯ãªãå ŽåããããŸãïŒã
è¿œå è³æïŒ
- Habrã®requestAnimationFrameã«ã€ããŠ
- requestAnimationFrameã®é·æãšçæ ã
- requestAnimationFrameã®äœ¿çšæ¹æ³ ã
- Mozillaã®requestAnimationFrameã«ã€ã㊠ã
- Google Chromeéçºè ããã®requestAnimationFrameã«ã€ã㊠ã
- Googleã®Chromeã§ã®requestAnimationFrameã®åé¡ã«ã€ã㊠ã
- Microsoft MSDNã®requestAnimationFrameã«ã€ã㊠ã
- ããªãã£ã«requestAnimationFrame ã
ïŒ ã¿ã¹ã¯ã«åºã¥ããŠã©ã€ãã©ãªã®ã¿ã€ãïŒcssãŸãã¯jsïŒãéžæããŸã
åã¿ã€ãã®ã©ã€ãã©ãªã«ã¯é·æãšçæããããŸãã 圌ãã¯éžæãããšãã«èæ ®ããå¿ èŠããããŸãã
cssã©ã€ãã©ãªã®å©ç¹ïŒ
- åçŽãªã¢ãã¡ãŒã·ã§ã³ãéçºãããšäŸ¿å©ã§ãã
- äžéšã®ããããã£ã¯GPUã§ããã«å®è¡ãããŸãã
- ãµã€ãã«jsã³ãŒããè² æ ããå¿ èŠã¯ãããŸããã
cssã©ã€ãã©ãªã®æ¬ ç¹ïŒ
- è€éãªã¢ãã¡ãŒã·ã§ã³ãäœæããŠç¶æããããšã¯å°é£ã§ãã
- ã¢ãã¡ãŒã·ã§ã³ããã»ã¹ãšãã®å€èŠ³ã®å¶åŸ¡ã®æ¬ åŠïŒããšãã°ãç¹å®ã®å®è¡ç§ã§ã¯ãªãã¯ãŸãã¯åæ¢ãããšãªã³ã«ãªããŸãïŒã
jsã©ã€ãã©ãªã®å©ç¹ïŒ
- è€éãªã¢ãã¡ãŒã·ã§ã³ãäœæã§ããŸãã
- ã¢ãã¡ãŒã·ã§ã³å¶åŸ¡ã¡ã«ããºã ïŒæå¹å/ç¡å¹åãç¹å®ã®ç§ã®åæ¢ãªã©ïŒããããŸãã
- å Žåã«ãã£ãŠã¯ãCSSã ãã§ãªããSVGãšãã£ã³ãã¹ã«ãé©çšãããŸãã
- cssã©ã€ãã©ãªãããéãå ŽåããããŸãã
- ããŸããŸãªã€ãŒãžã³ã°é¢æ°ïŒ2ã€ä»¥äžã®ã«ãŒããã€ã³ãïŒã
jsã©ã€ãã©ãªã®æ¬ ç¹ïŒ
- ãµã€ãã®ãµã€ãºãå¢ãããŸãã
- åçŽãªã¢ãã¡ãŒã·ã§ã³ã®åé·ã
- å匷ãè€éã
3çªç®ã®ã¿ã€ãã«ã€ããŠèŠããŠãã䟡å€ããããŸãã ã¢ãã¡ãŒã·ã§ã³ãèªåã§äœæããããå®æããã©ã€ãã©ãªãããœãŒã¹ã³ãŒãã®é©åãªéšåãã³ããŒã§ããŸãã
ããã§ã¯ãcssããã³jsã©ã€ãã©ãªã®ç 究ã«ç§»ããŸãããã
CSSã©ã€ãã©ãª
ç¹å¥ãªcssã©ã€ãã©ãªã䜿çšãããšãç°¡åãªã¢ãã¡ãŒã·ã§ã³ããã°ããäœæã§ããŸãã
- ãªããŠã³ã
- æºã;
- ã¹ã€ã³ã°;
- ãŒãªãŒ;
- é ãæ¶å€±/åºçŸ;
- å®è¿ã;
- åã;
- ã°ã©ã€ã;
- ãã®ä»ã
ã¢ãã¡ãŒã·ã§ã³ã¯ãjavascriptã䜿çšããŠããŸãã¯æåã§ã¯ã©ã¹ãä»ããŠæ¥ç¶ãããŸãã æ¢åã®ã©ã€ãã©ãªãæ€èšããŠãã ããã
Animate.css
75ã®ãšãã§ã¯ããåããã©ã€ãã©ãªã 2011幎ããååšããŸãã 2013-14幎ãŸã§ã圌女ã¯ãªã³ã©ã€ã³ãšãã§ã¯ãã³ã³ã¹ãã©ã¯ã¿ãŒãæäŸããŠããŸããã ãã®åŸãéçºè ã¯ãããåé€ããGulp.jsã䜿çšããŠãã«ããžã§ãã¬ãŒã¿ãŒãäœæããŸããã ãã¹ãŠã®ãšãã§ã¯ãã¯@keyframesã䜿çšããŸãã
販売ããŒãžã§äœ¿çšãããšäŸ¿å©ã§ãã
ã©ã€ãã©ãªã®äœæè ã¯ããšãã§ã¯ãã14ã®ã«ããŽãªã«åããŸããã
ãŠã§ããµã€ãïŒ Animate.css
Animate.css
75ã®ãšãã§ã¯ããåããã©ã€ãã©ãªã 2011幎ããååšããŸãã 2013-14幎ãŸã§ã圌女ã¯ãªã³ã©ã€ã³ãšãã§ã¯ãã³ã³ã¹ãã©ã¯ã¿ãŒãæäŸããŠããŸããã ãã®åŸãéçºè ã¯ãããåé€ããGulp.jsã䜿çšããŠãã«ããžã§ãã¬ãŒã¿ãŒãäœæããŸããã ãã¹ãŠã®ãšãã§ã¯ãã¯@keyframesã䜿çšããŸãã
販売ããŒãžã§äœ¿çšãããšäŸ¿å©ã§ãã
ã©ã€ãã©ãªã®äœæè ã¯ããšãã§ã¯ãã14ã®ã«ããŽãªã«åããŸããã
- 泚æãæ±ãã人;
- è·³ããå ¥ãå£;
- ããŠã³ã¹åºå£;
- ãã§ãŒãžã³ã°å ¥å£
- ãã§ãŒãžã³ã°åºå£
- 足ã²ã
- å é
- å ¥ãå£ã®å転;
- å転åºå£;
- ã¹ã©ã€ãåŒãšã³ãã©ã³ã¹
- ã¹ã©ã€ãåºå£
- ãºãŒã ãšã³ãã©ã³ã¹
- ãºãŒã åºå£
- ã¹ãã·ã£ã«
ãŠã§ããµã€ãïŒ Animate.css
Effeckt.css
Effeckt.cssã¯2013幎ã«ç»å ŽããŸããã ããã«ããããã€ã¢ãã°ããã¯ã¹ã®å€èŠ³çšã®çŸããã¢ãã¡ãŒã·ã§ã³ããã°ããäœæããããã¿ããåãæ¿ããããã¢ã€ãã ãè¿œå ãããã§ããŸãã
ä»ã®ãããªã¿ã€ããã¹ã¿ã€ã«ã§ã¯ãªããç¹å®ã®ç®çã«ãã£ãŠå¹æãåé¡ããŸãã
Effeckt.cssã¯SCSSã§èšè¿°ãããŠããããã®å¹æã®ã»ãšãã©ã¯@keyframesã䜿çšããªãããããã®ã³ãŒãã¯ä»ã®ãã®ããã軜éã§ãã
ãŠã§ããµã€ãïŒ Effeckt.css
Effeckt.css
Effeckt.cssã¯2013幎ã«ç»å ŽããŸããã ããã«ããããã€ã¢ãã°ããã¯ã¹ã®å€èŠ³çšã®çŸããã¢ãã¡ãŒã·ã§ã³ããã°ããäœæããããã¿ããåãæ¿ããããã¢ã€ãã ãè¿œå ãããã§ããŸãã
ä»ã®ãããªã¿ã€ããã¹ã¿ã€ã«ã§ã¯ãªããç¹å®ã®ç®çã«ãã£ãŠå¹æãåé¡ããŸãã
- ãã€ã¢ãã°ããã¯ã¹ã®34ã®å¹æã
- ç¹å®ã®èŠçŽ ã®è¿ãã®æ å ±ãããã¯ã®å€èŠ³ã«å¯Ÿãã23ã®å¹æã
- ä»»æã®ããŒã¿ïŒã¢ã€ã³ã³ãããã¹ããªã©ïŒã®ãã¿ã³ããªãŒããŒã¬ã€ããããã®20ã®å¹æã
- ãªã¹ãé ç®ã®åºçŸ/æ¶æ» ã®8ã€ã®å¹æ;
- ãªã¹ãã¢ã€ãã ãã¹ã¯ããŒã«ãã8ã€ã®å¹æã
- ããã²ãŒã·ã§ã³ããã«ïŒã¢ãã€ã«ããã«ïŒã®è¡šç€º/é衚瀺ã®27ã®å¹æ;
- ããŒãžéã®15ã®é·ç§»å¹æã
- ç»åã«ãŒãïŒãŸãã¯ãããšãã°ãåçã®ã£ã©ãªãŒïŒã«è¿œå æ å ±ã衚瀺ããã18ã®å¹æã
- 4ã€ã®ã·ã³ãã«ãªãã³ãå¹æã
- ã¹ã€ããã®4ã€ã®å¹æã
- ã¿ãçšã®7ã€ã®å¹æã
Effeckt.cssã¯SCSSã§èšè¿°ãããŠããããã®å¹æã®ã»ãšãã©ã¯@keyframesã䜿çšããªãããããã®ã³ãŒãã¯ä»ã®ãã®ããã軜éã§ãã
ãŠã§ããµã€ãïŒ Effeckt.css
Hover.css
ã¢ã€ãã ã«ã«ãŒãœã«ãåããããšãã«ããªã¬ãŒããããšãã§ã¯ããäœæããããã®ã©ã€ãã©ãªã ãã¿ã³ã«äœ¿çšãããšäŸ¿å©ã§ãã
ã¢ãã¡ãŒã·ã§ã³ã¯æ¬¡ã®ã«ããŽãªã«åé¡ãããŸãã
Hover.cssã¯ãlessãscssãcssã§èšè¿°ãããŠããŸãã
ãŠã§ããµã€ãïŒ Hover.css
Hover.css
ã¢ã€ãã ã«ã«ãŒãœã«ãåããããšãã«ããªã¬ãŒããããšãã§ã¯ããäœæããããã®ã©ã€ãã©ãªã ãã¿ã³ã«äœ¿çšãããšäŸ¿å©ã§ãã
ã¢ãã¡ãŒã·ã§ã³ã¯æ¬¡ã®ã«ããŽãªã«åé¡ãããŸãã
- 2Då€æã®27ã®å¹æã
- èŠçŽ ã®èæ¯ãå€æŽãã18ã®å¹æã
- ããã¹ããšã¢ã€ã³ã³ãå«ãèŠçŽ ã®27ã®å¹æã
- å¢çç·ç§»è¡ã®18ã®å¹æã
- 圱ä»ãã®7ã€ã®å¹æã
- äžè§åœ¢ã®å€èŠ³ã®8ã€ã®å¹æïŒããŒã«ããããªã©ïŒã
- 4ã€ã®æ²ãå¹æã
Hover.cssã¯ãlessãscssãcssã§èšè¿°ãããŠããŸãã
ãŠã§ããµã€ãïŒ Hover.css
éæ³ã®ã¢ãã¡ãŒã·ã§ã³
Animate.cssã«åºã¥ããŸãã ä»ã®ã©ã€ãã©ãªãšã¯ç°ãªãã å€ãã®ç°åžžãªå¹æããããŸãã
ãŠã§ããµã€ãïŒ éæ³ã®ã¢ãã¡ãŒã·ã§ã³ ã
éæ³ã®ã¢ãã¡ãŒã·ã§ã³
Animate.cssã«åºã¥ããŸãã ä»ã®ã©ã€ãã©ãªãšã¯ç°ãªãã å€ãã®ç°åžžãªå¹æããããŸãã
- éæ³ã®
- ããªã³
- éçå¹æ;
- 3DããŒã¹ãã¯ãã£ã;
- 3Dã¿ãŒã³;
- ã¹ã©ã€ã
- è€éãªåã;
- ççºå¹æãã;
- 空é;
- ãã®ä»ã
ãŠã§ããµã€ãïŒ éæ³ã®ã¢ãã¡ãŒã·ã§ã³ ã
ããã
Awesomeã¯ãçŽç²ãªcssã§æžãããããŠã¯ã©ã€ãã®éçºè ã«ãã89åã®ãšãã§ã¯ãã®ã»ããã§ãã ãããã¯12ã®ã«ããŽãªã«åããããŸãã
販売ããŒãžã§äœ¿çšãããšäŸ¿å©ã§ãã
ãŠã§ããµã€ãïŒ Awesome
ã©ã€ãã©ãªã®éçºè åãèšäº ã
ããã
Awesomeã¯ãçŽç²ãªcssã§æžãããããŠã¯ã©ã€ãã®éçºè ã«ãã89åã®ãšãã§ã¯ãã®ã»ããã§ãã ãããã¯12ã®ã«ããŽãªã«åããããŸãã
- ãã§ãŒã
- ã¹ã©ã€ã
- ããŠã³ã¹
- ããŒã«
- ããã;
- ããªãã;
- å転
- åã
- æ»ã
- ããã·ã¥
- ã¯ãªãã;
- ãã®ä»
販売ããŒãžã§äœ¿çšãããšäŸ¿å©ã§ãã
ãŠã§ããµã€ãïŒ Awesome
ã©ã€ãã©ãªã®éçºè åãèšäº ã
ç¡å¡è£
çŸããã¢ãã¡ãŒã·ã§ã³ãäœæããããã®å°ããªã©ã€ãã©ãªã ã³ãŒãã¯scssã§æžãããŠããŸãã 11ã®æ¢è£œã®å¹æãæäŸããŸãã
ãŠã§ããµã€ãïŒ Repaintless ã
ç¡å¡è£
çŸããã¢ãã¡ãŒã·ã§ã³ãäœæããããã®å°ããªã©ã€ãã©ãªã ã³ãŒãã¯scssã§æžãããŠããŸãã 11ã®æ¢è£œã®å¹æãæäŸããŸãã
- å³ããã¹ã©ã€ãããŸãã
- å·Šããã¹ã©ã€ãã
- äžããã¹ã©ã€ãããŸãã
- äžããã¹ã©ã€ãããŸãã
- å³äžããã¹ã©ã€ãããŸãã
- å³äžããã¹ã©ã€ãããŸãã
- å·Šäžããã¹ã©ã€ãããŸãã
- å·Šäžããã¹ã©ã€ãããŸãã
- å·Šå³ã«ã¹ã©ã€ãããŸãã
- äžäžã«ã¹ã©ã€ãããŸãã
ãŠã§ããµã€ãïŒ Repaintless ã
ãã¹ãŠã®ã¢ãã¡ãŒã·ã§ã³
36ã®æ¢è£œã®ãšãã§ã¯ããšã·ã³ãã«ãªUIã³ã³ããŒãã³ãã®ã»ãããåããã©ã€ãã©ãªã 圌ã®ã¢ãã¡ãŒã·ã§ã³ã¯8ã€ã®ã«ããŽãªã«åé¡ãããŸãã
CSSã§æžãããŠããŸãã
ãŠã§ããµã€ãïŒ ãã¹ãŠã®ã¢ãã¡ãŒã·ã§ã³
ãã¹ãŠã®ã¢ãã¡ãŒã·ã§ã³
36ã®æ¢è£œã®ãšãã§ã¯ããšã·ã³ãã«ãªUIã³ã³ããŒãã³ãã®ã»ãããåããã©ã€ãã©ãªã 圌ã®ã¢ãã¡ãŒã·ã§ã³ã¯8ã€ã®ã«ããŽãªã«åé¡ãããŸãã
- ããŠã³ã¹
- é è¿æ³
- ãã§ãŒãžã³ã°å ¥å£
- å転
- Agreccives;
- å¡äŸ
- ããŒãã¬ãŒãã
CSSã§æžãããŠããŸãã
ãŠã§ããµã€ãïŒ ãã¹ãŠã®ã¢ãã¡ãŒã·ã§ã³
ã¬ãŒãã³ã²ã³
27ã®æ¢è£œãšãã§ã¯ãã®ã¢ãã¡ãŒã·ã§ã³ã©ã€ãã©ãªã Facebook Rebound.jsã«åºã¥ããŠããŸãã
json-objectããã³reboundGet.jsã¹ã¯ãªããã䜿çšããŠcss-animationãçæã§ããŸãã ã¹ã¯ãªããã䜿çšããŠç¬èªã®å¹æãäœæããåŸã§ãµã€ãã§jsã䜿çšããã«cssã®ã¿ã䜿çšã§ãããããããã¯äŸ¿å©ã§ãã
æ¢è£œã®cssãšãã§ã¯ããšçæã¡ã«ããºã ã®ãããJavaScriptãªã¹ãã§ã¯ãªãcssã«ã©ã€ãã©ãªãå«ããããšã«ããŸããã
ãŠã§ããµã€ãïŒ Reboundgen
ã¬ãŒãã³ã²ã³
27ã®æ¢è£œãšãã§ã¯ãã®ã¢ãã¡ãŒã·ã§ã³ã©ã€ãã©ãªã Facebook Rebound.jsã«åºã¥ããŠããŸãã
json-objectããã³reboundGet.jsã¹ã¯ãªããã䜿çšããŠcss-animationãçæã§ããŸãã ã¹ã¯ãªããã䜿çšããŠç¬èªã®å¹æãäœæããåŸã§ãµã€ãã§jsã䜿çšããã«cssã®ã¿ã䜿çšã§ãããããããã¯äŸ¿å©ã§ãã
æ¢è£œã®cssãšãã§ã¯ããšçæã¡ã«ããºã ã®ãããJavaScriptãªã¹ãã§ã¯ãªãcssã«ã©ã€ãã©ãªãå«ããããšã«ããŸããã
ãŠã§ããµã€ãïŒ Reboundgen
圢æ
ååŠ
Morphodynamicsã¯ãçŸããå¹æãäœæããããã®ã©ã€ãã©ãªã§ãã 47ã®ã¢ãã¡ãŒã·ã§ã³ãªãã·ã§ã³ãæäŸããŸã ã
ãã¹ãŠã®å¹æã¯6ã€ã®ã°ã«ãŒãã«åããããŸãã
16ã®ã¹ã¿ã€ãªã³ã°çšã®æ¢è£œã®ããŒãããããŸãã ãã®ã©ã€ãã©ãªã¯ããã¿ã³ãã¡ãã¥ãŒã補åã«ãŒãããããŒã®ã¢ãã¡ãŒã·ã§ã³ãäœæããã®ã«é©ããŠããŸãã
å ã®ã³ãŒãã¯lessã§æžãããŠããŸãã
ãŠã§ããµã€ãïŒ Morphodynamics ã
圢æ ååŠ
Morphodynamicsã¯ãçŸããå¹æãäœæããããã®ã©ã€ãã©ãªã§ãã 47ã®ã¢ãã¡ãŒã·ã§ã³ãªãã·ã§ã³ãæäŸããŸã ã
ãã¹ãŠã®å¹æã¯6ã€ã®ã°ã«ãŒãã«åããããŸãã
- éå€
- èæ¯
- å¢çç·ã®é·ç§»
- ã·ã£ããŠãã©ã³ãžã·ã§ã³
- 2Då€æ
- 泡ã
16ã®ã¹ã¿ã€ãªã³ã°çšã®æ¢è£œã®ããŒãããããŸãã ãã®ã©ã€ãã©ãªã¯ããã¿ã³ãã¡ãã¥ãŒã補åã«ãŒãããããŒã®ã¢ãã¡ãŒã·ã§ã³ãäœæããã®ã«é©ããŠããŸãã
å ã®ã³ãŒãã¯lessã§æžãããŠããŸãã
ãŠã§ããµã€ãïŒ Morphodynamics ã
ãã
ã
ã¢ãã¡ãŒã·ã§ã³ãäœæããããã®ã·ã³ãã«ãªã©ã€ãã©ãªã
37æ¢è£œã®å¹æããããŸãã
å°ãªãã§æžãããŠããŸãã
ãŠã§ããµã€ãïŒ Css3animateit
ãã ã
ã¢ãã¡ãŒã·ã§ã³ãäœæããããã®ã·ã³ãã«ãªã©ã€ãã©ãªã
37æ¢è£œã®å¹æããããŸãã
- ããŠã³ã¹
- growIn;
- ãã§ãã€ã³;
- æ¯ã
- RotateIn;
- RollIn;
- Wiggle;
- ãã®ä»
å°ãªãã§æžãããŠããŸãã
ãŠã§ããµã€ãïŒ Css3animateit
CSS3ã¢ãã¡ãŒã·ã§ã³ã®ããŒãã·ãŒã
ã¢ãã¡ãŒã·ã§ã³çšã®16åã®æ¢è£œã®ãšãã§ã¯ããåããå°ããªã©ã€ãã©ãªïŒ
å°æ°ã®å¹æã«ããããããããããã¯åäžããŒãžã®éçºã«ãããã¢ãã¡ãŒã·ã§ã³ã®å¿ èŠæ§ãå®å šã«æºãããŸãã
å€ãã®ã©ã€ãã©ãªãšåæ§ã«ãCSS3 @keyframesã䜿çšããŸãã
ãŠã§ããµã€ãïŒ CSS3 Animation Cheat Sheet ã
CSS3ã¢ãã¡ãŒã·ã§ã³ã®ããŒãã·ãŒã
ã¢ãã¡ãŒã·ã§ã³çšã®16åã®æ¢è£œã®ãšãã§ã¯ããåããå°ããªã©ã€ãã©ãªïŒ
- SlideUp;
- äžã«ã¹ã©ã€ã
- å·Šã«ã¹ã©ã€ã
- å³ã«ã¹ã©ã€ã
- ã¹ã©ã€ãå±éäž;
- å±éãã
- ãã§ãŒãã€ã³;
- ãªãŒãã³ãå±é
- 倧ããªå ¥ãå£
- ããã;
- ãã®ä»
å°æ°ã®å¹æã«ããããããããããã¯åäžããŒãžã®éçºã«ãããã¢ãã¡ãŒã·ã§ã³ã®å¿ èŠæ§ãå®å šã«æºãããŸãã
å€ãã®ã©ã€ãã©ãªãšåæ§ã«ãCSS3 @keyframesã䜿çšããŸãã
ãŠã§ããµã€ãïŒ CSS3 Animation Cheat Sheet ã
ç«ææ¥
æ¢è£œã®ã¢ãã¡ãŒã·ã§ã³ã»ãããåããã©ã€ãã©ãªã ãšãã§ã¯ãã«ã¯9ã€ã®ã«ããŽãªããããŸãã
åèšã§ã圌ã®æŠåšåº«ã«ã¯29ã®ã¢ãã¡ãŒã·ã§ã³ããããŸãã ããã¯å°ãªãã§æžãããŠããã®ã§ãããªãã¯ããªãèªèº«ã®ã¢ã»ã³ããªãäœãããšãã§ããŸãã
ãŠã§ããµã€ãïŒ ç«ææ¥ ã
ç«ææ¥
æ¢è£œã®ã¢ãã¡ãŒã·ã§ã³ã»ãããåããã©ã€ãã©ãªã ãšãã§ã¯ãã«ã¯9ã€ã®ã«ããŽãªããããŸãã
- ãã§ãã€ã³;
- ãã§ãŒãã¢ãŠã
- å±éãã
- åæ
- åçž®;
- ã¹ã€ã³ã°
- DropIn;
- ãããã;
- ãã³ãžããªããã
åèšã§ã圌ã®æŠåšåº«ã«ã¯29ã®ã¢ãã¡ãŒã·ã§ã³ããããŸãã ããã¯å°ãªãã§æžãããŠããã®ã§ãããªãã¯ããªãèªèº«ã®ã¢ã»ã³ããªãäœãããšãã§ããŸãã
ãŠã§ããµã€ãïŒ ç«ææ¥ ã
Jsã©ã€ãã©ãª
ãç解ã®ãšãããcssã¯å®£èšåèšèªã§ãã 圌ã®ã¢ãã¡ãŒã·ã§ã³ã¯ãã¹ãŠç·åœ¢ã§ãããç¶æ³ã«å¿ããŠå€åããŸããã ãããã£ãŠãçŽç²ãªcssã§ã¯ãéåžžã®ã¢ãã¡ãŒã·ã§ã³ããžãã¯ãäœæããããšã¯ã§ããŸããã
Javascriptã©ã€ãã©ãªã¯æ©èœãæ¡åŒµããCSSãœãªã¥ãŒã·ã§ã³ã®å¶éãåãé€ããŸãã ãããã䜿çšããŠãç¶æ ã«å¿ããŠã¢ãã¡ãŒã·ã§ã³ãäœæã§ããŸãïŒ1ã€ã®å¹æãçµäºããå¥ã®å¹æãéå§ãããŸããããŠãŒã¶ãŒããã¿ã³ãæŒãããäœããçŸãããªã©ïŒã
js-solutionsã®ãããã§ã3ç§ã§ãªããžã§ã¯ãã移åãããå Žæãæ£ç¢ºã«ç¥ãããšãã§ããŸãã cssã§ã¯ããã¹ãŠã®ã¹ãããã¯ç§ã§ã¯ãªãããŒã»ã³ããŒãžã§æ±ºå®ããããããããã¯éæã§ããŸããã ãªããžã§ã¯ãã移åããå Žæã¯å€§ãŸãã«ããããããŸããã ã¯ã©ã€ã¢ã³ããã¢ãã¡ãŒã·ã§ã³ãå€æŽãããå Žåã¯ããã¹ãŠãåèšç®ããå¿ èŠããããŸãïŒããŒã»ã³ããŒãžãšå¯èœãªç§ã®éã®å¯Ÿå¿ãäœæãããšãïŒãããã¯æéã®ç¡é§ã§ãã
CSSã¢ãã¡ãŒã·ã§ã³ã¯ãïŒGPUã§èšç®ãè¡ãããå Žåã§ãïŒjsãœãªã¥ãŒã·ã§ã³ãããåžžã«é«éã«åäœãããšã¯éããŸããã ããã¯ãCss-trickã®èšäºïŒãªã³ã¯åããèŠãŠããïŒã§èª¬æãããŠããŸãã
æ¢åã®ã©ã€ãã©ãªã¯ãã¢ããªã±ãŒã·ã§ã³ã®çš®é¡ ïŒæšæºã®ã¢ãã¡ãŒã·ã§ã³ãšé«åºŠã«ç¹æ®åããããã®ïŒ ããã³ãããã®è€éã ïŒåçŽããã³è€éïŒ ã«ãã£ãŠåé¡ã§ããŸãã
ã·ã³ãã«ïŒ
å€æã¢ã€ã³ã³
8ã€ã®ã°ã«ãŒãã«åãããã20ã®çŸããã¢ãã¡ãŒã·ã§ã³èŠçŽ ïŒ
ãšãã§ã¯ãã¯ãå±æ§ãšjsé¢æ°ã䜿çšããŠæ§æãããŸãã ãªã³ã©ã€ã³ãã«ããŒããããŸãã
ãŠã§ããµã€ãïŒ Transformicons
å€æã¢ã€ã³ã³
8ã€ã®ã°ã«ãŒãã«åãããã20ã®çŸããã¢ãã¡ãŒã·ã§ã³èŠçŽ ïŒ
- ã¡ãã¥ãŒ;
- ã°ãªãã
- è¿œå /åé€;
- éµäŸ¿
- ã¹ã¯ããŒã«ã€ã³ãžã±ãŒã¿ã
- ãã©ãŒã
- æ å
- ããŒããŒã
ãšãã§ã¯ãã¯ãå±æ§ãšjsé¢æ°ã䜿çšããŠæ§æãããŸãã ãªã³ã©ã€ã³ãã«ããŒããããŸãã
ãŠã§ããµã€ãïŒ Transformicons
Snabbt.js
ã¢ãã¡ãŒã·ã§ã³ãäœæããããã®ã©ã€ãã©ãªã ã·ã³ãã«ã§çŽæçãªAPIãåããŠããŸãã ããã5kbããããããŸãã ã 3dmatrixã䜿çšããŸãã 60 FPSã宣èšããŸãã ã é¢æ°åŒã³åºãã®ãã§ãŒã³ïŒjQueryã®ããã«ïŒãä»ããŠãè€æ°ã®ã¢ãã¡ãŒã·ã§ã³ãé£ç¶ããŠå®è¡ã§ããŸãã
èŠçŽ ã®äœçœ®ãå¹ ãé«ããéæ床ãå€æŽã§ããŸãã ã©ã€ãã©ãªã䜿çšããŠããªããžã§ã¯ããå転ãæ¡å€§ãçž®å°ã§ããŸãã
5ã€ã®ã€ãŒãžã³ã°æ©èœããããŸãã
æ°åŠçãªjs-expressionsã䜿çšããŠäžæçãªé¢æ°ãæå®ã§ããŸãã
ãŠã§ããµã€ãïŒ Snabbt.js
Snabbt.js
ã¢ãã¡ãŒã·ã§ã³ãäœæããããã®ã©ã€ãã©ãªã ã·ã³ãã«ã§çŽæçãªAPIãåããŠããŸãã ããã5kbããããããŸãã ã 3dmatrixã䜿çšããŸãã 60 FPSã宣èšããŸãã ã é¢æ°åŒã³åºãã®ãã§ãŒã³ïŒjQueryã®ããã«ïŒãä»ããŠãè€æ°ã®ã¢ãã¡ãŒã·ã§ã³ãé£ç¶ããŠå®è¡ã§ããŸãã
èŠçŽ ã®äœçœ®ãå¹ ãé«ããéæ床ãå€æŽã§ããŸãã ã©ã€ãã©ãªã䜿çšããŠããªããžã§ã¯ããå転ãæ¡å€§ãçž®å°ã§ããŸãã
5ã€ã®ã€ãŒãžã³ã°æ©èœããããŸãã
- ç·åœ¢ïŒããã©ã«ãïŒ;
- ç°¡å;
- easeIn;
- easeOut;
- æ¥ã
æ°åŠçãªjs-expressionsã䜿çšããŠäžæçãªé¢æ°ãæå®ã§ããŸãã
ãŠã§ããµã€ãïŒ Snabbt.js
Move.js
äŸåé¢ä¿ã®ãªãå¥ã®ã©ã€ãã©ãªã ããã䜿çšãããšãçç£çãªå€æã ãã§ãªãããªããžã§ã¯ãã®æšæºããããã£ïŒèæ¯è²ãå¢çãµã€ãºãªã©ïŒãå€æŽããããšãã§ããŸãã éãã¯13ã14 kbã§ãã
30ã®ã€ãŒãžã³ã°æ©èœããµããŒãïŒ
Cubic-bezierã䜿çšããŠäžæé¢æ°ãå®çŸ©ããããšãã§ããŸãã
ãŠã§ããµã€ãïŒ Move.jsã
Move.js
äŸåé¢ä¿ã®ãªãå¥ã®ã©ã€ãã©ãªã ããã䜿çšãããšãçç£çãªå€æã ãã§ãªãããªããžã§ã¯ãã®æšæºããããã£ïŒèæ¯è²ãå¢çãµã€ãºãªã©ïŒãå€æŽããããšãã§ããŸãã éãã¯13ã14 kbã§ãã
30ã®ã€ãŒãžã³ã°æ©èœããµããŒãïŒ
- ã§;
- ã¢ãŠã;
- ã€ã³ã¢ãŠã;
- ã¹ããã;
- ç·åœ¢;
- ã¯ã¢ããã€ã³ã¯ã¢ãã;
- 䜿ãããã
- 䜿ãããã
- 䜿ãããã;
- ç°¡åãªãµã€ã³;
- ã€ãŒãºã¢ãŠãã¯ã¯ãã;
- ã€ãŒãºã¢ãŠããã¥ãŒããã¯;
- ç·©åã¯ã©ãŒã;
- 䜿ãããã;
- ã€ãŒãºã¢ãŠããµã€ã³;
- ãªã©ãªã©...
Cubic-bezierã䜿çšããŠäžæé¢æ°ãå®çŸ©ããããšãã§ããŸãã
ãŠã§ããµã€ãïŒ Move.jsã
Animo.js
2013幎ã«éçºããããã¢ãã¡ãŒã·ã§ã³ãäœæããããã®ã©ã€ãã©ãªã jQuery 2+ã®ãã©ã°ã€ã³ãšããŠäœ¿çšãããŸãã Animate.cssã®ã©ãããŒã§ãã
ãã©ã°ã€ã³ãåŒã³åºããšããããã¯ç€ºãããŸãïŒ
Animo.jsã®ééã¯7.2 kbã§ãã
ãŠã§ããµã€ãïŒ Animo.js
Animo.js
2013幎ã«éçºããããã¢ãã¡ãŒã·ã§ã³ãäœæããããã®ã©ã€ãã©ãªã jQuery 2+ã®ãã©ã°ã€ã³ãšããŠäœ¿çšãããŸãã Animate.cssã®ã©ãããŒã§ãã
ãã©ã°ã€ã³ãåŒã³åºããšããããã¯ç€ºãããŸãïŒ
- ã¢ãã¡ãŒã·ã§ã³ïŒããã€ãå¯èœïŒ;
- ã¢ãã¡ãŒã·ã§ã³å®è¡æéã
- ç¹°ãè¿ãåæ°ïŒ1åã2åããŸãã¯ç¡éã«ïŒ;
- ã¢ãã¡ãŒã·ã§ã³ã®å®äºåŸã«åŒã³åºãããã³ãŒã«ããã¯é¢æ°ïŒãã®äžã§åã³Animo.jsã䜿çšã§ããŸãïŒ;
- ç¹å®ã®å¹æïŒå転ã®åºŠåãããŒããã®åŒ·ããªã©ïŒã®äžæã®ããããã£ã
- ã¿ã€ãã³ã°æ©èœã
Animo.jsã®ééã¯7.2 kbã§ãã
ãŠã§ããµã€ãïŒ Animo.js
Ani.js
çãã䜿ãæ¹ã®ã©ã€ãã©ãªã ã¯ã©ã¹ãŸãã¯javascripté¢æ°åŒã³åºãã®æšæºä»æ§ã®ä»£ããã«ãããŒã¿å±æ§ïŒdata-anijsïŒãç»é²ãã次ã®ãããªãã®ãè¿œå ããå¿ èŠããããŸãã
ifïŒã¯ãªãã¯ã onïŒ h1ã doïŒ pulse animatedã toïŒ h2
å ŽæïŒ ã©ã€ãã©ãªèšèªãžã®ãªã³ã¯ ïŒïŒ
1ã€ã®èŠçŽ ã§ãè€æ°ã®æ¡ä»¶ãäžåºŠã«æå®ã§ããŸãã
ãã®å¹æã¯15ã®ã«ããŽãªã«åé¡ãããŸã ã
ã©ã€ãã©ãªã«ã¯70ã®ãšãã§ã¯ãããããŸã ã ãªã³ã©ã€ã³ãã«ããŒïŒhttp://anicollection.github.io/ïŒã®ãããã§ãç®çã®å¹æãéžæããŠãAniJSã®ããŒãžã§ã³ãçæã§ããŸãã
ãŠã§ããµã€ãïŒ Ani.jsã
Ani.js
çãã䜿ãæ¹ã®ã©ã€ãã©ãªã ã¯ã©ã¹ãŸãã¯javascripté¢æ°åŒã³åºãã®æšæºä»æ§ã®ä»£ããã«ãããŒã¿å±æ§ïŒdata-anijsïŒãç»é²ãã次ã®ãããªãã®ãè¿œå ããå¿ èŠããããŸãã
ifïŒã¯ãªãã¯ã onïŒ h1ã doïŒ pulse animatedã toïŒ h2
å ŽæïŒ ã©ã€ãã©ãªèšèªãžã®ãªã³ã¯ ïŒïŒ
- if-ä»»æã®ã€ãã³ã;
- on-ã¢ãã¡ãŒã·ã§ã³ãé©çšããããªããžã§ã¯ãã
- do-å¹æïŒããã€ãå¯èœïŒ;
- to-ã€ãã³ããçºçãããªããžã§ã¯ãïŒonãštoã¯ç°ãªãå€ãŸãã¯åãå€ãæã€ããšãã§ããŸãïŒã
1ã€ã®èŠçŽ ã§ãè€æ°ã®æ¡ä»¶ãäžåºŠã«æå®ã§ããŸãã
ãã®å¹æã¯15ã®ã«ããŽãªã«åé¡ãããŸã ã
- attention_seekers;
- bouncing_entrances;
- bouncing_exits;
- fading_entrances
- fading_exits;
- 足ã²ã;
- å é;
- å転
- rotation_entrances
- rotation_exits;
- ã¹ãã·ã£ã«;
- zooming_entrances
- zooming_exits;
- slide_entrances
- slide_exitsã
ã©ã€ãã©ãªã«ã¯70ã®ãšãã§ã¯ãããããŸã ã ãªã³ã©ã€ã³ãã«ããŒïŒhttp://anicollection.github.io/ïŒã®ãããã§ãç®çã®å¹æãéžæããŠãAniJSã®ããŒãžã§ã³ãçæã§ããŸãã
ãŠã§ããµã€ãïŒ Ani.jsã
é床
çç£çãªã¢ãã¡ãŒã·ã§ã³å¹æãäœæããããã®ã©ã€ãã©ãªã jQueryãã©ã°ã€ã³ãšããŠäœ¿çšã§ããŸãã ã³ã³ãã¥ãŒã¿ãŒãé»è©±ãã¿ãã¬ããã§IE8 +ããã³ææ°ã®ãã©ãŠã¶ãŒããµããŒãããŸãã
次ã®çç±ã«ãããå¹æçãªã¢ãã¡ãŒã·ã§ã³ãäœæã§ããŸãã
ä»ã®ã©ã€ãã©ãªãšåæ§ã«ãããã䜿çšãããšãcss-propertiesãšèšå®ã®ãªã¹ãã衚瀺ãããŸãïŒå®è¡æãã€ãŒãžã³ã°ãšã³ãŒã«ããã¯é¢æ°ãã¢ãã¡ãŒã·ã§ã³ã«ãŒããªã©ïŒã
è¿œå æ å ±ïŒ
ãŠã§ããµã€ãïŒ Velocity ã
é床
çç£çãªã¢ãã¡ãŒã·ã§ã³å¹æãäœæããããã®ã©ã€ãã©ãªã jQueryãã©ã°ã€ã³ãšããŠäœ¿çšã§ããŸãã ã³ã³ãã¥ãŒã¿ãŒãé»è©±ãã¿ãã¬ããã§IE8 +ããã³ææ°ã®ãã©ãŠã¶ãŒããµããŒãããŸãã
次ã®çç±ã«ãããå¹æçãªã¢ãã¡ãŒã·ã§ã³ãäœæã§ããŸãã
- ããã±ãŒãžå ã®èªã¿åãããã³æžã蟌ã¿æäœãèªåçã«åéããŸãã
- requestAnimationFrameãé©çšããŸãã
- æçµçãªã¢ãã¡ãŒã·ã§ã³å€ããã£ãã·ã¥ããããã«ãçç£çãªcssããããã£ãšãã¹ããã©ã¯ãã£ã¹ã䜿çšããŸãã
ä»ã®ã©ã€ãã©ãªãšåæ§ã«ãããã䜿çšãããšãcss-propertiesãšèšå®ã®ãªã¹ãã衚瀺ãããŸãïŒå®è¡æãã€ãŒãžã³ã°ãšã³ãŒã«ããã¯é¢æ°ãã¢ãã¡ãŒã·ã§ã³ã«ãŒããªã©ïŒã
è¿œå æ å ±ïŒ
ãŠã§ããµã€ãïŒ Velocity ã
Animatic.js
ã¢ãã¡ãŒã·ã§ã³ãäœæããããã®å°ããªã©ã€ãã©ãªïŒ7 kbïŒã ChromeãSafariãFirefoxãInternet Explorer 10ãããã³ã¢ãã€ã«ãã©ãŠã¶ãŒããµããŒãããŠããŸãã å¹æã«ã€ããŠã¯ãäžéæ床ãš2D / 3Då€æã®ã¿ã䜿çšãããŸãããããã¯æãçç£çãªcssããããã£ã®1ã€ã§ãã
䜿çšäžã«ã次ãæå®ããå¿ èŠããããŸãã
å®éã®ç©çãã·ãã¥ã¬ãŒãããã«ã¯ãè¿œå ã®ãã©ã¡ãŒã¿ãŒã䜿çšããå¿ èŠããããŸãã
Animo.js : , .
: Animatic.js .
Animatic.js
ã¢ãã¡ãŒã·ã§ã³ãäœæããããã®å°ããªã©ã€ãã©ãªïŒ7 kbïŒã ChromeãSafariãFirefoxãInternet Explorer 10ãããã³ã¢ãã€ã«ãã©ãŠã¶ãŒããµããŒãããŠããŸãã å¹æã«ã€ããŠã¯ãäžéæ床ãš2D / 3Då€æã®ã¿ã䜿çšãããŸãããããã¯æãçç£çãªcssããããã£ã®1ã€ã§ãã
䜿çšäžã«ã次ãæå®ããå¿ èŠããããŸãã
- å¹æïŒå¹³è¡ç§»åãå転ãæ¡å€§çž®å°ãäžéæ床ïŒ;
- ãªãŒãã¿ã€ã ;
- ã€ãŒãžã³ã°æ©èœïŒ25çš®é¡ïŒ;
- é 延ã
å®éã®ç©çãã·ãã¥ã¬ãŒãããã«ã¯ãè¿œå ã®ãã©ã¡ãŒã¿ãŒã䜿çšããå¿ èŠããããŸãã
Animo.js : , .
: Animatic.js .
TransitJS
jQuery . css- FPS ( ).
:
29 .
(.transition().transition().transition()...).
: TransitJS .
TransitJS
jQuery . css- FPS ( ).
:
- x (px) â X;
- y (px) â Y;
- translate (x, y) â ;
- rotate (deg) â ;
- rotateX (deg) â X;
- rotateY (deg) â Y;
- rotate3d (x, y, z, deg) â 3D ;
- scale (x, [y]) â / ;
- perspective (px) â ;
- skewX (deg) â X;
- skewY (deg) â Y.
29 .
(.transition().transition().transition()...).
: TransitJS .
Zurb motion-ui
css- «Foundation».
5 :
3 (normal, slow, fast) 3- easing- (linear, ease, bounce). css- js-.
: Zurb Motion-UI .
Zurb Motion-UI
css- «Foundation».
5 :
- Slide;
- Scale;
- Hinge;
- Fade;
- Spin.
3 (normal, slow, fast) 3- easing- (linear, ease, bounce). css- js-.
: Zurb Motion-UI .
Shift.js
ã¢ãã¡ãŒããã©ã¹
(2.8 kb) css/svg .
15 css-:
:
: AnimatePlus .
AnimatePlus
(2.8 kb) css/svg .
15 css-:
- translateX, translateY, translateZ;
- scale, scaleX, scaleY, scaleZ;
- rotate, rotateX, rotateY, rotateZ;
- skewX, skewY;
- opacity;
- perspective.
:
- el â ;
- duration â ;
- delay â ;
- easing â (29 );
- loop â ;
- direction â (normal, reverse, alternate);
- begin â ;
- complite â .
: AnimatePlus .
è€éãªïŒ
ã°ãªããã¯
ãµã ãµã©ã¹
, javascript. .
:
Transitionables 9 easing ( ):
: samsarajs.org/docs/getting-started.html .
: SamsaraJs .
SamsaraJs
, javascript. .
:
- Samsara.DOM.Surface â ;
- Samsara.DOM.Context â , Surface;
- Samsara.Core.Transitionable â () Surface- ;
- Samsara.Core.Transform â css-transform (, Transitionable);
- MouseInput â ;
- TouchInput â ;
- ScrollInput â scroll-;
- PinchInput â ;
- RotateInput â ;
- ScaleInput â / .
Transitionables 9 easing ( ):
- linear;
- easeIn;
- easeOut;
- easeInOut;
- easeOutBounce;
- easeInCubic;
- easeOutCubic;
- easeInOutCubic;
- easeOutWall.
: samsarajs.org/docs/getting-started.html .
: SamsaraJs .
ãããã¢ãŒã·ã§ã³
Popmotion â .
5 :
Standart:
Actions:
Roles:
Primitives:
Plugins:
Popmotion, Velocity, TweenLite TweenMax.https .
: Popmotion .
Popmotion
Popmotion â .
5 :
- Standart;
- Actions;
- Roles;
- Primitives;
- Plugins.
Standart:
- ui â ;
- Actor â ;
- Iterator â ;
- Sequence â ;
- calc â .
Actions:
- Simulate â ;
- Track â ;
- Tween â (Actor).
Roles:
- css â css-;
- attr â ;
- svg â svg ;
- drawPath â svg .
Primitives:
- Action â (Tween/Simulate/Track) (Actor);
- Easing â ;
- Input â Actor, ;
- Process â ;
- Role â (Actor) (css, attr ).
Plugins:
- Scroll To â DOM-.
Popmotion, Velocity, TweenLite TweenMax.https .
: Popmotion .
Mo.js
Shifty.js
ã¢ãã¡ãŒã·ã§ã³ãžã§ãã¬ãŒã¿ãŒ
ãµã€ãããã³Webã¢ããªã±ãŒã·ã§ã³ãéçºããå Žåãæšæºçãªãœãªã¥ãŒã·ã§ã³ã§ã¯å¿ ãããååã§ã¯ãããŸããããã®ãããäžéšã®ããã°ã©ããŒã¯ãèªåãååã®ããã«ã¢ãã¡ãŒã·ã§ã³ããã°ããäœæããããã®ç¹å¥ãªããŒã«ãéçºããŸããã
Bounce.js
ãªã³ã©ã€ã³ãµãŒãã¹ãBounce.jsãã«ãããããã°ã©ããŒã¯ãšã¬ã¬ã³ããªã¢ãã¡ãŒã·ã§ã³ãäœæã§ããŸãããã®äžã§ããã³ã³ããŒãã³ããè¿œå ããã¿ã³ã䜿çšããŠã次ã®èšå®ã§å¶åŸ¡ããããšãã§ã¯ããããã€ã§ãè¿œå ã§ããŸãã
- ã¿ã€ãïŒã¹ã±ãŒã«ã移åãå転ãåŸæïŒ;
- ã€ãŒãžã³ã°ïŒããŠã³ã¹ãã¹ãŠã§ã€ãããŒãããŠã³ã¹ãããŒãã¹ãŠã§ã€ïŒ;
- æé
- é 延
- ããŠã³ã¹;
- åã ã®ãã©ã¡ãŒã¿ãŒã
äœæãããã¢ãã¡ãŒã·ã§ã³ã¯cssã«ãšã¯ã¹ããŒãã§ããŸãã
CSSã¢ãã¡ãŒã·ã§ã³
ã¢ãã¡ãŒã·ã§ã³ãäœæããããã®äŸ¿å©ãªWebã¢ããªã±ãŒã·ã§ã³ãã¢ãã¡ãŒã·ã§ã³åããããªããžã§ã¯ããã¿ã€ã ã©ã€ã³ãããã³äžéç¶æ ãè¿œå ããããã®ããã«ãåãã座æšè»žãæäŸããŸããäžè¬èšå®ãšãã¢ãã¡ãŒã·ã§ã³ã®åã¹ããŒãžïŒããŒãã¬ãŒã ïŒã®èšå®ã®äž¡æ¹ããããŸãã
äœæãããã¢ãã¡ãŒã·ã§ã³ã®cssã³ãŒãã¯ããã¬ãã£ãã¯ã¹ã®æç¡ã«ãããããååŸã§ããŸãã
ã¹ã¿ã€ãªãŒãšãã³ãã©
çæéã§ãªããžã§ã¯ããå€æã§ããŸããäœæãããã¢ãã¡ãŒã·ã§ã³ã¯ãCSSïŒæ¥é èŸã®æç¡ã«ãããããïŒãŸãã¯rekapiã«ãšã¯ã¹ããŒãã§ããŸãã
次ã®ããããã£ããµããŒãããŸãã
- äžéæ床
- å転
- ã¹ã±ãŒã«
- ã¹ãã¥ãŒ
- 翻蚳ããŸãã
ããã¯äŸ¿å©ã§ç解ã§ããªãããã«æããŸããã
ç¹å¥ãªå Žåã®ã©ã€ãã©ãª
ã€ã³ã¿ãŒãããã«ã¯ãæšæºã®ã·ã³ãã«ããã³ã³ã³ãã¬ãã¯ã¹æ§é ã«åé¡ãããªãå€ãã®åçãªãœãªã¥ãŒã·ã§ã³ããããŸããèšäºã®ãã®ã»ã¯ã·ã§ã³ã§ããããæ€èšããŸãã
Webãµã€ãã®è² è·ã€ã³ãžã±ãŒã¿ãŒãäœæããããã®ã©ã€ãã©ãª
CSSããŒããŒ
ããªããŒããŒ
Shelleylowe css-animations
ããã¹ãã¢ãã¡ãŒã·ã§ã³
ããã¹ã¿ã€ã«
æ®ã
ãã±ããCSS
. -, .
Rocket CSS 8 :
: Rocket CSS .
Rocket CSS
. -, .
Rocket CSS 8 :
- rocketPulse;
- rocketPulseHole;
- rocketRotate;
- rocketRotateHole;
- rocketRotateGo;
- rocketGost;
- rocketFlip;
- rocketCircle.
: Rocket CSS .
ã«ã¹ã¿ã ã€ãŒãžã³ã°é¢æ°ã䜿çšããCSS3ãã©ã³ãžã·ã§ã³
javascript . hardware-acceleration.
.
: CSS3 Transitions with custom easing functions .
CSS3 Transitions with custom easing functions
javascript . hardware-acceleration.
.
: CSS3 Transitions with custom easing functions .
Dynamics.js
ã¢ãã¡ãŒã·ã§ã³
jQuery . data- js.
10 :
:
.
: Animsition .
Animsition
jQuery . data- js.
10 :
- Fade;
- Fade up;
- Fade down;
- Fade left;
- Fade right;
- Rotate;
- Flip X;
- Flip Y;
- Overlay;
- Zoom.
:
- IE10+;
- Safari;
- Chrome;
- Firefox.
.
: Animsition .
Webã¢ãã¡ãŒã·ã§ã³ã®æªæ¥
幎ãé£ãã ãã¢ãã¡ãŒã·ã§ã³ã«ã¯æ°ããæ©èœãè¿œå ãããŸããããããŠããã¹ãŠãããŸãããããã«èŠããŸãããäœããæ¬ ããŠããŸã...
ãããŠãWeb Animationsãæ£åžžã«äœæãã宣èšåïŒcssïŒãœãªã¥ãŒã·ã§ã³ãšåœä»€åïŒjsïŒãœãªã¥ãŒã·ã§ã³ã®ãã©ã³ã¹ãååã§ã¯ãããŸããã
ããã¯åœŒãã®è¯å®çãªåŽé¢ãçµåããŸãïŒ
- å¥ã®ã¹ããªãŒã ã§äœæ¥ããŸãïŒcssãªã©ïŒã
- ïŒjsã®ããã«ïŒã¢ãã¡ãŒã·ã§ã³ãå®å šã«å¶åŸ¡ã
- 䟿å©ãªã¢ãã¡ãŒã·ã§ã³äœæã¡ã«ããºã ïŒcssïŒ;
- ãã©ãŠã¶ã®è¡šç€ºããã»ã¹ãšã³ã³ãã¥ãŒã¿ãŒç»é¢ã®æŽæ°ãšã®åæïŒjsã®requestAnimationFrameïŒã
æ®å¿µãªãããããã€ãã®ãã©ãŠã¶ã§ã®ã¿ãµããŒããããŠããŸããïŒ
- Firefox 43以éã
- Chrome 45以éã
- Opera 35+;
- Androidãã©ãŠã¶47以éã
- Android 49以éçšã®Chromeã
ä»ã®äººã®ããã«ãïŒIE10 +ããã®ïŒèŠªåãããŸãã
Webã¢ãã¡ãŒã·ã§ã³ã®æ§æã¯æ¬¡ã®ãšããã§ãã
element.animate([ {cssProperty: value0}, {cssProperty: value1}, {cssProperty: value2}, //... ], { direction: nameDirection, // , 'normal', 'reverse', .. iterations: iterationCount, // ( ) delay: delayValue, // duration: timeInMs, // easing: nameEaseFunction, //'linear', , .. fill: nameFill //'forwards', 'backwards', 'both', 'none', 'auto' });
CSSã¢ãã¡ãŒã·ã§ã³ã䜿çšãããŠãŒã¶ãŒã¯ãããã«èŠæ £ããç»åãèŠãããšãã§ããŸããæåã«ãå€æŽããcssããããã£ãæå®ãããŸãïŒcssã®ããŒãã¬ãŒã ãªã©ïŒã次ã«ãã¢ãã¡ãŒã·ã§ã³èšå®ãäœæããããšãããã€ãã®äŸ¿å©ãªããããã£ãšã¡ãœãããæã€AnimationPlayerãªããžã§ã¯ããè¿ããŸãã
AnimationPlayerããããã£ïŒ
- currentTime â ( );
- playbackRate â ( );
- playState â (idle, pending, running, paused, finished);
- startTime â , ( ).
AnimationPlayer:
- finish â ( );
- pause â ;
- play â ;
- reverse â .
ãªããžã§ã¯ãã®å©ããåããŠGroupEffectãškeyframeEffectsããŒãžã«è€æ°ã®èŠçŽ ãäžåºŠã«ã¢ãã¡ãŒã·ã§ã³ãåæãããããšãã§ããŸããSequenceEffectã§ã¯ãå€æ°ã®ã¢ãã¡ãŒã·ã§ã³ïŒGroupEffectãªã©ïŒãçµã¿åãããããšãã§ããŸãããåæã«åçããããšãã§ããŸããããã«ãããäœæ¥ãç°¡åã«ãªããŸããçµå±ãcssã䜿çšããåã«ãåã®ã¢ãã¡ãŒã·ã§ã³ãçµäºããããã«åèŠçŽ ã®é 延å€ãéžæããå¿ èŠããããŸãïŒ8ã€ã®ã¢ãã¡ãŒã·ã§ã³ã®ã·ãŒã±ã³ã¹ãæ³åãããã®ãã¡ã®1ã€ã®å®è¡æéãå€æŽããå¿ èŠãããå Žåããã¹ãŠãåèšç®ããå¿ èŠããããŸãïŒã
2015幎4æ9æ¥ã«ãã¢ãã¡ãŒã·ã§ã³çšã®å¥ã®èå³æ·±ãæè¡ã®ä»æ§ããªãªãŒã¹ãããŸãããè»éã«æ²¿ã£ãŠãªããžã§ã¯ãã®åããäœæã§ããŸãããã®å Žåã座æšã¯ç¹å¥ãªcss-property motion-pathïŒæšæºã®css-animationãšweb-animationã®äž¡æ¹ã§äœ¿çšã§ããŸãïŒããã€ã³ãã¯ãSVGã³ã³ã¿ãŒãä»ããŠç€ºãããŸãããŠã§ãã¢ãã¡ãŒã·ã§ã³ã¯ããããŸã§ã®ä»æ§ã®å€ãã確èªããŠããªãããšããã€ãã®ãå®è£ ãããŠããŸãããããããæéãæ¢ãŸãããšã¯ãªããããã«ææ°ã®ãã©ãŠã¶ã®ã»ãšãã©ããµããŒãããŸããWebã¢ãã¡ãŒã·ã§ã³ã³ã³ãã³ãïŒ
- Mozillaã§ã®Webã¢ãã¡ãŒã·ã§ã³ã®ä»æ§ã
- ãã©ãŠã¶ã«ããWebã¢ãã¡ãŒã·ã§ã³ã®ãµããŒãã
- 2014幎ã®ã¢ãã¡ãŒã·ã§ã³ã®ç¶æ ã
- ãªããžã§ã¯ãã®åãã®è»è·¡ãäœæããããã®æè¡ä»æ§ã
- ããªãã£ã«ãŠã§ãã¢ãã¡ãŒã·ã§ã³ ;
- Webã¢ãã¡ãŒã·ã§ã³ã«é¢ããäžé£ã®èšäºã
- ä»æ§Webã¢ãã¡ãŒã·ã§ã³ã
- web-animations ;
- css js ;
- web-animations ;
ãããã«
cssã¢ãã¡ãŒã·ã§ã³ã«é¢ããèšäºãæžãå§ãããšãã2ã3æ¥ã§ç®¡çã§ãããšæã£ãŠããŸããããå€ãã®è³æããã£ãããšãããããŸããããããã£ãŠãWordã§ã¯ã30ããŒãžã®åçããããŸããã§ãããç©èªã®å®å šæ§ã䟵害ãããã®ã§ãç§ã¯ãããå¥ã ã®èšäºã«åå²ããŸããã§ããããããŠããã¹ãŠã1ãæã«ãããšäŸ¿å©ã§ãã
èšäºã®ãã¹ãŠã®è¿œå è³æãèªãããšããå§ãããŸãããã®æ¹æ³ã«ãããCSSã¢ãã¡ãŒã·ã§ã³ãããã«ããç解ã§ããããã§ãã楜ããã§ããã ããã°å¹žãã§ãã
èšäºã®äœæãšã¯ã©ãŠãIDEã®äœæãšäžŠè¡ããŠGefestãVKontakteã§ã®Webéçºã«é¢ããã°ã«ãŒããçããŠããŸããã©ã€ãã©ãª/è³æãå®çšçãªèŠ³ç¹ããå¯èœãªéãæçšã«ãªãããã«ãå ¬éãããåæ å ±ãå³å¯ã«ãã£ã«ã¿ãªã³ã°ããŸãããããã£ãŠãç§ã¯ããªããç§ãã¡ã«æåŸ ããŸãã賌èªè ãå€ãã»ã©ãæçšãªã©ã€ãã©ãªãšãããªã¢ã«ãå ¬éããŸãïŒæ°ãããããªã¢ã«ã®æ€çŽ¢ãšãã£ã«ã¿ãªã³ã°ã«å€ãã®æéãè²»ãããå€æ°ã®Webéçºè ãšå ±æããããšèããŠããŸãïŒã
ããã¹ãã®ã¿ã€ããã¹ã誀ãã¯å人çã«éã£ãŠãã ããã
èšäºã®ã»ã¯ã·ã§ã³ã«å«ãŸããŠããªãè³æ
- ã¢ãã¡ãŒã·ã§ã³ã«é¢ãããªã³ã¯ã
- 15åã§CSSã¢ãã¡ãŒã·ã§ã³ã®äœæã
- Googleã®ã¢ãã¡ãŒã·ã§ã³ããã©ãŒãã³ã¹ã«ã€ããŠã
- Googleã®è€éãªã¬ã€ã¢ãŠãã§ã®ã¹ããŒããŠã³ã«ã€ããŠã
- JavaScriptã䜿çšããŠCSSã¢ãã¡ãŒã·ã§ã³ãå¶åŸ¡ããŸãã
- javascript cssã¢ãã¡ãŒã·ã§ã³ã€ãã³ãã䜿çšããŸãã
- ãã·ã¢èªã§ã®cssã¢ãã¡ãŒã·ã§ã³ã®ããã©ãŒãã³ã¹ã«ã€ããŠã
- easing functions .