API reference
Preparing search index…

Shape

Abstract

Custom shapes publish a convex point outline by calling update().

Type hierarchy

Hierarchy (View Summary)

Source & inheritance
Member directory36

Constructors

Methods

Constructors

  • Creates a custom convex shape; subclasses provide points and call update().

    Returns

    Source & inheritance

Methods

  • Parameters

    operation
    number
    x
    number
    yOptional
    number
    zOptional
    number

    Returns

    void
    Source & inheritance
  • Returns an independent copy of the fill color.

    Returns

    Source & inheritance
  • Returns the shape's geometric center in local coordinates.

    Returns

    Source & inheritance
  • Returns local axis-aligned bounds including the outline.

    Returns

    Source & inheritance
  • Returns the outline miter limit.

    Returns

    number
    Source & inheritance
  • Returns an independent copy of the outline color.

    Returns

    Source & inheritance
  • Returns the outline thickness.

    Returns

    number
    Source & inheritance
  • Returns the outline point count.

    Returns

    number
    Source & inheritance
  • Return a copy of the rotation normalized to [0°, 360°).

    Returns

    Source & inheritance
  • Sets the maximum ratio of outline miter extension to thickness; must be at least 1.

    Parameters

    this
    limit
    number

    Returns

    void
    Source & inheritance
  • Sets outline thickness in local coordinates; positive values extend outward and negative values inward.

    Parameters

    this
    thickness
    number

    Returns

    void
    Source & inheritance
  • Sets and retains a texture reference; null disables texturing, and resetRect true covers the entire texture.

    Parameters

    this
    texture
    resetRect
    boolean = false

    Returns

    void
    Source & inheritance
  • Rebuilds native geometry from the subclass's getPointCount/getPoint; call after changing custom points.

    Parameters

    this

    Returns

    void
    Source & inheritance

Symbol members

Icons made by Lorc, Delapouite & Skoll · game-icons.net · CC BY 3.0