Context Class
Context entity
Constructor
Item Index
Methods
Methods
CreateFromModel
(
Render.Context
-
context
Create context view from context entity.
Parameters:
-
contextContext
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:
-
containerPixi.Container -
graphicsPixi.Graphics
dragTo
(
-
pos -
anchor
Drag render context.
Parameters:
-
posVec2 -
anchorVec2
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:
-
pointVec2 -
borderNumbermargin 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:
-
posVec2
Returns:
Boolean:
true if pos is inside
incrSize
(
-
ds
Increment the context width and height.
Parameters:
-
dsNumberincrement in width and height
setInteractive
(
-
displayObject
Set render entity as interactive.
Parameters:
-
displayObjectPixi.DisplayObject
