Class for designing new frame. The main reason for this class is to generate new terrain with certainty that the new frames will not collide with each other in ugly manner.

Constructors

Properties

Methods

Constructors

Properties

plan: SketchLayer[] = []
range: Range

range for which to generate design.

Methods

  • Checks if a new layer can fit within the existing plan without colliding with other layers.

    Parameters

    • newLayer: SketchLayer

      The new layer to check.

    • Optional xCollisionRadius: number = RADIUS

      The x-axis collision radius. If positive then extend the original bounds on x-axis. If negative, overlapping is accepted.

    • Optional yCollisionRadius: number = RADIUS

      The y-axis collision radius. If positive then extend the original bounds on y-axis. If negative, overlapping is accepted.

    • Optional tagArray: LayerType[] = []

      An array of tags to check for collision. If empty, only local layers are checked.

    Returns boolean

    Returns true if the new layer can fit without colliding, false otherwise.

  • Private

    Generate new design within given range. Order here matter as the elements check for collision with each other.

    Parameters

    Returns void