Просмотр исходного кода

WebGPURenderer: Guard reference to `VideoFrame`. (#31864)

Michael Herzog 8 месяцев назад
Родитель
Сommit
1aeae994a2
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      src/renderers/common/Textures.js

+ 1 - 1
src/renderers/common/Textures.js

@@ -391,7 +391,7 @@ class Textures extends DataMap {
 				target.height = image.videoHeight || 1;
 				target.depth = 1;
 
-			} else if ( image instanceof VideoFrame ) {
+			} else if ( ( typeof VideoFrame !== 'undefined' ) && ( image instanceof VideoFrame ) ) {
 
 				target.width = image.displayWidth || 1;
 				target.height = image.displayHeight || 1;

粤ICP备19079148号