# wagerfield/flat-surface-shader

Flat Surface Shader for rendering illuminated triangles

Repository: https://github.com/wagerfield/flat-surface-shader
Canonical: https://ross.abutalabs.com/products/flat-surface-shader
Homepage: http://wagerfield.github.io/flat-surface-shader/
Language: JavaScript
License: NOASSERTION
License Family: other
Last push: 2016-01-07T06:05:22+00:00

## Health v2 (maintenance only)
Score: 32/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 0, release rhythm 35, longevity 100
- inputs: {"age_days": 4915, "days_push": 3891, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases, no_license
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2466, forks 266 (observed 2026-08-28T04:06:53.661752+00:00)

## What it is
A lightweight JavaScript library implementing a flat surface shader that renders illuminated triangles using Lambertian reflectance. It supports rendering to WebGL, Canvas 2D, and SVG contexts.

## Use cases
- render lit triangles in the browser
- simulate flat shading with lights on a mesh
- create animated low-poly lighting backgrounds
- render 3D lighting effects without WebGL using canvas or SVG
- build interactive triangle-based visual effects

## When to choose
- you need lightweight flat-shaded triangle rendering with multiple output contexts
- you want WebGL fallbacks via Canvas 2D or SVG
- you need simple Lambertian lighting simulation in JavaScript

## When to avoid
- you need full 3D rendering with textures, shadows, or complex shaders
- you need a maintained general-purpose 3D engine like three.js
- you need PBR or advanced lighting models

## Facets
- artifact type: library
- maturity: maintenance
- function: graphics, animation
- domain: graphics, web-development, frontend
- platform: browser
- tags: lighting, triangles, webgl, canvas-2d, svg, lambertian-reflectance, 3d-rendering, javascript

## Member repositories
- wagerfield/flat-surface-shader (main) score 32

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:06:53.661752+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T02:29:14.037391+00:00, confidence not recorded.
  - readme: https://github.com/wagerfield/flat-surface-shader (fetched 2026-08-28T04:06:53.661752+00:00, sha f88aa85c3189)
  - homepage: http://wagerfield.github.io/flat-surface-shader/ (fetched 2026-08-29T10:10:44.141794+00:00, sha 15c0092156e7)
- Data as of 2026-08-30T08:39:29.467469+00:00.
