TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

A Quick Look Into The Math Of Animations With JavaScript

107 点作者 aditiyaa1超过 13 年前

5 条评论

davidsiems超过 13 年前
Cool article, it left out my favorite function though: <a href="http://en.wikipedia.org/wiki/Smoothstep" rel="nofollow">http://en.wikipedia.org/wiki/Smoothstep</a><p>This is the magic sauce you need. (more visual demo here: <a href="http://sol.gfxile.net/interpolation/index.html" rel="nofollow">http://sol.gfxile.net/interpolation/index.html</a>)
tychonoff超过 13 年前
The author shunned mathematics in favor of programming, but this exercise showed why that was a mistake.<p>Compared to serious mathematics, programming is relatively trivial.<p>With mathematics, you can do anything in computing.<p>Without it, you're reduced to this feeble exercise in self-enlightment.
评论 #3074026 未加载
unwind超过 13 年前
Very classical material, especially if you've ever been (as the author) writing demos/intros in the 80s/90s (<a href="http://en.wikipedia.org/wiki/Demoscene" rel="nofollow">http://en.wikipedia.org/wiki/Demoscene</a>). I have many memories of writing basic programs that spat out sine tables, since it wasn't possible to compute something as complex as a sine in real-time.
评论 #3074239 未加载
评论 #3073123 未加载
apitaru超过 13 年前
Reading this tutorial reminded me of the first time I realized how handy a bit of math can be for animation. I think it was this little ease-out snippet that opened my eyes (served me well for years to come):<p>posX += (destX - posX)/ slowdownRate<p>Moves an item like so: X....X...X..X.X
jtchang超过 13 年前
This ball is so much fun to play with! Single click to where you want the ball to go.<p><a href="http://www.robertpenner.com/easing/easing_demo.html" rel="nofollow">http://www.robertpenner.com/easing/easing_demo.html</a>