Represents a design layer with tag and coordinates.

Implements

Constructors

Properties

Methods

Constructors

  • Creates an instance of sketch layer.

    Parameters

    • tag: LayerType

      The tag associated with the design layer.

    • x: number

      The x-coordinate of the design layer.

    • y: number

      The y-coordinate of the design layer.

    • width: number

      The width of the design layer.

    • Optional height: number = 0

      The height of the design layer. The boat doesn't have specific height at creation.

    Returns SketchLayer

Properties

height: number = 0

The height of the design layer. The boat doesn't have specific height at creation.

The tag associated with the design layer.

width: number

The width of the design layer.

x: number

The x-coordinate of the design layer.

y: number

The y-coordinate of the design layer.

Methods

  • Checks if this SketchLayer is colliding with another SketchLayer.

    Parameters

    • layer: SketchLayer

      The SketchLayer to check collision with.

    • Optional xCollisionRadius: number = 0

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

    • Optional yCollisionRadius: number = 0

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

    Returns boolean

    • Returns true if the SketchLayers are colliding, false otherwise.