-
Notifications
You must be signed in to change notification settings - Fork 7.1k
/
DefaultPlugins.js
100 lines (84 loc) · 2.36 KB
/
DefaultPlugins.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
/**
* The Default Plugins.
*
* @namespace Phaser.Plugins.DefaultPlugins
* @memberof Phaser.Plugins
* @since 3.0.0
*/
var DefaultPlugins = {
/**
* These are the Global Managers that are created by the Phaser.Game instance.
* They are referenced from Scene.Systems so that plugins can use them.
*
* @name Phaser.Plugins.DefaultPlugins.Global
* @type {array}
* @since 3.0.0
*/
Global: [
'game',
'anims',
'cache',
'plugins',
'registry',
'scale',
'sound',
'textures',
'renderer'
],
/**
* These are the core plugins that are installed into every Scene.Systems instance, no matter what.
* They are optionally exposed in the Scene as well (see the InjectionMap for details)
*
* They are created in the order in which they appear in this array and EventEmitter is always first.
*
* @name Phaser.Plugins.DefaultPlugins.CoreScene
* @type {array}
* @since 3.0.0
*/
CoreScene: [
'EventEmitter',
'CameraManager',
'GameObjectCreator',
'GameObjectFactory',
'ScenePlugin',
'DisplayList',
'UpdateList'
],
/**
* These plugins are created in Scene.Systems in addition to the CoreScenePlugins.
*
* You can elect not to have these plugins by either creating a DefaultPlugins object as part
* of the Game Config, by creating a Plugins object as part of a Scene Config, or by modifying this array
* and building your own bundle.
*
* They are optionally exposed in the Scene as well (see the InjectionMap for details)
*
* They are always created in the order in which they appear in the array.
*
* @name Phaser.Plugins.DefaultPlugins.DefaultScene
* @type {array}
* @since 3.0.0
*/
DefaultScene: [
'Clock',
'DataManagerPlugin',
'InputPlugin',
'Loader',
'TweenManager',
'LightsPlugin'
]
};
if (typeof PLUGIN_CAMERA3D)
{
DefaultPlugins.DefaultScene.push('CameraManager3D');
}
if (typeof PLUGIN_FBINSTANT)
{
DefaultPlugins.Global.push('facebook');
}
module.exports = DefaultPlugins;