c

io.scalajs.dom.html.pixijs

CanvasRenderer

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" )
Linear Supertypes
AbstractRenderer, Object, Any, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. CanvasRenderer
  2. AbstractRenderer
  3. Object
  4. Any
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. 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

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. var autoResize: Boolean

    Whether the render view should be resized automatically

  6. var backgroundColor: Color

    The background color to fill if not transparent

  7. var blendModes: Any

    Tracks the blend modes useful for this renderer.

  8. 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.

  9. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  10. var context: CanvasRenderingContext2D

    The canvas 2d context that everything is drawn with.

  11. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  12. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  13. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  14. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
  15. def hasOwnProperty(v: String): Boolean
    Definition Classes
    Object
  16. def hashCode(): Int
    Definition Classes
    AnyRef → Any
  17. var height: Double
  18. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  19. def isPrototypeOf(v: Object): Boolean
    Definition Classes
    Object
  20. var maskManager: CanvasMaskManager

    Instance of a CanvasMaskManager, handles masking when using the canvas renderer.

  21. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  22. final def notify(): Unit
    Definition Classes
    AnyRef
  23. final def notifyAll(): Unit
    Definition Classes
    AnyRef
  24. var options: |[CanvasRendererOptions, RawOptions]
  25. var preserveDrawingBuffer: Boolean

    The value of the preserveDrawingBuffer flag affects whether or not the contents of the stencil buffer is retained after rendering.

  26. def propertyIsEnumerable(v: String): Boolean
    Definition Classes
    Object
  27. var refresh: Boolean

    Boolean flag controlling canvas refresh.

  28. var resolution: Resolution

    The resolution of the renderer

  29. 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.

  30. var smoothProperty: String

    The canvas property used to set the canvas smoothing property.

  31. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  32. def toLocaleString(): String
    Definition Classes
    Object
  33. def toString(): String
    Definition Classes
    AnyRef → Any
  34. var transparent: Boolean

    Whether the render view is transparent

  35. var type: Int

    The type of the renderer.

    The type of the renderer. Default: PIXI.RENDERER_TYPE.UNKNOWN

  36. def valueOf(): Any
    Definition Classes
    Object
  37. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  38. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  39. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  40. var width: Double

Inherited from AbstractRenderer

Inherited from Object

Inherited from Any

Inherited from AnyRef

Inherited from Any

Ungrouped