/de_heatmp

JavaScript library for csgo heatmap visualizations

Primary LanguageJavaScript

de_heatmp

A js library for placing of a csgo minimap and easy heatmap overlay on top of that.

Example

ScreenShot Example

Usage

<div id="container">
<canvas id="canvas" width="1024" height="1024"></canvas>
</div>
<script src="de_heatmp.js"> </script>
<script type="text/javascript">
  // Create heatmap, passing map name and array of csgo coordinates
  // This puts a very strong point right on the lavatories on cobble
  var points_array = [[-252, 668, 94]];
  // Note the point weight in the options argument, you'll want to eliminate this or
  // drop it to 2
  var options = { point_weight: 18 };
  var heatmap = new de_heatmp( "canvas", "de_cbble", points_array, options );
  // Draw heatmap
  heatmap.draw();
</script>

Options

asset_prefix: a string prefix pointing to the location images/ was tored with all the maps.

point_weight: a number between 1 and 18 indicating the intensity of a single point

About

This uses simpleheat, a super-tiny JavaScript library for drawing heatmaps with Canvas. Inspired by heatmap.js, but with focus on simplicity and performance.

This uses simpleradar, some excellent minimap/radar images for csgo maps.