Louis Eveillard
Jul 10, 2017 · 1 min read

Ha, good question, that was indeed tricky!

We created a store that contains all of the scene’s variables and a bunch of "setters" methods to change them. The Vue code has no idea there is a p5.js-based canvas, and p5.js has no idea there is a Vue-based dashboard. They just run concurrently and call setters to change values.

Basically, if you run window.store in the inspector you’d see the following output. state is what keeps track of everything that’s in the scene.

We talk about this a bit in the part Storing the scene informations in code.

Does that answer your question? Let me know if you have other questions, happy to help!

    Louis Eveillard

    Written by

    Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
    Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
    Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade