metafizzy / zdog

Flat, round, designer-friendly pseudo-3D engine for canvas & SVG
https://zzz.dog
10.36k stars 393 forks source link

Uncaught Error: Zdog.Illustration element required. Set to null #79

Closed koffer closed 4 years ago

koffer commented 5 years ago

I think this is a simple issue.

I try the simple demo pbut I only get the next error:

Uncaught Error: Zdog.Illustration element required. Set to null at r.s.setElement (zdog-docs.min.js:18) at r.s.create (zdog-docs.min.js:18) at new r (zdog-docs.min.js:5) at prueba.js:5

  |s.setElement zdog-docs.min.js:18

  s.create zdog-docs.min.js:18   r zdog-docs.min.js:5   (anonymous) prueba.js:5

I use zdog-docs.min.js

desandro commented 5 years ago

Check how the element property of the Illustration you are using.

andrewnc commented 5 years ago

I ran into this same problem, and it was solved by moving the <canvas> element above the zdog code <script> tag. That could potentially be a solution for you problem also.