Skip to content

Commit

Permalink
Properly handle POINTS for highlight logic
Browse files Browse the repository at this point in the history
  • Loading branch information
jdavidberger committed Jan 3, 2023
1 parent 505508c commit 886c900
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/visualization/interaction/Highlighter.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,15 +86,15 @@ ROS3D.Highlighter.prototype.renderHighlights = function(scene, renderer, camera)

/**
* Traverses the given object and makes every object that's a Mesh,
* Line or Sprite invisible. Also saves the previous visibility state
* Line, Sprite or points invisible. Also saves the previous visibility state
* so we can restore it later.
*
* @param scene - the object to traverse
*/
ROS3D.Highlighter.prototype.makeEverythingInvisible = function (scene) {
scene.traverse(function(currentObject) {
if ( currentObject instanceof THREE.Mesh || currentObject instanceof THREE.Line
|| currentObject instanceof THREE.Sprite ) {
|| currentObject instanceof THREE.Sprite || currentObject instanceof THREE.Points ) {
currentObject.previousVisibility = currentObject.visible;
currentObject.visible = false;
}
Expand All @@ -111,7 +111,7 @@ ROS3D.Highlighter.prototype.makeEverythingInvisible = function (scene) {
ROS3D.Highlighter.prototype.makeHighlightedVisible = function (scene) {
var makeVisible = function(currentObject) {
if ( currentObject instanceof THREE.Mesh || currentObject instanceof THREE.Line
|| currentObject instanceof THREE.Sprite ) {
|| currentObject instanceof THREE.Sprite || currentObject instanceof THREE.Points ) {
currentObject.visible = true;
}
};
Expand Down

0 comments on commit 886c900

Please sign in to comment.