admin管理员组文章数量:1293970
I want to draw a perspective grid on canvas, something like this: .html My best so far looks like this: / I don't exactly like it, I want it to look more realistic. So my question is: is there some library or something else that could render my grid in perspective if I only drew it flat. I have fair understanding of Javascript, so it doesn't have to be a plete spoon-feeding, just need to be pointed to the right direction at least.
I want to draw a perspective grid on canvas, something like this: http://www.shutterstock./pic-9039343/stock-photo-abstract-horizon-grid-perspective.html My best so far looks like this: http://modwebsolutions./test/ I don't exactly like it, I want it to look more realistic. So my question is: is there some library or something else that could render my grid in perspective if I only drew it flat. I have fair understanding of Javascript, so it doesn't have to be a plete spoon-feeding, just need to be pointed to the right direction at least.
Share asked Apr 20, 2011 at 20:20 CaballeroCaballero 12.1k22 gold badges105 silver badges169 bronze badges 2- 1 Your test looks pretty realistic to me. What more were you looking for? Background images? – sdleihssirhc Commented Apr 20, 2011 at 20:27
- Well, I want the grid to look more like that picture, but somehow I can't get the math to work. – Caballero Commented Apr 21, 2011 at 18:32
1 Answer
Reset to default 9Yes, you can draw things flat and have them rendered in perspective. There's a bit of math to the ordeal but nothing insane.
This should get you going:
http://tulrich./geekstuff/canvas/perspective.html
本文标签: javascriptPerspective rendering in HTML5 CanvasStack Overflow
版权声明:本文标题:javascript - Perspective rendering in HTML5 Canvas - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741581297a2386584.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论