agmcleod Posted February 19, 2014 Share Posted February 19, 2014 Presently I have a game that uses the canvas API to draw along a specified path. I'm wondering if there's a way to do this with Phaser. One option I'm also considering is cropping an image by the specified polygon shape. Any ideas? The polygon will likely be the height of the game screen, and kind of zig-zagged along the side. Link to comment Share on other sites More sharing options...
agmcleod Posted February 20, 2014 Author Share Posted February 20, 2014 Edited for clarity, and bump! Link to comment Share on other sites More sharing options...
bobo Posted February 22, 2014 Share Posted February 22, 2014 I also need to draw polygons, and have tried using the "renderPolygon" function (in the "Debug" class) with no luck.As far as I can tell, this function is broken, as I have successfully used other render functions in this class (such as renderLine and renderCircle). Here is some example code that demonstrates how to use some of the render functions in the Debug class:http://examples.phaser.io/_site/view_full.html?d=debug&f=debug+draw.js&t=debug%20drawGet these working, and then try to use the renderPolygon function, and let us know how you go. The error I get is described in the thread I started:http://www.html5gamedevs.com/topic/4012-the-renderpolygon-function/ Link to comment Share on other sites More sharing options...
Recommended Posts