From 11be5ebabcdab8272d938f7b90ef0ea9be29a421 Mon Sep 17 00:00:00 2001 From: Rubén Beltrán del Río Date: Fri, 20 Apr 2018 16:41:25 -0500 Subject: Initial Project Setup (#2) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 🔧 Add initial package.json * 🔧 Add eslint config * 🔧 Add assets target dir to gitignore * 🔧 Add webpack config * Add a contributing guide * Add the wrapper application * Add autogenerated docs * Add travis config * Add changelog --- doc/README.md | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 doc/README.md (limited to 'doc') diff --git a/doc/README.md b/doc/README.md new file mode 100644 index 0000000..2d79f30 --- /dev/null +++ b/doc/README.md @@ -0,0 +1,42 @@ + + +## Sumo +**Kind**: global class +**Properties** + +| Name | Type | Default | Description | +| --- | --- | --- | --- | +| [element] | HTMLElement | | the element in which to render. Required, will throw if not provided | +| [fps] | Number | 60 | the fps target to maintain | +| [verticalResolution] | Number | 224 | how many pixels to render in the vertical axis (gets scaled if the canvas is larger) | +| [aspectRatio] | Array.<Number> | [2.76, 1] | 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) + + + +### new Sumo(config) +Sumo - main entry point. Attached to window->load + + +| Param | Type | Description | +| --- | --- | --- | +| config | object | the configuration to extend the object | + + + +### 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 [Sumo](#Sumo) + + +### sumo.pauseLoop() +Pauses the loop + +**Kind**: instance method of [Sumo](#Sumo) -- cgit