Perfect. This was very helpful. I got it to work.
These were the settings that I should have used:
mapper.set({
colorByArrayName: "acceleration",
colorMode: ColorMode.MAP_SCALARS,
interpolateScalarsBeforeMapping: true,
scalarMode: ScalarMode.USE_POINT_FIELD_DATA,
scalarVisibility: true,
lookupTable: lookupTable,
});
the lookup table looks like this:
//configure lookup table
const lookupTable = vtkColorTransferFunction.newInstance();
//apply preset
var preset = vtkColorMaps.getPresetByName("erdc_rainbow_bright");
lookupTable.setVectorModeToComponent();
lookupTable.setVectorComponent(0);
lookupTable.setMappingRange(0, 1);
lookupTable.applyColorMap(preset);
lookupTable.updateRange();
Obviously for this test the data range is between 0 and 1.
Sebastien, thank you som much for guiding me through this!