{"id":19973945,"url":"https://github.com/dcmox/heatmapper","last_synced_at":"2025-05-04T02:32:26.113Z","repository":{"id":280447695,"uuid":"232702686","full_name":"dcmox/heatmapper","owner":"dcmox","description":"Track mouse movements and generate a heat map","archived":false,"fork":false,"pushed_at":"2020-01-19T23:34:04.000Z","size":35,"stargazers_count":33,"open_issues_count":0,"forks_count":10,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-08T01:42:23.714Z","etag":null,"topics":["canvas","heatmap","html","javascript","mouse-tracking","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dcmox.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-01-09T02:17:32.000Z","updated_at":"2024-09-09T22:43:19.000Z","dependencies_parsed_at":"2025-03-03T13:46:09.338Z","dependency_job_id":"71d35363-a56c-47d9-8032-31fb017483d4","html_url":"https://github.com/dcmox/heatmapper","commit_stats":null,"previous_names":["dcmox/heatmapper"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dcmox%2Fheatmapper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dcmox%2Fheatmapper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dcmox%2Fheatmapper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dcmox%2Fheatmapper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dcmox","download_url":"https://codeload.github.com/dcmox/heatmapper/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252279050,"owners_count":21722827,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["canvas","heatmap","html","javascript","mouse-tracking","typescript"],"created_at":"2024-11-13T03:13:26.972Z","updated_at":"2025-05-04T02:32:25.963Z","avatar_url":"https://github.com/dcmox.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# heatmapper-js\nHeatmapper allows you to generate heatmaps based on mouse movements quickly using HTML canvas. The output can be saved as a PNG or stored for later use. This script is meant to run in the browser and has not been made to run server-side as of yet!\n\n![heatmapper-js demo](https://i.imgur.com/jWtUC5r.jpg)\n\n## Features\nSome supported functions include:\n\n* generateCoordMap - Generates data for your heatmap based on your mouse movements. This function is ran on this demo's page load.\n* generateHeatMap - Generates a heatmap based on a coordinate map. This can accept multiple maps and will automatically handle them appropriately.\n* getScreenSize - Gets the current viewport size within your browser.\n* getScreenSizes - Gets all of the viewport sizes as you adjust the size of your browser window.\n* coordMapToJson - Converts the stored coordinates to JSON based on a map ID.\n* loadCoordMap/loadCoordMaps - Loads coordinates into the window context for generating a map.\n* getCoordMap - Get a current instance of a coord map being stored or generated.\n\n## Usage\nYou can start recording mouse movements using the following HTML:\n```js\n\u003cscript src=\"heatmapper.js\" type=\"text/javascript\"\u003e\u003c/script\u003e\n\u003cscript\u003egenerateCoordMap()\u003c/script\u003e\n```\n\nTo render the heatmap on-screen:\n\n```html\n\u003cbutton id=\"displayHeatMap\" onclick=\"generateHeatMap('result', {maxWidth: 1000, maxHeight: 600});\"\u003eDisplay Heat Map\u003c/button\u003e\n```\n\nor:\n\n```html\n\u003cbutton id=\"displayHeatMap\" onclick=\"generateHeatMap('#targetDiv', {maxWidth: 1000});\"\u003eDisplay Heat Map\u003c/button\u003e\n```\n\nTo store the generated output without rendering it on-screen:\n\n```js\n\u003cscript\u003e\n    let output = generateHeatMap()\n\u003c/script\u003e\n```\n\nThe parameters for generateHeatMap are defined in the [heatmapper.ts](heatmapper.ts) file:\n\n```\ndest?: string | HTMLElement - target element or query string to render the output to.\ndimensions?: IDimensions - object containing width and height or maxWidth and maxHeight\nmapIds: string[] = ['default'] - mapIds to render ('default' is the default when using generateCoordMap)\nscreenSize?: string - the screenSize to use for coordinates, by default it is the browsers current viewport size\n```\n\n## Demo\nSee the [tests/tests.html](tests/test.html) page for a visual demonstration.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdcmox%2Fheatmapper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdcmox%2Fheatmapper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdcmox%2Fheatmapper/lists"}