B2G/gecko/browser/devtools/tilt/TiltVisualizer.jsm
/**
   * Picks a stacked dom node at the x and y screen coordinates and highlights
   * the selected node in the mesh.
   *
   * @param {Number} x
   *                 the current horizontal coordinate of the mouse
   * @param {Number} y
   *                 the current vertical coordinate of the mouse
   * @param {Object} aProperties
   *                 an object containing the following properties:
   *      {Function} onpick: function to be called after picking succeeded
   *      {Function} onfail: function to be called after picking failed
   */
Picks a stacked dom node at the x and y screen coordinates and highlights
the selected node in the mesh.

@param {Number} x
the current horizontal coordinate of the mouse
@param {Number} y
the current vertical coordinate of the mouse
@param {Object} aProperties
an object containing the following properties:
{Function} onpick: function to be called after picking succeeded
{Function} onfail: function to be called after picking failed
Picks a stacked dom node at the x and y screen coordinates and highlights the selected node in the mesh . @param { Number } x the current horizontal coordinate of the mouse @param { Number } y the current vertical coordinate of the mouse @param { Object } aProperties an object containing the following properties : { Function } onpick : function to be called after picking succeeded { Function } onfail : function to be called after picking failed
function TVP_highlightNodeAt(x, y, aProperties)
  {
    aProperties = aProperties || {};
    this.pickNode(x, y, {
      onfail: function TVP_onHighlightFail()
      {
        this.highlightNodeFor(-1);
        if ("function" === typeof aProperties.onfail) {
          aProperties.onfail();
        }
      }.bind(this),
      onpick: function TVP_onHighlightPick(aIntersection)
      {
        this.highlightNodeFor(aIntersection.index);
        if ("function" === typeof aProperties.onpick) {
          aProperties.onpick();
        }
      }.bind(this)
    });
  }
function TVP_highlightNodeAt ( x , y , aProperties ) { aProperties = aProperties || { } ; this . pickNode ( x , y , { onfail : function TVP_onHighlightFail ( ) { this . highlightNodeFor ( - 1 ) ; if ( "function" === typeof aProperties . onfail ) { aProperties . onfail ( ) ; } } . bind ( this ) , onpick : function TVP_onHighlightPick ( aIntersection ) { this . highlightNodeFor ( aIntersection . index ) ; if ( "function" === typeof aProperties . onpick ) { aProperties . onpick ( ) ; } } . bind ( this ) } ) ; }
Picks a stacked dom node at the x and y screen coordinates and highlights
 the selected node in the mesh.
Picks a stacked dom node at the x and y screen coordinates and highlights the selected node in the mesh .
// make sure the properties parameter is a valid object // try to pick a mesh node using the current x, y coordinates /**
       * Mesh picking failed (nothing was found for the picked point).
       */ /**
       * Mesh picking succeeded.
       *
       * @param {Object} aIntersection
       *                 object containing the intersection details
       */