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-6/

{
  "context": "This evaluation assesses how effectively the engineer uses the gl package's texture creation and upload capabilities, specifically focusing on proper use of texture objects, texImage2D for uploading data, and texture parameter configuration.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Context creation",
      "description": "Uses createContext() from the gl package to create a WebGL rendering context with the correct dimensions (256x256)",
      "max_score": 10
    },
    {
      "name": "Texture object creation",
      "description": "Uses gl.createTexture() to create a texture object",
      "max_score": 10
    },
    {
      "name": "Texture binding",
      "description": "Uses gl.bindTexture() with gl.TEXTURE_2D as the target to bind the texture before uploading data",
      "max_score": 15
    },
    {
      "name": "texImage2D usage",
      "description": "Uses gl.texImage2D() to upload the texture data to the GPU with correct parameters: target (TEXTURE_2D), level (0), internalformat (RGBA), width (256), height (256), border (0), format (RGBA), type (UNSIGNED_BYTE), and pixel data",
      "max_score": 30
    },
    {
      "name": "MIN_FILTER parameter",
      "description": "Uses gl.texParameteri() to set gl.TEXTURE_MIN_FILTER to gl.NEAREST for nearest neighbor filtering",
      "max_score": 10
    },
    {
      "name": "MAG_FILTER parameter",
      "description": "Uses gl.texParameteri() to set gl.TEXTURE_MAG_FILTER to gl.NEAREST for nearest neighbor filtering",
      "max_score": 10
    },
    {
      "name": "Correct data format",
      "description": "Creates texture data as a Uint8Array with RGBA format (4 bytes per pixel) for a 256x256 image, totaling 262144 bytes",
      "max_score": 10
    },
    {
      "name": "Returns required values",
      "description": "Returns an object containing the gl context, texture object, and the generated texture data array as specified in the API",
      "max_score": 5
    }
  ]
}

Install with Tessl CLI

npx tessl i tessl/npm-gl

tile.json