Line Class
Line Base
Constructor
Item Index
Methods
addEntity
(
-
joint
-
options
Request to add a children Joint entity.
createGraphics
(
Pixi.Graphics
-
container
-
graphics
Create base grahpics.
Parameters:
-
container
Pixi.Container -
graphics
Pixi.Graphics, optional created otherwise
Returns:
Pixi.Graphics:
graphics
destroy
()
Destroy the line
destroyGraphics
(
-
container
-
graphics
Destroy base graphics.
Parameters:
-
container
Pixi.Container -
graphics
Pixi.Graphics
getJointByIdx
(
Joint
-
idx
Get a joint by index in the path.
Parameters:
-
idx
Number
Returns:
Joint:
joint or null
getJointIdx
(
Number
-
joint
Get a joint index in the path/wall
Parameters:
-
joint
Joint
Returns:
Number:
index or -1 if not found
getPos
()
Vec2
Get entity position.
Returns:
Vec2:
position.
getProjection
(
Vec2
-
point
-
segment
Get the projection from a point to a given segment.
Parameters:
-
point
Vec2 -
segment
Numberindex
Returns:
Vec2:
projection from point to segment
render
(
-
graphics
Animate entity.
Parameters:
-
graphics
Pixi.Graphics
reverse
()
Reverse the internal joints lists.
setInteractive
(
-
displayObject
Set render entity as interactive.
Parameters:
-
displayObject
Pixi.DisplayObject