Constructor
(private) new ControlsAndInputManager() → {ControlsAndInputManager}
Private constructor to enforce singleton pattern
Returns:
- Type
- ControlsAndInputManager
Members
instance
Singleton instance
isMenuDisplayed :boolean
whether the menu is currently displayed
Type:
- boolean
- Default Value:
- false
- Source:
playbackButton :PlayButton
A playback button displayed in the top left of the screen
Type:
- PlayButton
Methods
draw()
draws the playback button and potentially the menu
Parameters:
| Type | Description |
|---|---|
| P5 | p5 instance |
keyPressed(key)
responds to keyboard presses
Parameters:
| Name | Type | Description |
|---|---|---|
key |
number | the ascii code of the keypressed |
menu()
draw out menu items for each visualisation
Parameters:
| Type | Description |
|---|---|
| P5 | p5 instance |
mousePressed()
make the window fullscreen or revert to windowed
Parameters:
| Type | Description |
|---|---|
| P5 | p5 instance |