API Docs for: 1.13.1
Show:

game.Core Class

Defined in: engine/core.js:10
Module: game

Methods

addAsset

(
  • path
  • [id]
)
String

Defined in engine/core.js:219

Add asset to loader.

Parameters:

  • path String
  • [id] String optional

Returns:

String:

id

addAttributes

(
  • className
  • attributes
)

Defined in engine/core.js:720

Add attributes to class.

Parameters:

  • className String
  • attributes Object

addAudio

(
  • path
  • [id]
)
String

Defined in engine/core.js:230

Add audio to loader.

Parameters:

  • path String
  • [id] String optional

Returns:

String:

id

body

(
  • body
)

Defined in engine/core.js:331

Define body for module.

Parameters:

  • body Function

copy

(
  • object
)

Defined in engine/core.js:105

Copy object.

Parameters:

  • object Object

createClass

(
  • name
  • [extend]
  • content
)

Defined in engine/core.js:692

Create new class.

Parameters:

  • name String
  • [extend] String optional
  • content Object

createScene

(
  • name
  • content
)

Defined in engine/core.js:710

Create new scene.

Parameters:

  • name String
  • content Object

fullscreen

()

Defined in engine/core.js:201

Request fullscreen mode.

fullscreenSupport

() Boolean

Defined in engine/core.js:210

Test fullscreen support.

Returns:

Boolean:

Return true, if browser supports fullscreen mode.

getJSON

(
  • id
)

Defined in engine/core.js:96

Get JSON data.

Parameters:

  • id String

getTexture

(
  • id
)

Defined in engine/core.js:734

Get texture from texture cache.

Parameters:

  • id String

ksort

(
  • obj
  • [compare]
)

Defined in engine/core.js:163

Sort object by key names.

Parameters:

  • obj Object
  • [compare] Function optional

merge

(
  • to
  • from
)

Defined in engine/core.js:136

Merge objects.

Parameters:

  • to Object
  • from Object

module

(
  • name
)

Defined in engine/core.js:289

Define new module.

Parameters:

  • name String

removeAsset

(
  • id
)

Defined in engine/core.js:255

Remove asset from memory.

Parameters:

  • id String

removeAssets

()

Defined in engine/core.js:277

Remove all assets from memory.

require

(
  • modules
)

Defined in engine/core.js:318

Require module.

Parameters:

  • modules Array

Properties

debug

game.Debug

Defined in engine/core.js:48

Instance of game.Debug.

device

Object

Defined in engine/core.js:78

Device / browser information.

keyboard

game.Keyboard

Defined in engine/core.js:73

Instance of game.Keyboard.

pool

game.Pool

Defined in engine/core.js:63

Instance of game.Pool.

scale

Number

Defined in engine/core.js:38

Scale factor for Retina and HiRes mode.

scene

game.Scene

Defined in engine/core.js:43

Instance of current game.Scene.

sound

game.Audio

Defined in engine/core.js:58

Instance of game.Audio.

storage

game.Storage

Defined in engine/core.js:68

Instance of game.Storage.

system

game.System

Defined in engine/core.js:53

Instance of game.System.

TextureCache

Object

Provided by the renderer module.

Defined in engine/renderer.js:290

version

String

Defined in engine/core.js:14

Current engine version.