Class type AbstractRenderer-PIXI._t

inherit PIXI.EventEmitter._t
method autoDensity#=: Js.Internal.meth([ `Arity_1(bool) ], unit)

Whether CSS dimensions of canvas view should be resized to screen dimensions automatically

method autoDensity: bool

Whether CSS dimensions of canvas view should be resized to screen dimensions automatically

method backgroundColor#=: Js.Internal.meth([ `Arity_1(int) ], unit)

The background color to fill if not transparent

method backgroundColor: int

The background color to fill if not transparent

method cleanBeforeRender#=: Js.Internal.meth([ `Arity_1(bool) ], unit)

This sets if the CanvasRenderer will clear the canvas or not before the new render pass. If the scene is NOT transparent PixiJS will use a canvas sized fillRect operation every frame to set the canvas background color. If the scene is transparent PixiJS 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.

method cleanBeforeRender: bool

This sets if the CanvasRenderer will clear the canvas or not before the new render pass. If the scene is NOT transparent PixiJS will use a canvas sized fillRect operation every frame to set the canvas background color. If the scene is transparent PixiJS 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.

method height: float

Same as view.height, actual number of pixels in the canvas by vertical

method options: Js.t({.. })

The supplied constructor options

method plugins: rendererPlugins

Collection of plugins

method preserveDrawingBuffer#=: Js.Internal.meth([ `Arity_1(bool) ], unit)
method preserveDrawingBuffer: bool
method resolution#=: Js.Internal.meth([ `Arity_1(float) ], unit)

The resolution / device pixel ratio of the renderer.

method resolution: float

The resolution / device pixel ratio of the renderer.

method screen#=: Js.Internal.meth([ `Arity_1(PIXI.Rectangle.t) ], unit)

Measurements of the screen. (0, 0, screenWidth, screenHeight). Its safe to use as filterArea or hitArea for the whole stage

method screen: PIXI.Rectangle.t

Measurements of the screen. (0, 0, screenWidth, screenHeight). Its safe to use as filterArea or hitArea for the whole stage

method transparent#=: Js.Internal.meth([ `Arity_1(bool) ], unit)

Whether the render view is transparent

method transparent: bool

Whether the render view is transparent

method view#=: Js.Internal.meth([ `Arity_1(Dom.element) ], unit)

The canvas element that everything is drawn to

method view: Dom.element

The canvas element that everything is drawn to

method width: float

Same as view.width, actual number of pixels in the canvas by horizontal

method destroy: Js.Internal.meth([ `Arity_1(bool) ], unit)

Removes everything from the renderer and optionally removes the Canvas DOM element.

parameter removeView

removes the Canvas element from the DOM

method generateTexture: Js.Internal.meth([ `Arity_4((displayObjectOpaque, int, float, Js.Undefined.t(PIXI.Rectangle.t))) ]renderTextureOpaque)

Useful function that returns a texture of the display object that can then be used to create sprites This can be quite useful if your displayObject is complicated and needs to be reused multiple times

deprecated

Consider using AbstractRenderer.generateTexture

see /bs-pixi/PIXI/AbstractRenderer-PIXI/#val-generateTexture

AbstractRederer.generateTexture

parameter displayObject

The displayObject the object will be generated from

parameter scaleMode

Should be one of the scaleMode consts

parameter resolution

The resolution / device pixel ratio of the texture being generated

parameter region

(optional) The region of the displayObject, that shall be rendered, if no region is specified, defaults to the local bounds of the displayObject

returns

A texture of the graphics object

method initPlugins: Js.Internal.meth([ `Arity_1(Js.t({.. })) ], unit)

Initialize the plugins

parameter staticMap

the dictionary of statically saved plugins

method resize: Js.Internal.meth([ `Arity_2((float, float)) ], unit)

Resizes the screen and canvas to the specified width and height Canvas dimensions are multiplied by resolution

parameter screenWidth

The new width of the screen

parameter screenHeight

The new height of the screen