Flat, round, designer-friendly pseudo-3D engine for canvas & SVG
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

๐Ÿ›  PathCommand mapNewVector

+9 -1
+9 -1
js/path-command.js
··· 21 21 function PathCommand( method, points, previousPoint ) { 22 22 this.method = method; 23 23 this.points = points.map( mapVectorPoint ); 24 - this.renderPoints = points.map( mapVectorPoint ); 24 + this.renderPoints = points.map( mapNewVector ); 25 25 this.previousPoint = previousPoint; 26 26 this.endRenderPoint = this.renderPoints[ this.renderPoints.length - 1 ]; 27 27 // arc actions come with previous point & corner point ··· 32 32 } 33 33 34 34 function mapVectorPoint( point ) { 35 + if ( point instanceof Vector ) { 36 + return point; 37 + } else { 38 + return new Vector( point ); 39 + } 40 + } 41 + 42 + function mapNewVector( point ) { 35 43 return new Vector( point ); 36 44 } 37 45