You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: upgrade to version 1.1.0 with various improvements and bug fixes
- Updated the version number in package.json to 1.1.0.
- Enhanced the smooth scroll functionality in index.min.js with new features and optimizations.
- Refactored index.js to improve code readability and maintainability, including better handling of options and attributes.
- Added support for additional configuration options and improved the parsing of attributes.
- Introduced debug logging for instance creation to aid in development.
- Removed unused observer functionality to streamline the code.
> Note: If you do not set any `rt-smooth-scroll-*` config attributes, the root instance uses **Lenis defaults**.
74
+
74
75
---
75
76
76
77
## 3. Activation Rules
@@ -80,7 +81,7 @@ The library is activated when:
80
81
- The attribute `rt-smooth-scroll` exists on `<html>` or `<body>`**OR**
81
82
- You place one or more elements with `rt-smooth-scroll-instance`
82
83
83
-
If neither is present and no instance elements are found, it **auto-enables** itself on `<body>`with defaults.
84
+
If neither is present and no instance elements are found, it **auto-enables** itself on `<body>`by adding `rt-smooth-scroll` (so you get a working root instance by default).
84
85
85
86
---
86
87
@@ -107,22 +108,29 @@ Place on `<html>` or `<body>` to configure defaults:
107
108
></body>
108
109
```
109
110
111
+
Important Lenis behavior:
112
+
113
+
-`duration` and `easing` are **useless if `lerp` is defined** (this is how Lenis works).
@@ -215,10 +232,15 @@ This helps you confirm exactly what configuration is applied in the browser.
215
232
216
233
## 8. Troubleshooting
217
234
218
-
### Scroll feels laggy
235
+
### Scroll feels laggy / too delayed
236
+
237
+
-**Increase**`rt-smooth-scroll-lerp` (e.g. `0.2 → 0.35`) for a snappier response.
238
+
-**Decrease**`rt-smooth-scroll-lerp` (e.g. `0.1 → 0.05`) for a smoother/heavier feel.
239
+
- Leave `rt-smooth-scroll-wheel-multiplier="1"` unless you have a strong reason to change perceived speed.
240
+
241
+
### Duration / easing doesn’t seem to do anything
219
242
220
-
- Lower `lerp` (e.g., `0.18–0.3`) for snappier response.
221
-
- Avoid combining duration and lerp unintentionally.
243
+
Lenis treats `duration` and `easing` as **useless if `lerp` is defined**. If you want time-based behavior, ensure you’re not effectively running in lerp-mode.
222
244
223
245
### Instance not initialized
224
246
@@ -237,12 +259,10 @@ If using a custom `rt-smooth-scroll-lenis-src`, confirm the URL points to a vali
0 commit comments