File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ // These plugins are created in Scene.Systems by default, in addition to the CoreScenePlugins.
2+ // You can elect not to have these plugins by either creating a DefaultPlugins object as part
3+ // of the Game Config, or by creating a Plugins object as part of a Scene Config.
4+ // They are optionally exposed in the Scene as well (see the InjectionMap for details)
5+
6+ // They are always created in the order in which they appear in the array.
7+
8+ // TODO - Add Data
9+
10+ var DefaultScenePlugins = [
11+
12+ 'Clock' ,
13+ 'InputPlugin' ,
14+ 'Loader' ,
15+ 'TweenManager'
16+
17+ ] ;
18+
19+ module . exports = DefaultScenePlugins ;
Original file line number Diff line number Diff line change 11var Class = require ( '../utils/Class' ) ;
22var CONST = require ( '../const' ) ;
3+ var DefaultScenePlugins = require ( '../DefaultScenePlugins' ) ;
34var GetValue = require ( '../utils/object/GetValue' ) ;
45var MATH = require ( '../math/const' ) ;
56var NOOP = require ( '../utils/NOOP' ) ;
@@ -181,6 +182,9 @@ var Config = new Class({
181182 this . physics = GetValue ( config , 'physics' , { } ) ;
182183 this . defaultPhysicsSystem = GetValue ( this . physics , 'default' , false ) ;
183184
185+ // Scene Plugins
186+ this . defaultPlugins = GetValue ( config , 'plugins' , DefaultScenePlugins ) ;
187+
184188 // Default / Missing Images
185189 var pngPrefix = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAg' ;
186190
You can’t perform that action at this time.
0 commit comments