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

    Class CanvasDebugRenderer

    Canvas debug renderer extending the base Canvas renderer 扩展基础Canvas渲染器的Canvas调试渲染器

    Hierarchy (View Summary)

    Implements

    • IDebugRenderer
    Index

    Constructors

    Properties

    canvas: HTMLCanvasElement
    coordinateSystem: CoordinateSystem

    Methods

    • Clear all performance measurements 清除所有性能测量

      Returns void

    • Log debug message with optional color 记录带可选颜色的调试消息

      Parameters

      • message: string
      • Optionalcolor: Color

      Returns void

    • Draw an arrow from start to end point 从起点到终点绘制箭头

      Parameters

      • start: FixedVector2
      • end: FixedVector2
      • color: Color
      • OptionalheadSize: Fixed

      Returns void

    • Draw coordinate axes at origin 在原点绘制坐标轴

      Parameters

      • origin: FixedVector2
      • scale: Fixed

      Returns void

    • Draw bounding box around an area 在区域周围绘制边界框

      Parameters

      • bounds: FixedRect
      • color: Color

      Returns void

    • Draw a cross-hair at the specified position 在指定位置绘制十字线

      Parameters

      • position: FixedVector2
      • size: Fixed
      • color: Color

      Returns void

    • Draw debug overlay with information 绘制带信息的调试覆盖层

      Parameters

      • info: DebugInfo

      Returns void

    • Draw debug text at world position 在世界位置绘制调试文本

      Parameters

      • text: string
      • position: FixedVector2
      • Optionalcolor: Color

      Returns void

    • Draw debug text at screen position 在屏幕位置绘制调试文本

      Parameters

      • text: string
      • x: number
      • y: number
      • Optionalcolor: Color

      Returns void

    • Draw a grid with specified spacing 绘制指定间距的网格

      Parameters

      • spacing: Fixed
      • style: GridStyle

      Returns void

    • Draw performance statistics overlay 绘制性能统计覆盖层

      Parameters

      • stats: PerformanceStats

      Returns void

    • End measuring performance for a named operation 结束测量命名操作的性能

      Parameters

      • name: string

      Returns void

    • Get debug configuration 获取调试配置

      Returns DebugConfig

    • Get the current debug mode 获取当前调试模式

      Returns DebugMode

    • Get performance measurements 获取性能测量结果

      Returns Map<string, number>

    • Parameters

      • texture: ITexture
      • position: FixedVector2
      • Optionalstyle: TextureStyle

      Returns void

    • Parameters

      • texture: ITexture
      • sourceRect: FixedRect
      • destRect: FixedRect
      • Optionalstyle: TextureStyle

      Returns void

    • Returns { capabilities: string[]; name: string; vendor: string; version: string }

    • Set debug configuration 设置调试配置

      Parameters

      • config: Partial<DebugConfig>

      Returns void

    • Enable/disable debug logging 启用/禁用调试日志

      Parameters

      • enabled: boolean

      Returns void

    • Set the current debug mode 设置当前调试模式

      Parameters

      • mode: DebugMode

      Returns void

    • Start measuring performance for a named operation 开始测量命名操作的性能

      Parameters

      • name: string

      Returns void

    • Take a screenshot of the current frame 截取当前帧的屏幕截图

      Returns Promise<null | Blob>