class CanvasRenderer extends Object with AbstractRenderer
The CanvasRenderer draws the scene and all its content onto a 2d canvas. This renderer should be used for browsers that do not support webGL. Don't forget to add the CanvasRenderer.view to your DOM or you will not see anything :)
- Annotations
- @RawJSType() @native() @JSName( "CanvasRenderer" )
- Alphabetic
- By Inheritance
- CanvasRenderer
- AbstractRenderer
- Object
- Any
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
-
new
CanvasRenderer(width: Double = js.native, height: Double = js.native, options: |[CanvasRendererOptions, RawOptions] = js.native)
- width
the width of the canvas view
- height
the height of the canvas view
- options
The optional renderer parameters
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
var
autoResize: Boolean
Whether the render view should be resized automatically
-
var
backgroundColor: Color
The background color to fill if not transparent
-
var
blendModes: Any
Tracks the blend modes useful for this renderer.
-
var
clearBeforeRender: Boolean
This sets if the CanvasRenderer will clear the canvas or not before the new render pass.
This sets if the CanvasRenderer will clear the canvas or not before the new render pass. If the scene is NOT transparent Pixi will use a canvas sized fillRect operation every frame to set the canvas background color. If the scene is transparent Pixi will use clearRect to clear the canvas every frame. Disable this by setting this to false. For example if your game has a canvas filling background image you often don't need this set.
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
var
context: CanvasRenderingContext2D
The canvas 2d context that everything is drawn with.
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
-
def
hasOwnProperty(v: String): Boolean
- Definition Classes
- Object
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- var height: Double
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
isPrototypeOf(v: Object): Boolean
- Definition Classes
- Object
-
var
maskManager: CanvasMaskManager
Instance of a CanvasMaskManager, handles masking when using the canvas renderer.
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- var options: |[CanvasRendererOptions, RawOptions]
-
var
preserveDrawingBuffer: Boolean
The value of the preserveDrawingBuffer flag affects whether or not the contents of the stencil buffer is retained after rendering.
-
def
propertyIsEnumerable(v: String): Boolean
- Definition Classes
- Object
-
var
refresh: Boolean
Boolean flag controlling canvas refresh.
-
var
resolution: Resolution
The resolution of the renderer
-
var
roundPixels: Double
If true Pixi will Math.floor() x/y values when rendering, stopping pixel interpolation.
If true Pixi will Math.floor() x/y values when rendering, stopping pixel interpolation. Handy for crisp pixel art and speed on legacy devices.
-
var
smoothProperty: String
The canvas property used to set the canvas smoothing property.
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toLocaleString(): String
- Definition Classes
- Object
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
var
transparent: Boolean
Whether the render view is transparent
-
var
type: Int
The type of the renderer.
The type of the renderer. Default: PIXI.RENDERER_TYPE.UNKNOWN
-
def
valueOf(): Any
- Definition Classes
- Object
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
- var width: Double