Skip to content

Commit 2040396

Browse files
author
David Cormack
committed
Fixed flatShading check for r87 support.
1 parent fd4368f commit 2040396

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ consisting of THREE.BufferGeometry and an associated THREE.Material. Multi-mate
55
## Usage
66
Include the loader library in your project:
77
```html
8-
<script src="https://cdn.rawgit.com/NGenesis/bom-three.js/v0.5/examples/js/loaders/BOMLoader.min.js"></script>
8+
<script src="https://cdn.rawgit.com/NGenesis/bom-three.js/v0.5.1/examples/js/loaders/BOMLoader.min.js"></script>
99
```
1010

1111
Then create an instance of BOMLoader and specify the file path to load:

examples/js/loaders/BOMLoader.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -677,7 +677,7 @@ THREE.BOMLoader.prototype = {
677677
var materialId = readUint16();
678678
material = materials[ materialId ].clone() || new THREE.MeshPhongMaterial();
679679

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

683683
if ( this.debug ) console.log( 'Group Material', materialId, material );

examples/js/loaders/BOMLoader.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)