Skip to content

Commit

Permalink
Fixed flatShading check for r87 support.
Browse files Browse the repository at this point in the history
  • Loading branch information
David Cormack committed Oct 12, 2017
1 parent fd4368f commit 2040396
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ consisting of THREE.BufferGeometry and an associated THREE.Material. Multi-mate
## Usage
Include the loader library in your project:
```html
<script src="https://cdn.rawgit.com/NGenesis/bom-three.js/v0.5/examples/js/loaders/BOMLoader.min.js"></script>
<script src="https://cdn.rawgit.com/NGenesis/bom-three.js/v0.5.1/examples/js/loaders/BOMLoader.min.js"></script>
```

Then create an instance of BOMLoader and specify the file path to load:
Expand Down
2 changes: 1 addition & 1 deletion examples/js/loaders/BOMLoader.js
Original file line number Diff line number Diff line change
Expand Up @@ -677,7 +677,7 @@ THREE.BOMLoader.prototype = {
var materialId = readUint16();
material = materials[ materialId ].clone() || new THREE.MeshPhongMaterial();

if( material.flatShading ) material.flatShading = ( smoothing <= 0 );
if( material.flatShading !== undefined ) material.flatShading = ( smoothing <= 0 );
else material.shading = ( smoothing > 0 ) ? THREE.SmoothShading : THREE.FlatShading;

if ( this.debug ) console.log( 'Group Material', materialId, material );
Expand Down
2 changes: 1 addition & 1 deletion examples/js/loaders/BOMLoader.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 2040396

Please # to comment.