Class representing a generator for a twig with branches and leaves.

Hierarchy (view full)

Constructors

Properties

Methods

Constructors

  • Generates a twig with branches and leaves.

    Parameters

    • xOffset: number

      X-coordinate of the twig base.

    • yOffset: number

      Y-coordinate of the twig base.

    • depth: number

      Depth of the twig branches.

    • Optional angle: number = 0

      Initial angle of the twig.

    • Optional scale: number = 1

      Scale factor of the twig.

    • Optional direction: number = 1

      Direction of the twig branches.

    • Optional strokeWidth: number = 1

      Width of the twig branches.

    • Optional leaves: number = 12

      Number of the leaves.

    Returns Twig

Properties

elements: Element[] = []

An array of Elements.

range: Range = ...

Methods