jQuery加速 [英] Acceleration with jQuery
问题描述
我正在尝试在浏览器的重力作用下创建自由落体效果.基础物理学应该告诉您,身体(在这种情况下为div)下降得越快,其速度就应该越快.
I am trying to create a free-falling effect under the action of gravity in my browser. Basic Physics should tell you that the more the body (a div in this case) falls the faster should be its velocity.
有什么想法要实现吗?
基本上,物体的速度始终应等于"at".其中t =时间段,a =加速度= 9.8.
Basically the velocity of the object should be equal to 'at' at all times. Where t = time period and a = acceleration = 9.8.
推荐答案
有一个jQuery'physics'插件,可让您将物理应用于元素.您可以创建矢量并分配速度/重力等: http://plugins.jquery.com/project/jphysics
Theres a jQuery 'physics' plugin that allows you to apply physics to elements. You can create vectors and assign velocity/gravity etc: http://plugins.jquery.com/project/jphysics
希望有帮助:)
这篇关于jQuery加速的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!