File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -1818,12 +1818,12 @@ function rendererWebGPU(p5, fn) {
18181818 }
18191819
18201820 // Find the input parameter name from the main function signature (anchored to start)
1821- const inputMatch = postMain . match ( / ^ \s * \( ( \w + ) : \s * \w + \) / ) ;
1821+ const inputMatch = main . match ( / f n m a i n \s * \( ( \w + ) : \s * \w + \) / ) ;
18221822 if ( inputMatch ) {
18231823 const inputVarName = inputMatch [ 1 ] ;
18241824 initStatements = initStatements . replace ( / I N P U T _ V A R / g, inputVarName ) ;
18251825 // Insert after the main function parameter but before any other code (anchored to start)
1826- postMain = postMain . replace ( / ^ ( \s * \( \w + : \s * \w + \) \s * [ ^ { ] * \{ ) / , `$1\n ${ initStatements } ` ) ;
1826+ postMain = initStatements + postMain ;
18271827 }
18281828 }
18291829 }
You can’t perform that action at this time.
0 commit comments