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

Function projectVertex

stackgl_modules/index.js:16816–16824  ·  view source on GitHub ↗
(v, model, view, projection, resolution)

Source from the content-addressed store, hash-verified

16814}
16815
16816function projectVertex(v, model, view, projection, resolution) {
16817 var p = xformMatrix(projection,
16818 xformMatrix(view,
16819 xformMatrix(model, [v[0], v[1], v[2], 1])))
16820 for(var i=0; i<3; ++i) {
16821 p[i] /= p[3]
16822 }
16823 return [ 0.5 * resolution[0] * (1.0+p[0]), 0.5 * resolution[1] * (1.0-p[1]) ]
16824}
16825
16826function barycentricCoord(simplex, point) {
16827 if(simplex.length === 2) {

Callers 1

Calls 1

xformMatrixFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…