Name | Type | Description | ||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
config |
object |
optional
The Game options
|
Extends
Members
-
The default options, so we mixin functionality later.
-
The initHeight.
-
The initWidth.
-
Loader instance to help with asset loading.
-
renderer SINT.WebGLRenderer | SINT.CanvasRenderer inherited overrides
-
WebGL renderer if available, otherwise CanvasRenderer
-
screen SINT.Rectangle readonly inherited overrides
-
Reference to the renderer's screen rectangle. Its safe to use as filterArea or hitArea for whole screen
-
stage SINT.Container inherited overrides
-
The root display container that's rendered.
-
ticker SINT.ticker.Ticker inherited overrides
-
Ticker for doing render updates.
- Default Value:
- SINT.ticker.shared
-
Reference to the renderer's canvas element.
Methods
-
Adds one or more children to the stage.
Name Type Description child
PIXI.DisplayObject repeatable The DisplayObject(s) to add to the container
Returns:
Type Description PIXI.DisplayObject The first child that was added. -
Destroy and don't use after this.
Name Type Default Description removeView
Boolean false optional Automatically remove canvas from DOM.
stageOptions
object | boolean optional Options parameter. A boolean will act as if all options have been set to that value
Name Type Default Description children
boolean false optional if set to true, all the children will have their destroy method called as well. 'stageOptions' will be passed on to those calls.
texture
boolean false optional Only used for child Sprites if stageOptions.children is set to true. Should it destroy the texture of the child sprite
baseTexture
boolean false optional Only used for child Sprites if stageOptions.children is set to true. Should it destroy the base texture of the child sprite
-
Init assets loader
Name Type Description config
object The assets loader options
Name Type Default Description assets
object {} optional The assets
loading
function ()=>{} optional loading function
loaded
function ()=>{} optional loaded callback function
-
Remove child from stage.
Name Type Description child
PIXI.DisplayObject repeatable The DisplayObject(s) to add to the container
-
Destroy and don't use after this.
-
Render the current stage.
-
Convenience method for starting the render.
-
Convenience method for stopping the render.