File tree Expand file tree Collapse file tree 1 file changed +19
-19
lines changed
src/renderers/webgl-fallback/utils Expand file tree Collapse file tree 1 file changed +19
-19
lines changed Original file line number Diff line number Diff line change @@ -497,25 +497,6 @@ class WebGLTextureUtils {
497
497
if ( texture . isRenderTargetTexture || ( textureGPU === undefined /* unsupported texture format */ ) )
498
498
return ;
499
499
500
- const getImage = ( source ) => {
501
-
502
- if ( source . isDataTexture ) {
503
-
504
- return source . image . data ;
505
-
506
- } else if ( ( typeof HTMLImageElement !== 'undefined' && source instanceof HTMLImageElement ) ||
507
- ( typeof HTMLCanvasElement !== 'undefined' && source instanceof HTMLCanvasElement ) ||
508
- ( typeof ImageBitmap !== 'undefined' && source instanceof ImageBitmap ) ||
509
- ( typeof OffscreenCanvas !== 'undefined' && source instanceof OffscreenCanvas ) ) {
510
-
511
- return source ;
512
-
513
- }
514
-
515
- return source . data ;
516
-
517
- } ;
518
-
519
500
this . backend . state . bindTexture ( glTextureType , textureGPU ) ;
520
501
521
502
this . setTextureParameters ( glTextureType , texture ) ;
@@ -1154,4 +1135,23 @@ class WebGLTextureUtils {
1154
1135
1155
1136
}
1156
1137
1138
+ function getImage ( source ) {
1139
+
1140
+ if ( source . isDataTexture ) {
1141
+
1142
+ return source . image . data ;
1143
+
1144
+ } else if ( ( typeof HTMLImageElement !== 'undefined' && source instanceof HTMLImageElement ) ||
1145
+ ( typeof HTMLCanvasElement !== 'undefined' && source instanceof HTMLCanvasElement ) ||
1146
+ ( typeof ImageBitmap !== 'undefined' && source instanceof ImageBitmap ) ||
1147
+ ( typeof OffscreenCanvas !== 'undefined' && source instanceof OffscreenCanvas ) ) {
1148
+
1149
+ return source ;
1150
+
1151
+ }
1152
+
1153
+ return source . data ;
1154
+
1155
+ }
1156
+
1157
1157
export default WebGLTextureUtils ;
You can’t perform that action at this time.
0 commit comments