New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@adoratorio/hades

Package Overview
Dependencies
Maintainers
4
Versions
48
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@adoratorio/hades - npm Package Compare versions

Comparing version 0.1.20 to 0.1.30

1

dist/declarations.d.ts

@@ -39,2 +39,3 @@ import Aion from '@adoratorio/aion';

threshold: Vec2;
startStopPrecision: number;
}

@@ -41,0 +42,0 @@ export interface Boundries {

5

dist/index.js

@@ -72,2 +72,3 @@ "use strict";

},
startStopPrecision: 4,
};

@@ -188,4 +189,4 @@ this.options = __assign({}, defaults, options);

// Use 4 digits precision
this.velocity.x = parseFloat(this.velocity.x.toFixed(4));
this.velocity.y = parseFloat(this.velocity.y.toFixed(4));
this.velocity.x = parseFloat(this.velocity.x.toFixed(this.options.startStopPrecision));
this.velocity.y = parseFloat(this.velocity.y.toFixed(this.options.startStopPrecision));
this.prevAmount = current;

@@ -192,0 +193,0 @@ // Check if the scroll is still animating or not

@@ -71,5 +71,4 @@ "use strict";

style.textContent = this.style;
if (document.head) {
if (document.head)
document.head.appendChild(style);
}
};

@@ -179,5 +178,4 @@ ;

var style = document.getElementById('hades-style');
if (!style || !style.parentNode) {
if (!style || !style.parentNode)
return;
}
style.parentNode.removeChild(style);

@@ -184,0 +182,0 @@ if (this.wrapper !== null)

{
"name": "@adoratorio/hades",
"version": "0.1.20",
"version": "0.1.30",
"description": "A smooth scrollbar based on Hermes, scroll down 'till hell",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -30,5 +30,5 @@ # Hades

|container|`HTMLElement`|`document.querySelector('.hades-container')`|The node translated when the user scrolls.|
|easing|`Function`|`Hades.EASING.LINEAR`|A function used to bend the progress in time to match a curve and create more natural scrolling intertia the function is called with only one parameter being the time nomralized in relation with the total duration (currentTime / totalDuration) so the value is goint from 0 to a max of 1. Eg. for a linear time `function(t) { return t; }`. It's always a advised to use a linear-in eased-out timing function to avoid weird visual artifacts when the scroll starts. Some enumerators are exposed, just for having a bounch of useful functions out of the box: `Hades.EASING.LINEAR, Hades.EASING.QUAD, Hades.EASING.CUBIC, Hades.EASING.QUART, Hades.EASING.QUINT`. If you wish BezierEasing from [bezier-easing npm package](https://npmjs.com/package/bezier-easing) can be used as easing function.|
|easing|`Function`|`Hades.EASING.LINEAR`|A function used to bend the progress in time to match a curve and create more natural scrolling inertia the function is called with only one parameter being the time nomralized in relation with the total duration (currentTime / totalDuration) so the value is goint from 0 to a max of 1. Eg. for a linear time `function(t) { return t; }`. It's always a advised to use a linear-in eased-out timing function to avoid weird visual artifacts when the scroll starts. Some enumerators are exposed, just for having a bounch of useful functions out of the box: `Hades.EASING.LINEAR, Hades.EASING.QUAD, Hades.EASING.CUBIC, Hades.EASING.QUART, Hades.EASING.QUINT`. If you wish BezierEasing from [bezier-easing npm package](https://npmjs.com/package/bezier-easing) can be used as easing function.|
|duration|`number`|`1000`|The total lasting duration of the scrolling inertia after the user has stopped scrolling. Expressed in *ms*.|
|infiniteScroll|`boolean`|`false`|Whether or not the boundries are taken in account when checking the scroll amount, resulting in an infinite scrolling on all axis.|
|infiniteScroll|`boolean`|`false`|Whether or not the boundaries are taken in account when checking the scroll amount, resulting in an infinite scrolling on all axis.|
|emitGlobal|`boolean`|`false`|If you want the custom scroll generated internally also emitted on global scope (window).|

@@ -46,2 +46,3 @@ |callback|`Callbacks`|`{ frame: () => {}, scroll: () => {} }`|The callbacks functions, scroll is called on each scroll event, the [HadesEvent]() is passed to this function. Frame is called every rAF after updating style|

|renderScroll|`boolean`|`false`|Wheather or not to apply the actual CSS transform property, if false the internal amount is kept and exposed for your personal use.|
|startStopPrecision|`number`|`4`|A number to define the precision of the start and stop events.|

@@ -48,0 +49,0 @@ ## APIs

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