MCPcopy Index your code
hub / github.com/PavelDoGreat/WebGL-Fluid-Simulation / updateColors

Function updateColors

script.js:1207–1217  ·  view source on GitHub ↗
(dt)

Source from the content-addressed store, hash-verified

1205}
1206
1207function updateColors (dt) {
1208 if (!config.COLORFUL) return;
1209
1210 colorUpdateTimer += dt * config.COLOR_UPDATE_SPEED;
1211 if (colorUpdateTimer >= 1) {
1212 colorUpdateTimer = wrap(colorUpdateTimer, 0, 1);
1213 pointers.forEach(p => {
1214 p.color = generateColor();
1215 });
1216 }
1217}
1218
1219function applyInputs () {
1220 if (splatStack.length > 0)

Callers 1

updateFunction · 0.85

Calls 2

wrapFunction · 0.85
generateColorFunction · 0.85

Tested by

no test coverage detected