Javascript compilation of High Simulation controllable spring vibrator

Source: Internet
Author: User
Activate again after running!
(!!! If it fails to run after the setting, click (stop now) and then click the element. Do not refresh it any more! It depends on you! Haha !)
Initial speed (unit: pixel/millisecond ): Do not be too large. Be careful when the browser crashes. It is better to be less than 100.
Moving interval (unit: milliseconds ):
Half-cycle loss (speed) Energy (>-1 ): 0 is a simple harmonic movement!
Distance from the start position to the central axis (unit: pixel ):
After setting, activate the new element and click me !! I just learned JavaScript and saw some cool guys write a lot of special effects. I also spent a day writing a spring vibrator, which was completely original and did not learn from anyone. Code Here, I am running my compressed version code (some cards are running on the internet). I will upload the full version and the Code with comments (which is very detailed, the first time I posted code in my blog, it was quite difficult to control! Haha !), There are also experts who don't want to laugh. I am using a very stupid method. There will be new special effects to upload in a few days (this spring is a button special effect on my webpage, my webpage has a lot of special effects. The webpage has not been completed yet. After that, I will send all the original special effects ). Because I am still studying, it may be slow to publish new special effects. Please forgive me!
For those who want to share their experiences, add my group of programmers: 50352735
Programming philosophy: It mainly uses physical thinking, imagining the spring movement process, and then simulating it with if else and else if, because the action of any thing is true .. so .. so you can use if else !, Here is an idea that I call it latency. Algorithm "(I wonder if my predecessors have invented it. If any offense happens, change it immediately !) It is mainly used for values that cannot be accurately obtained at one point. It is better to change it into a class, and then add top and top to the next one! (The second version of spring vibrator has been released (less than 10 lines of code !, Ultra-concise !))
Second Version address
Download spring vibrator compression version
Download the complete spring vibrator teaching Edition
Download the spring vibrator Design Drawing
Reprinted please describe the source:
Http://www.cnblogs.com/NONE/archive/2009/10/22/JavaScriptSpringEmluator.html

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.