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