Skip to content

Instantly share code, notes, and snippets.

@vrobel
Last active December 10, 2015 14:08
Show Gist options
  • Save vrobel/4445873 to your computer and use it in GitHub Desktop.
Save vrobel/4445873 to your computer and use it in GitHub Desktop.
Make a Nape v2 Triangle shape of given width and height
var verts : Array = Polygon.regular( width *.5, height, 4, -Math.PI * .5 );
verts.splice( 2, 1 );
var shape:Shape = new Polygon( verts );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment