Skip to content

docs: fix inverted direction property values in README - #539

Open
cauelimsia wants to merge 1 commit into
darkroomengineering:mainfrom
cauelimsia:docs/fix-direction-values
Open

docs: fix inverted direction property values in README#539
cauelimsia wants to merge 1 commit into
darkroomengineering:mainfrom
cauelimsia:docs/fix-direction-values

Conversation

@cauelimsia

Copy link
Copy Markdown

The Properties table describes direction as 1: scrolling up, -1: scrolling down, but the implementation computes it as the sign of the scroll delta:

https://github.com/darkroomengineering/lenis/blob/main/packages/core/src/lenis.ts#L630-L632

this.direction = Math.sign(
  this.animatedScroll - lastScroll
) as Lenis['direction']

Scrolling down increases the scroll value, so direction is 1 when scrolling down and -1 when scrolling up. This PR flips the two values in the table to match the implementation.

The README stated direction is 1 when scrolling up and -1 when
scrolling down, but the implementation sets
direction = Math.sign(newScroll - lastScroll), so scrolling down
(increasing scroll value) yields 1 and scrolling up yields -1.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017d8jkYPToh2LvKGu1rLk8i
@cauelimsia
cauelimsia requested a review from a team as a code owner August 14, 2026 21:23
@vercel

vercel Bot commented Aug 14, 2026

Copy link
Copy Markdown

@cauelimsia is attempting to deploy a commit to the Darkroom Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant