MyTurbine

MyTurbine

Represents a faced up turbine of MyVehicle.

Constructor

new MyTurbine(scene, slices, stacks)

Instantiates a new turbine instance.
Source:
Parameters:
Name Type Description
scene CGFscene the scene
slices integer the number slices of the curved objects
stacks integer the number of stacks of the curved objects

Methods

display()

Displays the turbine.
Source:

initMovement()

Initializes the movement of the turbine.
Source:

initObjects(slices, stacks)

Initializes the objects of the turbine.
Source:
Parameters:
Name Type Description
slices integer the number slices of the curved objects
stacks integer the number of stacks of the curved objects

reset()

Resets the position of the turbines.
Source:

update(elapsed, speed)

Updates the movement of the turbine.
Source:
Parameters:
Name Type Description
elapsed integer the elapsed time since the last update
speed integer the speed of the vehicle