phaser - v4.0.0-rc.4
    Preparing search index...
    • Creates a new Canvas DOM element, or pulls one from the pool if free.

      Parameters

      • parent: any

        The parent of the Canvas object.

      • Optionalwidth: number

        The width of the Canvas. Default 1.

      • Optionalheight: number

        The height of the Canvas. Default 1.

      • OptionalcanvasType: number

        The type of the Canvas. Either Phaser.CANVAS or Phaser.WEBGL. Default Phaser.CANVAS.

      • OptionalselfParent: boolean

        Use the generated Canvas element as the parent? Default false.

      Returns HTMLCanvasElement