We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0f0d05d commit ceb3cb3Copy full SHA for ceb3cb3
src/loaders/CompressedTextureLoader.js
@@ -107,6 +107,23 @@ class CompressedTextureLoader extends Loader {
107
texture.image.height = texDatas.height;
108
texture.mipmaps = texDatas.mipmaps;
109
110
+ // put first mipmap data into image to simulate ImageData
111
+ if ( texDatas.mipmaps[ 0 ] && texDatas.mipmaps[ 0 ].data ) {
112
+
113
+ const firstBitmapData = texDatas.mipmaps[ 0 ].data;
114
115
+ if ( firstBitmapData instanceof Uint8ClampedArray ) {
116
117
+ texture.image.data = firstBitmapData;
118
119
+ } else if ( firstBitmapData instanceof Uint8Array ) {
120
121
+ texture.image.data = new Uint8ClampedArray( firstBitmapData );
122
123
+ }
124
125
126
127
}
128
129
if ( texDatas.mipmapCount === 1 ) {
0 commit comments