MCPcopy
hub / github.com/KilledByAPixel/LittleJS / debugRenderPost

Function debugRenderPost

src/engineDebug.js:557–579  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

555}
556
557function debugRenderPost()
558{
559 if (debugVideoCaptureIsActive())
560 {
561 debugVideoCaptureUpdate();
562 return;
563 }
564
565 if (!debugWatermark && !debugOverlay) return;
566
567 // update fps display
568 mainContext.textAlign = 'right';
569 mainContext.textBaseline = 'top';
570 mainContext.font = '1em monospace';
571 mainContext.fillStyle = '#000';
572 const text = engineName + ' v' + engineVersion + ' / '
573 + drawCount + ' / ' + primitiveCount + ' / '
574 + engineObjects.length + ' / ' + averageFPS.toFixed(1)
575 + (glEnable ? ' GL' : ' 2D') ;
576 mainContext.fillText(text, mainCanvas.width-3, 3);
577 mainContext.fillStyle = '#fff';
578 mainContext.fillText(text, mainCanvas.width-2, 2);
579}
580
581///////////////////////////////////////////////////////////////////////////////
582// video capture - records video and audio at 60 fps using MediaRecorder API

Callers 1

renderFrameFunction · 0.70

Calls 2

debugVideoCaptureUpdateFunction · 0.70

Tested by

no test coverage detected