We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ea4b3d6 commit 906b0e0Copy full SHA for 906b0e0
src/webgl/ShaderGenerator.js
@@ -8,7 +8,6 @@ import { parse } from 'acorn';
8
import { ancestor } from 'acorn-walk';
9
import escodegen from 'escodegen';
10
11
-const fn = {};
12
function shadergenerator(p5, fn) {
13
14
let GLOBAL_SHADER;
@@ -1627,7 +1626,7 @@ function shadergenerator(p5, fn) {
1627
1626
const originalLerp = fn.lerp;
1628
fn.lerp = function (...args) {
1629
if (GLOBAL_SHADER?.isGenerating) {
1630
- return fn.mix(...args); // Use mix inside p5.strands
+ return this.mix(...args); // Use mix inside p5.strands
1631
} else {
1632
return originalLerp.apply(this, args); // Fallback to normal p5.js lerp
1633
}
0 commit comments