Skip to content

Commit

Permalink
LightShadow: Added normalOffset to toJSON()
Browse files Browse the repository at this point in the history
  • Loading branch information
mrdoob committed Jun 17, 2020
1 parent 5057626 commit 181e550
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/lights/LightShadow.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ Object.assign( LightShadow.prototype, {
const object = {};

if ( this.bias !== 0 ) object.bias = this.bias;
if ( this.normalOffset !== 0 ) object.normalOffset = this.normalOffset;
if ( this.radius !== 1 ) object.radius = this.radius;
if ( this.mapSize.x !== 512 || this.mapSize.y !== 512 ) object.mapSize = this.mapSize.toArray();

Expand Down
1 change: 1 addition & 0 deletions src/loaders/ObjectLoader.js
Original file line number Diff line number Diff line change
Expand Up @@ -928,6 +928,7 @@ ObjectLoader.prototype = Object.assign( Object.create( Loader.prototype ), {
if ( data.shadow ) {

if ( data.shadow.bias !== undefined ) object.shadow.bias = data.shadow.bias;
if ( data.shadow.normalOffset !== undefined ) object.shadow.normalOffset = data.shadow.normalOffset;
if ( data.shadow.radius !== undefined ) object.shadow.radius = data.shadow.radius;
if ( data.shadow.mapSize !== undefined ) object.shadow.mapSize.fromArray( data.shadow.mapSize );
if ( data.shadow.camera !== undefined ) object.shadow.camera = this.parseObject( data.shadow.camera );
Expand Down

0 comments on commit 181e550

Please sign in to comment.