Skip to content

Commit

Permalink
use forEach
Browse files Browse the repository at this point in the history
  • Loading branch information
pixelzoom committed Apr 13, 2024
1 parent f164bbd commit 1ffbb44
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions js/common/view/PickupCoilSamplePointsNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,10 @@ export default class PickupCoilSamplePointsNode extends Node {

pickupCoil.samplePointsProperty.link( () => {
const shape = new Shape();
const samplePoints = pickupCoil.samplePointsProperty.value;
for ( let i = 0; i < samplePoints.length; i++ ) {
const samplePoint = samplePoints[ i ];
pickupCoil.samplePointsProperty.value.forEach( samplePoint => {
shape.moveToPoint( samplePoint );
shape.circle( samplePoint, 2 );
}
} );
path.shape = shape;
} );

Expand Down

0 comments on commit 1ffbb44

Please sign in to comment.