MCPcopy Create free account
hub / github.com/plotly/plotly.js / getIndex

Function getIndex

src/traces/isosurface/convert.js:155–170  ·  view source on GitHub ↗
(i, j, k)

Source from the content-addressed store, hash-verified

153 var filled = GRID_TYPES.indexOf(data._gridFill.replace(/-/g, '').replace(/\+/g, ''));
154
155 var getIndex = function(i, j, k) {
156 switch(filled) {
157 case 5: // 'zyx'
158 return k + depth * j + depth * height * i;
159 case 4: // 'zxy'
160 return k + depth * i + depth * width * j;
161 case 3: // 'yzx'
162 return j + height * k + height * depth * i;
163 case 2: // 'yxz'
164 return j + height * i + height * width * k;
165 case 1: // 'xzy'
166 return i + width * k + width * depth * j;
167 default: // case 0: // 'xyz'
168 return i + width * j + width * height * k;
169 }
170 };
171
172 var minValues = data._minValues;
173 var maxValues = data._maxValues;

Callers 6

beginSectionFunction · 0.70
draw2dXFunction · 0.70
draw2dYFunction · 0.70
draw2dZFunction · 0.70
draw3dFunction · 0.70
insertGridPointsFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…