Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "points"

Index

Functions

Const buildShape

  • buildShape(shape: string, id: string, r: number): (string | { cx: number; cy: number; id: string; r: string | number })[] | (string | { height: string | number; id: string; width: string | number; x: string | number; y: string | number })[]
  • Parameters

    • shape: string
    • id: string
    • r: number

    Returns (string | { cx: number; cy: number; id: string; r: string | number })[] | (string | { height: string | number; id: string; width: string | number; x: string | number; y: string | number })[]

Const buildSymbol

  • buildSymbol(group: any[], shape: string, size: number): string
  • Parameters

    • group: any[]
    • shape: string
    • size: number

    Returns string

Const packedPoints

  • packedPoints(pts: ArrayLike<number>, shape: string, size?: number, attribs?: any, ...body: any[]): any[]
  • Similar to points, but takes points from a single large flat buffer of coordinates with arbitrary striding.

    remarks

    In addition to shape and size, the following attribs can be used to define the index range and strides:

    • start - start index (default: 0)
    • num - number of points (default: buffer length/2)
    • cstride - component stride (default: 1)
    • estride - element stride (default: 2)

    Parameters

    • pts: ArrayLike<number>

      flat point buffer

    • shape: string

      shape type

    • Default value size: number = 1

      point size/radius

    • Optional attribs: any

      other attributes

    • Rest ...body: any[]

    Returns any[]

Const points

  • points(pts: Iterable<Vec2Like>, shape: string, size?: number, attribs?: any, ...body: any[]): any[]
  • Shape instancing group.

    remarks

    The shape arg can be an SVG shape #id defined elsewhere in the document or set to circle or rect (default).

    The size arg is only used for the latter two shape types and defines the radius or width respectively.

    Parameters

    • pts: Iterable<Vec2Like>

      points

    • shape: string

      shape type

    • Default value size: number = 1

      point size/radius

    • Optional attribs: any

      attributes

    • Rest ...body: any[]

    Returns any[]

Generated using TypeDoc