Transferring dynamic data using imports/exports

Viewed 44

I have two P5 scripts running synchronously:

A. Continuously populates an object with fresh data using posenet and the webcam.
B. Dynamically draws on the canvas using said data

What is the best practice to get the data from file A to file B in real time, using ES6 modules (webpack)? Is it better practice to store the data in a separate json file?

0 Answers
Related