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

Fixes THREE.ColorManagement warning in r150 #2772

Closed
wants to merge 3 commits into from
Closed

Fixes THREE.ColorManagement warning in r150 #2772

wants to merge 3 commits into from

Conversation

enijar
Copy link

@enijar enijar commented Feb 23, 2023

THREE.ColorManagement: .legacyMode=false renamed to .enabled=true in r150.

In three.js r150 THREE.ColorManagement.legacyMode = false has been replaced with THREE.ColorManagement.enabled = true; this PR removes that warning message by updating the way ColorManagement is assigned based on the legacy prop passed to the <Canvas /> component.

@codesandbox-ci
Copy link

codesandbox-ci bot commented Feb 23, 2023

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 9b8cdd2:

Sandbox Source
example Configuration

@@ -286,7 +286,7 @@ function createRoot<TCanvas extends Element>(canvas: TCanvas): ReconcilerRoot<TC
// Safely set color management if available.
// Avoid accessing THREE.ColorManagement to play nice with older versions
if ('ColorManagement' in THREE) {
setDeep(THREE, legacy, ['ColorManagement', 'legacyMode'])
setDeep(THREE, !legacy, ['ColorManagement', 'enabled'])
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wouldn't this therefore not work in r149 where the setting was different?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a PR for that in #2620, will be cutting a release for these in a moment.

@CodyJasonBennett
Copy link
Member

Continued in #2620

renovate bot referenced this pull request in ziyadedher/ziyadedher Feb 23, 2023
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [@react-three/fiber](https://github.com/pmndrs/react-three-fiber) |
[`8.11.2` ->
`8.11.5`](https://renovatebot.com/diffs/npm/@react-three%2ffiber/8.11.2/8.11.5)
|
[![age](https://badges.renovateapi.com/packages/npm/@react-three%2ffiber/8.11.5/age-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://badges.renovateapi.com/packages/npm/@react-three%2ffiber/8.11.5/adoption-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://badges.renovateapi.com/packages/npm/@react-three%2ffiber/8.11.5/compatibility-slim/8.11.2)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://badges.renovateapi.com/packages/npm/@react-three%2ffiber/8.11.5/confidence-slim/8.11.2)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>pmndrs/react-three-fiber</summary>

###
[`v8.11.5`](https://github.com/pmndrs/react-three-fiber/releases/tag/v8.11.5)

[Compare
Source](https://github.com/pmndrs/react-three-fiber/compare/v8.11.4...v8.11.5)

#### What's Changed

- fix(types): update canvas root types by
[@&#8203;CodyJasonBennett](https://github.com/CodyJasonBennett) in
[https://github.com/pmndrs/react-three-fiber/pull/2774](https://github.com/pmndrs/react-three-fiber/pull/2774)

**Full Changelog**:
pmndrs/react-three-fiber@v8.11.4...v8.11.5

###
[`v8.11.4`](https://github.com/pmndrs/react-three-fiber/releases/tag/v8.11.4)

[Compare
Source](https://github.com/pmndrs/react-three-fiber/compare/v8.11.3...v8.11.4)

#### What's Changed

- fix: play nice with OffscreenCanvas by
[@&#8203;CodyJasonBennett](https://github.com/CodyJasonBennett) in
[https://github.com/pmndrs/react-three-fiber/pull/2770](https://github.com/pmndrs/react-three-fiber/pull/2770)
- fix: use width and height from OffscreenCanvas by
[@&#8203;ulyssesdotcodes](https://github.com/ulyssesdotcodes) in
[https://github.com/pmndrs/react-three-fiber/pull/2773](https://github.com/pmndrs/react-three-fiber/pull/2773)

**Full Changelog**:
pmndrs/react-three-fiber@v8.11.3...v8.11.4

###
[`v8.11.3`](https://github.com/pmndrs/react-three-fiber/releases/tag/v8.11.3)

[Compare
Source](https://github.com/pmndrs/react-three-fiber/compare/v8.11.2...v8.11.3)

#### What's Changed

- fix(core): set THREE.ColorManagement.enabled if able by
[@&#8203;CodyJasonBennett](https://github.com/CodyJasonBennett) in
[https://github.com/pmndrs/react-three-fiber/pull/2620](https://github.com/pmndrs/react-three-fiber/pull/2620)
- chore(docs): update documentation on re-using materials by
[@&#8203;Coada](https://github.com/Coada) in
[https://github.com/pmndrs/react-three-fiber/pull/2711](https://github.com/pmndrs/react-three-fiber/pull/2711)

#### New Contributors

- [@&#8203;Coada](https://github.com/Coada) made their first
contribution in
[https://github.com/pmndrs/react-three-fiber/pull/2711](https://github.com/pmndrs/react-three-fiber/pull/2711)
- [@&#8203;enijar](https://github.com/enijar) made their first
contribution in
[https://github.com/pmndrs/react-three-fiber/pull/2772](https://github.com/pmndrs/react-three-fiber/pull/2772)

**Full Changelog**:
pmndrs/react-three-fiber@v8.11.2...v8.11.3

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://app.renovatebot.com/dashboard#github/ziyadedher/ziyadedher).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNC4xNDguMCIsInVwZGF0ZWRJblZlciI6IjM0LjE0OC4wIn0=-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
ziyadedher referenced this pull request in ziyadedher/ziyadedher Dec 16, 2023
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [@react-three/fiber](https://github.com/pmndrs/react-three-fiber) |
[`8.11.2` ->
`8.11.5`](https://renovatebot.com/diffs/npm/@react-three%2ffiber/8.11.2/8.11.5)
|
[![age](https://badges.renovateapi.com/packages/npm/@react-three%2ffiber/8.11.5/age-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://badges.renovateapi.com/packages/npm/@react-three%2ffiber/8.11.5/adoption-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://badges.renovateapi.com/packages/npm/@react-three%2ffiber/8.11.5/compatibility-slim/8.11.2)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://badges.renovateapi.com/packages/npm/@react-three%2ffiber/8.11.5/confidence-slim/8.11.2)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>pmndrs/react-three-fiber</summary>

###
[`v8.11.5`](https://github.com/pmndrs/react-three-fiber/releases/tag/v8.11.5)

[Compare
Source](https://github.com/pmndrs/react-three-fiber/compare/v8.11.4...v8.11.5)

#### What's Changed

- fix(types): update canvas root types by
[@&#8203;CodyJasonBennett](https://github.com/CodyJasonBennett) in
[https://github.com/pmndrs/react-three-fiber/pull/2774](https://github.com/pmndrs/react-three-fiber/pull/2774)

**Full Changelog**:
pmndrs/react-three-fiber@v8.11.4...v8.11.5

###
[`v8.11.4`](https://github.com/pmndrs/react-three-fiber/releases/tag/v8.11.4)

[Compare
Source](https://github.com/pmndrs/react-three-fiber/compare/v8.11.3...v8.11.4)

#### What's Changed

- fix: play nice with OffscreenCanvas by
[@&#8203;CodyJasonBennett](https://github.com/CodyJasonBennett) in
[https://github.com/pmndrs/react-three-fiber/pull/2770](https://github.com/pmndrs/react-three-fiber/pull/2770)
- fix: use width and height from OffscreenCanvas by
[@&#8203;ulyssesdotcodes](https://github.com/ulyssesdotcodes) in
[https://github.com/pmndrs/react-three-fiber/pull/2773](https://github.com/pmndrs/react-three-fiber/pull/2773)

**Full Changelog**:
pmndrs/react-three-fiber@v8.11.3...v8.11.4

###
[`v8.11.3`](https://github.com/pmndrs/react-three-fiber/releases/tag/v8.11.3)

[Compare
Source](https://github.com/pmndrs/react-three-fiber/compare/v8.11.2...v8.11.3)

#### What's Changed

- fix(core): set THREE.ColorManagement.enabled if able by
[@&#8203;CodyJasonBennett](https://github.com/CodyJasonBennett) in
[https://github.com/pmndrs/react-three-fiber/pull/2620](https://github.com/pmndrs/react-three-fiber/pull/2620)
- chore(docs): update documentation on re-using materials by
[@&#8203;Coada](https://github.com/Coada) in
[https://github.com/pmndrs/react-three-fiber/pull/2711](https://github.com/pmndrs/react-three-fiber/pull/2711)

#### New Contributors

- [@&#8203;Coada](https://github.com/Coada) made their first
contribution in
[https://github.com/pmndrs/react-three-fiber/pull/2711](https://github.com/pmndrs/react-three-fiber/pull/2711)
- [@&#8203;enijar](https://github.com/enijar) made their first
contribution in
[https://github.com/pmndrs/react-three-fiber/pull/2772](https://github.com/pmndrs/react-three-fiber/pull/2772)

**Full Changelog**:
pmndrs/react-three-fiber@v8.11.2...v8.11.3

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://app.renovatebot.com/dashboard#github/ziyadedher/ziyadedher).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNC4xNDguMCIsInVwZGF0ZWRJblZlciI6IjM0LjE0OC4wIn0=-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
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.

3 participants