Browse Source

Updated builds.

Mr.doob 2 years ago
parent
commit
cb104a35c4
2 changed files with 38 additions and 8 deletions
  1. 19 4
      build/three.cjs
  2. 19 4
      build/three.module.js

+ 19 - 4
build/three.cjs

@@ -1477,8 +1477,7 @@ function LinearToSRGB( c ) {
 
 }
 
-// JavaScript RGB-to-RGB transforms, defined as
-// FN[InputColorSpace][OutputColorSpace] callback functions.
+// RGB-to-RGB transforms, defined as `FN[InputColorSpace][OutputColorSpace] → conversionFn`.
 const FN = {
 	[ SRGBColorSpace ]: { [ LinearSRGBColorSpace ]: SRGBToLinear },
 	[ LinearSRGBColorSpace ]: { [ SRGBColorSpace ]: LinearToSRGB },
@@ -1486,7 +1485,23 @@ const FN = {
 
 const ColorManagement = {
 
-	legacyMode: true,
+	enabled: false,
+
+	get legacyMode() {
+
+		console.warn( 'THREE.ColorManagement: .legacyMode=false renamed to .enabled=true in r147.' );
+
+		return ! this.enabled;
+
+	},
+
+	set legacyMode( legacyMode ) {
+
+		console.warn( 'THREE.ColorManagement: .legacyMode=false renamed to .enabled=true in r147.' );
+
+		this.enabled = ! legacyMode;
+
+	},
 
 	get workingColorSpace() {
 
@@ -1502,7 +1517,7 @@ const ColorManagement = {
 
 	convert: function ( color, sourceColorSpace, targetColorSpace ) {
 
-		if ( this.legacyMode || sourceColorSpace === targetColorSpace || ! sourceColorSpace || ! targetColorSpace ) {
+		if ( this.enabled === false || sourceColorSpace === targetColorSpace || ! sourceColorSpace || ! targetColorSpace ) {
 
 			return color;
 

+ 19 - 4
build/three.module.js

@@ -1475,8 +1475,7 @@ function LinearToSRGB( c ) {
 
 }
 
-// JavaScript RGB-to-RGB transforms, defined as
-// FN[InputColorSpace][OutputColorSpace] callback functions.
+// RGB-to-RGB transforms, defined as `FN[InputColorSpace][OutputColorSpace] → conversionFn`.
 const FN = {
 	[ SRGBColorSpace ]: { [ LinearSRGBColorSpace ]: SRGBToLinear },
 	[ LinearSRGBColorSpace ]: { [ SRGBColorSpace ]: LinearToSRGB },
@@ -1484,7 +1483,23 @@ const FN = {
 
 const ColorManagement = {
 
-	legacyMode: true,
+	enabled: false,
+
+	get legacyMode() {
+
+		console.warn( 'THREE.ColorManagement: .legacyMode=false renamed to .enabled=true in r147.' );
+
+		return ! this.enabled;
+
+	},
+
+	set legacyMode( legacyMode ) {
+
+		console.warn( 'THREE.ColorManagement: .legacyMode=false renamed to .enabled=true in r147.' );
+
+		this.enabled = ! legacyMode;
+
+	},
 
 	get workingColorSpace() {
 
@@ -1500,7 +1515,7 @@ const ColorManagement = {
 
 	convert: function ( color, sourceColorSpace, targetColorSpace ) {
 
-		if ( this.legacyMode || sourceColorSpace === targetColorSpace || ! sourceColorSpace || ! targetColorSpace ) {
+		if ( this.enabled === false || sourceColorSpace === targetColorSpace || ! sourceColorSpace || ! targetColorSpace ) {
 
 			return color;