MCPcopy Create free account
hub / github.com/DavidHDev/react-bits / _hash

Method _hash

src/tools/texture-lab/renderer.js:1282–1285  ·  view source on GitHub ↗
(x, y, seed)

Source from the content-addressed store, hash-verified

1280 }
1281
1282 _hash(x, y, seed) {
1283 const n = Math.sin(x * 12.9898 + y * 78.233 + seed) * 43758.5453;
1284 return n - Math.floor(n);
1285 }
1286
1287 _applyNoise(data, width, height, params, seed) {
1288 const intensity = params.intensity;

Callers 1

_applyNoiseMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected