SDF-2D - v0.8.0
    Preparing search index...

    Constructor and vertex storage shared by classes returned by drawables/shapes/polygon-factory!PolygonFactory and drawables/shapes/noisy-polygon-factory!NoisyPolygonFactory. Create drawable classes through those factories.

    Hierarchy

    • EmptyDrawable
      • PolygonBase
    Index
    • Parameters

      • vertices: vec2[]

        Positions in world coordinates, ordered around the polygon's outline.

      Returns PolygonBase

    vertices: vec2[]

    Positions in world coordinates, ordered around the polygon's outline.

    descriptor: DrawableDescriptor

    This should be defined in inherited classes.

    • Return the values that should be given to the shaders through uniform inputs.

      Parameters

      • transform2d: mat2d

        position-like properties should be transformed by this matrix before being returned.

      • transform1d: number

        scalar properties should be transformed by this number before being returned.

      Returns any

    • The lower bound of the distance between the target and the object.

      It can return 0 by default; the only consequence is reduced performance, because this object won't benefit from tile-based rendering.

      Parameters

      • target: vec2

      Returns number