Cannot create new shapes inside animate function
Open
- Dominant language
- JavaScript
- Stars
- 10.7k
- Forks
- 407
- PR merge metrics
- No merged PRs in 30d
Description
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'?
Contributor guide
Research direction
Start with the reported animate function and the call to illo.updateRenderGraph(); reproduce the issue using a minimal Zdog.Shape created during requestAnimationFrame. Trace how newly added shapes enter the render graph and confirm that the completed behavior renders shapes created during animation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- computer-graphics
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100