JavaScript to achieve flash dazzle Light wave special effects _javascript skills

Source: Internet
Author: User
Tags cos

See Flash's implementation of this kind of animation is very convenient, so try to fool around. All is the pixel point that simulates with DOM, the sawtooth is unavoidable ...

To avoid the sawtooth I am afraid to add a filter again, or use the picture.

<! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">  

Parameters:

var Lightwave = function (t,left,thick,sharp,speed,vibration,amplitude,opacity) {this
    . cont = T;//need to add a bright light container
    this. left = left; The right offset at the time of light birth this
    . Thick = thick;//thickness degree this
    . Sharp = sharp;//sharp degree this
    . Speed = speed;//fluctuation Speed
    This.vib ration = vibration; Frequency of vibration per unit time this
    . amplitude = amplitude;//amplitude this
    . Opacity = opacity;/transparency this
    . Cont.style.position = ' re Lative ';
    this. Move ();
}

We are interested to have a discussion.

In addition, there is a problem, the above code under IE, the transparency filter does not work, the study learned that changing the location of the parent container will affect the child nodes of the transparent filter inheritance.

The above mentioned is the entire content of this article, I hope you can enjoy.

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.