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

fix: Crash on first render when using <Line /> and it's derivatives #946

Closed
wants to merge 1 commit into from

Conversation

FarazzShaikh
Copy link
Member

@FarazzShaikh FarazzShaikh commented Jun 12, 2022

Why

closes pmndrs/react-three-fiber#2315

What

Change useLayoutEffect to useEffect as computeLineDistances needs to be called after the geometry is attached to the mesh.

Checklist

  • Documentation updated
  • Storybook entry added
  • Ready to be merged

PR for refrence https://codesandbox.io/s/spaceman-forked-oqrx40?file=/src/lib/Line.tsx:1333-1414

@vercel
Copy link

vercel bot commented Jun 12, 2022

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

Name Status Preview Updated
drei ✅ Ready (Inspect) Visit Preview Jun 12, 2022 at 8:41PM (UTC)

@FarazzShaikh FarazzShaikh requested a review from drcmda June 12, 2022 20:41
@codesandbox-ci
Copy link

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 5fd38f3:

Sandbox Source
keen-parm-msip70 Configuration
Ground reflections and video textures Configuration
arc-x-pmndrs-colors Configuration
SPACEMAN (forked) PR
SPACEMAN Issue pmndrs/react-three-fiber#2315

@FarazzShaikh
Copy link
Member Author

Root cause not in Drei

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.

QuadraticBezierLine component broken with @react-three/fiber version 8.0.18 and higher
1 participant