Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
constructor(system, options)
{
super();
// Add the default render options
options = Object.assign({}, settings.RENDER_OPTIONS, options);
// Deprecation notice for renderer roundPixels option
if (options.roundPixels)
{
settings.ROUND_PIXELS = options.roundPixels;
deprecation('5.0.0', 'Renderer roundPixels option is deprecated, please use PIXI.settings.ROUND_PIXELS', 2);
}
/**
* The supplied constructor options.
*
* @member {Object}
* @readOnly
*/
this.options = options;
/**
* The type of the renderer.
*
* @member {number}
* @default PIXI.RENDERER_TYPE.UNKNOWN
* @see PIXI.RENDERER_TYPE
get()
{
deprecation(v5, 'PIXI.extras.BitmapText class has moved to PIXI.BitmapText');
return PIXI.BitmapText;
},
},
PIXI.Loader.addPixiMiddleware = function addPixiMiddleware(middleware)
{
deprecation(v5,
'PIXI.loaders.Loader.addPixiMiddleware function is deprecated, use PIXI.loaders.Loader.registerPlugin'
);
return PIXI.loaders.Loader.registerPlugin({ use: middleware() });
};
get()
{
deprecation('5.2.0', 'PIXI.GroupD8 namespace has moved to PIXI.groupD8');
return PIXI.groupD8;
},
},
PIXI.Container.prototype.renderAdvancedWebGL = function renderAdvancedWebGL(renderer)
{
deprecation(v5, 'PIXI.Container.renderAdvancedWebGL method has moved to PIXI.Container.renderAdvanced');
this.renderAdvanced(renderer);
};
get()
{
deprecation(v5, 'PIXI.utils.SVG_SIZE property has moved to PIXI.resources.SVGResource.SVG_SIZE');
return PIXI.SVGResource.SVG_SIZE;
},
},
BaseTexture.fromImage = function fromImage(canvas, crossorigin, scaleMode, scale)
{
deprecation(v5, 'PIXI.BaseTexture.fromImage method has been replaced with PIXI.BaseTexture.from');
const resourceOptions = { scale, crossorigin };
return BaseTexture.from(canvas, { scaleMode, resourceOptions });
};
get()
{
deprecation(v5, 'PIXI.loaders.parseBitmapFontData function has moved to PIXI.BitmapFontLoader.parse');
return PIXI.BitmapFontLoader.parse;
},
},
get()
{
deprecation(v5, 'PIXI.TRANSFORM_MODE property has been removed');
return { STATIC: 0, DYNAMIC: 1 };
},
},
get()
{
deprecation(v5, 'PIXI.extras.AnimatedSprite class has moved to PIXI.AnimatedSprite');
return PIXI.AnimatedSprite;
},
},