MyFlag

MyFlag

Represents the flag of MyVehicle.

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

displayWithShaders()

Displays the flag.
Source:

initMaterial()

Initializes the material.
Source:

initMovement()

Initializes the movement of the wings, defining constants and relevant variables.
Source:

initShader()

Initializes the shader.
Source:

initTextures()

Initializes the required textures.
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