2021-01-11 20:32:57 -08:00

1.9 KiB
Raw Permalink Blame History

Planck.js API Doc › Globals › ChainShape

Class: ChainShape

Hierarchy

  • any

    ↳ ChainShape

Callable

▸ ChainShape(vertices: Vec2[], loop?: boolean): ChainShape

Defined in shape/index.d.ts:83

Parameters:

Name Type
vertices Vec2[]
loop? boolean

Returns: ChainShape

Index

Constructors

Properties

Methods

Constructors

constructor

+ new ChainShape(vertices: Vec2[], loop?: boolean): ChainShape

Defined in shape/index.d.ts:85

Parameters:

Name Type
vertices Vec2[]
loop? boolean

Returns: ChainShape

Properties

Static TYPE

▪ TYPE: "chain"

Defined in shape/index.d.ts:85

Methods

getChildEdge

▸ getChildEdge(edge: EdgeShape, childIndex: number): void

Defined in shape/index.d.ts:97

Parameters:

Name Type
edge EdgeShape
childIndex number

Returns: void


getVertex

▸ getVertex(index: number): Vec2

Defined in shape/index.d.ts:98

Parameters:

Name Type
index number

Returns: Vec2