Matter.RenderPixi
Deprecated: the Matter.RenderPixi module will soon be removed from the Matter.js core. It will likely be moved to its own repository (but maintenance will be limited).
The Matter.RenderPixi
module is an example renderer using pixi.js.
See also Matter.Render
for a canvas based renderer.
Methods
Matter.RenderPixi._createBodyPrimitive
Creates a body primitive
Parameters
-
render
RenderPixi -
body
Body
Returns
graphics
Matter.RenderPixi._createBodySprite
Creates a body sprite
Parameters
-
render
RenderPixi -
body
Body
Returns
sprite
Matter.RenderPixi._getTexture
Gets the requested texture (a PIXI.Texture) via its path
Parameters
-
render
RenderPixi -
imagePath
String
Returns
texture
Matter.RenderPixi.constraint
Description
Parameters
-
engine
Engine -
constraint
Constraint
Matter.RenderPixi.create
Creates a new Pixi.js WebGL renderer
Parameters
-
options
Object
Returns
A new renderer
Matter.RenderPixi.run
Continuously updates the render canvas on the requestAnimationFrame
event.
Parameters
-
render
Render
Matter.RenderPixi.setBackground
Sets the background of the canvas
Parameters
-
render
RenderPixi -
background
String
Matter.RenderPixi.stop
Ends execution of Render.run
on the given render
, by canceling the animation frame request event loop.
Parameters
-
render
Render
Item Index
Methods
- _createBodyPrimitive deprecated
- _createBodySprite deprecated
- _getTexture deprecated
- body deprecated
- clear deprecated
- constraint deprecated
- create deprecated
- run deprecated
- setBackground deprecated
- stop deprecated
- world deprecated