@@ -218,10 +218,10 @@ class Texture {
218218 */
219219 constructor ( graphicsDevice , options = { } ) {
220220 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 ) ;
225225
226226 this . name = options . name ?? '' ;
227227
@@ -235,7 +235,7 @@ class Texture {
235235
236236 this . _layers = Math . floor ( options . layers ?? ( this . _dimension === TEXTUREDIMENSION_CUBE ? 6 : 1 ) ) ;
237237
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' ) ;
239239
240240 this . _format = options . format ?? PIXELFORMAT_RGBA8 ;
241241 this . _compressed = isCompressedPixelFormat ( this . _format ) ;
@@ -942,8 +942,9 @@ class Texture {
942942 if ( ! invalid ) {
943943 // mark levels as updated
944944 for ( let i = 0 ; i < this . _layers ; i ++ ) {
945- if ( this . _levels [ 0 ] [ i ] !== source [ i ] )
945+ if ( this . _levels [ 0 ] [ i ] !== source [ i ] ) {
946946 this . _levelsUpdated [ 0 ] [ i ] = true ;
947+ }
947948 }
948949 }
949950 } else {
@@ -954,8 +955,9 @@ class Texture {
954955
955956 if ( ! invalid ) {
956957 // mark level as updated
957- if ( source !== this . _levels [ 0 ] )
958+ if ( source !== this . _levels [ 0 ] ) {
958959 this . _levelsUpdated [ 0 ] = true ;
960+ }
959961
960962 width = source . width ;
961963 height = source . height ;
0 commit comments