Class: Highlighter

Highlighter(options)

new Highlighter(options)

A mouseover highlighter for 3D objects in the scene.

Parameters:
Name Type Description
options

object with following keys:

  • mouseHandler - the handler for the mouseover and mouseout events
Source:

Methods

makeEverythingInvisible(scene)

Traverses the given object and makes every object that's a Mesh, Line or Sprite invisible. Also saves the previous visibility state so we can restore it later.

Parameters:
Name Type Description
scene

the object to traverse

Source:

makeHighlightedVisible(scene)

Make the objects in the scene that are currently highlighted (and all of their children!) visible.

Parameters:
Name Type Description
scene

the object to traverse

Source:

onMouseOut(event)

Remove the current target of the mouseover from the hover list.

Parameters:
Name Type Description
event

the event that contains the target of the mouseout

Source:

onMouseOver(event)

Add the current target of the mouseover to the hover list.

Parameters:
Name Type Description
event

the event that contains the target of the mouseover

Source:

renderHighlights(scene, renderer, camera)

Render the highlights for all objects that are currently highlighted.

This method should be executed after clearing the renderer and rendering the regular scene.

Parameters:
Name Type Description
scene

the current scene, which should contain the highlighted objects (among others)

renderer

the renderer used to render the scene.

camera

the scene's camera

Source:

restoreVisibility(scene)

Restore the old visibility state that was saved by makeEverythinginvisible.

Parameters:
Name Type Description
scene

the object to traverse

Source: