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
*/
this.vertexDirty = 0;
this._transformID = -1;
// Inherited from DisplayMode, set defaults
this.tint = 0xFFFFFF;
this.blendMode = BLEND_MODES.NORMAL;
/**
* Internal roundPixels field
*
* @member {boolean}
* @private
*/
this._roundPixels = settings.ROUND_PIXELS;
/**
* Batched UV's are cached for atlas textures
* @member {PIXI.MeshBatchUvs}
* @private
*/
this.batchUvs = null;
}
*/
this.pluginName = 'batch';
/**
* used to fast check if a sprite is.. a sprite!
* @member {boolean}
*/
this.isSprite = true;
/**
* Internal roundPixels field
*
* @member {boolean}
* @private
*/
this._roundPixels = settings.ROUND_PIXELS;
}
* The dirty state of this object.
*
* @member {boolean}
*/
this.dirty = false;
/**
* If true PixiJS will Math.floor() x/y values when rendering, stopping pixel interpolation.
* Advantages can include sharper image quality (like text) and faster rendering on canvas.
* The main disadvantage is movement of objects may appear less smooth.
* To set the global default, change {@link PIXI.settings.ROUND_PIXELS}
*
* @member {boolean}
* @default false
*/
this.roundPixels = settings.ROUND_PIXELS;
this.updateText();
}