The primary purpose of this PR is to introduce the TransparentLineStrip primitive. The existing LineStrip primitive has alpha overlap artifacts that make it unsuitable for rendering with transparency. TransparentLineStrip solves this at the cost of some efficiency (6x the number of draw calls) and flexibility (color and width are constant across the line strip, instead of per-vertex).
A backwards incompatible change was required to implement this primitive: multiple DrawCommands are needed to render the TransparentLineStrip, so the Primitive.command function was updated to return multiple named DrawCommands in a Record<string, DrawCommand>. See the change log for more details.
This PR also introduces the OpaqueLineStrip primitive, which is identical to the existing LineStrip primitive, but with the alpha channel of the colors parameter disabled. A warning that LineStrip is deprecated is now printed to the console when it is instantiated.
Another incompatible change was made in this PR: renaming Grid.info to Grid.computed.
Several backwards-compatible changes were made as well:
dataset.ts was moved from /src/primitives up to /src.
font.ts was moved from /src/primitives to /src/assets.
The definition for Primitive was moved out of /src/common.ts to /primitives/primitive.ts.
The definition for Composite was moved out of src/common.ts to /composites/composite.ts.
RenderableType was removed entirely and replaced with usage of instanceof.
The primary purpose of this PR is to introduce the
TransparentLineStrip
primitive. The existingLineStrip
primitive has alpha overlap artifacts that make it unsuitable for rendering with transparency.TransparentLineStrip
solves this at the cost of some efficiency (6x the number of draw calls) and flexibility (color and width are constant across the line strip, instead of per-vertex).A backwards incompatible change was required to implement this primitive: multiple
DrawCommands
are needed to render theTransparentLineStrip
, so thePrimitive.command
function was updated to return multiple namedDrawCommands
in aRecord<string, DrawCommand>
. See the change log for more details.This PR also introduces the
OpaqueLineStrip
primitive, which is identical to the existingLineStrip
primitive, but with the alpha channel of thecolors
parameter disabled. A warning thatLineStrip
is deprecated is now printed to the console when it is instantiated.Another incompatible change was made in this PR: renaming
Grid.info
toGrid.computed
.Several backwards-compatible changes were made as well:
dataset.ts
was moved from/src/primitives
up to/src
.font.ts
was moved from/src/primitives
to/src/assets
.Primitive
was moved out of/src/common.ts
to/primitives/primitive.ts
.Composite
was moved out ofsrc/common.ts
to/composites/composite.ts
.RenderableType
was removed entirely and replaced with usage ofinstanceof
.type
s were converted tointerface
s.