new PIXI()
Namespace-class for pixi.js.
Contains assorted static properties and enumerations.
- Source - pixi/Pixi.js, line 11
Members
-
<static> blendModes :Object
-
Various blend modes supported by pixi.
- Source - pixi/Pixi.js, line 41
-
<internal, static> CANVAS_RENDERER :Number
-
- Internal:
- This member is internal (protected) and may be modified or removed in the future.
- Source - pixi/Pixi.js, line 27
-
<static> defaultRenderOptions :Object
-
The default render options if none are supplied to {{#crossLink "WebGLRenderer"}}{{/crossLink}} or {{#crossLink "CanvasRenderer"}}{{/crossLink}}.
- Source - pixi/Pixi.js, line 154
-
<static> DEG_TO_RAD :Number
-
- Source - pixi/Pixi.js, line 131
-
<static> dontSayHello :Boolean
-
If true the default pixi startup (console) banner message will be suppressed.
- Default Value:
- false
- Source - pixi/Pixi.js, line 145
-
<static> PI_2 :Number
-
- Source - pixi/Pixi.js, line 119
-
<static> RAD_TO_DEG :Number
-
- Source - pixi/Pixi.js, line 125
-
<internal, static> RETINA_PREFIX :String
-
- Internal:
- This member is internal (protected) and may be modified or removed in the future.
- Source - pixi/Pixi.js, line 137
-
<static> scaleModes :Object
-
The scale modes that are supported by pixi.
The DEFAULT scale mode affects the default scaling mode of future operations. It can be re-assigned to either LINEAR or NEAREST, depending upon suitability.
- Source - pixi/Pixi.js, line 83
-
<static> VERSION :String
-
Version of pixi that is loaded.
- Source - pixi/Pixi.js, line 34
-
<internal, static> WEBGL_RENDERER :Number
-
- Internal:
- This member is internal (protected) and may be modified or removed in the future.
- Source - pixi/Pixi.js, line 21
Methods
-
<static> autoDetectRecommendedRenderer(width=800, height=600, options)
-
This helper function will automatically detect which renderer you should be using. This function is very similar to the autoDetectRenderer function except that is will return a canvas renderer for android. Even thought both android chrome supports webGL the canvas implementation perform better at the time of writing. This function will likely change and update as webGL performance improves on these devices.
Parameters:
Name Type Argument Description width=800
Number the width of the renderers view
height=600
Number the height of the renderers view
options
Object <optional>
The optional renderer parameters
Properties
Name Type Argument Default Description view
HTMLCanvasElement <optional>
the canvas to use as a view, optional
transparent
Boolean <optional>
false If the render view is transparent, default false
antialias
Boolean <optional>
false sets antialias (only applicable in chrome at the moment)
preserveDrawingBuffer
Boolean <optional>
false enables drawing buffer preservation, enable this if you need to call toDataUrl on the webgl context
resolution
Number <optional>
1 the resolution of the renderer retina would be 2
- Source - pixi/utils/Detector.js, line 46
-
<static> autoDetectRenderer(width=800, height=600, options)
-
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
Parameters:
Name Type Argument Description width=800
Number the width of the renderers view
height=600
Number the height of the renderers view
options
Object <optional>
The optional renderer parameters
Properties
Name Type Argument Default Description view
HTMLCanvasElement <optional>
the canvas to use as a view, optional
transparent
Boolean <optional>
false If the render view is transparent, default false
antialias
Boolean <optional>
false sets antialias (only applicable in chrome at the moment)
preserveDrawingBuffer
Boolean <optional>
false enables drawing buffer preservation, enable this if you need to call toDataUrl on the webgl context
resolution
Number <optional>
1 the resolution of the renderer retina would be 2
- Source - pixi/utils/Detector.js, line 5