Skip to content

Commit

Permalink
doc #209
Browse files Browse the repository at this point in the history
  • Loading branch information
pixelzoom committed Oct 6, 2021
1 parent 1b6c701 commit 823f846
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions js/common/view/LightRaysNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,9 @@ function segmentsToLines( segments, modelViewTransform, stroke, lineWidth ) {
assert && assert( ColorDef.isColorDef( stroke ) );
assert && assert( typeof lineWidth === 'number' && lineWidth > 0 );

// When attempting to render the rays as a single scenery.Path, we were seeing all kinds of closed-path triangles
// being rendered. We had to resort to a scenery.Line per segment to make the problem go away.
// See https://github.com/phetsims/geometric-optics/issues/209
return segments.map( segment => {
const viewStartPoint = modelViewTransform.modelToViewPosition( segment.startPoint );
const viewEndPoint = modelViewTransform.modelToViewPosition( segment.endPoint );
Expand Down

0 comments on commit 823f846

Please sign in to comment.