2
0
Fork 0
mirror of https://github.com/photonstorm/phaser synced 2024-12-29 06:23:30 +00:00
phaser/src/PixiDefaults.js

45 lines
1.1 KiB
JavaScript
Raw Normal View History

/* global Phaser:true */
/**
* @author Richard Davey <rich@photonstorm.com>
2016-04-04 21:15:01 +00:00
* @copyright 2016 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
// Pixi expects these globals to exist
if (PIXI.blendModes === undefined)
{
PIXI.blendModes = Phaser.blendModes;
}
if (PIXI.scaleModes === undefined)
{
PIXI.scaleModes = Phaser.scaleModes;
}
if (PIXI.Texture.emptyTexture === undefined)
{
PIXI.Texture.emptyTexture = new PIXI.Texture(new PIXI.BaseTexture());
}
if (PIXI.DisplayObject._tempMatrix === undefined)
{
PIXI.DisplayObject._tempMatrix = new PIXI.Matrix();
}
if (PIXI.RenderTexture.tempMatrix === undefined)
{
PIXI.RenderTexture.tempMatrix = new PIXI.Matrix();
}
2015-02-17 16:39:40 +00:00
2015-09-30 10:20:14 +00:00
if (PIXI.Graphics && PIXI.Graphics.POLY === undefined)
2015-02-17 16:39:40 +00:00
{
PIXI.Graphics.POLY = Phaser.POLYGON;
PIXI.Graphics.RECT = Phaser.RECTANGLE;
PIXI.Graphics.CIRC = Phaser.CIRCLE;
PIXI.Graphics.ELIP = Phaser.ELLIPSE;
PIXI.Graphics.RREC = Phaser.ROUNDEDRECTANGLE;
}
2015-05-14 15:50:27 +00:00
PIXI.TextureSilentFail = true;