new AnimationController()
Class containing listeners for events concerning HTML elements, buttons and inputs.
This class creates listeners which act on events of the user with the GUI, and sets values which are
retrieved from the Main class.
- Source:
Methods
getAnimationSpeed() → {Integer}
Returns the speed of the whole animation in seconds.
- Source:
Returns:
speed Speed in seconds of animation
- Type
- Integer
getAutoRepeat() → {Boolean}
Turns off or on the auto-repeat trait of animating the flight paths.
- Source:
Returns:
flag Value of check box for setting aut-repeat on.
- Type
- Boolean
getIsPaused() → {Boolean}
Returns the state of the animation if it is playing or paused.
- Source:
Returns:
paused Toggle for play/pause
- Type
- Boolean
getScale() → {Integer}
Returns the scale of the manoeuvres on the scene. Default is 4.
- Source:
Returns:
scale Value to scale the aerolane and manoeuvers
- Type
- Integer
getTube() → {Tube}
Acsesses the ManoeuvreController#getTube method to compile the OLAN strings and
create a tube represnting the entire sequence.
- Source:
Returns:
tube Manoeuvre set compiled into a single tube
- Type
- Tube
initContolEvents(rend, cams, p)
Sets up listeners for GUI controls. Each listener links to its own event, onclick, on change and
on key events where the user types into the OLAN box.
Parameters:
Name | Type | Description |
---|---|---|
rend |
Renderer | Renderer to be added to |
cams |
Cameras | Cameras object to be affected when triggured by change of input |
p |
Parent | Parent to be added to by tube |
- Source:
initialiseLocalStorage()
Triggers the local storage to be loaded
- Source:
pause(p)
Pauses the animation for the plane. Movement is still animated though.
Also changes the html button src on a toggle basis.
Parameters:
Name | Type | Description |
---|---|---|
p |
Boolean | Pause toggle |
- Source:
refreshCameras()
Resets the cameras back to default positons, and turns off the on-board camera.
- Source:
refreshManoeuvres(manoeuvres)
Updates the scene with the newly entered maneouvres.
Parameters:
Name | Type | Description |
---|---|---|
manoeuvres |
Array | Array holding the manoeuvres entered from OLAN |
- Source:
refreshScene()
Resets the aeroplane loaction and rotation, the movie reel, manoeuvres shown and camera each time
it is triggered by either a change in the OLAN entered, or an appearence change. Means that problems
caused by changing any effects while animating is ongoing are avoided.
- Source:
setScale()
Sets the scale of the manoeuvre based on the input in the GUI controls. Can be from 1 to 8 multiplied.
- Source:
setSpeed()
Sets the speed of the animation of the flight based on number of seconds. Range is from 40 to 1.
- Source:
setUpAnimationListeners()
Sets up listeners for actions with the animation options. For example, on chnage of options
concerning the constrcution of flights causes the scene to be refreshed.
- Source:
setUpInputListeners()
Adds listeners for the OLAN dropdown, input box and play/ pause button.
- Source:
setUpPageListeners()
Creates GUI listeners for page elements such as help and about sections.
Listener also for hiding or showing the move reel.
- Source:
setUpPageLsetUpReelListenersisteners()
Creates GUI listeners for the movie reel for moving left and right along manoeuvres.
- Source:
setUpSaveLoadListeners()
Sets up listeners for importing and exporting OLAN entered by the user.
Performs a call to initialise local storage, so previous entry from the user is
automatically added to the scene.
- Source: