scene.js
function renderPick() {
    if(checkContextLoss()) {
      return
    }

    gl.colorMask(true, true, true, true)
    gl.depthMask(true)
    gl.disable(gl.BLEND)
    gl.enable(gl.DEPTH_TEST)

    var numObjs = objects.length
    var numPick = pickBuffers.length
    for(var j=0; j<numPick; ++j) {
      var buf = pickBuffers[j]
      buf.shape = pickShape
      buf.begin()
      for(var i=0; i<numObjs; ++i) {
        if(pickBufferIds[i] !== j) {
          continue
        }
        var obj = objects[i]
        if(obj.drawPick) {
          obj.pixelRatio = 1
          obj.drawPick(cameraParams)
        }
      }
      buf.end()
    }
  }
function renderPick() {
    if(checkContextLoss()) {
      return
    }

    gl.colorMask(true, true, true, true)
    gl.depthMask(true)
    gl.disable(gl.BLEND)
    gl.enable(gl.DEPTH_TEST)

    var numObjs = objects.length
    var numPick = pickBuffers.length
    for(var j=0; j<numPick; ++j) {
      var buf = pickBuffers[j]
      buf.shape = pickShape
      buf.begin()
      for(var i=0; i<numObjs; ++i) {
        if(pickBufferIds[i] !== j) {
          continue
        }
        var obj = objects[i]
        if(obj.drawPick) {
          obj.pixelRatio = 1
          obj.drawPick(cameraParams)
        }
      }
      buf.end()
    }
  }
function renderPick ( ) { if ( checkContextLoss ( ) ) { return } gl . colorMask ( true , true , true , true ) gl . depthMask ( true ) gl . disable ( gl . BLEND ) gl . enable ( gl . DEPTH_TEST ) var numObjs = objects . length var numPick = pickBuffers . length for ( var j = 0 ; j < numPick ; ++ j ) { var buf = pickBuffers [ j ] buf . shape = pickShape buf . begin ( ) for ( var i = 0 ; i < numObjs ; ++ i ) { if ( pickBufferIds [ i ] !== j ) { continue } var obj = objects [ i ] if ( obj . drawPick ) { obj . pixelRatio = 1 obj . drawPick ( cameraParams ) } } buf . end ( ) } }
Render the scene for mouse picking
Render the scene for mouse picking