Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@hscmap/inertial-wheel

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hscmap/inertial-wheel - npm Package Compare versions

Comparing version 0.2.0 to 0.4.0

5

lib/index.d.ts

@@ -20,7 +20,8 @@ export interface Callbacks {

constructor(target: HTMLElement, cb: Callbacks);
setParams({beta, t0, v0}: {
private readonly t0;
setParams(override: Partial<{
beta: number;
t0: number;
v0: number;
}): void;
}>): void;
teardown(): void;

@@ -27,0 +28,0 @@ stop(): void;

"use strict";
var __assign = (this && this.__assign) || Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
Object.defineProperty(exports, "__esModule", { value: true });

@@ -35,7 +43,14 @@ var magic_trackpad_detector_1 = require("@hscmap/magic-trackpad-detector");

}
InertialWheel.prototype.setParams = function (_a) {
var beta = _a.beta, t0 = _a.t0, v0 = _a.v0;
this.beta = beta;
this.tau = t0 * this.beta;
this.v0 = v0;
Object.defineProperty(InertialWheel.prototype, "t0", {
get: function () {
return this.tau / this.beta;
},
enumerable: true,
configurable: true
});
InertialWheel.prototype.setParams = function (override) {
var p = __assign({ beta: this.beta, t0: this.t0, v0: this.v0 }, override);
this.beta = p.beta;
this.tau = p.t0 * this.beta;
this.v0 = p.v0;
this.eta = this.beta / this.tau;

@@ -42,0 +57,0 @@ };

2

package.json
{
"name": "@hscmap/inertial-wheel",
"version": "0.2.0",
"version": "0.4.0",
"main": "./lib/index.js",

@@ -5,0 +5,0 @@ "types": "./lib/index.d.ts",

@@ -32,6 +32,11 @@ import { MagicTrackpadDetector } from "@hscmap/magic-trackpad-detector"

setParams({ beta, t0, v0 }: { beta: number, t0: number, v0: number }) {
this.beta = beta
this.tau = t0 * this.beta
this.v0 = v0
private get t0() {
return this.tau / this.beta
}
setParams(override: Partial<{ beta: number, t0: number, v0: number }>) {
const p = { beta: this.beta, t0: this.t0, v0: this.v0, ...override }
this.beta = p.beta
this.tau = p.t0 * this.beta
this.v0 = p.v0
this.eta = this.beta / this.tau

@@ -38,0 +43,0 @@ }

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc