Implements
Members
defaultOptions ViewSystemOptions static
The default options for the view system.
Properties:
Name | Type | Default | Description |
---|---|---|---|
antialias |
boolean |
false
|
WebGLOptions.antialias |
autoDensity |
boolean |
false
|
WebGLOptions.autoDensity |
height |
number |
600
|
WebGLOptions.height |
width |
number |
800
|
WebGLOptions.width |
Whether to enable anti-aliasing. This may affect performance.
Whether CSS dimensions of canvas view should be resized to screen dimensions automatically.
canvas ICanvas
The canvas element that everything is drawn to.
renderTarget RenderTarget
The render target that the view is drawn to.
The resolution / device pixel ratio of the renderer.
screen Rectangle
Measurements of the screen. (0, 0, screenWidth, screenHeight).
Its safe to use as filterArea or hitArea for the whole stage.
texture Texture
The texture that is used to draw the canvas to the screen.
Methods
Destroys this System and optionally removes the canvas from the dom.
Name | Type | Default | Description |
---|---|---|---|
options |
options | false | false |
The options for destroying the view, or "false". |
options.removeView |
Whether to remove the view element from the DOM. Defaults to |
initiates the view system
Name | Type | Description |
---|---|---|
options |
ViewSystemOptions |
the options for the view |
Resizes the screen and canvas to the specified dimensions.
Name | Type | Description |
---|---|---|
desiredScreenWidth |
number |
The new width of the screen. |
desiredScreenHeight |
number |
The new height of the screen. |
resolution |
number |