Classes
- AbstractRenderer
- AnimatedSprite
- Application
- Attribute
- BaseRenderTexture
- BaseTexture
- BatchBuffer
- BitmapFontLoader
- BitmapText
- Bounds
- Buffer
- CanvasMaskManager
- CanvasRenderer
- CanvasRenderTarget
- CanvasTinter
- Circle
- Container
- CountLimiter
- CubeTexture
- DisplayObject
- Ellipse
- Filter
- FilterManager
- FrameBuffer
- Geometry
- Graphics
- GraphicsData
- GraphicsRenderer
- GroupD8
- Loader
- LoaderResource
- Matrix
- Mesh
- MeshRenderer
- NineSlicePlane
- ObjectRenderer
- ObservablePoint
- ParticleContainer
- ParticleRenderer
- Plane
- Point
- Polygon
- PrimitiveShader
- Program
- Quad
- QuadUv
- RawMesh
- Rectangle
- Renderer
- RenderTexture
- Rope
- RoundedRectangle
- Shader
- Sprite
- SpriteMaskFilter
- Spritesheet
- SpritesheetLoader
- State
- System
- Text
- TextMetrics
- TextStyle
- Texture
- TextureLoader
- TextureMatrix
- Ticker
- TilingSprite
- TilingSpriteRenderer
- TimeLimiter
- Transform
- TransformBase
- TransformStatic
- UniformGroup
- WebGLRenderer
Namespaces
- accessibility
- extract
- extras
- filters
- interaction
- loaders
- mesh
- prepare
- resources
- settings
- systems
- utils
Members
-
Various blend modes supported by PIXI.
IMPORTANT - The WebGL renderer only supports the NORMAL, ADD, MULTIPLY and SCREEN blend modes. Anything else will silently act like NORMAL.
Properties:
Name Type Description NORMALnumber ADDnumber MULTIPLYnumber SCREENnumber OVERLAYnumber DARKENnumber LIGHTENnumber COLOR_DODGEnumber COLOR_BURNnumber HARD_LIGHTnumber SOFT_LIGHTnumber DIFFERENCEnumber EXCLUSIONnumber HUEnumber SATURATIONnumber COLORnumber LUMINOSITYnumber -
Regexp for data URI. Based on: https://github.com/ragingwind/data-uri-regex
Example
data:image/png;base64 -
Various webgl draw modes. These can be used to specify which GL drawMode to use under certain situations and renderers.
Properties:
Name Type Description POINTSnumber LINESnumber LINE_LOOPnumber LINE_STRIPnumber TRIANGLESnumber TRIANGLE_STRIPnumber TRIANGLE_FANnumber -
Different types of environments for WebGL.
Properties:
Name Type Description WEBGL_LEGACYnumber Used for older v1 WebGL devices. PixiJS will aim to ensure compatibility with older / less advanced devices. If you experiance unexplained flickering prefer this envionment.
WEBGLnumber Version 1 of WebGL
WEBGL2number Version 2 of WebGL
-
Various GL texture/resources formats.
Properties:
Name Type Default Description RGBAnumber 6408 RGBnumber 6407 ALPHAnumber 6406 LUMINANCEnumber 6409 LUMINANCE_ALPHAnumber 6410 DEPTH_COMPONENTnumber 6402 DEPTH_STENCILnumber 34041 -
The gc modes that are supported by pixi.
The PIXI.settings.GC_MODE Garbage Collection mode for PixiJS textures is AUTO If set to GC_MODE, the renderer will occasionally check textures usage. If they are not used for a specified period of time they will be removed from the GPU. They will of course be uploaded again when they are required. This is a silent behind the scenes process that should ensure that the GPU does not get filled up.
Handy for mobile devices! This property only affects WebGL.
Properties:
Name Type Description AUTOnumber Garbage collection will happen periodically automatically
MANUALnumber Garbage collection will need to be called manually
-
PIXI.loader PIXI.Loader Deprecated : since 5.0.0 static
-
- See:
-
Constants that specify float precision in shaders.
Properties:
Name Type Default Description LOWstring 'lowp' MEDIUMstring 'mediump' HIGHstring 'highp' -
Constant to identify the Renderer Type.
Properties:
Name Type Description UNKNOWNnumber Unknown render type.
WEBGLnumber WebGL render type.
CANVASnumber Canvas render type.
-
The prefix that denotes a URL is for a retina asset.
- Default Value:
- /@([0-9\.]+)x/
Example
`@2x` -
The scale modes that are supported by pixi.
The PIXI.settings.SCALE_MODE scale mode affects the default scaling mode of future operations. It can be re-assigned to either LINEAR or NEAREST, depending upon suitability.
Properties:
Name Type Description LINEARnumber Smooth scaling
NEARESTnumber Pixelating scaling
-
Constants that identify shapes, mainly to prevent
instanceofcalls.Properties:
Name Type Description POLYnumber Polygon
RECTnumber Rectangle
CIRCnumber Circle
ELIPnumber Ellipse
RRECnumber Rounded Rectangle
-
- See:
-
- PIXI.SVGResource.SVG_SIZE
-
Various GL target types.
Properties:
Name Type Default Description TEXTURE_2Dnumber 3553 TEXTURE_CUBE_MAPnumber 34067 TEXTURE_2D_ARRAYnumber 35866 TEXTURE_CUBE_MAP_POSITIVE_Xnumber 34069 TEXTURE_CUBE_MAP_NEGATIVE_Xnumber 34070 TEXTURE_CUBE_MAP_POSITIVE_Ynumber 34071 TEXTURE_CUBE_MAP_NEGATIVE_Ynumber 34072 TEXTURE_CUBE_MAP_POSITIVE_Znumber 34073 TEXTURE_CUBE_MAP_NEGATIVE_Znumber 34074 -
Constants that define the type of gradient on text.
Properties:
Name Type Description LINEAR_VERTICALnumber Vertical gradient
LINEAR_HORIZONTALnumber Linear gradient
-
Constants that specify the transform type.
Properties:
Name Type Description STATICnumber DYNAMICnumber -
Various GL data format types.
Properties:
Name Type Default Description UNSIGNED_BYTEnumber 5121 UNSIGNED_SHORTnumber 5123 UNSIGNED_SHORT_5_6_5number 33635 UNSIGNED_SHORT_4_4_4_4number 32819 UNSIGNED_SHORT_5_5_5_1number 32820 FLOATnumber 5126 HALF_FLOATnumber 36193 -
Represents the update priorities used by internal PIXI classes when registered with the PIXI.Ticker object. Higher priority items are updated first and lower priority items, such as render, should go later.
Properties:
Name Type Default Description INTERACTIONnumber 50 Highest priority, used for PIXI.interaction.InteractionManager
HIGHnumber 25 High priority updating, PIXI.VideoBaseTexture and PIXI.AnimatedSprite
NORMALnumber 0 Default priority for ticker events, see PIXI.Ticker#add.
LOWnumber -25 Low priority used for PIXI.Application rendering.
UTILITYnumber -50 Lowest priority used for PIXI.prepare.BasePrepare utility.
-
String of the current PIXI version.
-
The wrap modes that are supported by pixi.
The PIXI.settings.WRAP_MODE wrap mode affects the default wrapping mode of future operations. It can be re-assigned to either CLAMP or REPEAT, depending upon suitability. If the texture is non power of two then clamp will be used regardless as webGL can only use REPEAT if the texture is po2.
This property only affects WebGL.
Properties:
Name Type Description CLAMPnumber The textures uvs are clamped
REPEATnumber The texture uvs tile and repeat
MIRRORED_REPEATnumber The texture uvs tile and repeat with mirroring
Methods
-
PIXI.autoDetectRenderer (options)PIXI.Renderer | PIXI.CanvasRenderer static
-
This helper function will automatically detect which renderer you should be using. WebGL is the preferred renderer as it is a lot faster. If webGL is not supported by the browser then this function will return a canvas renderer
Name Type Description optionsobject optional The optional renderer parameters
Name Type Default Description widthnumber 800 optional the width of the renderers view
heightnumber 600 optional the height of the renderers view
viewHTMLCanvasElement optional the canvas to use as a view, optional
transparentboolean false optional If the render view is transparent, default false
antialiasboolean false optional sets antialias (only applicable in chrome at the moment)
preserveDrawingBufferboolean false optional enables drawing buffer preservation, enable this if you need to call toDataUrl on the webgl context
backgroundColornumber 0x000000 optional The background color of the rendered area (shown if not transparent).
clearBeforeRenderboolean true optional This sets if the renderer will clear the canvas or not before the new render pass.
resolutionnumber 1 optional The resolution / device pixel ratio of the renderer, retina would be 2
forceCanvasboolean false optional prevents selection of WebGL renderer, even if such is present
roundPixelsboolean false optional If true PixiJS will Math.floor() x/y values when rendering, stopping pixel interpolation.
forceFXAAboolean false optional forces FXAA antialiasing to be used over native. FXAA is faster, but may not always look as great webgl only
powerPreferencestring optional Parameter passed to webgl context, set to "high-performance" for devices with dual graphics card webgl only
Returns:
Type Description PIXI.Renderer | PIXI.CanvasRenderer Returns WebGL renderer if available, otherwise CanvasRenderer