blob: 2d79f303c85fad80b3489e3e5782b3bbffe7ee31 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
<a name="Sumo"></a>
## Sumo
**Kind**: global class
**Properties**
| Name | Type | Default | Description |
| --- | --- | --- | --- |
| [element] | <code>HTMLElement</code> | <code></code> | the element in which to render. Required, will throw if not provided |
| [fps] | <code>Number</code> | <code>60</code> | the fps target to maintain |
| [verticalResolution] | <code>Number</code> | <code>224</code> | how many pixels to render in the vertical axis (gets scaled if the canvas is larger) |
| [aspectRatio] | <code>Array.<Number></code> | <code>[2.76, 1]</code> | the aspect ratio experssed as an array of two numbers, where aspect ratio x:y is [x, y] (eg. [16, 9]) |
* [Sumo](#Sumo)
* [new Sumo(config)](#new_Sumo_new)
* [.startLoop()](#Sumo+startLoop)
* [.pauseLoop()](#Sumo+pauseLoop)
<a name="new_Sumo_new"></a>
### new Sumo(config)
Sumo - main entry point. Attached to window->load
| Param | Type | Description |
| --- | --- | --- |
| config | <code>object</code> | the configuration to extend the object |
<a name="Sumo+startLoop"></a>
### sumo.startLoop()
Starts the main loop. Resets the FPS (if you change it it won't go
live until after you stop and start the loop)
**Kind**: instance method of [<code>Sumo</code>](#Sumo)
<a name="Sumo+pauseLoop"></a>
### sumo.pauseLoop()
Pauses the loop
**Kind**: instance method of [<code>Sumo</code>](#Sumo)
|