Skip to content

Conversation

@ngokevin
Copy link
Member

@ngokevin ngokevin commented May 22, 2018

Description:

Fix an issue where entities would not get mouseleaved when raycaster was disabled.

Changes proposed:

  • When toggling raycaster to disabled, clear its intersections.
  • Use event constants to define in one place now that they are used in multiple methods.
  • Remove function creation in tick
intersection: 'raycaster-intersection',
intersectClear: 'raycaster-intersected-cleared',
intersectionClear: 'raycaster-intersection-cleared'
};
Copy link
Member

@donmccurdy donmccurdy May 22, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: it would be slightly more idiomatic to use this capitalization:

var Event = {
  INTERSECT: 'raycaster-intersected',
  // ...
};
: this.removeEventListeners();
}

if (oldData.enabled && !data.enabled) { this.clearAllIntersections(); }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's also invoke this method on remove().

@ngokevin ngokevin force-pushed the raycasterclear branch 2 times, most recently from 282c944 to 8931ec7 Compare May 22, 2018 22:20
@ngokevin
Copy link
Member Author

Addressed / ready.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

3 participants