You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems when adding a block while the simulation is running (Runner.run(runner, engine) has been called etc.), a deep copy triggered from inside the DomBodies.block function goes into an endless loop, resulting in a stack call size exceeded error.
The element I'm adding can be added fine if it is added before the simulation starts running, so I'm fairly certain that the problem is that the render has some kind of circular reference after starting the simulation.
let matterBlock = DomBodies.block(x, y, {
Dom: {
render: this.render,
element,
},
width,
height
});
World.add(this.engine.world, matterBlock);
The text was updated successfully, but these errors were encountered:
It seems when adding a block while the simulation is running (
Runner.run(runner, engine)
has been called etc.), a deep copy triggered from inside the DomBodies.block function goes into an endless loop, resulting in a stack call size exceeded error.The element I'm adding can be added fine if it is added before the simulation starts running, so I'm fairly certain that the problem is that the
render
has some kind of circular reference after starting the simulation.The text was updated successfully, but these errors were encountered: