MCPcopy Index your code
hub / github.com/plotly/plotly.js / renderPick

Function renderPick

stackgl_modules/index.js:18881–18910  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

18879
18880 //Render the scene for mouse picking
18881 function renderPick() {
18882 if(checkContextLoss()) {
18883 return
18884 }
18885
18886 gl.colorMask(true, true, true, true)
18887 gl.depthMask(true)
18888 gl.disable(gl.BLEND)
18889 gl.enable(gl.DEPTH_TEST)
18890 gl.depthFunc(gl.LEQUAL)
18891
18892 var numObjs = objects.length
18893 var numPick = pickBuffers.length
18894 for(var j=0; j<numPick; ++j) {
18895 var buf = pickBuffers[j]
18896 buf.shape = pickShape
18897 buf.begin()
18898 for(var i=0; i<numObjs; ++i) {
18899 if(pickBufferIds[i] !== j) {
18900 continue
18901 }
18902 var obj = objects[i]
18903 if(obj.drawPick) {
18904 obj.pixelRatio = 1
18905 obj.drawPick(cameraParams)
18906 }
18907 }
18908 buf.end()
18909 }
18910 }
18911
18912 var nBounds = [
18913 [ Infinity, Infinity, Infinity],

Callers 1

redrawFunction · 0.85

Calls 1

checkContextLossFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…