Changeset 0c6b92a for imaps-frontend/node_modules/konva/lib/shapes/Star.js
Legend:
- Unmodified
- Added
- Removed
-
imaps-frontend/node_modules/konva/lib/shapes/Star.js
rd565449 r0c6b92a 8 8 class Star extends Shape_1.Shape { 9 9 _sceneFunc(context) { 10 varinnerRadius = this.innerRadius(), outerRadius = this.outerRadius(), numPoints = this.numPoints();10 const innerRadius = this.innerRadius(), outerRadius = this.outerRadius(), numPoints = this.numPoints(); 11 11 context.beginPath(); 12 12 context.moveTo(0, 0 - outerRadius); 13 for ( varn = 1; n < numPoints * 2; n++) {14 varradius = n % 2 === 0 ? outerRadius : innerRadius;15 varx = radius * Math.sin((n * Math.PI) / numPoints);16 vary = -1 * radius * Math.cos((n * Math.PI) / numPoints);13 for (let n = 1; n < numPoints * 2; n++) { 14 const radius = n % 2 === 0 ? outerRadius : innerRadius; 15 const x = radius * Math.sin((n * Math.PI) / numPoints); 16 const y = -1 * radius * Math.cos((n * Math.PI) / numPoints); 17 17 context.lineTo(x, y); 18 18 }
Note:
See TracChangeset
for help on using the changeset viewer.