Several userconfigurable variables
gamvas. | Several userconfigurable variables |
Variables | |
preventKeyEvents | Capture the whole documents key events? |
preventMouseEvents | Capture the whole documents mouse events? |
worldPerState | Use one physics world per game state? |
reverseLayerOrder | Reverse layer sorting |
preventKeyEvents: false
Capture the whole documents key events?
If true, every key event on the page will be handled by gamvas. This disables scrolling with cursor keys and other keyboard shortcuts. When false, only keys that are explicitly handled by the running game are not given to the browser, everything else is put through
false
preventMouseEvents: false
Capture the whole documents mouse events?
If true, every mouse event on the page will be handled by gamvas. You can not select input fields, or click on the scrollbar. When false, only if the event handler like for example <gamvas.actor.onKeyDown> returns false, the mouse event will not be put through to the browser.
false
reverseLayerOrder: false
Reverse layer sorting
The first versions of gamvas had a error, detected by forum user bogdanaslt, where the value of <gamvas.actor.layer> was the wrong way, so a background layer had to have a higher layer value then a foreground object to be rendered below the foreground object.
If you have used layers before introduction of this fix (0.8.3), you have to options, rearrange your code to work with the correct layering (as in layer 0 = background, layer 1 = before background, or you have to set this variable to true BEFORE starting gamvas to use the old - wrong - sorting.
false
Capture the whole documents key events?
preventKeyEvents: false
Capture the whole documents mouse events?
preventMouseEvents: false
Use one physics world per game state?
worldPerState: true
Reverse layer sorting
reverseLayerOrder: false