Skip to content

Commit d6ff9cf

Browse files
committed
FB Plugin moved to its own build file
1 parent c36a3b4 commit d6ff9cf

3 files changed

Lines changed: 13 additions & 23 deletions

File tree

src/boot/Game.js

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -25,18 +25,12 @@ var TextureManager = require('../textures/TextureManager');
2525
var TimeStep = require('./TimeStep');
2626
var VisibilityHandler = require('./VisibilityHandler');
2727

28-
2928
if (typeof EXPERIMENTAL)
3029
{
3130
var CreateDOMContainer = require('./CreateDOMContainer');
3231
var ScaleManager = require('./ScaleManager');
3332
}
3433

35-
if (typeof PLUGIN_FBINSTANT)
36-
{
37-
var FacebookInstantGamesPlugin = require('../../plugins/fbinstant/src/FacebookInstantGamesPlugin');
38-
}
39-
4034
/**
4135
* @classdesc
4236
* The Phaser.Game instance is the main controller for the entire Phaser game. It is responsible
@@ -276,18 +270,6 @@ var Game = new Class({
276270
*/
277271
this.plugins = new PluginManager(this, this.config);
278272

279-
if (typeof PLUGIN_FBINSTANT)
280-
{
281-
/**
282-
* An instance of the Facebook Instant Games Manager.
283-
*
284-
* @name Phaser.Game#facebook
285-
* @type {any}
286-
* @since 3.12.0
287-
*/
288-
this.facebook = new FacebookInstantGamesPlugin(this);
289-
}
290-
291273
/**
292274
* Is this Game pending destruction at the start of the next frame?
293275
*
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
/**
2+
* @author Richard Davey <rich@photonstorm.com>
3+
* @copyright 2018 Photon Storm Ltd.
4+
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
5+
*/
6+
7+
// We need everything from the phaser src file:
8+
9+
require('./phaser');
10+
11+
// Now merge in the plugin:
12+
13+
Phaser.FacebookInstantGamesPlugin = require('../plugins/fbinstant/src/FacebookInstantGamesPlugin');

src/phaser.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,6 @@ if (typeof PLUGIN_CAMERA3D)
5757
Phaser.GameObjects.Creators.Sprite3D = require('../plugins/camera3d/src/sprite3d/Sprite3DCreator');
5858
}
5959

60-
if (typeof PLUGIN_FBINSTANT)
61-
{
62-
Phaser.FBInstant = require('../plugins/fbinstant/src/FacebookInstantGamesPlugin');
63-
}
64-
6560
// Merge in the consts
6661

6762
Phaser = Extend(false, Phaser, CONST);

0 commit comments

Comments
 (0)