finds.dev← search

// the find

mrdoob/texgen.js

★ 1,866 · JavaScript · MIT · updated Jan 2021

JavaScript Texture Generator

A small procedural texture generator for JavaScript that builds 2D textures by layering noise, sine waves, and XOR patterns via a chainable API, then renders to a canvas. Useful for game devs or generative-art folks who want quick procedural textures without pulling in a full shader pipeline.

- The chainable, functional API (.add().mul().tint()) is genuinely pleasant for composing texture layers without writing shader code

- Ships a working visual editor (editor/) with live preview, which makes experimenting with texture combinations much faster than editing JS and reloading

- Zero dependencies for the core library (src/TexGen.js) and a prebuilt minified build, so it drops into a project trivially

- Last commit is from January 2021 — five years stale, no npm package, no TypeScript types, no module/ESM build, just a single global-scoped script

- No tests at all, and no CI, so any behavior you rely on is whatever the current source happens to do

- README is a single code snippet with a picture — no API reference, no list of available generator types (XOR, SinX, Noise, etc.), you have to read src/TexGen.js to know what's available

- CPU-only canvas rendering with no WebGL/shader path, so it won't scale to real-time generation of large textures

View on GitHub → Homepage ↗

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →