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

Function createOpenTri

src/traces/isosurface/convert.js:253–280  ·  view source on GitHub ↗
(xyzv, abc)

Source from the content-addressed store, hash-verified

251 }
252
253 function createOpenTri(xyzv, abc) {
254 var A = xyzv[0];
255 var B = xyzv[1];
256 var C = xyzv[2];
257 var G = getCenter(A, B, C);
258
259 var r = Math.sqrt(1 - activeFill);
260 var p1 = getBetween(G, A, r);
261 var p2 = getBetween(G, B, r);
262 var p3 = getBetween(G, C, r);
263
264 var a = abc[0];
265 var b = abc[1];
266 var c = abc[2];
267
268 return {
269 xyzv: [
270 [A, B, p2], [p2, p1, A],
271 [B, C, p3], [p3, p2, B],
272 [C, A, p1], [p1, p3, C]
273 ],
274 abc: [
275 [a, b, -1], [-1, -1, a],
276 [b, c, -1], [-1, -1, b],
277 [c, a, -1], [-1, -1, c]
278 ]
279 };
280 }
281
282 function styleIncludes(style, char) {
283 if(style === 'all' || style === null) return true;

Callers 1

drawTriFunction · 0.85

Calls 2

getCenterFunction · 0.70
getBetweenFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…