lunarovich Posted May 8, 2015 Share Posted May 8, 2015 Hello. Since I've migrated to V3, I have a strange issue with polygon drawing. Every time I want to draw a polygon object that has 5 or more vertices, the given alpha value to the .beginFill is ignored and alpha = 1 is used insted. Here is the code chunk from my game framework Dodo:DODO.drawPolygon = function (graphics, polygon, props) { _.isObject(props) || (props = {}); graphics.clear(); graphics.beginFill(props.fillColor || DODO.Colors.violet, props.fillAlpha || 0.5); graphics.lineStyle(props.lineWidth || 2, props.lineColor || DODO.Colors.green, props.lineAlpha || 0.67); graphics.drawPolygon(polygon.points); graphics.endFill();};I use it for debug purposes to draw a collision mask: Or the other example: Quote Link to comment Share on other sites More sharing options...
xerver Posted May 8, 2015 Share Posted May 8, 2015 That certainly looks like a bug, can you please report it on GitHub so we can track it? Thanks! Quote Link to comment Share on other sites More sharing options...
lunarovich Posted May 8, 2015 Author Share Posted May 8, 2015 It appears that it's definitely a bug. Here is a bug report and a barebones JSFiddle example (included in bug report also). Quote Link to comment Share on other sites More sharing options...
xerver Posted May 8, 2015 Share Posted May 8, 2015 Totally weird, fixed it in the latest dev code. Hotfix incoming when I finish this bug smash I am on today. 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.