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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Sprite.js: HTML5 framework for creating efficient animations in browsers

77 点作者 sverrejoh超过 14 年前

5 条评论

olalonde超过 14 年前
I was a bit curious what exactly this "system load" was. Turns out it's a ratio between the time the browser takes to draw the particles and the frequency at which it is supposed which to draw.<p><pre><code> this.tick_duration = 25; .... this.now = new Date().getTime(); // Drawing... this.time_to_paint = (new Date().getTime()) - this.now; this.load = Math.round((this.time_to_paint / this.tick_duration) * 100);</code></pre>
评论 #1987539 未加载
评论 #1987522 未加载
necolas超过 14 年前
Demo: <a href="http://batiste.dosimple.ch/sprite.js/test_input.html" rel="nofollow">http://batiste.dosimple.ch/sprite.js/test_input.html</a><p>I like how he can fall off the ledge into an infinite drop.
评论 #1987528 未加载
评论 #1987817 未加载
rudd超过 14 年前
Curious that Canvas rendering is so much slower / causes more load than the HTML backend, at least for me. Anyone know why?
评论 #1987788 未加载
评论 #1987646 未加载
评论 #1989907 未加载
weixiyen超过 14 年前
Always wanted to make an RPG game using sprites. Anyone ever tried?<p>I made a prototype a while ago just to demo some sprite movement while messing around with Node.js (it's concurrent multi-user): <a href="http://rpg.sleeperbot.com/" rel="nofollow">http://rpg.sleeperbot.com/</a>
nathanwdavis超过 14 年前
I'm curious how the Ticker object provides more accurate tick timing than setTimeout considering it just uses setTimeout.