Jelajahi Sumber

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 tahun lalu
induk
melakukan
dd5d429285
1 mengubah file dengan 4 tambahan dan 0 penghapusan
  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.' );
+
 	}
 
 }