I have two scripts, in one of them I have an animation on a p5 canvas, and on another script I do some operation on it.
Script A - p5 animation:
functi