Sinusoid Component



Methods


waveMC.pauseAnimation(), waveMC.startAnimation()

These two functions control the animation state. You can also use the animate property (see below).


waveMC.update()

Call update() after adjusting properties of the wave.


waveMC.setStyle(obj)

Use this function to set the linestyle used for the curve. The object obj can have properties thickness, color, alpha, and (instead of color) wavelength. If wavelength is a number between 400 and 700 the color of the curve will be that of the corresponding wavelength of light (in nm).



Properties


waveMC.wavelength

wavelength is specified in pixels.


waveMC.amplitude

amplitude is specified in pixels.


waveMC.width

width determines the horizontal extent of the sinusoid component, in pixels.


waveMC.phase

phase is given as a number between 0 and 1.


waveMC.animate

This property reflects and controls the animation state: true if animating and false if paused. Note also the pauseAnimation() and startAnimation() functions (see above).