new Lissajous(containerElement)
Create a Lissajous curve and sets the default values
Parameters:
Name | Type | Description |
---|---|---|
containerElement |
object | The HTML element that contains the curves |
Members
-
private amplitudA :number
-
The amplitud of the X axis
-
private amplitudB :number
-
The amplitud of the Y axis
-
private animationEnable :boolean
-
If the animation is enabled or not
-
private canvas :HTMLElement
-
The Canvas
-
private centerX :number
-
The center x pos of the canvas
-
private centerY :number
-
The center y pos of the canvas
-
private ctx :object
-
The context of the canvas
-
private lobesAx :number
-
The number of lobes in the X axis
-
private lobesBy :number
-
The number of lobes in the X axis
-
private phase :number
-
The phase of the curve
-
render
-
Render the curves
-
private velocity :number
-
The velocity of the change of the phase
Methods
-
private (ctx)
-
Draw the curve
Parameters:
Name Type Description ctx
object The Canvas context -
updateAmplitudeA(value)
-
Updates the private atribute
Parameters:
Name Type Description value
number The new value -
updateAmplitudeB(value)
-
Updates the private atribute
Parameters:
Name Type Description value
number The new value -
updateAnimation(onoff)
-
Updates the private atribute
Parameters:
Name Type Description onoff
boolean The new value -
updateLobuleA(value)
-
Updates the private atribute
Parameters:
Name Type Description value
number The new value -
updateLobuleB(value)
-
Updates the private atribute
Parameters:
Name Type Description value
number The new value -
updatePhi(value)
-
Updates the private atribute
Parameters:
Name Type Description value
number The new value