mirror of
https://github.com/photonstorm/phaser
synced 2024-11-10 07:04:31 +00:00
Revert define changes as they don't work
This commit is contained in:
parent
7959f373ac
commit
c445303ffb
57 changed files with 142 additions and 134 deletions
|
@ -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) => {
|
||||
|
|
|
@ -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) => {
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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) => {
|
||||
|
|
|
@ -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)
|
||||
})
|
||||
]
|
||||
};
|
||||
|
|
|
@ -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');
|
||||
|
||||
|
|
|
@ -101,7 +101,7 @@ var DebugHeader = function (game)
|
|||
}
|
||||
}
|
||||
|
||||
var fb = (typeof PLUGIN_FBINSTANT !== 'undefined') ? '-FB' : '';
|
||||
var fb = (typeof PLUGIN_FBINSTANT) ? '-FB' : '';
|
||||
|
||||
if (!config.hidePhaser)
|
||||
{
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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');
|
||||
}
|
||||
|
|
|
@ -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');
|
||||
}
|
||||
|
|
|
@ -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');
|
||||
}
|
||||
|
|
|
@ -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');
|
||||
}
|
||||
|
|
|
@ -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');
|
||||
}
|
||||
|
|
4
src/gameobjects/extern/ExternRender.js
vendored
4
src/gameobjects/extern/ExternRender.js
vendored
|
@ -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');
|
||||
}
|
||||
|
|
|
@ -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');
|
||||
}
|
||||
|
|
|
@ -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');
|
||||
}
|
||||
|
|
|
@ -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');
|
||||
|
|
|
@ -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');
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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');
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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');
|
||||
}
|
||||
|
|
|
@ -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');
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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');
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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');
|
||||
}
|
||||
|
|
|
@ -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');
|
||||
}
|
||||
|
|
|
@ -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');
|
||||
}
|
||||
|
|
|
@ -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');
|
||||
}
|
||||
|
|
|
@ -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');
|
||||
}
|
||||
|
|
|
@ -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');
|
||||
}
|
||||
|
|
|
@ -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');
|
||||
}
|
||||
|
|
|
@ -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');
|
||||
}
|
||||
|
|
|
@ -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');
|
||||
}
|
||||
|
|
|
@ -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');
|
||||
}
|
||||
|
|
|
@ -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');
|
||||
}
|
||||
|
|
|
@ -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');
|
||||
}
|
||||
|
|
|
@ -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');
|
||||
}
|
||||
|
|
|
@ -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' };
|
||||
}
|
||||
|
|
|
@ -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');
|
||||
}
|
||||
|
|
|
@ -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' };
|
||||
}
|
||||
|
|
|
@ -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');
|
||||
}
|
||||
|
|
|
@ -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');
|
||||
}
|
||||
|
|
|
@ -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');
|
||||
}
|
||||
|
|
|
@ -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');
|
||||
}
|
||||
|
|
|
@ -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');
|
||||
}
|
||||
|
|
|
@ -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');
|
||||
}
|
||||
|
|
|
@ -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');
|
||||
}
|
||||
|
|
|
@ -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');
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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';
|
||||
}
|
||||
|
|
|
@ -257,7 +257,7 @@ var Scene = new Class({
|
|||
*/
|
||||
this.matter;
|
||||
|
||||
if (typeof PLUGIN_FBINSTANT !== 'undefined')
|
||||
if (typeof PLUGIN_FBINSTANT)
|
||||
{
|
||||
/**
|
||||
* The Facebook Instant Games Plugin.
|
||||
|
|
|
@ -62,7 +62,7 @@ var Systems = new Class({
|
|||
*/
|
||||
this.renderer;
|
||||
|
||||
if (typeof PLUGIN_FBINSTANT !== 'undefined')
|
||||
if (typeof PLUGIN_FBINSTANT)
|
||||
{
|
||||
/**
|
||||
* The Facebook Instant Games Plugin.
|
||||
|
|
|
@ -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 };
|
||||
}
|
||||
|
|
|
@ -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');
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue