Home > @modelo.io/api > HeatMap

HeatMap class

Generate a heatmap texture from a point distribution and color map.

Signature:

export default class HeatMap extends Visualize 

Constructors

ConstructorDescription
(constructor)(renderScene)Construct a heat map.

Methods

MethodDescription
getImageData()
getTexture()Fetch the generated heat map texture.
setParameter(name, value)Set the rendering parameters of bar chart visualization.

Example

const heatmap = new Modelo.Scene3D.Visualize.HeatMap(viewer.getRenderScene());
var data = [{x: 0.11, y: 0.87}, {x: 0.43, y: 0.127}];
heatmap.setParameter("points", data);
heatmap.setParameter("width", 256);
heatmap.setParameter("height", 256);
heatmap.setParameter("gridSize", 64);

// Create heightmap.
const heightMap = new Modelo.Scene3D.Visualize.HeightMap(viewer.getRenderScene());
viewer.getScene().addVisualize(heightMap);

heightMap.setParameter("xres", 1024);
heightMap.setParameter("yres", 1024);
heightMap.setParameter("dataTexture", heatmap.getTexture());
heightMap.setParameter("platteImage", "platte.png");
heightMap.setScaling([40, 40, 5.0]);
heightMap.setPosition([0, 0, 0.1]);
heightMap.setEnabled(true);