Skip to content

Commit 886c900

Browse files
committed
Properly handle POINTS for highlight logic
1 parent 505508c commit 886c900

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/visualization/interaction/Highlighter.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,15 +86,15 @@ ROS3D.Highlighter.prototype.renderHighlights = function(scene, renderer, camera)
8686

8787
/**
8888
* Traverses the given object and makes every object that's a Mesh,
89-
* Line or Sprite invisible. Also saves the previous visibility state
89+
* Line, Sprite or points invisible. Also saves the previous visibility state
9090
* so we can restore it later.
9191
*
9292
* @param scene - the object to traverse
9393
*/
9494
ROS3D.Highlighter.prototype.makeEverythingInvisible = function (scene) {
9595
scene.traverse(function(currentObject) {
9696
if ( currentObject instanceof THREE.Mesh || currentObject instanceof THREE.Line
97-
|| currentObject instanceof THREE.Sprite ) {
97+
|| currentObject instanceof THREE.Sprite || currentObject instanceof THREE.Points ) {
9898
currentObject.previousVisibility = currentObject.visible;
9999
currentObject.visible = false;
100100
}
@@ -111,7 +111,7 @@ ROS3D.Highlighter.prototype.makeEverythingInvisible = function (scene) {
111111
ROS3D.Highlighter.prototype.makeHighlightedVisible = function (scene) {
112112
var makeVisible = function(currentObject) {
113113
if ( currentObject instanceof THREE.Mesh || currentObject instanceof THREE.Line
114-
|| currentObject instanceof THREE.Sprite ) {
114+
|| currentObject instanceof THREE.Sprite || currentObject instanceof THREE.Points ) {
115115
currentObject.visible = true;
116116
}
117117
};

0 commit comments

Comments
 (0)