Core

Module: engine.game

Properties

_booted Boolean

(No description yet)

_coreModules Array

(No description yet)

_current Object

(No description yet)

_currentModule Object

(No description yet)

_DOMLoaded Boolean

(No description yet)

_fnTest Function

(No description yet)

_gameLoopId Number

(No description yet)

_gameLoops Object

(No description yet)

_gameModuleDefined Boolean

(No description yet)

_initializing Boolean

(No description yet)

_loadFinished Boolean

(No description yet)

_logoSource HTMLImageElement

(No description yet)

_moduleQueue Array

(No description yet)

_nocache String

(No description yet)

_waitForLoad Number

(No description yet)

audio Audio

Instance of Audio class.

config Object

Game config.

debug Debug

Instance of Debug class.

device Object

Device information.

input Input

Instance of Input class.

isStarted Boolean (Default: false)

Is engine started.

json Object

List of JSON files.

keyboard Keyboard

Instance of Keyboard class.

logo Texture

Texture of Panda 2 logo.

mediaQueue Array

Media load queue.

modules Object

List of modules.

paths Object

List of asset paths.

plugins Object

List of plugins.

pool Pool

Instance of Pool class.

renderer Renderer

Instance of Renderer class.

scale Number (Default: 1)

Scale multiplier for Retina and HiRes mode.

storage Storage

Instance of Storage class.

system System

Instance of System class.

version String

Engine version.

Methods

_boot()

(No description yet)

_clearGameLoop()

(No description yet)

_DOMReady()

(No description yet)

_getFilePath(file) String

(No description yet)

Parameters:

  • file String
_getId(path) String

(No description yet)

Parameters:

  • path String
_getVendorAttribute(el, attr) Object

(No description yet)

Parameters:

  • el Object
  • attr String
_loadDeviceInformation()

(No description yet)

_loadModules()

(No description yet)

_loadNativeExtensions()

(No description yet)

_loadScript()

(No description yet)

_normalizeVendorAttribute(el, attr)

(No description yet)

Parameters:

  • el Object
  • attr String
_ready()

Called, when all modules are loaded.

_readyLogo()

Called, when logo source is loaded.

_scriptLoaded()

(No description yet)

_setGameLoop() Number

(No description yet)

_setVendorAttribute(el, attr, val)

(No description yet)

Parameters:

  • el Object
  • attr String
  • val *
addAsset(filename, [id])

Add asset to load queue. If not id defined, filename will be used as id.

Parameters:

  • filename String
  • id String (optional)
addAttributes(className, attributes)

Add attributes to class.

Parameters:

  • className String
  • attributes Object
body(body)

Define body for module.

Parameters:

  • body Function
copy(object) Object

Copy object.

Parameters:

  • object Object
createClass(name, [extend], content) Class

Create new class.

Parameters:

  • name String
  • extend String (optional)
  • content Object
createScene(name, [extend], content) Scene

Create new scene.

Parameters:

  • name String
  • extend String (optional)
  • content Object
defineProperties(className, properties)

Define properties to class with get and set functions.

Parameters:

  • className String
  • properties Object
getJSON(id) Object

Get JSON data.

Parameters:

  • id String
injectClass(name, content) Class

Inject class.

Parameters:

  • name String
  • content Object
ksort(obj, [compare]) Object

Sort object by key names.

Parameters:

  • obj Object
  • compare Function (optional)
merge(to, from) Object

Merge objects.

Parameters:

  • to Object
  • from Object
module(name)

Define new module.

Parameters:

  • name String
onReady()

Called, when all modules are loaded.

onStart()

Called, when engine is started.

removeAllAssets()

Remove all assets from memory.

removeAsset(id)

Remove asset from memory.

Parameters:

  • id String
require(modules)

Require module.

Parameters:

  • modules Array
screenshot(callback, [x], [y], [width], [height])

Take screenshot from the game.

Parameters:

  • callback Function
  • x Number (optional)
  • y Number (optional)
  • width Number (optional)
  • height Number (optional)
start()

Start engine. By default, this is called automatically.