babylon.quarks - v1.0.0
    Preparing search index...

    Class RectangleEmitter

    Emits from the outline of a rectangle in the xy plane, heading out from its centre: a perimeter emitter, like a Niagara box or plane location with Surface Only, which thickness widens into a band toward the centre. Unity's Rectangle shape, a filled rectangle emitting along +z, is a BoxEmitter with no depth instead.

    Implements

    Index
    height: number

    Height of the rectangle, along y.

    State the RectangleEmitter.speed generator keeps.

    How the start point moves around the edge, see EmitterMode; the edge is the "arc" here, run from the bottom left corner.

    Speed of the arc sweep in arcs per second, for the Loop and PingPong modes; sampled over the system's cycle.

    spread: number

    Snaps the start point along the arc to multiples of this fraction (Unity's Spread); 0 for none.

    thickness: number

    How far in from the outline particles may start, as a fraction of the way to the centre, clamped to [0, 1]: 0 on the outline, 1 anywhere down to the centre. Each edge gets particles in proportion to its length, spread evenly over the area of its band.

    transform?: ShapeTransform

    Optional local transform of the shape inside its particle system, applied by the shape itself at the end of initialize.

    type: string

    Always 'rectangle'.

    width: number

    Width of the rectangle, along x.

    • Starts p on the rectangle's edge, heading away from the centre at its start speed.

      Parameters

      Returns void

    • Forgets the state the shape built up while emitting (the arc sweep position of Loop/PingPong shapes, generator memory), so a restarted system emits from the start of the arc again. Called by the particle system's restart().

      Returns void

    • Advances the arc sweep by delta seconds in the Loop and PingPong modes.

      Parameters

      Returns void