Hacker News new | past | comments | ask | show | jobs | submit login

This was my initial attempt using an Illustration https://codepen.io/anon/pen/NVORrZ

This is my 2nd attempt using the docs you linked https://codepen.io/anon/pen/QRZKxy?editors=0010

What do you think - is updateGraph + render supposed to work more than once?




No, the underlying flatgraph (which is used to generate the drawing commands) is cached and only updated on first call. Reset it by calling

  scene.updateFlatGraph();
after adding new shapes, before updating the graph & rendering

(see https://github.com/metafizzy/zdog/blob/master/js/anchor.js#L...)

edit: made an issue https://github.com/metafizzy/zdog/issues/21


Cheers!




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: