Skip to content

Commit 906b0e0

Browse files
Update ShaderGenerator.js to revert unnecessary changes
1 parent ea4b3d6 commit 906b0e0

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/webgl/ShaderGenerator.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import { parse } from 'acorn';
88
import { ancestor } from 'acorn-walk';
99
import escodegen from 'escodegen';
1010

11-
const fn = {};
1211
function shadergenerator(p5, fn) {
1312

1413
let GLOBAL_SHADER;
@@ -1627,7 +1626,7 @@ function shadergenerator(p5, fn) {
16271626
const originalLerp = fn.lerp;
16281627
fn.lerp = function (...args) {
16291628
if (GLOBAL_SHADER?.isGenerating) {
1630-
return fn.mix(...args); // Use mix inside p5.strands
1629+
return this.mix(...args); // Use mix inside p5.strands
16311630
} else {
16321631
return originalLerp.apply(this, args); // Fallback to normal p5.js lerp
16331632
}

0 commit comments

Comments
 (0)