MCPcopy
hub / github.com/microsoft/SandDance / colorMapFromCubes

Function colorMapFromCubes

packages/sanddance/src/colorCubes.ts:39–45  ·  view source on GitHub ↗
(cubes: VegaDeckGl.types.Cube[])

Source from the content-addressed store, hash-verified

37}
38
39export function colorMapFromCubes(cubes: VegaDeckGl.types.Cube[]) {
40 const map: ColorMap = {};
41 cubes.forEach(cube => {
42 map[cube.ordinal] = { color: cube.color };
43 });
44 return map;
45}
46
47export function populateColorContext(colorContext: ColorContext, presenter: VegaDeckGl.Presenter) {
48 if (!colorContext.colorMap) {

Callers 4

onDataChangedMethod · 0.90
_renderMethod · 0.90
populateColorContextFunction · 0.70

Calls 1

forEachMethod · 0.45

Tested by

no test coverage detected