Optional
options: Partial<IRendererOptions>See PIXI.settings.RENDER_OPTIONS for defaults.
Unique UID assigned to the renderer's WebGL context.
Readonly
_multisample_multisample system instance
Readonly
_pluginplugin system instance
Readonly
_view_view system instance
Readonly
backgroundbackground system instance
Readonly
batchBatch system instance
Readonly
bufferBuffer system instance
Readonly
contextContext system instance
Readonly
eventsReadonly
extractReadonly
filterFilter system instance
Readonly
framebufferFramebuffer system instance
Readonly
geometryGeometry system instance
Readonly
glWebGL 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
Readonly
maskMask system instance
Readonly
object_render system instance
Readonly
optionsOptions passed to the constructor.
Readonly
prepareReadonly
projectionProjection system instance
Readonly
renderRenderTexture system instance
Readonly
runnersa collection of runners defined by the user
Readonly
scissorScissor system instance
Readonly
shaderShader system instance
Readonly
startupstartup system instance
Readonly
stateState system instance
Readonly
stencilStencil system instance
Readonly
textureTexture system instance
Readonly
textureGCTexture garbage collector system instance
Readonly
texturetextureGenerator system instance
Readonly
transformTransformFeedback system instance
Readonly
typeThe type of the renderer. will be PIXI.RENDERER_TYPE.CANVAS
PIXI.RENDERER_TYPE
Static
prefixedWhether CSS dimensions of canvas view should be resized to screen dimensions automatically.
The background color alpha. Setting this to 0 will make the canvas transparent.
since 7.0.0
since 7.0.0
The background color to fill if not transparent
since 7.0.0
This sets weather the screen is totally cleared between each frame withthe background color and alpha
since 7.0.0
Same as view.height, actual number of pixels in the canvas by vertical.
600
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
since 7.0.0
readonly drawing buffer preservation we can only know this if Pixi created the context
since 7.0.0
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.
Pass-thru setting for the canvas' context alpha
property. This is typically
not something you need to fiddle with. If you want transparency, use backgroundAlpha
.
since 7.0.0
Same as view.width, actual number of pixels in the canvas by horizontal.
800
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
Removes everything from the renderer (event listeners, spritebatch, etc...)
Optional
removeView: booleanRemoves the Canvas element from the DOM. See: https://github.com/pixijs/pixijs/issues/2233
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
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.
Optional
options: IGenerateTextureOptionsGenerate texture options.
A texture of the graphics object.
Renders the object to its WebGL view.
The object to be rendered.
Optional
options: IRendererRenderOptionsObject to use for render options.
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
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 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