@@ -218,10 +218,10 @@ class Texture {
218
218
*/
219
219
constructor ( graphicsDevice , options = { } ) {
220
220
this . device = graphicsDevice ;
221
- Debug . assert ( this . device , " Texture constructor requires a graphicsDevice to be valid" ) ;
222
- Debug . assert ( ! options . width || Number . isInteger ( options . width ) , " Texture width must be an integer number, got" , options ) ;
223
- Debug . assert ( ! options . height || Number . isInteger ( options . height ) , " Texture height must be an integer number, got" , options ) ;
224
- Debug . assert ( ! options . layers || Number . isInteger ( options . layers ) , " Texture layers must be an integer number, got" , options ) ;
221
+ Debug . assert ( this . device , ' Texture constructor requires a graphicsDevice to be valid' ) ;
222
+ Debug . assert ( ! options . width || Number . isInteger ( options . width ) , ' Texture width must be an integer number, got' , options ) ;
223
+ Debug . assert ( ! options . height || Number . isInteger ( options . height ) , ' Texture height must be an integer number, got' , options ) ;
224
+ Debug . assert ( ! options . layers || Number . isInteger ( options . layers ) , ' Texture layers must be an integer number, got' , options ) ;
225
225
226
226
this . name = options . name ?? '' ;
227
227
@@ -235,7 +235,7 @@ class Texture {
235
235
236
236
this . _layers = Math . floor ( options . layers ?? ( this . _dimension === TEXTUREDIMENSION_CUBE ? 6 : 1 ) ) ;
237
237
238
- Debug . assert ( ( this . _dimension === TEXTUREDIMENSION_CUBE ? this . _layers === 6 : true ) , " Texture cube map must have 6 layers" ) ;
238
+ Debug . assert ( ( this . _dimension === TEXTUREDIMENSION_CUBE ? this . _layers === 6 : true ) , ' Texture cube map must have 6 layers' ) ;
239
239
240
240
this . _format = options . format ?? PIXELFORMAT_RGBA8 ;
241
241
this . _compressed = isCompressedPixelFormat ( this . _format ) ;
@@ -942,8 +942,9 @@ class Texture {
942
942
if ( ! invalid ) {
943
943
// mark levels as updated
944
944
for ( let i = 0 ; i < this . _layers ; i ++ ) {
945
- if ( this . _levels [ 0 ] [ i ] !== source [ i ] )
945
+ if ( this . _levels [ 0 ] [ i ] !== source [ i ] ) {
946
946
this . _levelsUpdated [ 0 ] [ i ] = true ;
947
+ }
947
948
}
948
949
}
949
950
} else {
@@ -954,8 +955,9 @@ class Texture {
954
955
955
956
if ( ! invalid ) {
956
957
// mark level as updated
957
- if ( source !== this . _levels [ 0 ] )
958
+ if ( source !== this . _levels [ 0 ] ) {
958
959
this . _levelsUpdated [ 0 ] = true ;
960
+ }
959
961
960
962
width = source . width ;
961
963
height = source . height ;
0 commit comments