test Posted April 9, 2014 Share Posted April 9, 2014 I'm writing a program that will have a large number of simple polygons which users can click on to select. I thought Pixi would be a great place to start because it includes a Polygon class and a function to see if points (mouseclicks) are inside the Polygon. Unfortunately, I haven't figured out a convenient way to draw Polygons to the stage -- it looks like the stage is expecting an object which inherits from the DisplayObject class, and the Polygon class does not. Is there an easy way to do this that I have overlooked? If there isn't already an easy way then I am thinking about extending Pixi to do what I want. Maybe if I'm happy with the results I could even have my first open source contribution. If anyone is already working on this would you please let me know so that we don't duplicate effort? Quote Link to comment Share on other sites More sharing options...
xerver Posted April 9, 2014 Share Posted April 9, 2014 The geometry objects are for representing shapes in code, not drawing them. You are looking for the PIXI.Graphics object which exposes canvas-like drawing methods that you can use to draw shapes. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.