Collection of installed plugins. These are included by default in PIXI, but can be excluded by creating a custom build. Consult the README for more information about creating custom builds and excluding plugins.
The background color alpha. Setting this to 0 will make the canvas transparent.
The background color alpha. Setting this to 0 will make the canvas transparent.
The background color to fill if not transparent
The background color to fill if not transparent
Please use plugins.extract
instead.
Same as view.height, actual number of pixels in the canvas by vertical.
Same as view.width, actual number of pixels in the canvas by horizontal.
Clear the frame buffer
Removes everything from the renderer (event listeners, spritebatch, etc...)
Calls each of the listeners registered for a given event.
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.
The scale mode of the texture.
The resolution / device pixel ratio of the texture being generated.
A texture of the graphics object.
Initialize the plugins.
The dictionary of statically saved plugins.
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.
Add a one-time listener for a given event.
Remove all listeners, or those of the specified event.
Remove the listeners of a given event.
Renders the object to its WebGL view.
The object to be rendered.
Please use the option
render arguments instead.
Resets the WebGL state so you can render things however you fancy!
Returns itself.
Resizes the WebGL view to the specified width and height.
The new width of the screen.
The new height of the screen.
Create renderer if WebGL is available. Overrideable by the @pixi/canvas-renderer package to allow fallback. throws error if WebGL is not available.
Adds a plugin to the renderer.
The name of the plugin.
The constructor function or class for the plugin.
Generated using TypeDoc
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 WebGLBatchesm, 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.
PIXI