You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert
When doing the new website for the Sublime Text 2.0 launch, instead of just screenshots, I wanted to have animations to demonstrate some of its features. One of the criteria was that the animations should work everywhere, from IE6 to an iPad. This ruled out two common video options, Flash and the <video> element. Animated GIF files would have been a candidate, except for two issues: the 256 color
ã¤ã¼ã¸ã³ã°é¢æ°ã¯ãæéã®çµéã«ä¼´ããã©ã¡ã¼ã¿ã¼ã®å¤åçãæå®ãã¾ãã ç¾å®ã®ç©ä½ã¯ãå³åº§ã«åãããåæ¢ããããããã¨ã¯ãªããä¸å®ã®é度ã§åããã¨ãã»ã¨ãã©ããã¾ãããå¼ãåºããéããã¨ããç§ãã¡ã¯æåã«å¼ãåºãããã°ããå¼ãåºãããããå¤ã«åºã¦ããã«ã¤ãã¦ãã£ããã¨åããã¾ããåºã«åãã¦ãªã«ããï¼ä¾ãã°ãã³ã®ãããªï¼æ¾ãã¨ãæåã«éåã«ãã£ã¦ä¸ã«åãã£ã¦å éããåºã«å½ãã£ãå¾ä¸ã«è·³ãè¿ãã¾ãã ããªãã®å¿ è¦ãªã¤ã¼ã¸ã³ã°ãé¸æãã¦ãããªãã®ããã¸ã§ã¯ãã®ä¸ã§ä½¿ç¨ãã¦ã¿ã¦ãã ããã
ããé©åãªãã®ã追å ãããã®ã§ãã£ã¡ã使ãã¾ãããã setInterval/setTimeout â requestAnimationFrame; ããã¾ã§ã¯ setInterval function render(){ // ã¢ãã¡ã¼ã·ã§ã³ 1ãã¬ã¼ã åã®å¦ç } setInterval(render, 1000 / 60); ããã¯ããå¤ãã ãããã㯠requestAnimationFrame function animationLoop(){ render(); requestAnimationFrame(animationLoop); } animationLoop(); ãããã¹ãã requestAnimationFrameã«ããã¨ä½ãããã®ï¼ è¤æ°ã®ã¢ãã¡ã¼ã·ã§ã³æåå¦çãä¸ã¤ã«ã¾ã¨ãã¦æé©åãã¦ããã åãç¨ã«åããã¦ããç©ä½A,Bã®åãã次第ã«ããã¦ããã¨ãããªããª
Posted at May 3, 2011 by Nicholas C. Zakas Tags: Animation, JavaScript, mozRequestAnimationFrame, requestAnimationFrame, webkitRequestAnimationFrame For a long time, timers and intervals have been the state of the art for JavaScript-based animations. While CSS transitions and animations make some animations easy for web developers, little has changed in the world of JavaScript-based animation over
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}