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

Incompatible with three@0.162.0 #1856

Closed
Methuselah96 opened this issue Mar 2, 2024 · 1 comment
Closed

Incompatible with three@0.162.0 #1856

Methuselah96 opened this issue Mar 2, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@Methuselah96
Copy link
Contributor

Methuselah96 commented Mar 2, 2024

  • three version: 0.162.0
  • @react-three/fiber version: N/A
  • @react-three/drei version: 9.99.5
  • node version: N/A
  • npm (or yarn) version: N/A

Problem description:

drei is importing LinearEncoding from three in ./core/SpotLight.js. LinearEncoding was removed in r162, and has been deprecated since r152. This causes an error when trying to build a web app with r162. For example, this is sample esbuild output:

Error: R] No matching export in "./node_modules/three/build/three.module.js" for import "LinearEncoding"

    ./node_modules/@react-three/drei/core/SpotLight.js:3:76:
      3 │ ...enderTarget, RGBAFormat, LinearEncoding, ShaderMaterial, DoubleS...
        ╵                             ~~~~~~~~~~~~~~

1 error

Relevant code:

N/A

Suggested solution:

The naive solution would be to replace encoding: LinearEncoding with colorSpace: LinearSRGBColorSpace. However, this would be a breaking change because I don't believe colorSpace: LinearSRGBColorSpace support was added until r152, and drei claims to support r137.

I'm happy to create a PR, but didn't know whether this should be a breaking change or if you have some clever way to avoid that.

@Methuselah96 Methuselah96 added the bug Something isn't working label Mar 2, 2024
@Methuselah96
Copy link
Contributor Author

Never mind, I was one version behind, this was fixed in ee2be0a.

@Methuselah96 Methuselah96 closed this as not planned Won't fix, can't repro, duplicate, stale Mar 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant