Class: ViewToken

ViewToken


new ViewToken(p_pixi_app, p_model, p_config, p_resources)

Parameters:
Name Type Description
p_pixi_app Object
p_model ModelToken
p_config Object
Properties
Name Type Argument Default Description
images Object
border Object = {left: 0, top: 0}]
gap number <optional>
0
p_resources Object
Source:

Extends

Members


border :Object

The border width and height of the board view.
Type:
  • Object
Inherited From:
Overrides:
Source:

gap :number

The vertical and horizontal gap between two tokens.
Type:
  • number
Inherited From:
Overrides:
Source:

image :string

The resource name of the image to be used as texture of the rectangle.
Type:
  • string
Inherited From:
Overrides:
Source:

model :ModelRectangle

The model to be visualized.
Type:
Inherited From:
Source:

sprite :PIXI.Sprite

The sprite object that visualizes the model.
Type:
  • PIXI.Sprite
Inherited From:
Source:

Methods


addEventListener(p_event, f_listener)

Adds a listener to PixiJS events dispatched by this.sprite.
Parameters:
Name Type Description
p_event string the name of the PixiJS event to be listened to
f_listener function the listener
Inherited From:
Source:
See:

render()

Renders the token.
Overrides:
Source: