Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
* A map of renderer IDs to webgl buffer
*
* @private
* @member {object}
*/
this._glBuffers = {};
this._updateID = 0;
this.index = index;
this.static = _static;
this.id = UID++;
this.disposeRunner = new Runner('disposeBuffer', 2);
}
* are assigned to each system created.
* @see PIXI.Runner
* @name PIXI.Renderer#runners
* @private
* @type {object}
* @readonly
* @property {PIXI.Runner} destroy - Destroy runner
* @property {PIXI.Runner} contextChange - Context change runner
* @property {PIXI.Runner} reset - Reset runner
* @property {PIXI.Runner} update - Update runner
* @property {PIXI.Runner} postrender - Post-render runner
* @property {PIXI.Runner} prerender - Pre-render runner
* @property {PIXI.Runner} resize - Resize runner
*/
this.runners = {
destroy: new Runner('destroy'),
contextChange: new Runner('contextChange', 1),
reset: new Runner('reset'),
update: new Runner('update'),
postrender: new Runner('postrender'),
prerender: new Runner('prerender'),
resize: new Runner('resize', 2),
};
/**
* Global uniforms
* @member {PIXI.UniformGroup}
*/
this.globalUniforms = new UniformGroup({
projectionMatrix: new Matrix(),
}, true);
* @member {number}
* @protected
*/
this.dirtyId = 0;
/**
* WebGL Renderbuffer object.
*/
this.glRenderbuffer = null;
/**
* Runs when this renderbuffer is disposed.
*
* @member {PIXI.Runner}
*/
this.disposeRunner = new Runner('disposeRenderbuffer', 2);
/**
* Fast way to check if this is a renderbuffer.
*
* @member {boolean}
*/
this.isRenderbuffer = true;
}
/**
* Mini-runner for handling update events
*
* @member {Runner}
* @private
*/
this.onUpdate = new Runner('update');
/**
* Handle internal errors, such as loading errors
*
* @member {Runner}
* @private
*/
this.onError = new Runner('onError', 1);
}
* @type {object}
* @readonly
* @property {PIXI.Runner} destroy - Destroy runner
* @property {PIXI.Runner} contextChange - Context change runner
* @property {PIXI.Runner} reset - Reset runner
* @property {PIXI.Runner} update - Update runner
* @property {PIXI.Runner} postrender - Post-render runner
* @property {PIXI.Runner} prerender - Pre-render runner
* @property {PIXI.Runner} resize - Resize runner
*/
this.runners = {
destroy: new Runner('destroy'),
contextChange: new Runner('contextChange', 1),
reset: new Runner('reset'),
update: new Runner('update'),
postrender: new Runner('postrender'),
prerender: new Runner('prerender'),
resize: new Runner('resize', 2),
};
/**
* Global uniforms
* @member {PIXI.UniformGroup}
*/
this.globalUniforms = new UniformGroup({
projectionMatrix: new Matrix(),
}, true);
/**
* Mask system instance
* @member {PIXI.systems.MaskSystem} mask
* @memberof PIXI.Renderer#
* @see PIXI.Runner
* @name PIXI.Renderer#runners
* @private
* @type {object}
* @readonly
* @property {PIXI.Runner} destroy - Destroy runner
* @property {PIXI.Runner} contextChange - Context change runner
* @property {PIXI.Runner} reset - Reset runner
* @property {PIXI.Runner} update - Update runner
* @property {PIXI.Runner} postrender - Post-render runner
* @property {PIXI.Runner} prerender - Pre-render runner
* @property {PIXI.Runner} resize - Resize runner
*/
this.runners = {
destroy: new Runner('destroy'),
contextChange: new Runner('contextChange', 1),
reset: new Runner('reset'),
update: new Runner('update'),
postrender: new Runner('postrender'),
prerender: new Runner('prerender'),
resize: new Runner('resize', 2),
};
/**
* Global uniforms
* @member {PIXI.UniformGroup}
*/
this.globalUniforms = new UniformGroup({
projectionMatrix: new Matrix(),
}, true);
/**
* @type {object}
*/
this.glVertexArrayObjects = {};
this.id = UID++;
this.instanced = false;
/**
* Number of instances in this geometry, pass it to `GeometrySystem.draw()`
* @member {number}
* @default 1
*/
this.instanceCount = 1;
this.disposeRunner = new Runner('disposeGeometry', 2);
/**
* Count of existing (not destroyed) meshes that reference this geometry
* @member {number}
*/
this.refCount = 0;
}
* @private
* @type {object}
* @readonly
* @property {PIXI.Runner} destroy - Destroy runner
* @property {PIXI.Runner} contextChange - Context change runner
* @property {PIXI.Runner} reset - Reset runner
* @property {PIXI.Runner} update - Update runner
* @property {PIXI.Runner} postrender - Post-render runner
* @property {PIXI.Runner} prerender - Pre-render runner
* @property {PIXI.Runner} resize - Resize runner
*/
this.runners = {
destroy: new Runner('destroy'),
contextChange: new Runner('contextChange', 1),
reset: new Runner('reset'),
update: new Runner('update'),
postrender: new Runner('postrender'),
prerender: new Runner('prerender'),
resize: new Runner('resize', 2),
};
/**
* Global uniforms
* @member {PIXI.UniformGroup}
*/
this.globalUniforms = new UniformGroup({
projectionMatrix: new Matrix(),
}, true);
/**
* Mask system instance
* @member {PIXI.systems.MaskSystem} mask
* @readonly
* @property {PIXI.Runner} destroy - Destroy runner
* @property {PIXI.Runner} contextChange - Context change runner
* @property {PIXI.Runner} reset - Reset runner
* @property {PIXI.Runner} update - Update runner
* @property {PIXI.Runner} postrender - Post-render runner
* @property {PIXI.Runner} prerender - Pre-render runner
* @property {PIXI.Runner} resize - Resize runner
*/
this.runners = {
destroy: new Runner('destroy'),
contextChange: new Runner('contextChange', 1),
reset: new Runner('reset'),
update: new Runner('update'),
postrender: new Runner('postrender'),
prerender: new Runner('prerender'),
resize: new Runner('resize', 2),
};
/**
* Global uniforms
* @member {PIXI.UniformGroup}
*/
this.globalUniforms = new UniformGroup({
projectionMatrix: new Matrix(),
}, true);
/**
* Mask system instance
* @member {PIXI.systems.MaskSystem} mask
* @memberof PIXI.Renderer#
* @readonly
this.width = Math.ceil(width || 100);
this.height = Math.ceil(height || 100);
this.stencil = false;
this.depth = false;
this.dirtyId = 0;
this.dirtyFormat = 0;
this.dirtySize = 0;
this.depthTexture = null;
this.colorTextures = [];
this.glFramebuffers = {};
this.disposeRunner = new Runner('disposeFramebuffer', 2);
}