test doc structure

This commit is contained in:
Jack Armitage
2019-03-20 11:04:42 +00:00
parent 4c56b8fe20
commit dfb00c640a
4 changed files with 215 additions and 42 deletions

View File

@@ -1,29 +1,36 @@
# Global variables
## Global variables
Useful variables that are defined globally, and can be used within functions as a parameter.
- [mouse](#mouse)
- [time](#time)
---
### mouse
* .x :: x position of mouse
* .y :: y position of mouse
Example:
- Control the oscillator frequency with the mouse position:
```
`mouse`
* `.x` :: x position of mouse
* `.y` :: y position of mouse
#### Example
Control the oscillator frequency with the mouse position:
```javascript
osc(() => mouse.x).out(o0)
```
### time
Example:
- Control the oscillator using a sine wave based on the current time:
```
osc(
({time}) => Math.sin(time)
)
`time`
* `time` :: the current time
#### Example
Control the oscillator using a sine wave based on the current time:
```javascript
osc( ({time}) => Math.sin(time) )
.out(o0)
```