Optionaloptions: Partial<IRendererOptions>See PIXI.settings.RENDER_OPTIONS for defaults.
Readonly__multisample system instance
Readonly_plugin system instance
Readonly__view system instance
Readonlybackgroundbackground system instance
ReadonlybatchBatch system instance
ReadonlybufferBuffer system instance
ReadonlycontextContext system instance
Unique UID assigned to the renderer's WebGL context.
ReadonlyeventsReadonlyextractReadonlyfilterFilter system instance
ReadonlyframebufferFramebuffer system instance
ReadonlygeometryGeometry system instance
ReadonlyglWebGL context, set by PIXI.ContextSystem this.context.
Global uniforms Add any uniforms you want shared across your shaders. the must be added before the scene is rendered for the first time as we dynamically buildcode to handle all global var per shader
ReadonlymaskMask system instance
Readonlyobject_render system instance
ReadonlyoptionsOptions passed to the constructor.
ReadonlyprepareReadonlyprojectionProjection system instance
ReadonlyrenderRenderTexture system instance
Readonlyrunnersa collection of runners defined by the user
ReadonlyscissorScissor system instance
ReadonlyshaderShader system instance
Readonlystartupstartup system instance
ReadonlystateState system instance
ReadonlystencilStencil system instance
ReadonlytextureTexture system instance
ReadonlytextureTexture garbage collector system instance
ReadonlytexturetextureGenerator system instance
ReadonlytransformTransformFeedback system instance
ReadonlytypeThe type of the renderer. will be PIXI.RENDERER_TYPE.CANVAS
StaticprefixedWhether CSS dimensions of canvas view should be resized to screen dimensions automatically.
the last object rendered by the renderer. Useful for other plugins like interaction managers
The number of msaa samples of the canvas.
Collection of plugins
When logging Pixi to the console, this is the name we will show
Flag if we are rendering to the screen vs renderTexture
The resolution / device pixel ratio of the renderer.
The resolution / device pixel ratio of the renderer.
Measurements of the screen. (0, 0, screenWidth, screenHeight).
Its safe to use as filterArea or hitArea for the whole stage.
The canvas element that everything is drawn to.
Create a bunch of runners based of a collection of ids
the runner ids to add
Add a new system to the renderer.
Class reference
Property name for system, if not specified
will use a static name property on the class itself. This
name will be assigned as s property on the Renderer so make
sure it doesn't collide with properties on Renderer.
Return instance of renderer
Clear the frame buffer.
Removes everything from the renderer (event listeners, spritebatch, etc...)
OptionalremoveView: booleanRemoves the Canvas element from the DOM. See: https://github.com/pixijs/pixijs/issues/2233
Calls each of the listeners registered for a given event.
A function that will run a runner and call the runners function but pass in different options to each system based on there name.
E.g. If you have two systems added called systemA and systemB you could call do the following:
system.emitWithCustomOptions(init, {
systemA: {...optionsForA},
systemB: {...optionsForB},
});
init would be called on system A passing optionsForA and on system B passing optionsForB.
the runner to target
key value options for each system
Return an array listing the events for which the emitter has registered listeners.
Useful function that returns a texture of the display object that can then be used to create sprites This can be quite useful if your displayObject is complicated and needs to be reused multiple times.
The displayObject the object will be generated from.
Optionaloptions: IGenerateTextureOptionsGenerate texture options.
OptionalalphaMode?: ALPHA_MODESOptionalanisotropicLevel?: numberOptionalformat?: FORMATSOptionalheight?: numberOptionalmipmap?: MIPMAP_MODESOptionalmultisample?: MSAA_QUALITYThe number of samples of the frame buffer. The default is the renderer's multisample.
OptionalpixiIdPrefix?: stringOptionalregion?: RectangleThe region of the displayObject, that shall be rendered, if no region is specified, defaults to the local bounds of the displayObject.
Optionalresolution?: numberThe resolution / device pixel ratio of the texture being generated. The default is the renderer's resolution.
OptionalresourceOptions?: anyOptionalscaleMode?: SCALE_MODESOptionaltarget?: TARGETSOptionaltype?: TYPESOptionalwidth?: numberOptionalwrapMode?: WRAP_MODESA texture of the graphics object.
Return the number of listeners listening to a given event.
Return the listeners registered for a given event.
Add a listener for a given event.
Optionalcontext: anyAdd a one-time listener for a given event.
Optionalcontext: anyRemove all listeners, or those of the specified event.
Optionalevent: string | symbolRemove the listeners of a given event.
Optionalfn: (...args: any[]) => voidOptionalcontext: anyOptionalonce: booleanRenders the object to its WebGL view.
The object to be rendered.
Optionaloptions: IRendererRenderOptionsObject to use for render options.
Optionalblit?: booleanOptionalclear?: booleanOptionalrenderTexture?: RenderTextureOptionalskipUpdateTransform?: booleanOptionaltransform?: MatrixResets the WebGL state so you can render things however you fancy!
Returns itself.
Resizes the WebGL view to the specified width and height.
The desired width of the screen.
The desired height of the screen.
Set up a system with a collection of SystemClasses and runners. Systems are attached dynamically to this class when added.
the config for the system manager
The Renderer draws the scene and all its content onto a WebGL enabled canvas.
This renderer should be used for browsers that support WebGL.
This renderer works by automatically managing WebGLBatches, so no need for Sprite Batches or Sprite Clouds. Don't forget to add the view to your DOM or you will not see anything!
Renderer is composed of systems that manage specific tasks. The following systems are added by default whenever you create a renderer:
projectionMatrix, used by shaders to get NDC coordinates.The breadth of the API surface provided by the renderer is contained within these systems.
Memberof
PIXI