소스 검색

USDZExporter: Throw exception when processing textures with no image data. (#25093)

* USDZExporter: Add warning when processing textures with no image data.

* USDZExporter: Throw exception when no image data are defined.

* Update USDZExporter.js
Michael Herzog 2 년 전
부모
커밋
dd5d429285
1개의 변경된 파일4개의 추가작업 그리고 0개의 파일을 삭제
  1. 4 0
      examples/jsm/exporters/USDZExporter.js

+ 4 - 0
examples/jsm/exporters/USDZExporter.js

@@ -163,6 +163,10 @@ function imageToCanvas( image, color ) {
 
 		return canvas;
 
+	} else {
+
+		throw new Error( 'THREE.USDZExporter: No valid image data found. Unable to process texture.' );
+
 	}
 
 }