Revert define changes as they don't work

This commit is contained in:
Richard Davey 2024-02-21 13:23:52 +00:00
parent 7959f373ac
commit c445303ffb
57 changed files with 142 additions and 134 deletions

View file

@ -34,14 +34,14 @@ module.exports = [
plugins: [
new webpack.DefinePlugin({
CANVAS_RENDERER: JSON.stringify(true),
WEBGL_RENDERER: JSON.stringify(true),
WEBGL_DEBUG: JSON.stringify(false),
EXPERIMENTAL: JSON.stringify(true),
PLUGIN_3D: JSON.stringify(false),
PLUGIN_CAMERA3D: JSON.stringify(false),
PLUGIN_FBINSTANT: JSON.stringify(false),
FEATURE_SOUND: JSON.stringify(true)
"typeof CANVAS_RENDERER": JSON.stringify(true),
"typeof WEBGL_RENDERER": JSON.stringify(true),
"typeof WEBGL_DEBUG": JSON.stringify(false),
"typeof EXPERIMENTAL": JSON.stringify(true),
"typeof PLUGIN_3D": JSON.stringify(false),
"typeof PLUGIN_CAMERA3D": JSON.stringify(false),
"typeof PLUGIN_FBINSTANT": JSON.stringify(false),
"typeof FEATURE_SOUND": JSON.stringify(true)
}),
{
apply: (compiler) => {

View file

@ -34,14 +34,14 @@ module.exports = [
plugins: [
new webpack.DefinePlugin({
CANVAS_RENDERER: JSON.stringify(true),
WEBGL_RENDERER: JSON.stringify(true),
WEBGL_DEBUG: JSON.stringify(true),
EXPERIMENTAL: JSON.stringify(true),
PLUGIN_3D: JSON.stringify(false),
PLUGIN_CAMERA3D: JSON.stringify(false),
PLUGIN_FBINSTANT: JSON.stringify(false),
FEATURE_SOUND: JSON.stringify(true)
"typeof CANVAS_RENDERER": JSON.stringify(true),
"typeof WEBGL_RENDERER": JSON.stringify(true),
"typeof WEBGL_DEBUG": JSON.stringify(true),
"typeof EXPERIMENTAL": JSON.stringify(true),
"typeof PLUGIN_3D": JSON.stringify(false),
"typeof PLUGIN_CAMERA3D": JSON.stringify(false),
"typeof PLUGIN_FBINSTANT": JSON.stringify(false),
"typeof FEATURE_SOUND": JSON.stringify(true)
}),
{
apply: (compiler) => {

View file

@ -54,14 +54,14 @@ module.exports = [
plugins: [
new webpack.DefinePlugin({
CANVAS_RENDERER: JSON.stringify(true),
WEBGL_RENDERER: JSON.stringify(true),
WEBGL_DEBUG: JSON.stringify(false),
EXPERIMENTAL: JSON.stringify(false),
PLUGIN_3D: JSON.stringify(false),
PLUGIN_CAMERA3D: JSON.stringify(false),
PLUGIN_FBINSTANT: JSON.stringify(false),
FEATURE_SOUND: JSON.stringify(true)
"typeof CANVAS_RENDERER": JSON.stringify(true),
"typeof WEBGL_RENDERER": JSON.stringify(true),
"typeof WEBGL_DEBUG": JSON.stringify(false),
"typeof EXPERIMENTAL": JSON.stringify(false),
"typeof PLUGIN_3D": JSON.stringify(false),
"typeof PLUGIN_CAMERA3D": JSON.stringify(false),
"typeof PLUGIN_FBINSTANT": JSON.stringify(false),
"typeof FEATURE_SOUND": JSON.stringify(true)
}),
new CleanWebpackPlugin()

View file

@ -27,13 +27,13 @@ module.exports = {
plugins: [
new webpack.DefinePlugin({
CANVAS_RENDERER: JSON.stringify(true),
WEBGL_RENDERER: JSON.stringify(true),
EXPERIMENTAL: JSON.stringify(false),
PLUGIN_3D: JSON.stringify(false),
PLUGIN_CAMERA3D: JSON.stringify(false),
PLUGIN_FBINSTANT: JSON.stringify(true),
FEATURE_SOUND: JSON.stringify(true)
"typeof CANVAS_RENDERER": JSON.stringify(true),
"typeof WEBGL_RENDERER": JSON.stringify(true),
"typeof EXPERIMENTAL": JSON.stringify(false),
"typeof PLUGIN_3D": JSON.stringify(false),
"typeof PLUGIN_CAMERA3D": JSON.stringify(false),
"typeof PLUGIN_FBINSTANT": JSON.stringify(true),
"typeof FEATURE_SOUND": JSON.stringify(true)
}),
{
apply: (compiler) => {

View file

@ -44,13 +44,13 @@ module.exports = {
plugins: [
new webpack.DefinePlugin({
CANVAS_RENDERER: JSON.stringify(true),
WEBGL_RENDERER: JSON.stringify(true),
EXPERIMENTAL: JSON.stringify(false),
PLUGIN_3D: JSON.stringify(false),
PLUGIN_CAMERA3D: JSON.stringify(false),
PLUGIN_FBINSTANT: JSON.stringify(true),
FEATURE_SOUND: JSON.stringify(true)
"typeof CANVAS_RENDERER": JSON.stringify(true),
"typeof WEBGL_RENDERER": JSON.stringify(true),
"typeof EXPERIMENTAL": JSON.stringify(false),
"typeof PLUGIN_3D": JSON.stringify(false),
"typeof PLUGIN_CAMERA3D": JSON.stringify(false),
"typeof PLUGIN_FBINSTANT": JSON.stringify(true),
"typeof FEATURE_SOUND": JSON.stringify(true)
})
]
};

View file

@ -95,7 +95,7 @@ var CreateRenderer = function (game)
var CanvasRenderer;
var WebGLRenderer;
if (typeof WEBGL_RENDERER !== 'undefined' && typeof CANVAS_RENDERER !== 'undefined')
if (typeof WEBGL_RENDERER && typeof CANVAS_RENDERER)
{
CanvasRenderer = require('../renderer/canvas/CanvasRenderer');
WebGLRenderer = require('../renderer/webgl/WebGLRenderer');
@ -112,7 +112,7 @@ var CreateRenderer = function (game)
}
}
if (typeof WEBGL_RENDERER !== 'undefined' && !typeof CANVAS_RENDERER !== 'undefined')
if (typeof WEBGL_RENDERER && !typeof CANVAS_RENDERER)
{
WebGLRenderer = require('../renderer/webgl/WebGLRenderer');
@ -122,7 +122,7 @@ var CreateRenderer = function (game)
game.renderer = new WebGLRenderer(game);
}
if (!typeof WEBGL_RENDERER !== 'undefined' && typeof CANVAS_RENDERER !== 'undefined')
if (!typeof WEBGL_RENDERER && typeof CANVAS_RENDERER)
{
CanvasRenderer = require('../renderer/canvas/CanvasRenderer');

View file

@ -101,7 +101,7 @@ var DebugHeader = function (game)
}
}
var fb = (typeof PLUGIN_FBINSTANT !== 'undefined') ? '-FB' : '';
var fb = (typeof PLUGIN_FBINSTANT) ? '-FB' : '';
if (!config.hidePhaser)
{

View file

@ -28,12 +28,12 @@ var TextureManager = require('../textures/TextureManager');
var TimeStep = require('./TimeStep');
var VisibilityHandler = require('./VisibilityHandler');
if (typeof FEATURE_SOUND !== 'undefined')
if (typeof FEATURE_SOUND)
{
var SoundManagerCreator = require('../sound/SoundManagerCreator');
}
if (typeof PLUGIN_FBINSTANT !== 'undefined')
if (typeof PLUGIN_FBINSTANT)
{
var FacebookInstantGamesPlugin = require('../../plugins/fbinstant/src/FacebookInstantGamesPlugin');
}
@ -255,7 +255,7 @@ var Game = new Class({
*/
this.sound = null;
if (typeof FEATURE_SOUND !== 'undefined')
if (typeof FEATURE_SOUND)
{
this.sound = SoundManagerCreator.create(this);
}
@ -284,7 +284,7 @@ var Game = new Class({
*/
this.plugins = new PluginManager(this, this.config);
if (typeof PLUGIN_FBINSTANT !== 'undefined')
if (typeof PLUGIN_FBINSTANT)
{
/**
* An instance of the Facebook Instant Games Plugin.
@ -395,7 +395,7 @@ var Game = new Class({
this.events.emit(Events.BOOT);
if (typeof WEBGL_DEBUG !== 'undefined' && window)
if (typeof WEBGL_DEBUG && window)
{
window.PHASER_GAME = this;
}

View file

@ -8,12 +8,12 @@ var NOOP = require('../../../utils/NOOP');
var renderWebGL = NOOP;
var renderCanvas = NOOP;
if (typeof WEBGL_RENDERER !== 'undefined')
if (typeof WEBGL_RENDERER)
{
renderWebGL = require('./DynamicBitmapTextWebGLRenderer');
}
if (typeof CANVAS_RENDERER !== 'undefined')
if (typeof CANVAS_RENDERER)
{
renderCanvas = require('./DynamicBitmapTextCanvasRenderer');
}

View file

@ -8,12 +8,12 @@ var NOOP = require('../../../utils/NOOP');
var renderWebGL = NOOP;
var renderCanvas = NOOP;
if (typeof WEBGL_RENDERER !== 'undefined')
if (typeof WEBGL_RENDERER)
{
renderWebGL = require('./BitmapTextWebGLRenderer');
}
if (typeof CANVAS_RENDERER !== 'undefined')
if (typeof CANVAS_RENDERER)
{
renderCanvas = require('./BitmapTextCanvasRenderer');
}

View file

@ -8,12 +8,12 @@ var NOOP = require('../../utils/NOOP');
var renderWebGL = NOOP;
var renderCanvas = NOOP;
if (typeof WEBGL_RENDERER !== 'undefined')
if (typeof WEBGL_RENDERER)
{
renderWebGL = require('./BlitterWebGLRenderer');
}
if (typeof CANVAS_RENDERER !== 'undefined')
if (typeof CANVAS_RENDERER)
{
renderCanvas = require('./BlitterCanvasRenderer');
}

View file

@ -9,12 +9,12 @@ var NOOP = require('../../utils/NOOP');
var renderWebGL = NOOP;
var renderCanvas = NOOP;
if (typeof WEBGL_RENDERER !== 'undefined')
if (typeof WEBGL_RENDERER)
{
renderWebGL = require('./ContainerWebGLRenderer');
}
if (typeof CANVAS_RENDERER !== 'undefined')
if (typeof CANVAS_RENDERER)
{
renderCanvas = require('./ContainerCanvasRenderer');
}

View file

@ -8,12 +8,12 @@ var NOOP = require('../../utils/NOOP');
var renderWebGL = NOOP;
var renderCanvas = NOOP;
if (typeof WEBGL_RENDERER !== 'undefined')
if (typeof WEBGL_RENDERER)
{
renderWebGL = require('./DOMElementCSSRenderer');
}
if (typeof CANVAS_RENDERER !== 'undefined')
if (typeof CANVAS_RENDERER)
{
renderCanvas = require('./DOMElementCSSRenderer');
}

View file

@ -8,12 +8,12 @@ var NOOP = require('../../utils/NOOP');
var renderWebGL = NOOP;
var renderCanvas = NOOP;
if (typeof WEBGL_RENDERER !== 'undefined')
if (typeof WEBGL_RENDERER)
{
renderWebGL = require('./ExternWebGLRenderer');
}
if (typeof CANVAS_RENDERER !== 'undefined')
if (typeof CANVAS_RENDERER)
{
renderCanvas = require('./ExternCanvasRenderer');
}

View file

@ -8,7 +8,7 @@ var NOOP = require('../../utils/NOOP');
var renderWebGL = NOOP;
var renderCanvas = NOOP;
if (typeof WEBGL_RENDERER !== 'undefined')
if (typeof WEBGL_RENDERER)
{
renderWebGL = require('./GraphicsWebGLRenderer');
@ -16,7 +16,7 @@ if (typeof WEBGL_RENDERER !== 'undefined')
renderCanvas = require('./GraphicsCanvasRenderer');
}
if (typeof CANVAS_RENDERER !== 'undefined')
if (typeof CANVAS_RENDERER)
{
renderCanvas = require('./GraphicsCanvasRenderer');
}

View file

@ -8,12 +8,12 @@ var NOOP = require('../../utils/NOOP');
var renderWebGL = NOOP;
var renderCanvas = NOOP;
if (typeof WEBGL_RENDERER !== 'undefined')
if (typeof WEBGL_RENDERER)
{
renderWebGL = require('./ImageWebGLRenderer');
}
if (typeof CANVAS_RENDERER !== 'undefined')
if (typeof CANVAS_RENDERER)
{
renderCanvas = require('./ImageCanvasRenderer');
}

View file

@ -124,7 +124,7 @@ var GameObjects = {
};
// WebGL only Game Objects
if (typeof WEBGL_RENDERER !== 'undefined')
if (typeof WEBGL_RENDERER)
{
GameObjects.Shader = require('./shader/Shader');
GameObjects.Mesh = require('./mesh/Mesh');

View file

@ -8,12 +8,12 @@ var NOOP = require('../../utils/NOOP');
var renderWebGL = NOOP;
var renderCanvas = NOOP;
if (typeof WEBGL_RENDERER !== 'undefined')
if (typeof WEBGL_RENDERER)
{
renderWebGL = require('./LayerWebGLRenderer');
}
if (typeof CANVAS_RENDERER !== 'undefined')
if (typeof CANVAS_RENDERER)
{
renderCanvas = require('./LayerCanvasRenderer');
}

View file

@ -30,7 +30,7 @@ var GameObjectFactory = require('../GameObjectFactory');
*
* @return {Phaser.GameObjects.Mesh} The Game Object that was created.
*/
if (typeof WEBGL_RENDERER !== 'undefined')
if (typeof WEBGL_RENDERER)
{
GameObjectFactory.register('mesh', function (x, y, texture, frame, vertices, uvs, indicies, containsZ, normals, colors, alphas)
{

View file

@ -8,12 +8,12 @@ var NOOP = require('../../utils/NOOP');
var renderWebGL = NOOP;
var renderCanvas = NOOP;
if (typeof WEBGL_RENDERER !== 'undefined')
if (typeof WEBGL_RENDERER)
{
renderWebGL = require('./MeshWebGLRenderer');
}
if (typeof CANVAS_RENDERER !== 'undefined')
if (typeof CANVAS_RENDERER)
{
renderCanvas = require('./MeshCanvasRenderer');
}

View file

@ -94,7 +94,7 @@ var GameObjectFactory = require('../GameObjectFactory');
*
* @return {Phaser.GameObjects.NineSlice} The Game Object that was created.
*/
if (typeof WEBGL_RENDERER !== 'undefined')
if (typeof WEBGL_RENDERER)
{
GameObjectFactory.register('nineslice', function (x, y, texture, frame, width, height, leftWidth, rightWidth, topHeight, bottomHeight)
{

View file

@ -8,11 +8,19 @@ var NOOP = require('../../utils/NOOP');
var renderWebGL = NOOP;
var renderCanvas = NOOP;
if (typeof WEBGL_RENDERER !== 'undefined')
if (typeof WEBGL_RENDERER)
{
renderWebGL = require('./NineSliceWebGLRenderer');
}
<<<<<<< HEAD
=======
if (typeof CANVAS_RENDERER)
{
// renderCanvas = require('./MeshCanvasRenderer');
}
>>>>>>> parent of 7aaa976a4 (Updated webpack config DefinePlugin use and corresponding defs to allow those crazy souls who import source directly on node to have a better life #6644)
module.exports = {
renderWebGL: renderWebGL,

View file

@ -8,12 +8,12 @@ var NOOP = require('../../utils/NOOP');
var renderWebGL = NOOP;
var renderCanvas = NOOP;
if (typeof WEBGL_RENDERER !== 'undefined')
if (typeof WEBGL_RENDERER)
{
renderWebGL = require('./ParticleEmitterWebGLRenderer');
}
if (typeof CANVAS_RENDERER !== 'undefined')
if (typeof CANVAS_RENDERER)
{
renderCanvas = require('./ParticleEmitterCanvasRenderer');
}

View file

@ -8,7 +8,7 @@ var NOOP = require('../../utils/NOOP');
var renderWebGL = NOOP;
var renderCanvas = NOOP;
if (typeof WEBGL_RENDERER !== 'undefined')
if (typeof WEBGL_RENDERER)
{
renderWebGL = require('./PointLightWebGLRenderer');
}

View file

@ -27,7 +27,7 @@ var GameObjectFactory = require('../GameObjectFactory');
*
* @return {Phaser.GameObjects.Rope} The Game Object that was created.
*/
if (typeof WEBGL_RENDERER !== 'undefined')
if (typeof WEBGL_RENDERER)
{
GameObjectFactory.register('rope', function (x, y, texture, frame, points, horizontal, colors, alphas)
{

View file

@ -8,12 +8,12 @@ var NOOP = require('../../utils/NOOP');
var renderWebGL = NOOP;
var renderCanvas = NOOP;
if (typeof WEBGL_RENDERER !== 'undefined')
if (typeof WEBGL_RENDERER)
{
renderWebGL = require('./RopeWebGLRenderer');
}
if (typeof CANVAS_RENDERER !== 'undefined')
if (typeof CANVAS_RENDERER)
{
renderCanvas = require('./RopeCanvasRenderer');
}

View file

@ -26,7 +26,7 @@ var GameObjectFactory = require('../GameObjectFactory');
*
* @return {Phaser.GameObjects.Shader} The Game Object that was created.
*/
if (typeof WEBGL_RENDERER !== 'undefined')
if (typeof WEBGL_RENDERER)
{
GameObjectFactory.register('shader', function (key, x, y, width, height, textures, textureData)
{

View file

@ -8,12 +8,12 @@ var NOOP = require('../../utils/NOOP');
var renderWebGL = NOOP;
var renderCanvas = NOOP;
if (typeof WEBGL_RENDERER !== 'undefined')
if (typeof WEBGL_RENDERER)
{
renderWebGL = require('./ShaderWebGLRenderer');
}
if (typeof CANVAS_RENDERER !== 'undefined')
if (typeof CANVAS_RENDERER)
{
renderCanvas = require('./ShaderCanvasRenderer');
}

View file

@ -8,12 +8,12 @@ var NOOP = require('../../../utils/NOOP');
var renderWebGL = NOOP;
var renderCanvas = NOOP;
if (typeof WEBGL_RENDERER !== 'undefined')
if (typeof WEBGL_RENDERER)
{
renderWebGL = require('./ArcWebGLRenderer');
}
if (typeof CANVAS_RENDERER !== 'undefined')
if (typeof CANVAS_RENDERER)
{
renderCanvas = require('./ArcCanvasRenderer');
}

View file

@ -8,12 +8,12 @@ var NOOP = require('../../../utils/NOOP');
var renderWebGL = NOOP;
var renderCanvas = NOOP;
if (typeof WEBGL_RENDERER !== 'undefined')
if (typeof WEBGL_RENDERER)
{
renderWebGL = require('./CurveWebGLRenderer');
}
if (typeof CANVAS_RENDERER !== 'undefined')
if (typeof CANVAS_RENDERER)
{
renderCanvas = require('./CurveCanvasRenderer');
}

View file

@ -8,12 +8,12 @@ var NOOP = require('../../../utils/NOOP');
var renderWebGL = NOOP;
var renderCanvas = NOOP;
if (typeof WEBGL_RENDERER !== 'undefined')
if (typeof WEBGL_RENDERER)
{
renderWebGL = require('./EllipseWebGLRenderer');
}
if (typeof CANVAS_RENDERER !== 'undefined')
if (typeof CANVAS_RENDERER)
{
renderCanvas = require('./EllipseCanvasRenderer');
}

View file

@ -8,12 +8,12 @@ var NOOP = require('../../../utils/NOOP');
var renderWebGL = NOOP;
var renderCanvas = NOOP;
if (typeof WEBGL_RENDERER !== 'undefined')
if (typeof WEBGL_RENDERER)
{
renderWebGL = require('./GridWebGLRenderer');
}
if (typeof CANVAS_RENDERER !== 'undefined')
if (typeof CANVAS_RENDERER)
{
renderCanvas = require('./GridCanvasRenderer');
}

View file

@ -8,12 +8,12 @@ var NOOP = require('../../../utils/NOOP');
var renderWebGL = NOOP;
var renderCanvas = NOOP;
if (typeof WEBGL_RENDERER !== 'undefined')
if (typeof WEBGL_RENDERER)
{
renderWebGL = require('./IsoBoxWebGLRenderer');
}
if (typeof CANVAS_RENDERER !== 'undefined')
if (typeof CANVAS_RENDERER)
{
renderCanvas = require('./IsoBoxCanvasRenderer');
}

View file

@ -8,12 +8,12 @@ var NOOP = require('../../../utils/NOOP');
var renderWebGL = NOOP;
var renderCanvas = NOOP;
if (typeof WEBGL_RENDERER !== 'undefined')
if (typeof WEBGL_RENDERER)
{
renderWebGL = require('./IsoTriangleWebGLRenderer');
}
if (typeof CANVAS_RENDERER !== 'undefined')
if (typeof CANVAS_RENDERER)
{
renderCanvas = require('./IsoTriangleCanvasRenderer');
}

View file

@ -8,12 +8,12 @@ var NOOP = require('../../../utils/NOOP');
var renderWebGL = NOOP;
var renderCanvas = NOOP;
if (typeof WEBGL_RENDERER !== 'undefined')
if (typeof WEBGL_RENDERER)
{
renderWebGL = require('./LineWebGLRenderer');
}
if (typeof CANVAS_RENDERER !== 'undefined')
if (typeof CANVAS_RENDERER)
{
renderCanvas = require('./LineCanvasRenderer');
}

View file

@ -8,12 +8,12 @@ var NOOP = require('../../../utils/NOOP');
var renderWebGL = NOOP;
var renderCanvas = NOOP;
if (typeof WEBGL_RENDERER !== 'undefined')
if (typeof WEBGL_RENDERER)
{
renderWebGL = require('./PolygonWebGLRenderer');
}
if (typeof CANVAS_RENDERER !== 'undefined')
if (typeof CANVAS_RENDERER)
{
renderCanvas = require('./PolygonCanvasRenderer');
}

View file

@ -8,12 +8,12 @@ var NOOP = require('../../../utils/NOOP');
var renderWebGL = NOOP;
var renderCanvas = NOOP;
if (typeof WEBGL_RENDERER !== 'undefined')
if (typeof WEBGL_RENDERER)
{
renderWebGL = require('./RectangleWebGLRenderer');
}
if (typeof CANVAS_RENDERER !== 'undefined')
if (typeof CANVAS_RENDERER)
{
renderCanvas = require('./RectangleCanvasRenderer');
}

View file

@ -8,12 +8,12 @@ var NOOP = require('../../../utils/NOOP');
var renderWebGL = NOOP;
var renderCanvas = NOOP;
if (typeof WEBGL_RENDERER !== 'undefined')
if (typeof WEBGL_RENDERER)
{
renderWebGL = require('./StarWebGLRenderer');
}
if (typeof CANVAS_RENDERER !== 'undefined')
if (typeof CANVAS_RENDERER)
{
renderCanvas = require('./StarCanvasRenderer');
}

View file

@ -8,12 +8,12 @@ var NOOP = require('../../../utils/NOOP');
var renderWebGL = NOOP;
var renderCanvas = NOOP;
if (typeof WEBGL_RENDERER !== 'undefined')
if (typeof WEBGL_RENDERER)
{
renderWebGL = require('./TriangleWebGLRenderer');
}
if (typeof CANVAS_RENDERER !== 'undefined')
if (typeof CANVAS_RENDERER)
{
renderCanvas = require('./TriangleCanvasRenderer');
}

View file

@ -8,12 +8,12 @@ var NOOP = require('../../utils/NOOP');
var renderWebGL = NOOP;
var renderCanvas = NOOP;
if (typeof WEBGL_RENDERER !== 'undefined')
if (typeof WEBGL_RENDERER)
{
renderWebGL = require('./SpriteWebGLRenderer');
}
if (typeof CANVAS_RENDERER !== 'undefined')
if (typeof CANVAS_RENDERER)
{
renderCanvas = require('./SpriteCanvasRenderer');
}

View file

@ -1433,7 +1433,7 @@ var Text = new Class({
{
this.frame.source.glTexture = this.renderer.canvasToTexture(canvas, this.frame.source.glTexture, true);
if (typeof WEBGL_DEBUG !== 'undefined')
if (typeof WEBGL_DEBUG)
{
this.frame.glTexture.spectorMetadata = { textureKey: 'Text Game Object' };
}

View file

@ -8,12 +8,12 @@ var NOOP = require('../../utils/NOOP');
var renderWebGL = NOOP;
var renderCanvas = NOOP;
if (typeof WEBGL_RENDERER !== 'undefined')
if (typeof WEBGL_RENDERER)
{
renderWebGL = require('./TextWebGLRenderer');
}
if (typeof CANVAS_RENDERER !== 'undefined')
if (typeof CANVAS_RENDERER)
{
renderCanvas = require('./TextCanvasRenderer');
}

View file

@ -469,7 +469,7 @@ var TileSprite = new Class({
{
this.fillPattern = this.renderer.canvasToTexture(canvas, this.fillPattern);
if (typeof WEBGL_DEBUG !== 'undefined')
if (typeof WEBGL_DEBUG)
{
this.fillPattern.spectorMetadata = { textureKey: 'TileSprite Game Object' };
}

View file

@ -8,12 +8,12 @@ var NOOP = require('../../utils/NOOP');
var renderWebGL = NOOP;
var renderCanvas = NOOP;
if (typeof WEBGL_RENDERER !== 'undefined')
if (typeof WEBGL_RENDERER)
{
renderWebGL = require('./TileSpriteWebGLRenderer');
}
if (typeof CANVAS_RENDERER !== 'undefined')
if (typeof CANVAS_RENDERER)
{
renderCanvas = require('./TileSpriteCanvasRenderer');
}

View file

@ -8,12 +8,12 @@ var NOOP = require('../../utils/NOOP');
var renderWebGL = NOOP;
var renderCanvas = NOOP;
if (typeof WEBGL_RENDERER !== 'undefined')
if (typeof WEBGL_RENDERER)
{
renderWebGL = require('./VideoWebGLRenderer');
}
if (typeof CANVAS_RENDERER !== 'undefined')
if (typeof CANVAS_RENDERER)
{
renderCanvas = require('./VideoCanvasRenderer');
}

View file

@ -55,12 +55,12 @@ var Phaser = {
// Merge in the optional plugins and WebGL only features
if (typeof FEATURE_SOUND !== 'undefined')
if (typeof FEATURE_SOUND)
{
Phaser.Sound = require('./sound');
}
if (typeof PLUGIN_CAMERA3D !== 'undefined')
if (typeof PLUGIN_CAMERA3D)
{
Phaser.Cameras.Sprite3D = require('../plugins/camera3d/src');
Phaser.GameObjects.Sprite3D = require('../plugins/camera3d/src/sprite3d/Sprite3D');
@ -68,7 +68,7 @@ if (typeof PLUGIN_CAMERA3D !== 'undefined')
Phaser.GameObjects.Creators.Sprite3D = require('../plugins/camera3d/src/sprite3d/Sprite3DCreator');
}
if (typeof PLUGIN_FBINSTANT !== 'undefined')
if (typeof PLUGIN_FBINSTANT)
{
Phaser.FacebookInstantGamesPlugin = require('../plugins/fbinstant/src/FacebookInstantGamesPlugin');
}

View file

@ -103,7 +103,7 @@ var Phaser = {
// Merge in the optional plugins and WebGL only features
if (typeof FEATURE_SOUND !== 'undefined')
if (typeof FEATURE_SOUND)
{
Phaser.Sound = require('./sound');
}

View file

@ -52,12 +52,12 @@ var Phaser = {
// Merge in the optional plugins and WebGL only features
if (typeof FEATURE_SOUND !== 'undefined')
if (typeof FEATURE_SOUND)
{
Phaser.Sound = require('./sound');
}
if (typeof PLUGIN_CAMERA3D !== 'undefined')
if (typeof PLUGIN_CAMERA3D)
{
Phaser.Cameras.Sprite3D = require('../plugins/camera3d/src');
Phaser.GameObjects.Sprite3D = require('../plugins/camera3d/src/sprite3d/Sprite3D');
@ -65,7 +65,7 @@ if (typeof PLUGIN_CAMERA3D !== 'undefined')
Phaser.GameObjects.Creators.Sprite3D = require('../plugins/camera3d/src/sprite3d/Sprite3DCreator');
}
if (typeof PLUGIN_FBINSTANT !== 'undefined')
if (typeof PLUGIN_FBINSTANT)
{
Phaser.FacebookInstantGamesPlugin = require('../plugins/fbinstant/src/FacebookInstantGamesPlugin');
}

View file

@ -53,12 +53,12 @@ var Phaser = {
// Merge in the optional plugins and WebGL only features
if (typeof FEATURE_SOUND !== 'undefined')
if (typeof FEATURE_SOUND)
{
Phaser.Sound = require('./sound');
}
if (typeof PLUGIN_CAMERA3D !== 'undefined')
if (typeof PLUGIN_CAMERA3D)
{
Phaser.Cameras.Sprite3D = require('../plugins/camera3d/src');
Phaser.GameObjects.Sprite3D = require('../plugins/camera3d/src/sprite3d/Sprite3D');
@ -66,7 +66,7 @@ if (typeof PLUGIN_CAMERA3D !== 'undefined')
Phaser.GameObjects.Creators.Sprite3D = require('../plugins/camera3d/src/sprite3d/Sprite3DCreator');
}
if (typeof PLUGIN_FBINSTANT !== 'undefined')
if (typeof PLUGIN_FBINSTANT)
{
Phaser.FacebookInstantGamesPlugin = require('../plugins/fbinstant/src/FacebookInstantGamesPlugin');
}

View file

@ -87,12 +87,12 @@ var DefaultPlugins = {
};
if (typeof PLUGIN_CAMERA3D !== 'undefined')
if (typeof PLUGIN_CAMERA3D)
{
DefaultPlugins.DefaultScene.push('CameraManager3D');
}
if (typeof PLUGIN_FBINSTANT !== 'undefined')
if (typeof PLUGIN_FBINSTANT)
{
DefaultPlugins.Global.push('facebook');
}

View file

@ -19,12 +19,12 @@ module.exports = {
};
if (typeof CANVAS_RENDERER !== 'undefined')
if (typeof CANVAS_RENDERER)
{
module.exports.Canvas = require('./canvas');
}
if (typeof WEBGL_RENDERER !== 'undefined')
if (typeof WEBGL_RENDERER)
{
module.exports.WebGL = require('./webgl');
}

View file

@ -30,7 +30,7 @@ var WebGLUniformLocationWrapper = require('./wrappers/WebGLUniformLocationWrappe
var DEBUG = false;
if (typeof WEBGL_DEBUG !== 'undefined')
if (typeof WEBGL_DEBUG)
{
var SPECTOR = require('phaser3spectorjs');
DEBUG = true;

View file

@ -47,12 +47,12 @@ var InjectionMap = {
};
if (typeof PLUGIN_CAMERA3D !== 'undefined')
if (typeof PLUGIN_CAMERA3D)
{
InjectionMap.cameras3d = 'cameras3d';
}
if (typeof PLUGIN_FBINSTANT !== 'undefined')
if (typeof PLUGIN_FBINSTANT)
{
InjectionMap.facebook = 'facebook';
}

View file

@ -257,7 +257,7 @@ var Scene = new Class({
*/
this.matter;
if (typeof PLUGIN_FBINSTANT !== 'undefined')
if (typeof PLUGIN_FBINSTANT)
{
/**
* The Facebook Instant Games Plugin.

View file

@ -62,7 +62,7 @@ var Systems = new Class({
*/
this.renderer;
if (typeof PLUGIN_FBINSTANT !== 'undefined')
if (typeof PLUGIN_FBINSTANT)
{
/**
* The Facebook Instant Games Plugin.

View file

@ -255,7 +255,7 @@ var TextureSource = new Class({
this.glTexture = renderer.createTextureFromSource(image, width, height, scaleMode);
}
if (typeof WEBGL_DEBUG !== 'undefined')
if (typeof WEBGL_DEBUG)
{
this.glTexture.spectorMetadata = { textureKey: this.texture.key };
}

View file

@ -8,12 +8,12 @@ var NOOP = require('../utils/NOOP');
var renderWebGL = NOOP;
var renderCanvas = NOOP;
if (typeof WEBGL_RENDERER !== 'undefined')
if (typeof WEBGL_RENDERER)
{
renderWebGL = require('./TilemapLayerWebGLRenderer');
}
if (typeof CANVAS_RENDERER !== 'undefined')
if (typeof CANVAS_RENDERER)
{
renderCanvas = require('./TilemapLayerCanvasRenderer');
}