@react-three/fiber 8.15.14 → 8.15.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @react-three/fiber
2
2
 
3
+ ## 8.15.15
4
+
5
+ ### Patch Changes
6
+
7
+ - 71cd8f96: fix: tonemapping config overwrites userland
8
+
3
9
  ## 8.15.14
4
10
 
5
11
  ### Patch Changes
@@ -1984,14 +1984,15 @@ function createRoot(canvas) {
1984
1984
  if (ColorManagement) {
1985
1985
  if ('enabled' in ColorManagement) ColorManagement.enabled = !legacy;else if ('legacyMode' in ColorManagement) ColorManagement.legacyMode = legacy;
1986
1986
  }
1987
-
1988
- // Set color space and tonemapping preferences
1989
- const LinearEncoding = 3000;
1990
- const sRGBEncoding = 3001;
1991
- applyProps(gl, {
1992
- outputEncoding: linear ? LinearEncoding : sRGBEncoding,
1993
- toneMapping: flat ? THREE__namespace.NoToneMapping : THREE__namespace.ACESFilmicToneMapping
1994
- });
1987
+ if (!configured) {
1988
+ // Set color space and tonemapping preferences, once
1989
+ const LinearEncoding = 3000;
1990
+ const sRGBEncoding = 3001;
1991
+ applyProps(gl, {
1992
+ outputEncoding: linear ? LinearEncoding : sRGBEncoding,
1993
+ toneMapping: flat ? THREE__namespace.NoToneMapping : THREE__namespace.ACESFilmicToneMapping
1994
+ });
1995
+ }
1995
1996
 
1996
1997
  // Update color management state
1997
1998
  if (state.legacy !== legacy) state.set(() => ({
@@ -1957,14 +1957,15 @@ function createRoot(canvas) {
1957
1957
  if (ColorManagement) {
1958
1958
  if ('enabled' in ColorManagement) ColorManagement.enabled = !legacy;else if ('legacyMode' in ColorManagement) ColorManagement.legacyMode = legacy;
1959
1959
  }
1960
-
1961
- // Set color space and tonemapping preferences
1962
- const LinearEncoding = 3000;
1963
- const sRGBEncoding = 3001;
1964
- applyProps(gl, {
1965
- outputEncoding: linear ? LinearEncoding : sRGBEncoding,
1966
- toneMapping: flat ? THREE.NoToneMapping : THREE.ACESFilmicToneMapping
1967
- });
1960
+ if (!configured) {
1961
+ // Set color space and tonemapping preferences, once
1962
+ const LinearEncoding = 3000;
1963
+ const sRGBEncoding = 3001;
1964
+ applyProps(gl, {
1965
+ outputEncoding: linear ? LinearEncoding : sRGBEncoding,
1966
+ toneMapping: flat ? THREE.NoToneMapping : THREE.ACESFilmicToneMapping
1967
+ });
1968
+ }
1968
1969
 
1969
1970
  // Update color management state
1970
1971
  if (state.legacy !== legacy) state.set(() => ({
@@ -1984,14 +1984,15 @@ function createRoot(canvas) {
1984
1984
  if (ColorManagement) {
1985
1985
  if ('enabled' in ColorManagement) ColorManagement.enabled = !legacy;else if ('legacyMode' in ColorManagement) ColorManagement.legacyMode = legacy;
1986
1986
  }
1987
-
1988
- // Set color space and tonemapping preferences
1989
- const LinearEncoding = 3000;
1990
- const sRGBEncoding = 3001;
1991
- applyProps(gl, {
1992
- outputEncoding: linear ? LinearEncoding : sRGBEncoding,
1993
- toneMapping: flat ? THREE__namespace.NoToneMapping : THREE__namespace.ACESFilmicToneMapping
1994
- });
1987
+ if (!configured) {
1988
+ // Set color space and tonemapping preferences, once
1989
+ const LinearEncoding = 3000;
1990
+ const sRGBEncoding = 3001;
1991
+ applyProps(gl, {
1992
+ outputEncoding: linear ? LinearEncoding : sRGBEncoding,
1993
+ toneMapping: flat ? THREE__namespace.NoToneMapping : THREE__namespace.ACESFilmicToneMapping
1994
+ });
1995
+ }
1995
1996
 
1996
1997
  // Update color management state
1997
1998
  if (state.legacy !== legacy) state.set(() => ({
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var index = require('./index-54c0bb16.cjs.dev.js');
5
+ var index = require('./index-38c9b12f.cjs.dev.js');
6
6
  var _extends = require('@babel/runtime/helpers/extends');
7
7
  var React = require('react');
8
8
  var THREE = require('three');
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var index = require('./index-8eb7ac4a.cjs.prod.js');
5
+ var index = require('./index-e873c87f.cjs.prod.js');
6
6
  var _extends = require('@babel/runtime/helpers/extends');
7
7
  var React = require('react');
8
8
  var THREE = require('three');
@@ -1,5 +1,5 @@
1
- import { c as createEvents, e as extend, u as useMutableCallback, a as useIsomorphicLayoutEffect, b as createRoot, i as isRef, E as ErrorBoundary, B as Block, d as unmountComponentAtNode } from './index-29b7121b.esm.js';
2
- export { t as ReactThreeFiber, x as _roots, v as act, o as addAfterEffect, n as addEffect, p as addTail, m as advance, j as applyProps, w as buildGraph, f as context, c as createEvents, g as createPortal, b as createRoot, k as dispose, e as extend, q as flushGlobalEffects, s as getRootState, l as invalidate, h as reconciler, r as render, d as unmountComponentAtNode, C as useFrame, D as useGraph, y as useInstanceHandle, F as useLoader, z as useStore, A as useThree } from './index-29b7121b.esm.js';
1
+ import { c as createEvents, e as extend, u as useMutableCallback, a as useIsomorphicLayoutEffect, b as createRoot, i as isRef, E as ErrorBoundary, B as Block, d as unmountComponentAtNode } from './index-ca597524.esm.js';
2
+ export { t as ReactThreeFiber, x as _roots, v as act, o as addAfterEffect, n as addEffect, p as addTail, m as advance, j as applyProps, w as buildGraph, f as context, c as createEvents, g as createPortal, b as createRoot, k as dispose, e as extend, q as flushGlobalEffects, s as getRootState, l as invalidate, h as reconciler, r as render, d as unmountComponentAtNode, C as useFrame, D as useGraph, y as useInstanceHandle, F as useLoader, z as useStore, A as useThree } from './index-ca597524.esm.js';
3
3
  import _extends from '@babel/runtime/helpers/esm/extends';
4
4
  import * as React from 'react';
5
5
  import * as THREE from 'three';
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var index = require('../../dist/index-54c0bb16.cjs.dev.js');
5
+ var index = require('../../dist/index-38c9b12f.cjs.dev.js');
6
6
  var _extends = require('@babel/runtime/helpers/extends');
7
7
  var React = require('react');
8
8
  var THREE = require('three');
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var index = require('../../dist/index-8eb7ac4a.cjs.prod.js');
5
+ var index = require('../../dist/index-e873c87f.cjs.prod.js');
6
6
  var _extends = require('@babel/runtime/helpers/extends');
7
7
  var React = require('react');
8
8
  var THREE = require('three');
@@ -1,5 +1,5 @@
1
- import { c as createEvents, e as extend, u as useMutableCallback, b as createRoot, E as ErrorBoundary, B as Block, d as unmountComponentAtNode } from '../../dist/index-29b7121b.esm.js';
2
- export { t as ReactThreeFiber, x as _roots, v as act, o as addAfterEffect, n as addEffect, p as addTail, m as advance, j as applyProps, w as buildGraph, f as context, c as createEvents, g as createPortal, b as createRoot, k as dispose, e as extend, q as flushGlobalEffects, s as getRootState, l as invalidate, h as reconciler, r as render, d as unmountComponentAtNode, C as useFrame, D as useGraph, y as useInstanceHandle, F as useLoader, z as useStore, A as useThree } from '../../dist/index-29b7121b.esm.js';
1
+ import { c as createEvents, e as extend, u as useMutableCallback, b as createRoot, E as ErrorBoundary, B as Block, d as unmountComponentAtNode } from '../../dist/index-ca597524.esm.js';
2
+ export { t as ReactThreeFiber, x as _roots, v as act, o as addAfterEffect, n as addEffect, p as addTail, m as advance, j as applyProps, w as buildGraph, f as context, c as createEvents, g as createPortal, b as createRoot, k as dispose, e as extend, q as flushGlobalEffects, s as getRootState, l as invalidate, h as reconciler, r as render, d as unmountComponentAtNode, C as useFrame, D as useGraph, y as useInstanceHandle, F as useLoader, z as useStore, A as useThree } from '../../dist/index-ca597524.esm.js';
3
3
  import _extends from '@babel/runtime/helpers/esm/extends';
4
4
  import * as React from 'react';
5
5
  import * as THREE from 'three';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-three/fiber",
3
- "version": "8.15.14",
3
+ "version": "8.15.15",
4
4
  "description": "A React renderer for Threejs",
5
5
  "keywords": [
6
6
  "react",