Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Properly handle POINTS for highlight logic #552

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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