File tree Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -279,20 +279,22 @@ class KTX2Loader extends Loader {
279279
280280 pendings . push ( createDataTexture ( container , levelIndex ) . then ( function ( dataTexture ) {
281281
282- mipmaps [ levelIndex ] = {
283- data : dataTexture . image . data ,
284- width : dataTexture . image . width ,
285- height : dataTexture . image . height
286- } ;
282+ mipmaps [ levelIndex ] = dataTexture ;
287283
288284 } ) ) ;
289285
290286 }
291287
292288 await Promise . all ( pendings ) ;
293289
294- const texture = mipmaps . shift ( ) ;
295- texture . mipmaps = mipmaps ;
290+ const texture = mipmaps [ 0 ] ;
291+ texture . mipmaps = mipmaps . map ( dt => {
292+ return {
293+ data : dt . source . data ,
294+ width : dt . source . width ,
295+ height : dt . source . height
296+ } ;
297+ } ) ;
296298 return texture ;
297299
298300 }
You can’t perform that action at this time.
0 commit comments