Context Class
Context entity
Constructor
Item Index
Methods
Methods
CreateFromModel
(
Render.Context
-
context
Create context view from context entity.
Parameters:
-
context
Context
Returns:
Render.Context:
CreateFromPoint
(
Render.Context
-
x
-
y
-
parent
-
options
Create context view and context entity.
Returns:
Render.Context:
destroy
()
Destroy Context.
destroy
()
Destroy the Context
destroyGraphics
(
-
container
-
graphics
Destroy base graphics.
Parameters:
-
container
Pixi.Container -
graphics
Pixi.Graphics
dragTo
(
-
pos
-
anchor
Drag render context.
Parameters:
-
pos
Vec2 -
anchor
Vec2
Returns:
getAnchor
()
Vec2
Get context center for dragging actions.
Returns:
Vec2:
anchor
getMaxXY
()
Vec2
Gets the context maximun X,Y coordinate.
Returns:
Vec2:
point
getMinXY
()
Vec2
Gets the context minimum X,Y coordinate.
Returns:
Vec2:
point
getNearestPoint
(
Vec2
-
point
-
border
Get the nearest point in the context to another.
Parameters:
-
point
Vec2 -
border
Numbermargin inside the context
Returns:
Vec2:
nearest point in the context to the given point
getPos
()
Vec2
Get context center.
Returns:
Vec2:
position
getRandomPoint
()
Vec2
Get a random point in the context.
Returns:
Vec2:
point
getTrigger
()
Boolean
Get context trigger option.
Returns:
Boolean:
true if contexts stops simulation on empty of agents
in
(
Boolean
-
pos
Check if a point is inside the context.
Parameters:
-
pos
Vec2
Returns:
Boolean:
true if pos is inside
incrSize
(
-
ds
Increment the context width and height.
Parameters:
-
ds
Numberincrement in width and height
setInteractive
(
-
displayObject
Set render entity as interactive.
Parameters:
-
displayObject
Pixi.DisplayObject