We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 98f64b0 commit 145f712Copy full SHA for 145f712
examples/jsm/loaders/PLYLoader.js
@@ -3,7 +3,8 @@ import {
3
FileLoader,
4
Float32BufferAttribute,
5
Loader,
6
- LoaderUtils
+ LoaderUtils,
7
+ Color
8
} from 'three';
9
10
/**
@@ -32,6 +33,7 @@ import {
32
33
*
34
*/
35
36
+const _color = new Color();
37
38
class PLYLoader extends Loader {
39
@@ -407,7 +409,13 @@ class PLYLoader extends Loader {
407
409
408
410
if ( attrR !== null && attrG !== null && attrB !== null ) {
411
- buffer.colors.push( element[ attrR ] / 255.0, element[ attrG ] / 255.0, element[ attrB ] / 255.0 );
412
+ _color.setRGB(
413
+ element[ attrR ] / 255.0,
414
+ element[ attrG ] / 255.0,
415
+ element[ attrB ] / 255.0
416
+ ).convertSRGBToLinear();
417
+
418
+ buffer.colors.push( _color.r, _color.g, _color.b );
419
420
}
421
0 commit comments