CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-gl

Creates a WebGL context without a window for headless rendering and server-side graphics

Overall
score

96%

Overview
Eval results
Files

rubric.jsonevals/scenario-1/

{
  "context": "This criteria evaluates how well the engineer uses the headless-gl package to create and configure a WebGL 2.0 rendering context, perform basic rendering operations, and properly manage GPU resources in a server-side environment.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "WebGL 2.0 Context Creation",
      "description": "Uses createContext(width, height, options) with the createWebGL2Context: true option to create a WebGL 2.0 context instead of WebGL 1.0",
      "max_score": 30
    },
    {
      "name": "Context Attributes Configuration",
      "description": "Properly configures context attributes in the options object passed to createContext, specifically setting alpha: true, depth: true, and stencil: false as required in the spec",
      "max_score": 20
    },
    {
      "name": "Clear Operations",
      "description": "Uses gl.clearColor(r, g, b, a) to set the clear color and gl.clear(gl.COLOR_BUFFER_BIT) to clear the rendering buffer",
      "max_score": 15
    },
    {
      "name": "Pixel Reading",
      "description": "Uses gl.readPixels(x, y, width, height, gl.RGBA, gl.UNSIGNED_BYTE, buffer) to read pixel data from the framebuffer with appropriate buffer allocation",
      "max_score": 20
    },
    {
      "name": "Resource Cleanup",
      "description": "Uses the STACKGL_destroy_context extension (gl.getExtension('STACKGL_destroy_context')) and calls ext.destroy() to properly release GPU resources",
      "max_score": 15
    }
  ]
}

Install with Tessl CLI

npx tessl i tessl/npm-gl

tile.json