Skip to content

Commit ca06693

Browse files
committed
make addDefaultMaterials an explicit call
1 parent fefbb4c commit ca06693

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

examples/jsm/loaders/LDrawLoader.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1907,7 +1907,7 @@ class LDrawLoader extends Loader {
19071907
fileLoader.load( url, text => {
19081908

19091909
// Initializes the materials library with default materials
1910-
this.addMaterials( [] );
1910+
this.addDefaultMaterials();
19111911

19121912
this.partsCache
19131913
.parseModel( text )
@@ -1966,6 +1966,12 @@ class LDrawLoader extends Loader {
19661966

19671967
}
19681968

1969+
return this;
1970+
1971+
}
1972+
1973+
addDefaultMaterials() {
1974+
19691975
// Add default main triangle and line edge materials (used in pieces that can be colored with a main color)
19701976
this.addMaterial( this.parseColorMetaDirective( new LineParser( 'Main_Colour CODE 16 VALUE #FF8080 EDGE #333333' ) ) );
19711977
this.addMaterial( this.parseColorMetaDirective( new LineParser( 'Edge_Colour CODE 24 VALUE #A0A0A0 EDGE #333333' ) ) );

0 commit comments

Comments
 (0)