You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
varstage=newPIXI.Container();varrenderer=PIXI.autoDetectRenderer(800,600);document.body.appendChild(renderer.view);varpolyVert4=newPIXI.Polygon([0,0,100,0,100,100,0,100]);varpolyVert5=newPIXI.Polygon([0,0,100,0,100,100,50,150,0,100]);stage.addChild(Polygon(polyVert4,200,200));stage.addChild(Polygon(polyVert5,400,200));requestAnimationFrame(animate);functionanimate(){requestAnimationFrame(animate);// Render the stage.renderer.render(stage);}functionPolygon(polygon,x,y,props){vargraphics=newPIXI.Graphics();graphics.clear();graphics.beginFill('0xEE82EE',.5);graphics.lineStyle(2,'0x008000',0.67);graphics.drawPolygon(polygon.points);graphics.endFill();graphics.position.x=x;graphics.position.y=y;returngraphics;};
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.
link to JSFiddle!
The text was updated successfully, but these errors were encountered: