jwagner / simplex-noise.js

A fast simplex noise implementation in Javascript / Typescript.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

simplify interface

semibran opened this issue · comments

hey, love what this module is doing. I was thinking it could be simplified further by using the following function signature:

simplex(random)(x[, y, z, w]) -> noise

The result would use currying to accept a function with the same random() -> percent signature as Math.random, then the user would be able to call a 1D, 2D, 3D, or 4D variation of the function which would be selected based on the number of arguments supplied.

Also addresses #16 by definition.