Options
All
  • Public
  • Public/Protected
  • All
Menu

A spawn shape that picks a random position along a series of line segments. If those line segments form a polygon, particles will only be placed on the perimeter of that polygon.

Example config:

{
type: 'polygonalChain',
data: [
[{x: 0, y: 0}, {x: 10, y: 10}, {x: 20, y: 0}],
[{x: 0, y, -10}, {x: 10, y: 0}, {x: 20, y: -10}]
]
}

Hierarchy

  • PolygonalChain

Implements

Index

Constructors

  • new PolygonalChain(data: IPointData[] | IPointData[][]): PolygonalChain

Properties

countingLengths: number[]

Total length of segments up to and including the segment of the same index. Used for weighted random selection of segment.

segments: Segment[]

List of segment objects in the chain.

totalLength: number

Total length of all segments of the chain.

editorConfig: ListProperty = null
type: string = 'polygonalChain'

Methods

  • getRandPos(out: IPointData): void
  • init(data: IPointData[] | IPointData[][]): void
  • Parameters

    • data: IPointData[] | IPointData[][]

      Point data for polygon chains. Either a list of points for a single chain, or a list of chains.

    Returns void

Generated using TypeDoc