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