API Docs for: 0.3
Show:

Joint Class

Extends Entity
Module: Joint
Parent Module: Entities

Joint helper entity children of Wall and Path

Constructor

Joint

(
  • joint
  • texture
)

Parameters:

  • joint Joint
  • texture Pixi.Texture

Methods

addEntity

(
  • joint
)

Description

Parameters:

Returns:

calcNewId

(
  • id
)

Description

Parameters:

Returns:

CallExpression

createGraphics

(
  • graphics
)

Inherited from Entity but overwritten in src\app\Render\Joint.js:41

Create base graphics.

Parameters:

  • graphics Pixi.Graphics

destroy

(
  • graphics
)

Inherited from Entity but overwritten in src\app\Render\Joint.js:27

Destroy base graphics.

Parameters:

  • graphics Pixi.Graphics

destroy

()

Destroy the Joint

destroyGraphics

(
  • container
  • graphics
)

Destroy base graphics.

Parameters:

  • container Pixi.Container
  • graphics Pixi.Graphics

dragTo

(
  • pos
  • anchor
)

Draggin actino.

Parameters:

  • pos Vec2
  • anchor Vec2

getAnchor

() Vec2

Get joint anchor for dragging actions.

Returns:

Vec2:

anchor

getJoint

() Joint

Get joint associated entity.

Returns:

Joint:

joint

getPos

() Vec2

Inherited from Entity but overwritten in src\app\Render\Joint.js:119

Get joint position.

Returns:

Vec2:

position

getRadius

() Number

Get radius

Returns:

Number:

radius

in

(
  • pos
)
Boolean

Checks if a point is inside a joint.

Parameters:

  • pos Vec2

Returns:

Boolean:

true if inside; false otherwise

incrRadius

(
  • dr
)

Increment radius.

Parameters:

removeEntity

(
  • joint
)

Description

Parameters:

Returns:

render

()

Inherited from Entity but overwritten in src\app\Render\Joint.js:62

Animate joint, update position and radius.

setInteractive

(
  • displayObject
)

Set render entity as interactive.

Parameters:

  • displayObject Pixi.DisplayObject

setRadius

(
  • radius
)

Set radius.

Parameters:

show

(
  • show
)

Shows or hides render joint.

Parameters:

updatePos

(
  • x
  • y
)

Description

Parameters:

Returns: