Lume
    Preparing search index...

    Class Box

    Draws a square box.

    Hierarchy (View Summary)

    Index

    Accessors

    • get cornerRadius(): number

      Returns the radius of the corners. If greater than zero, corners are rounded.

      Returns number

    • set cornerRadius(value: number): void

      Sets the size of the corner radius.

      Parameters

      • value: number

      Returns void

      Value must be equal or greater than zero.

    • get strokeWeight(): number

      Returns the thickness of the border. Stored as pixel units.

      Returns number

    • set strokeWeight(value: number): void

      Sets the thickness of the border (in pixels).

      Parameters

      • value: number

      Returns void

      Value must be equal or greater than zero.

    Constructors

    Methods

    • Called by the rendering engine on every frame.

      When overriding this method, ensure that the p5 instance is configured properly. For example, rectangles may be drawn incorrectly if a previous CanvasDrawer had modified p5.rectMode(). CanvasDrawer classes are not obligated/expected to use the default p5 attributes.

      See the p5 documentation on attributes for more information: https://p5js.org/reference/#Attributes

      Returns void