Sine Wave Object

sine wave

The SineWave Object will slide the layer along a sine wave path.

Initialization:

objectName.sinewave = new SineWave("objectName","sinewave")

Example:

mylayer = new DynLayer("mylayerDiv")
mylayer.sinewave = new SineWave("mylayer","sinewave")

The play() Method:

The play() method begins the sine wave:

objectName.sinewave.play(amplitude,wavelength,angleinc,angle,cycles,direction,speed,fn)

Examples:

mylayer.sinewave.play(60,200,15,0,2,1,20)

The pause() and stop() Methods:

Work the same as in the circle() method.

Example: geometric-sinewave1.html [source]

Source Code

sinewave.js

Geometric Objects

Home Next Lesson: JavaScript Gif Animation
copyright 1998 Dan Steinman