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: Line accepts readonly points and vertex colors #2055

Merged
merged 10 commits into from
Sep 20, 2024

Conversation

RodrigoHamuy
Copy link
Contributor

@RodrigoHamuy RodrigoHamuy commented Jul 26, 2024

Why

Currently this will give TS errors:

import { Line } from "@react-three/drei";
const points: readonly [number, number][] = [[0,0], [0,1]];
const MyLine = ()=> <Line points={points} />

What

Updated the types so it accepts also readonly arrays.

This doesn't mean that you need to pass immutable arrays now, just means that <Line> promises it won't change the receiving arrays.

Checklist

  • Ready to be merged

Copy link

vercel bot commented Jul 26, 2024

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

Name Status Preview Comments Updated (UTC)
drei ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 29, 2024 1:42pm

Copy link

codesandbox-ci bot commented Jul 26, 2024

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.

@RodrigoHamuy
Copy link
Contributor Author

I think the image snapshot test is failing due to an update to the test docker image.
@abernier pmndrs/playwright@3f65c31

@abernier
Copy link
Member

ah yes, missed that, will fix

@abernier
Copy link
Member

should be fixed

Copy link

vercel bot commented Aug 8, 2024

@RodrigoHamuy is attempting to deploy a commit to the Poimandres Team on Vercel.

A member of the Team first needs to authorize it.

@CodyJasonBennett CodyJasonBennett merged commit 115d464 into pmndrs:master Sep 20, 2024
3 of 4 checks passed
@RodrigoHamuy RodrigoHamuy deleted the accept-read-only branch September 20, 2024 11:28
Copy link

🎉 This PR is included in version 9.112.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants