Cannot create new shapes inside animate function
charlesr1971 opened this issue · comments
Charles Robertson commented
When I try and create a new shape inside:
var shapes = [];
function animate(){
push.shapes(new Zdog.Shape({...}));
illo.updateRenderGraph();
window.requestAnimationFrame(animate);
}
Although the array gets populated, the new shapes do not get rendered to the screen.
I am not sure whether this is a bug or a constraint of 'requestAnimationFrame'?
David DeSandro commented
I'm sorry to see you're having trouble with Zdog. Could you provide a reduced test case? See Submitting Issues in the contributing guidelines.