Hi everyone,
I am trying to use p5.js static functions in instance mode in observablehq following this example How to call static p5.Vector methods in instance mode - Processing 2.x and 3.x Forum .
This is my code: p5.js static functions on observablehq / Paulo Sobrinho / Observable
But when I uncomment the function subVec() I got an error “TypeError: Cannot read properties of undefined (reading ‘sub’)”.
Could you help me please?
Is there any more better or elegant way of using p5.js static functions in observablehq?
Thanks in advance,