Skip to content

Commit ef06aaf

Browse files
committed
Set THREE.ColorManagement.legacyMode to false when using color management
1 parent 775c764 commit ef06aaf

16 files changed

+5
-46
lines changed

dist/aframe-master.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15830,13 +15830,11 @@ module.exports.Component = registerComponent('light', {
1583015830
case 'color':
1583115831
{
1583215832
light.color.set(value);
15833-
rendererSystem.applyColorCorrection(light.color);
1583415833
break;
1583515834
}
1583615835
case 'groundColor':
1583715836
{
1583815837
light.groundColor.set(value);
15839-
rendererSystem.applyColorCorrection(light.groundColor);
1584015838
break;
1584115839
}
1584215840
case 'angle':
@@ -16014,12 +16012,10 @@ module.exports.Component = registerComponent('light', {
1601416012
getLight: function (data) {
1601516013
var angle = data.angle;
1601616014
var color = new THREE.Color(data.color);
16017-
this.rendererSystem.applyColorCorrection(color);
1601816015
color = color.getHex();
1601916016
var decay = data.decay;
1602016017
var distance = data.distance;
1602116018
var groundColor = new THREE.Color(data.groundColor);
16022-
this.rendererSystem.applyColorCorrection(groundColor);
1602316019
groundColor = groundColor.getHex();
1602416020
var intensity = data.intensity;
1602516021
var type = data.type;

src/components/generic-tracked-controller-controls.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ module.exports.Component = registerComponent('generic-tracked-controller-control
6767
this.controllerPresent = false;
6868
this.wasControllerConnected = false;
6969
this.lastControllerCheck = 0;
70-
this.rendererSystem = this.el.sceneEl.systems.renderer;
7170
this.bindMethods();
7271

7372
// generic-tracked-controller-controls has the lowest precedence.

src/components/hp-mixed-reality-controls.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ module.exports.Component = registerComponent('hp-mixed-reality-controls', {
6161
this.onButtonTouchEnd = function (evt) { onButtonEvent(evt.detail.id, 'touchend', self, self.data.hand); };
6262
this.onButtonTouchStart = function (evt) { onButtonEvent(evt.detail.id, 'touchstart', self, self.data.hand); };
6363
this.previousButtonValues = {};
64-
this.rendererSystem = this.el.sceneEl.systems.renderer;
6564

6665
this.bindMethods();
6766
},

src/components/light.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ module.exports.Component = registerComponent('light', {
5656
var el = this.el;
5757
this.light = null;
5858
this.defaultTarget = null;
59-
this.rendererSystem = this.el.sceneEl.systems.renderer;
6059
this.system.registerLight(el);
6160
},
6261

@@ -67,7 +66,6 @@ module.exports.Component = registerComponent('light', {
6766
var data = this.data;
6867
var diffData = diff(data, oldData);
6968
var light = this.light;
70-
var rendererSystem = this.rendererSystem;
7169
var self = this;
7270

7371
// Existing light.
@@ -80,13 +78,11 @@ module.exports.Component = registerComponent('light', {
8078
switch (key) {
8179
case 'color': {
8280
light.color.set(value);
83-
rendererSystem.applyColorCorrection(light.color);
8481
break;
8582
}
8683

8784
case 'groundColor': {
8885
light.groundColor.set(value);
89-
rendererSystem.applyColorCorrection(light.groundColor);
9086
break;
9187
}
9288

@@ -281,12 +277,10 @@ module.exports.Component = registerComponent('light', {
281277
getLight: function (data) {
282278
var angle = data.angle;
283279
var color = new THREE.Color(data.color);
284-
this.rendererSystem.applyColorCorrection(color);
285280
color = color.getHex();
286281
var decay = data.decay;
287282
var distance = data.distance;
288283
var groundColor = new THREE.Color(data.groundColor);
289-
this.rendererSystem.applyColorCorrection(groundColor);
290284
groundColor = groundColor.getHex();
291285
var intensity = data.intensity;
292286
var type = data.type;

src/components/line.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ module.exports.Component = registerComponent('line', {
1616
var data = this.data;
1717
var geometry;
1818
var material;
19-
this.rendererSystem = this.el.sceneEl.systems.renderer;
2019
material = this.material = new THREE.LineBasicMaterial({
2120
color: data.color,
2221
opacity: data.opacity,
@@ -26,7 +25,6 @@ module.exports.Component = registerComponent('line', {
2625
geometry = this.geometry = new THREE.BufferGeometry();
2726
geometry.setAttribute('position', new THREE.BufferAttribute(new Float32Array(2 * 3), 3));
2827

29-
this.rendererSystem.applyColorCorrection(material.color);
3028
this.line = new THREE.Line(geometry, material);
3129
this.el.setObject3D(this.attrName, this.line);
3230
},
@@ -59,7 +57,6 @@ module.exports.Component = registerComponent('line', {
5957
}
6058

6159
material.color.setStyle(data.color);
62-
this.rendererSystem.applyColorCorrection(material.color);
6360
material.opacity = data.opacity;
6461
material.transparent = data.opacity < 1;
6562
material.visible = data.visible;

src/components/magicleap-controls.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ module.exports.Component = registerComponent('magicleap-controls', {
5656
this.onButtonTouchEnd = function (evt) { onButtonEvent(evt.detail.id, 'touchend', self); };
5757
this.onButtonTouchStart = function (evt) { onButtonEvent(evt.detail.id, 'touchstart', self); };
5858
this.previousButtonValues = {};
59-
this.rendererSystem = this.el.sceneEl.systems.renderer;
6059

6160
this.bindMethods();
6261
},

src/components/obj-model.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,7 @@ module.exports.Component = registerComponent('obj-model', {
6464
self.model.traverse(function (object) {
6565
if (object.isMesh) {
6666
var material = object.material;
67-
if (material.color) rendererSystem.applyColorCorrection(material.color);
6867
if (material.map) rendererSystem.applyColorCorrection(material.map);
69-
if (material.emissive) rendererSystem.applyColorCorrection(material.emissive);
7068
if (material.emissiveMap) rendererSystem.applyColorCorrection(material.emissiveMap);
7169
}
7270
});

src/components/oculus-go-controls.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ module.exports.Component = registerComponent('oculus-go-controls', {
8383
this.onButtonTouchEnd = function (evt) { onButtonEvent(evt.detail.id, 'touchend', self); };
8484
this.controllerPresent = false;
8585
this.lastControllerCheck = 0;
86-
this.rendererSystem = this.el.sceneEl.systems.renderer;
8786
this.bindMethods();
8887
},
8988

@@ -197,6 +196,5 @@ module.exports.Component = registerComponent('oculus-go-controls', {
197196
}
198197
button = buttonMeshes[buttonName];
199198
button.material.color.set(color);
200-
this.rendererSystem.applyColorCorrection(button.material.color);
201199
}
202200
});

src/components/oculus-touch-controls.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,6 @@ module.exports.Component = registerComponent('oculus-touch-controls', {
197197
this.controllerPresent = false;
198198
this.lastControllerCheck = 0;
199199
this.previousButtonValues = {};
200-
this.rendererSystem = this.el.sceneEl.systems.renderer;
201200
this.bindMethods();
202201
this.triggerEuler = new THREE.Euler();
203202
},
@@ -498,7 +497,6 @@ module.exports.Component = registerComponent('oculus-touch-controls', {
498497
if (buttonMeshes && buttonMeshes[buttonName]) {
499498
button = buttonMeshes[buttonName];
500499
button.material.color.set(color);
501-
this.rendererSystem.applyColorCorrection(button.material.color);
502500
}
503501
}
504502
});

src/components/valve-index-controls.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@ module.exports.Component = registerComponent('valve-index-controls', {
7373
this.onButtonTouchEnd = function (evt) { onButtonEvent(evt.detail.id, 'touchend', self); };
7474
this.onButtonTouchStart = function (evt) { onButtonEvent(evt.detail.id, 'touchstart', self); };
7575
this.previousButtonValues = {};
76-
this.rendererSystem = this.el.sceneEl.systems.renderer;
7776

7877
this.bindMethods();
7978
},

0 commit comments

Comments
 (0)