-
-
Notifications
You must be signed in to change notification settings - Fork 384
Commit
- Loading branch information
There are no files selected for viewing
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
export class Animate { | ||
advance(deltaTime: any): void; | ||
value: any; | ||
stop(): void; | ||
isRunning: boolean; | ||
fromTo(from: any, to: any, { lerp, duration, easing, onStart, onUpdate, onComplete, }: { | ||
lerp?: number; | ||
duration?: number; | ||
easing?: (t: any) => any; | ||
onStart: any; | ||
onUpdate: any; | ||
onComplete: any; | ||
}): void; | ||
from: any; | ||
to: any; | ||
lerp: number; | ||
duration: number; | ||
easing: (t: any) => any; | ||
currentTime: number; | ||
onStart: any; | ||
onUpdate: any; | ||
onComplete: any; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
export default class Lenis { | ||
/** | ||
* @typedef {(t: number) => number} EasingFunction | ||
* @typedef {'vertical' | 'horizontal'} Orientation | ||
* @typedef {'vertical' | 'horizontal' | 'both'} GestureOrientation | ||
* | ||
* @typedef LenisOptions | ||
* @property {Orientation} [direction] | ||
* @property {GestureOrientation} [gestureDirection] | ||
* @property {number} [mouseMultiplier] | ||
* @property {boolean} [smooth] | ||
* | ||
* @property {Window | HTMLElement} [wrapper] | ||
* @property {HTMLElement} [content] | ||
* @property {boolean} [smoothWheel] | ||
* @property {boolean} [smoothTouch] | ||
* @property {number} [duration] | ||
* @property {EasingFunction} [easing] | ||
* @property {number} [lerp] | ||
* @property {boolean} [infinite] | ||
* @property {Orientation} [orientation] | ||
* @property {GestureOrientation} [gestureOrientation] | ||
* @property {number} [touchMultiplier] | ||
* @property {number} [wheelMultiplier] | ||
* | ||
* @param {LenisOptions} | ||
*/ | ||
constructor({ direction, gestureDirection, mouseMultiplier, smooth, wrapper, content, smoothWheel, smoothTouch, duration, easing, lerp, infinite, orientation, gestureOrientation, touchMultiplier, wheelMultiplier, }?: { | ||
direction?: "vertical" | "horizontal"; | ||
gestureDirection?: "vertical" | "horizontal" | "both"; | ||
mouseMultiplier?: number; | ||
smooth?: boolean; | ||
wrapper?: Window | HTMLElement; | ||
content?: HTMLElement; | ||
smoothWheel?: boolean; | ||
smoothTouch?: boolean; | ||
duration?: number; | ||
easing?: (t: number) => number; | ||
lerp?: number; | ||
infinite?: boolean; | ||
orientation?: "vertical" | "horizontal"; | ||
gestureOrientation?: "vertical" | "horizontal" | "both"; | ||
touchMultiplier?: number; | ||
wheelMultiplier?: number; | ||
}); | ||
set velocity(arg: any); | ||
get velocity(): any; | ||
set isStopped(arg: any); | ||
get isStopped(): any; | ||
set isSmooth(arg: any); | ||
get isSmooth(): any; | ||
set isScrolling(arg: any); | ||
get isScrolling(): any; | ||
destroy(): void; | ||
on(event: any, callback: any): import("nanoevents").Unsubscribe; | ||
emit(): void; | ||
start(): void; | ||
stop(): void; | ||
raf(time: any): void; | ||
scrollTo(target: any, { offset, immediate, lock, duration, easing, lerp, onComplete, }?: { | ||
offset?: number; | ||
immediate?: boolean; | ||
lock?: boolean; | ||
duration?: number; | ||
easing?: (t: number) => number; | ||
lerp?: number; | ||
onComplete: any; | ||
}, programmatic?: boolean): void; | ||
get options(): { | ||
wrapper: Window | HTMLElement; | ||
content: HTMLElement; | ||
smoothWheel: boolean; | ||
smoothTouch: boolean; | ||
duration: number; | ||
easing: (t: number) => number; | ||
lerp: number; | ||
infinite: boolean; | ||
gestureOrientation: "vertical" | "horizontal" | "both"; | ||
orientation: "vertical" | "horizontal"; | ||
touchMultiplier: number; | ||
wheelMultiplier: number; | ||
}; | ||
get limit(): number; | ||
get isHorizontal(): boolean; | ||
get scroll(): number; | ||
get progress(): number; | ||
get direction(): any; | ||
#private; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
export function clamp(min: any, input: any, max: any): number; | ||
export function truncate(value: any, decimals?: number): number; | ||
export function lerp(start: any, end: any, amt: any): number; | ||
export function clampedModulo(dividend: any, divisor: any): number; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
export class ObservedElement { | ||
constructor(element: any); | ||
element: any; | ||
width: any; | ||
height: any; | ||
destroy(): void; | ||
#private; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
export class VirtualScroll { | ||
constructor(element: any, { wheelMultiplier, touchMultiplier }: { | ||
wheelMultiplier?: number; | ||
touchMultiplier?: number; | ||
}); | ||
element: any; | ||
on(event: any, callback: any): import("nanoevents").Unsubscribe; | ||
destroy(): void; | ||
#private; | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
1522fae
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"⚡️ Lighthouse report for the changes in this commit:
🟠 Performance: 57
🟢 Accessibility: 100
🟠 Best practices: 83
🟢 SEO: 92
🟠 PWA: 70
Lighthouse ran on https://vercel.com/login?next=%2Fdeployments%2Flenis-bv9rctwna-studio-freight.vercel.app%3Fhost%3Dlenis-bv9rctwna-studio-freight.vercel.app%26redirect%3D1%26section%3D"