new ViewRectangleSprite(p_pixi_app, p_model, p_config, p_resources)
Parameters:
| Name | Type | Description | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
p_pixi_app |
Object | |||||||||||
p_model |
ModelRectangle | |||||||||||
p_config |
Object |
Properties
|
||||||||||
p_resources |
Object |
- Source:
Members
-
border :Object
-
The border width and height of the board view.
Type:
- Object
- Source:
-
gap :number
-
The vertical and horizontal gap between two tokens.
Type:
- number
- Source:
-
image :string
-
The resource name of the image to be used as texture of the rectangle.
Type:
- string
- Source:
-
image :Object
-
The name of the image to be used for visualization.
Type:
- Object
- Source:
-
model :ModelRectangle
-
The model to be visualized.
Type:
- Source:
-
sprite :PIXI.Sprite
-
The sprite object that visualizes the model.
Type:
- PIXI.Sprite
- Source:
Methods
-
addEventListener(p_event, f_listener)
-
Adds a listener to PixiJS events dispatched by
this.sprite.Parameters:
Name Type Description p_eventstring the name of the PixiJS event to be listened to f_listenerfunction the listener -
render()
-
Renders the view.
- Source: