@esengine/nova-ecs-render-canvas - v1.0.2
    Preparing search index...

    Class BatchManager

    Batch rendering manager 批量渲染管理器

    Index

    Constructors

    Properties

    drawCircleImmediate: (
        center: FixedVector2,
        radius: Fixed,
        style: ShapeStyle,
    ) => void = ...
    drawLineImmediate: (
        start: FixedVector2,
        end: FixedVector2,
        style: LineStyle,
    ) => void = ...
    drawPolygonImmediate: (vertices: FixedVector2[], style: ShapeStyle) => void = ...
    drawRectImmediate: (bounds: FixedRect, style: ShapeStyle) => void = ...
    drawTextImmediate: (
        text: string,
        position: FixedVector2,
        style: TextStyle,
    ) => void = ...

    Methods

    • Add circle command to batch 添加圆形命令到批次

      Parameters

      • center: FixedVector2
      • radius: Fixed
      • style: ShapeStyle

      Returns void

    • Add line command to batch 添加线条命令到批次

      Parameters

      • start: FixedVector2
      • end: FixedVector2
      • style: LineStyle

      Returns void

    • Add polygon command to batch 添加多边形命令到批次

      Parameters

      • vertices: FixedVector2[]
      • style: ShapeStyle

      Returns void

    • Add rectangle command to batch 添加矩形命令到批次

      Parameters

      • bounds: FixedRect
      • style: ShapeStyle

      Returns void

    • Add text command to batch 添加文本命令到批次

      Parameters

      • text: string
      • position: FixedVector2
      • style: TextStyle

      Returns void

    • End batch rendering and execute all commands 结束批量渲染并执行所有命令

      Returns void

    • Flush current batch immediately 立即刷新当前批次

      Returns void

    • Get batched draw call count 获取批量绘制调用次数

      Returns number

    • Reset batched draw call count 重置批量绘制调用次数

      Returns void