Skip to content

Commit bc507d8

Browse files
authored
LDrawLoader: remove phong material use (#22973)
* LDrawLoader: remove phong material use * adjust roughness
1 parent 64e930e commit bc507d8

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

examples/jsm/loaders/LDrawLoader.js

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import {
99
Loader,
1010
Matrix4,
1111
Mesh,
12-
MeshPhongMaterial,
1312
MeshStandardMaterial,
1413
ShaderMaterial,
1514
UniformsLib,
@@ -1201,14 +1200,8 @@ class LDrawLoader extends Loader {
12011200

12021201
case FINISH_TYPE_PEARLESCENT:
12031202

1204-
// Try to imitate pearlescency by setting the specular to the complementary of the color, and low shininess
1205-
const specular = new Color( colour );
1206-
const hsl = specular.getHSL( { h: 0, s: 0, l: 0 } );
1207-
hsl.h = ( hsl.h + 0.5 ) % 1;
1208-
hsl.l = Math.min( 1, hsl.l + ( 1 - hsl.l ) * 0.7 );
1209-
specular.setHSL( hsl.h, hsl.s, hsl.l );
1210-
1211-
material = new MeshPhongMaterial( { color: colour, specular: specular, shininess: 10, reflectivity: 0.3 } );
1203+
// Try to imitate pearlescency by making the surface glossy
1204+
material = new MeshStandardMaterial( { color: colour, roughness: 0.3, metalness: 0.25 } );
12121205
break;
12131206

12141207
case FINISH_TYPE_CHROME:

0 commit comments

Comments
 (0)