Security News
PyPI Introduces Digital Attestations to Strengthen Python Package Security
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.
@hscmap/inertial-mouse
Advanced tools
Inertial Mouse for TypeScript * Wraps native MouseEvent and emit pseudo mousemove events with inertial smooth motion. * [Working Demo](https://michitaro.github.io/inertial-mouse)
Inertial Mouse for TypeScript
npm instasll --save @hscmap/inertial-mouse
import { InertialMouse, Coord } from "@hscmap/inertial-mouse"
window.addEventListener('load', e => {
const sandbox = document.querySelector('.sandbox') as HTMLElement
const cursor = document.querySelector('.cursor') as HTMLElement
const dxText = document.querySelector('[name="dx"]') as HTMLInputElement
const dyText = document.querySelector('[name="dy"]') as HTMLInputElement
function setCursorPosition(r: Coord) {
cursor.style.left = `${r.x}px`
cursor.style.top = `${r.y}px`
}
const im = new InertialMouse(sandbox, {
down: (e) => {
setCursorPosition(e.r)
cursor.classList.add('pressed')
},
up: () => {
cursor.classList.remove('pressed')
},
move: (e) => {
setCursorPosition(e.r)
dxText.value = `${e.d.x}`
dyText.value = `${e.d.y}`
},
movestart: () => cursor.classList.add('moving'),
moveend: () => cursor.classList.remove('moving'),
})
document.addEventListener('change', e => {
const target = e.target as HTMLInputElement
if (target.matches('[name="slick"]'))
im.slick = target.checked
if (target.matches('[name="friction"]'))
im.friction = Number(target.value)
if (target.matches('[name="k"]'))
im.k = Number(target.value)
})
})
document.addEventListener('selectstart', e => e.preventDefault()) // disable selection
FAQs
Inertial Mouse for TypeScript * Wraps native MouseEvent and emit pseudo mousemove events with inertial smooth motion. * [Working Demo](https://michitaro.github.io/inertial-mouse)
The npm package @hscmap/inertial-mouse receives a total of 1 weekly downloads. As such, @hscmap/inertial-mouse popularity was classified as not popular.
We found that @hscmap/inertial-mouse demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.