|
@@ -13,8 +13,8 @@ LWO2Parser.prototype = {
|
|
|
this.IFF.debugger.offset = this.IFF.reader.offset;
|
|
|
this.IFF.debugger.closeForms();
|
|
|
|
|
|
- var blockID = this.IFF.reader.getIDTag();
|
|
|
- var length = this.IFF.reader.getUint32(); // size of data in bytes
|
|
|
+ const blockID = this.IFF.reader.getIDTag();
|
|
|
+ let length = this.IFF.reader.getUint32(); // size of data in bytes
|
|
|
if ( length > this.IFF.reader.dv.byteLength - this.IFF.reader.offset ) {
|
|
|
|
|
|
this.IFF.reader.offset -= 4;
|
|
@@ -235,7 +235,7 @@ LWO2Parser.prototype = {
|
|
|
break;
|
|
|
|
|
|
case 'IMAG':
|
|
|
- var index = this.IFF.reader.getVariableLengthIndex();
|
|
|
+ const index = this.IFF.reader.getVariableLengthIndex();
|
|
|
this.IFF.currentForm.imageIndex = index;
|
|
|
break;
|
|
|
|
|
@@ -303,7 +303,7 @@ LWO2Parser.prototype = {
|
|
|
|
|
|
// LWO2 Spec chunks: these are needed since the SURF FORMs are often in LWO2 format
|
|
|
case 'SMAN':
|
|
|
- var maxSmoothingAngle = this.IFF.reader.getFloat32();
|
|
|
+ const maxSmoothingAngle = this.IFF.reader.getFloat32();
|
|
|
this.IFF.currentSurface.attributes.smooth = ( maxSmoothingAngle < 0 ) ? false : true;
|
|
|
break;
|
|
|
|