jetlag2d
    Preparing search index...

    Class FilledPolygon

    FilledPolygon describes any object whose visual representation is a filled polygon.

    Index
    • Build a FilledPolygon

      Parameters

      • cfg: {
            fillColor?: string;
            lineColor?: string;
            lineWidth?: number;
            offset?: JLOffset;
            vertices: JLPoint[];
            z?: 0 | 1 | 2 | 4 | -4 | 3 | -3 | -2 | -1;
        }
        • OptionalfillColor?: string

          Color to fill the box

        • OptionallineColor?: string

          Color for the border

        • OptionallineWidth?: number

          Width of the border

        • Optionaloffset?: JLOffset

          An offset between the component's center and its RigidBody's center (optional)

        • vertices: JLPoint[]

          The vertex points, relative to the center.

        • Optionalz?: 0 | 1 | 2 | 4 | -4 | 3 | -3 | -2 | -1

          An optional z index in the range [-4,4]

      Returns FilledPolygon

    actor?: Actor<unknown>

    The Actor to which this FilledPolygon is attached

    fillColor?: string

    Fill color

    height: number

    Height, to simplify some other code

    offset: JLOffset

    An offset between the FilledPolygon's center and the RigidBody's center

    vertices: JLPoint[] = []

    Vertices of the polygon

    width: number

    Width, to simplify some other code

    z: -4 | -3 | -2 | -1 | 0 | 1 | 2 | 3 | 4

    Z index of the polygon: Must be in the range [-4, 4]