Class: darlingjs

darlingjs

The static facade of darlinjg engine.
Uses for creating modules and game world.

new darlingjs()

Source:
  • core/core.js, line 15

Members

<static> m

Create new Module
m is short form of function module

Source:
  • core/core.js, line 53
Example
 var m = darlingjs.module('theModule');

<static> w

Build World. Like a Module in AngularJS.
w is short form of function world

Source:
  • core/core.js, line 82
Example
 var world = darlingjs.world('theWorld', [
   'ngPhysics',
   'ngBox2DEmscripten',
   'ngFlatland',
   'ngPixijsAdapter']);

Methods

<static> noConflict() → {darlingjs}

Restores the previous global value of darlingjs and returns the current instance. Other libraries may already use the
darlingjs namespace. Or a previous version of darlingjs is already loaded on the page. In these cases you may want to
restore the previous namespace and keep a reference to darlingjs.

Source:
  • core/core.js, line 36
Returns:

The current darlingjs namespace

Type
darlingjs

<static> removeAllModules()

Remove all modules from engine

Source:
  • core/core.js, line 142

<static> removeAllWorlds()

Remove all worlds from engine

Source:
  • core/core.js, line 168

<static> removeModule(name)

Remove module from engine by name

Parameters:
Name Type Description
name String

The name of module

Source:
  • core/core.js, line 135

<static> removeWorld(value)

Remove world

Parameters:
Name Type Description
value String/World

The name or instance of world to remove

Source:
  • core/core.js, line 152

comments powered by Disqus