interface AcGiRenderer<T extends AcGiEntity = AcGiEntity> {
    get context(): AcGiContext;
    get subEntityTraits(): AcGiSubEntityTraits;
    area(area: AcGeArea2d): T;
    circularArc(arc: AcGeCircArc3d): T;
    ellipticalArc(ellipseArc: AcGeEllipseArc3d): T;
    group(entities: T[]): T;
    image(blob: Blob, style: AcGiImageStyle): T;
    lines(points: AcGeVector3dLike[]): T;
    lineSegments(
        array: Float32Array,
        itemSize: number,
        indices: Uint16Array,
    ): T;
    mtext(mtext: AcGiMTextData, style: AcGiTextStyle, delay?: boolean): T;
    point(point: AcGePoint3d, style: AcGiPointStyle): T;
    setFontMapping(mapping: AcGiFontMapping): void;
    shape(shape: AcGiShapeData, style?: AcGiTextStyle, delay?: boolean): T;
}

Type Parameters

Accessors

Methods

  • Create one group

    Parameters

    • entities: T[]

      Input entities to group together

    Returns T

    Return created group

  • Draw lines using gl.LINES.

    Parameters

    • array: Float32Array

      Must be a TypedArray. Used to instantiate the buffer. This array should have itemSize * numVertices elements, where numVertices is the number of vertices.

    • itemSize: number

      The number of values of the array that should be associated with a particular vertex. If the vertex is one 2d point, then itemSize should be 2. If the vertex is one 3d point, then itemSize should be 3.

    • indices: Uint16Array

      Index buffer.

    Returns T

    Return an object which can be added to scene

  • Draw multiple line texts

    Parameters

    • mtext: AcGiMTextData

      Input multiple line text data to draw

    • style: AcGiTextStyle

      Input text style applied to the text string

    • Optionaldelay: boolean

      The flag to delay creating one rendered entity and just create one dummy entity. Renderer can delay heavy calculation operation to avoid blocking UI when this flag is true.

    Returns T

    Return an object which can be added to scene

  • Draw one SHX shape glyph.

    Parameters

    • shape: AcGiShapeData

      Shape placement and glyph identity

    • Optionalstyle: AcGiTextStyle

      Optional text style that references the SHX shape font. When omitted, null, or undefined, the renderer resolves the glyph by collecting every shape definition file from the text style table and searching them for the shape specified in shape.

    • Optionaldelay: boolean

      When true, the renderer may defer heavy work and return a placeholder

    Returns T

    Rendered entity for the scene graph