Members
-
<static> AUTO_CRISP_SCALING :Boolean
-
Whether to automatically switch to crisp scaling when game scale goes above 1.
- Default Value:
- true
- Source:
-
<static> AUTO_SORT_LAYERS :Boolean
-
Whether to automatically sort layers.
- Default Value:
- false
- Source:
-
<static> AUTO_SORT_OVERLAY_LAYER :Boolean
-
Whether to automatically sort overlay layer.
- Default Value:
- true
- Source:
-
<static> AUTO_SORT_UI_LAYER :Boolean
-
Whether to automatically sort ui layer.
- Default Value:
- true
- Source:
-
<static> AUTO_SPAWN_PLAYER :Boolean
-
Whether game should autospawn player when a new level is loaded.
- Default Value:
- true
- Source:
-
<static> CLEAR_COLOR :String
-
Color to clear screen with.
- Default Value:
- #000000
- Source:
-
<static> CLEAR_ON_LOAD_UI_LAYER :Boolean
-
Whether ui layer clears between levels. Tip: set this to true if your UI should be destroyed when changing levels.
- Default Value:
- false
- Source:
-
<static> DIMMED_PAUSE :Boolean
-
Whether game should dim on pause via overlay.
- Default Value:
- true
- Source:
-
<static> DIMMER_ALPHA :Number
-
Alpha of pause dimmer overlay.
- Default Value:
- 0.75
- Source:
-
<static> DIMMER_B :Number
-
Blue between 0 and 1 of dimmer overlay.
- Default Value:
- 51
- Source:
-
<static> DIMMER_COLOR :String
-
Color of pause dimmer overlay.
- Default Value:
- #333333
- Source:
-
<static> DIMMER_G :Number
-
Green between 0 and 1 of dimmer overlay.
- Default Value:
- 51
- Source:
-
<static> DIMMER_R :Number
-
Red between 0 and 1 of dimmer overlay.
- Default Value:
- 51
- Source:
-
<static> DURATION_FADE :Number
-
Fade tween duration.
- Default Value:
- 300
- Source:
-
<static> DURATION_THROTTLE :Number
-
Function throttle duration.
- Default Value:
- 500
- Source:
- See:
-
<static> DURATION_THROTTLE_MEDIUM :Number
-
Function throttle duration medium.
- Default Value:
- 250
- Source:
- See:
-
<static> DURATION_THROTTLE_SHORT :Number
-
Function throttle duration short.
- Default Value:
- 60
- Source:
- See:
-
<static> DURATION_TWEEN :Number
-
General tween duration.
- Default Value:
- 500
- Source:
-
<static> DYNAMIC :String
-
Performance level where entities move and have full physics / collisions.
- Default Value:
- dynamic
- Source:
-
<static> FLIP_Y :boolean
-
Whether to flip animations on the Y-axis when moving up. IMPORTANT: this config value is deprecated, use ig.CONFIG.ENTITY.CAN_FLIP_Y instead.
- Source:
-
<static> FORCE_ENTITY_EXTENDED :Boolean
-
Whether to force all entities to inherit or extend ig.EntityExtended.
- Default Value:
- true
- Source:
-
<static> GAME_HEIGHT :Number
-
Base height of game.
- Default Value:
- ig.ua.viewport.height
- Source:
-
<static> GAME_HEIGHT_PCT :Number
-
What percent of window height to fill, where 0 = keep base size. IMPORTANT: this overrides ig.CONFIG.GAME_HEIGHT to dynamically set size.
- Default Value:
- 0
- Source:
-
<static> GAME_HEIGHT_VIEW :Number
-
Approximate number of pixels to keep in view on height, where 0 = does not matter. IMPORTANT: this overrides ig.CONFIG.SCALE to dynamically set scale on resize.
- Default Value:
- 0
- Source:
-
<static> GAME_WIDTH :Number
-
Base width of game.
- Default Value:
- ig.ua.viewport.width
- Source:
-
<static> GAME_WIDTH_PCT :Number
-
What percent of window width to fill, where 0 = keep base size. IMPORTANT: this overrides ig.CONFIG.GAME_WIDTH to dynamically set size.
- Default Value:
- 0
- Source:
-
<static> GAME_WIDTH_VIEW :Number
-
Approximate number of pixels to keep in view on width, where 0 = does not matter. IMPORTANT: this overrides ig.CONFIG.SCALE to dynamically set scale on resize.
- Default Value:
- 0
- Source:
-
<static> GRAVITY :Number
-
Magnitude of gravity in down direction.
- Default Value:
- 400
- Source:
-
<static> IGNORE_PAUSE_OVERLAY_LAYER :Boolean
-
Whether overlay layer ignores game pause.
- Default Value:
- false
- Source:
-
<static> IGNORE_PAUSE_UI_LAYER :Boolean
-
Whether ui layer ignores game pause.
- Default Value:
- true
- Source:
-
<static> LAYERS_CUSTOM :Object
-
Custom layers to be added to game.
- Source:
// adds a new layer with the name of 'foo' and sorted to top LAYERS_CUSTOM = { foo: { zIndex: 3 } };
-
<static> LEVEL_MAX :Number
-
Max power / rank level in game. Be careful about going over 9000, as it may break things.
- Default Value:
- 4
- Source:
-
<static> LOADER_BAR :Boolean
-
Whether loader has a bar to show progress, placed in center of loader.
- Default Value:
- true
- Source:
-
<static> LOADER_BAR_COLOR :String
-
Loader progress bar color.
- Default Value:
- #DDDDDD
- Source:
-
<static> LOADER_BAR_HEIGHT_PCT :Number
-
Height, in percent, of loader progress bar relative to canvas height.
- Default Value:
- 0.025
- Source:
-
<static> LOADER_BAR_LINE_WIDTH :Number
-
Loader progress outline width.
- Default Value:
- 3
- Source:
-
<static> LOADER_BAR_SPACE_PCT :Number
-
Space between loader progress bar outline and progress, in percent of canvas size.
- Default Value:
- 0.005
- Source:
-
<static> LOADER_BAR_WIDTH_PCT :Number
-
Width, in percent, of loader progress bar relative to canvas height.
- Default Value:
- 0.25
- Source:
-
<static> LOADER_BG_COLOR :String
-
Loader background color.
- Default Value:
- #111111
- Source:
-
<static> LOADER_FADE_COLOR :String
-
Loader fade color.
- Default Value:
- #DDDDDD
- Source:
-
<static> LOADER_LOGO_SRC_ALT :String
-
Alt base64 image logo for loader. Placed in bottom center of loader.
- Source:
-
<static> LOADER_LOGO_SRC_MAIN :String
-
Main base64 image logo for loader. Placed in top center of loader.
- Source:
-
<static> LOADER_MAX_HEIGHT_PCT :Number
-
Max percent of canvas height that loader can take up. Loader will be scaled down to stay below this.
- Default Value:
- 0.5
- Source:
-
<static> LOADER_MAX_WIDTH_PCT :Number
-
Max percent of canvas width that loader can take up. Loader will be scaled down to stay below this.
- Default Value:
- 0.5
- Source:
-
<static> LOADER_SPACE_PCT :Number
-
Percent of canvas to use as spacing between loader elements.
- Default Value:
- 0.02
- Source:
-
<static> MIN_TIME_STEP :Number
-
Minimum time step for better battery life and more stable framerate. Defaults to 60 fps on desktop and 30 fps on mobile.
- Source:
-
<static> MOVABLE :String
-
Performance level where entities move and collide only with other entities, but have no physics step such as velocity, accel, and collision map.
- Default Value:
- movable
- Source:
-
<static> NO_UPDATE_BACKGROUND_LAYER :Boolean
-
Whether background layer skips update.
- Default Value:
- true
- Source:
-
<static> NO_UPDATE_FOREGROUND_LAYER :Boolean
-
Whether foreground layer skips update.
- Default Value:
- true
- Source:
-
<static> PATH_TO_MEDIA :String
-
Media base directory. Used for dynamic media loading upon class instantiation.
- Default Value:
- media/
- Source:
-
<static> PRECISION_PCT_ONE_SIDED :Number
-
Precision when checking collision of one sided entities.
- Default Value:
- 0.01
- Source:
-
<static> PRECISION_ZERO :Number
-
Precision when checking if numbers are close enough to zero.
- Default Value:
- 0.01
- Source:
-
<static> PRECISION_ZERO_TWEEN :Number
-
Precision when checking if numbers are close enough to zero during a tween.
- Default Value:
- 0.1
- Source:
-
<static> PRERENDER_BACKGROUND_LAYER :Boolean
-
Whether to set background layer to automatically prerender maps.
- Default Value:
- true
- Source:
-
<static> PRERENDER_FOREGROUND_LAYER :Boolean
-
Whether to set foreground layer to automatically prerender maps.
- Default Value:
- true
- Source:
-
<static> PRERENDER_MAPS :Boolean
-
Whether to automatically prerender maps.
- Default Value:
- true
- Source:
-
<static> RANKS :Array
-
Ranks in an array for easy iteration.
- Source:
-
<static> RANKS_MAP :Object
-
Map of ranks based on max level.
- Source:
Properties:
Name Type Description NONE
Number 0 EASY
Number max level * 0.25 MEDIUM
Number max level * 0.5 HARD
Number max level * 0.75 IMPOSSIBLE
Number max level -
<static> RESIZE_DELAY :Number
-
Delay in milliseconds to wait after window is resized to actually resize game.
- Default Value:
- 500
- Source:
-
<static> SCALE :Number
-
Base scale of game.
- Default Value:
- 1
- Source:
-
<static> SCALE_MAX :Number
-
Maximum scale of game.
- Source:
-
<static> SCALE_MIN :Number
-
Minimum scale of game.
- Default Value:
- 1
- Source:
-
<static> STATIC :String
-
Performance level where entities never move.
- Default Value:
- static
- Source:
-
<static> TOP_DOWN :boolean
-
Whether the game is in a top-down perspective.
- Source:
-
<static> TRANSITION_LEVELS :Boolean
-
Whether game should fade transition between levels.
- Default Value:
- true
- Source:
-
<static> TRANSITIONER_B :Number
-
Blue between 0 and 1 of transitioner.
- Default Value:
- 51
- Source:
-
<static> TRANSITIONER_COLOR :String
-
Color of level transitioner overlay.
- Default Value:
- #333333
- Source:
-
<static> TRANSITIONER_G :Number
-
Green between 0 and 1 of transitioner.
- Default Value:
- 51
- Source:
-
<static> TRANSITIONER_LAYER :String
-
Layer to add level transitioner overlay to.
- Default Value:
- ui
- Source:
-
<static> TRANSITIONER_R :Number
-
Red between 0 and 1 of transitioner.
- Default Value:
- 51
- Source:
-
<static> Z_INDEX_ABOVE_ALL :Number
-
Z index for sorting entities above all others.
- Default Value:
- 9999
- Source:
-
<static> Z_INDEX_ABOVE_PLAYER :Number
-
Z index for sorting entities above player.
- Default Value:
- 200
- Source:
-
<static> Z_INDEX_BELOW_ALL :Number
-
Z index for sorting entities below anything else.
- Source:
-
<static> Z_INDEX_BELOW_PLAYER :Number
-
Z index for sorting entities below player.
- Default Value:
- 0
- Source:
-
<static> Z_INDEX_PLAYER :Number
-
Z index for player, ideally above most other entities.
- Default Value:
- 100
- Source:
-
<static> Z_INDEX_TRANSITIONER :Number
-
Z index of level transitioner.
- Source: