Hey, I am trying to run two instances of Sketch.js on two different canvases. However, my demo will only run the latest Sketch.js instance that was created. I've created a reduced test below that shows the issue.
You can confirm this by commenting out the second instance of the creation starting at line 15.
I am suspecting there is something going wrong with either the start(), running, dt, or millis properties when using multiple instances. You can see how they output different values in my console log interval at line 31:
I even tried adding a manual a.start() call, but a always reports running to be false.
I am not sure how the inner working of Sketch.js handle multiple instances, but there could be an issue there. If there's a solution for this, let me know. Thanks!
Hey, I am trying to run two instances of Sketch.js on two different canvases. However, my demo will only run the latest Sketch.js instance that was created. I've created a reduced test below that shows the issue.
https://codepen.io/jackrugile/pen/1cd4ff94228f26fbd3775d5e9bc04dd9
You can confirm this by commenting out the second instance of the creation starting at line 15.
I am suspecting there is something going wrong with either the
start()
,running
,dt
, ormillis
properties when using multiple instances. You can see how they output different values in my console log interval at line 31:I even tried adding a manual
a.start()
call, buta
always reportsrunning
to befalse
.I am not sure how the inner working of Sketch.js handle multiple instances, but there could be an issue there. If there's a solution for this, let me know. Thanks!