Live data from Hacker News

Zdog – Pseudo-3D JavaScript engine for Canvas and SVG

zzz.dog

21–30 of 96 posts

Re: Zdog – Pseudo-3D JavaScript engine for Canvas and SVG

#21
post #13

This is amazing. The examples are great and feel amost too easy. I hope I get the chance to use it.

Same. I kind of wish I had a need for this sort of thing. Without this sort of library I would have zero chance of building this myself. Amazing.

> I kind of wish I had a need for this sort of thing.

Just Do It. Over some coffee instead of loading HN.

Make a snowman. Three spheres. Progressively smaller. Make two eyes, then get the snowman to rotate. Then add a carrot nose. Maybe two arms as extra credit.

Doesn't take long, you've dabbled enough to at least think of it if you do ever need it. And best of all, you've replaced idle consumption with creation which always is a more fulfilling use of time.

Re: Zdog – Pseudo-3D JavaScript engine for Canvas and SVG

#25
Does this library support dynamic rendering? I tried to add extra elements to the illustration after rendering it to the canvas and it doesn't appear to work. I might be using the API incorrectly though - is the idea that you can use this library to produce a static model which can then be transformed (eg. rotated), but can't be extended after the first render?

Re: Zdog – Pseudo-3D JavaScript engine for Canvas and SVG

#26

Pop this on product hunt, you'll get your first few thousand users in no time. > Zdog is directly inspired by Dogz, a virtual pet game by P.F. Magic released in 1995. It used flat 2D circle sprites to render the Dogz’ models, but in a 3D scene. See Dogz playthrough video here. Dogz were fully animated in real time, running, flopping, scratching (on Windows 3.1!). It was remarkable. The new repeating the old. Love whe…

It reminded me of Ecstatica (https://en.wikipedia.org/wiki/Ecstatica), an early 90s game that rendered character with sorted ellipsoids. It also reminds me of Ballz 3D, which also used sorted circles for rendering.

Some Pico-8 demos also use sorted circles for a 3D effect (https://www.lexaloffle.com/bbs/?tid=4050) and (http://www.pouet.net/prod.php?which=66974)

Re: Zdog – Pseudo-3D JavaScript engine for Canvas and SVG

#27
post #2

Is it me, or that `addTo` api feels very strange. Creating new objects with no assignments, with the side effects of adding it to an illustration.

When the objects are tightly coupled, it makes sense to keep this logic internal.

This way its short and self documenting, easyer to improve without breaking existing stuff, and likely has some implicit stability and performance gains because developers can make less mistakes.

Re: Zdog – Pseudo-3D JavaScript engine for Canvas and SVG

#29
So cool. I looked at a few projects and was turned off by how much code was needed to render each result. However, when I looked closer I realized that most of the code was simply to define the shapes in the illustration, which, is nice, because it's not very logic heavy and means these scenes could be whipped up relatively quickly without confusing the hell out of me. Nice! To the author: you said you wanted to make it for a video game, would love to hear if that idea is going anywhere because I could imagine something like this as a game engine being super useful.

Re: Zdog – Pseudo-3D JavaScript engine for Canvas and SVG

#30
post #13

Earlier quoted context omitted.

Same. I kind of wish I had a need for this sort of thing. Without this sort of library I would have zero chance of building this myself. Amazing.

> I kind of wish I had a need for this sort of thing. Just Do It. Over some coffee instead of loading HN. Make a snowman. Three spheres. Progressively smaller. Make two eyes, then get the snowman to rotate. Then add a carrot nose. Maybe two arms as extra credit. Doesn't take long, you've dabbled enough to at least think of it if you do ever need it. And best of all, you've replaced idle consumption with creation whic…

You are the man. Took the advice. :D
Post reply on HN