Documentation
    Preparing search index...

    Debug module registered into devtools as window.Debug (or just Debug). Contains various debug utilities for working on LoPoly games.

    Index
    • Record an HTML canvas directly to a compressed webm video. 640x480, 30fps.

      Returns void

    • Record an HTML canvas directly to a compressed webm video. 640x480, 30fps.

      Parameters

      • options: Partial<RecordCanvasOptions>

      Returns void

    • Record an HTML canvas directly to a compressed webm video. 640x480, 30fps.

      Parameters

      • canvasSelector: string
      • options: Partial<RecordCanvasOptions>

      Returns void

    • Record an HTML canvas as a series of PNGs and download them as a ZIP file. This is a lossless, raw frame capture. You can use something like ffmpeg to join the frames into a video:

      Returns void

      ffmpeg -framerate 30 -i "${FRAMES_DIR}/frame_%04d.png" -vf "scale=iw*4:ih*4:flags=neighbor" -c:v libx264 -pix_fmt yuv420p -crf 0 -preset veryslow "$OUTPUT"
      
    • Record an HTML canvas as a series of PNGs and download them as a ZIP file. This is a lossless, raw frame capture. You can use something like ffmpeg to join the frames into a video:

      Parameters

      • options: Partial<RecordCanvasRawOptions>

      Returns void

      ffmpeg -framerate 30 -i "${FRAMES_DIR}/frame_%04d.png" -vf "scale=iw*4:ih*4:flags=neighbor" -c:v libx264 -pix_fmt yuv420p -crf 0 -preset veryslow "$OUTPUT"
      
    • Record an HTML canvas as a series of PNGs and download them as a ZIP file. This is a lossless, raw frame capture. You can use something like ffmpeg to join the frames into a video:

      Parameters

      • canvasSelector: string
      • Optionaloptions: Partial<RecordCanvasRawOptions>

      Returns void

      ffmpeg -framerate 30 -i "${FRAMES_DIR}/frame_%04d.png" -vf "scale=iw*4:ih*4:flags=neighbor" -c:v libx264 -pix_fmt yuv420p -crf 0 -preset veryslow "$OUTPUT"
      
    • Capture the contents of an HTML canvas as a png image.

      Parameters

      • canvasSelector: string = "canvas"

      Returns void

    • No description provided.

      Returns void

    • Create an instance of DebugModule and store it on window.Debug.

      Parameters

      • saveOverride: SaveOverrideFunction | undefined = undefined

        Optional override for providing custom file-saving logic.

      Returns void

    • No description provided.

      Parameters

      • engine: Engine
      • canvas: HTMLCanvasElement

      Returns void