Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add intersecion options #85

Merged
merged 24 commits into from
Aug 14, 2024
Merged

feat: add intersecion options #85

merged 24 commits into from
Aug 14, 2024

Conversation

fand
Copy link
Owner

@fand fand commented Aug 14, 2024

This PR adds VFXProps.intersection to control transition shader behavior.
These property changes how element are considered to be entered to / left from the viewport.

type VFXProps = {
    /**
     * Options to control transition behaviour.
     * These properties work similarly to the IntersectionObsrever options.
     */
    intersection?: {
        /** Threshold for the element to be considered "entered" to the viewport. */
        threshold?: number;

        /** Margin of the viewport to be used in intersection calculcation. */
        rootMargin?: RectOpts;
    };
};

Changes

  • Added VFXProps.intersection
  • Added new uniform value uniform float intersection
  • Added new shader focusTransition

Copy link

vercel bot commented Aug 14, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
react-vfx-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 14, 2024 9:13pm

@fand fand merged commit b06d11f into main Aug 14, 2024
3 checks passed
@fand fand deleted the feat/intersection branch August 14, 2024 21:17
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