Commit acfdb851 authored by loelkes's avatar loelkes
Browse files

documentation

parent aa0bda33
# zkmtools
Usefull things for JavaScript.
## Installation
You can install this module with
```
yarn add https://url-to-this-repository...
```
## ToDo
* Allow any kind of event for the setupPointerLock() callback
* Enable element selection for FullscreenUtils.request()
## Documentation
### blink( target, interval, duration )
This toggles the _.visible_ attribute of _target_ with the interval _interval_ (milliseconds) for the duration _duration_ (milliseconds).
### getRandomInt( min, max )
Returns a random integer between _min_ (inclusive) and _max_ (exclusive). Default is min=0 and max=10.
### getRandomArbitrary( min, max )
Returns a random float between _min_ (inclusive) and _max_ (exclusive). Default is min=0, max=1.
### getMaxOfArray( numArray )
Get the maximum value from an array of values.
### getMinOfArray( numArray)
Get the minim value from an array of values.
### getQueryVariable( variableName, fallbackValue )
Returns HTTP GET value for _variableName_ form the current _window.location_ or _fallbackValue_ if _variableName_ is not set or found.
### setupPointerLock( target, callback )
Request a pointer lock for any element _target_ and execute _callback_ on the **mousemove** event.
### FullscreenUtils()
#### Static methods
##### .toogle()
Toggle between the fullscreen mode.
##### .request()
Request the element (_document_) to go fullscreen.
Request the element **document** to go fullscreen.
##### .close()
Close the fullscreen mode.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment