Constructor
new MyFlag(scene, divs)
Instantiates a new flag instance.
- Source:
Parameters:
Name | Type | Default | Description |
---|---|---|---|
scene |
CGFscene
|
the scene | |
divs |
integer
|
100 | the number of divisions of the plane |
Methods
initMovement()
Initializes the movement of the wings, defining constants and relevant variables.
- Source:
update(t, turningValue, speed, angle, speedMultiplier)
Updates the flag in terms of movement and shaders.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
t |
integer
|
the current time |
turningValue |
number
|
turning multiplier |
speed |
number
|
the speed of the flag |
angle |
number
|
the angle of rotation of the flag |
speedMultiplier |
number
|
speed multiplier |