Skip to content

Commit

Permalink
performance optimization - made the bounds computation 'unstroked', see
Browse files Browse the repository at this point in the history
  • Loading branch information
jbphet committed Nov 4, 2015
1 parent b13831e commit 2fce61c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions js/StarNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,16 @@ define( function( require ) {
stroke: options.emptyStroke,
fill: options.emptyFill,
lineWidth: options.emptyLineWidth,
lineJoin: options.emptyLineJoin
lineJoin: options.emptyLineJoin,
boundsMethod: 'unstroked' // optimization for faster creation and usage
} ) );

this.addChild( new Path( new StarShape( options ), {
stroke: options.filledStroke,
fill: options.filledFill,
lineWidth: options.filledLineWidth,
lineJoin: options.filledLineJoin
lineJoin: options.filledLineJoin,
boundsMethod: 'unstroked' // optimization for faster creation and usage
} ) );

this.mutate( options );
Expand Down

0 comments on commit 2fce61c

Please sign in to comment.