{"id":38779128,"url":"https://github.com/patrickkunka/pointerify","last_synced_at":"2026-01-17T12:21:11.615Z","repository":{"id":17839566,"uuid":"82711390","full_name":"patrickkunka/pointerify","owner":"patrickkunka","description":"A unified event-based API for mouse and multi-touch with built-in geometry and physics.","archived":false,"fork":false,"pushed_at":"2023-01-04T02:02:48.000Z","size":1765,"stargazers_count":9,"open_issues_count":18,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-22T16:45:19.667Z","etag":null,"topics":["inertia","mouse-events","physics","touch-events","vanilla-js"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/patrickkunka.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-02-21T18:08:17.000Z","updated_at":"2024-09-01T13:32:44.000Z","dependencies_parsed_at":"2023-01-13T19:31:51.243Z","dependency_job_id":null,"html_url":"https://github.com/patrickkunka/pointerify","commit_stats":null,"previous_names":[],"tags_count":44,"template":false,"template_full_name":null,"purl":"pkg:github/patrickkunka/pointerify","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patrickkunka%2Fpointerify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patrickkunka%2Fpointerify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patrickkunka%2Fpointerify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patrickkunka%2Fpointerify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/patrickkunka","download_url":"https://codeload.github.com/patrickkunka/pointerify/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patrickkunka%2Fpointerify/sbom","scorecard":{"id":722363,"data":{"date":"2025-08-11","repo":{"name":"github.com/patrickkunka/pointerify","commit":"6383b6aca527cceb216fcf1649a3fd00fb7355fc"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.7,"checks":[{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":0,"reason":"Found 1/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE.txt:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE.txt:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 2 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"46 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92","Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-x9w5-v3q2-3rhw","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c","Warn: Project is vulnerable to: GHSA-w573-4hg7-7wgq","Warn: Project is vulnerable to: GHSA-r9p9-mrjm-926w","Warn: Project is vulnerable to: GHSA-434g-2637-qmqr","Warn: Project is vulnerable to: GHSA-49q7-c7j4-3p7m","Warn: Project is vulnerable to: GHSA-977x-g7h5-7qgw","Warn: Project is vulnerable to: GHSA-f7q4-pwc6-w24p","Warn: Project is vulnerable to: GHSA-fc9h-whq2-v747","Warn: Project is vulnerable to: GHSA-vjh7-7g9h-fjfh","Warn: Project is vulnerable to: GHSA-2j2x-2gpw-g8fm","Warn: Project is vulnerable to: GHSA-fjxv-7rqg-78g4","Warn: Project is vulnerable to: GHSA-4q6p-r6v2-jvc5","Warn: Project is vulnerable to: GHSA-ww39-953v-wcq6","Warn: Project is vulnerable to: GHSA-43f8-2h32-f4cj","Warn: Project is vulnerable to: GHSA-qqgx-2p2h-9c37","Warn: Project is vulnerable to: GHSA-896r-f27r-55mw","Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h","Warn: Project is vulnerable to: GHSA-76p3-8jx3-jpfq","Warn: Project is vulnerable to: GHSA-3rfm-jhwj-7488","Warn: Project is vulnerable to: GHSA-hhq3-ff78-jv3g","Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9","Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9","Warn: Project is vulnerable to: GHSA-9wv6-86v2-598j","Warn: Project is vulnerable to: GHSA-g6ww-v8xp-vmwg","Warn: Project is vulnerable to: GHSA-h7cp-r72f-jxh6","Warn: Project is vulnerable to: GHSA-v62p-rq8g-8h59","Warn: Project is vulnerable to: GHSA-hrpp-h998-j3pp","Warn: Project is vulnerable to: GHSA-p8p7-x288-28g6","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-vx3p-948g-6vhq","Warn: Project is vulnerable to: GHSA-4wf5-vphf-c2xc","Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3","Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7","Warn: Project is vulnerable to: GHSA-6fc8-4gx4-v693","Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q","Warn: Project is vulnerable to: GHSA-c4w7-xm78-47vh"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-22T11:45:06.594Z","repository_id":17839566,"created_at":"2025-08-22T11:45:06.594Z","updated_at":"2025-08-22T11:45:06.594Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28508464,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T11:50:55.898Z","status":"ssl_error","status_checked_at":"2026-01-17T11:50:55.569Z","response_time":85,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["inertia","mouse-events","physics","touch-events","vanilla-js"],"created_at":"2026-01-17T12:21:08.612Z","updated_at":"2026-01-17T12:21:11.601Z","avatar_url":"https://github.com/patrickkunka.png","language":"TypeScript","readme":"# Pointerify\n\nA unified events-based API for mouse and multi-touch with built-in geometry and physics.\n\nPointerify takes the hard work and math out of cross-platform sliders, image galleries, media controls, menus and more.\n\n### Contents\n- [Features](#features)\n- [Installation](#installation)\n- [Instantiation](#instantiation)\n- [Events](#events)\n\n## Features\nPointerify provides a simple, common set of intuitive DOM events for dealing with pointer interactions across mouse and touch platforms.\n\nAs well as abstracting away the idiosyncrasies of the underlying mouse/touch events into one robust API, Pointerify also provides rich geometry data – in the form of pointer \"state\" objects – which include:\n- Element-centric X/Y positioning (as percentage-friendly multipliers)\n- X/Y deltas (as px and percentage-friendly multipliers)\n- X/Y velocities (in px/f)\n- X/Y directions (left, right, up, down)\n- Pinch distance and direction (for multi-touch \"virtual\" pointers)\n\nPointerify also features a lightweight, built-in physics engine to simulate inertia. This means that with inertia enabled, Pointerify will continue to dispatch \"drag\" events along the appropriate vector, after the mouse or touch pointer has been released, and until the specified friction coefficient has reduced the velocity to 0.\n\nAll of Pointerify's features are designed to reduce the amount of repetitive integration code we have to write when building cross-platform swipe, flick, tap and pinch gesture-based UI, and can be used to rapidly develop UI such as carousels, sliders, image galleries, and media timeline/volume controls.\n\n## Installation\n\nFirstly, install the package using your package manager of choice.\n\n```\nnpm install pointerify --save-dev\n```\n\nYou may then import the pointerify factory function into your project's modules.\n\n```js\nimport pointerify from 'pointerify';\n```\n\n## Instantiation\n\nThe `pointerify` factory function then can be used to create a discrete pointerify instance on a provided \"root\" element.\n\n```js\nconst ptr = pointerify(input);\n```\n\nA reference to the pointerify instance is returned and can be used to destroy it (and unbind its event handlers) later on.\n\n#### Pointerify \"Root\" Elements\n\nThe element on which pointerify is instantiated will be used to determine all geometry data contained in the events dispatched by the instance.\n\nFor example, if the root element is `500px` wide and a user performs a mouse down at `50px` from its left edge, the `multiplierX` property in the resulting `PointerState` would be `0.1`, meaning the event ocurred at 10% of the element's width.\n\n## Events\n\nEach pointerify instance dispatches the following DOM events from the (\"root\") element on which it is instantiated. Each event contains a reference to a pointer \"state\" object via the event `detail` property, containing various geometry data points.\n\nNB: All event names are written in \"camelCase\" to differentiate them from the lowercase native pointer events that are dispatched on some platforms. To avoid magic strings, it is recommended that event types are accessed via the exported `EventType` enum in your code.\n\n```js\nimport pointerify, {EventType} from 'pointerify';\n\nconsole.log(EventType.POINTER_DOWN); // pointerDown\n```\n\n#### `EventType.POINTER_DOWN`\n\nDispatched when the primary mouse button is depressed, or when a finger makes contact with the device glass.\n\n#### `EventType.POINTER_DRAG`\n\nDispatched when the mouse is moved while its primary button is depressed, or when a finger is moved across the device screen while in contact with the glass.\n\nWhen `physics.inertia` is enabled, drag events will continue to be dispatched after the pointer is released, for an amount of time determined by the drag velocity at the time of release, and the specified `physics.friction` value.\n\n#### `EventType.POINTER_UP`\n\nDispatched when the primary mouse button is released after being depressed while within the root element, or when a finger leaves contact with the device glass after having made contact while within the root element.\n\n#### `EventType.POINTER_STOP`\n\nDispatched after the pointer is released (when inertia is disabled), or after the inertial phase of a \"swipe\" gesture, when the pointer comes to a complete stop as inertia is depleted due to friction (when inertia is enabled).\n\n#### `EventType.POINTER_INSPECT`\n\nDispatched when the mouse moves across the root element without any buttons depressed. Similar to a \"hover\" event.\n\n#### `EventType.POINTER_TAP`\n\nDispatched when the primary mouse button is depressed and immediately released without any lateral movement taking place, or when a finger makes contact with the device glass and then leaves contact without any lateral movement taking place.\n\nThis event can be used as a substitute for `click` events in gesture-enabled UI where a swipe might cause unintended click events to be dispatched.\n\n#### `EventType.POINTER_DOUBLE_TAP`\n\nDispatched when a second tap event (see above) occurs within 500ms of the first one.\n\n#### `EventType.VIRTUAL_POINTER_CREATE`\n\nDispatched when two fingers come into contact with the device glass. A \"virtual pointer\" is created at the exact midpoint of the two touch points and forms the origin of any resulting \"pinch\" gestures.\n\n#### `EventType.VIRTUAL_POINTER_MOVE`\n\nDispatched when a virtual pointer moves in response either of its two physical touch points being dragged. The virtual pointer equivalent of `pointerDrag`.\n\n#### `EventType.VIRTUAL_POINTER_PINCH`\n\nDispatched when a virtual pointer's two physical touch points converge or diverge from the virtual pointer midpoint, forming a \"pinch\" gesture.\n\n#### `EventType.VIRTUAL_POINTER_DESTROY`\n\nDispatched when a virtual pointer is destroyed in response to the termination of either one of its physical touch points (either due to a pointer release, or the depletion of inertia).\n\n---\n*\u0026copy; 2017 Patrick Kunka / KunkaLabs Ltd*\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpatrickkunka%2Fpointerify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpatrickkunka%2Fpointerify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpatrickkunka%2Fpointerify/lists"}