Преглед на файлове

USDZExporter: Remove obsolete code in `buildVector2Array()`. (#27264)

Michael Herzog преди 1 година
родител
ревизия
3543d2aab4
променени са 1 файла, в които са добавени 4 реда и са изтрити 11 реда
  1. 4 11
      examples/jsm/exporters/USDZExporter.js

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

@@ -287,7 +287,7 @@ function buildMesh( geometry ) {
 			interpolation = "vertex"
 		)
 		point3f[] points = [${ buildVector3Array( attributes.position, count )}]
-${ buildPrimvars( attributes, count ) }
+${ buildPrimvars( attributes ) }
 		uniform token subdivisionScheme = "none"
 	}
 `;
@@ -356,14 +356,7 @@ function buildVector3Array( attribute, count ) {
 
 }
 
-function buildVector2Array( attribute, count ) {
-
-	if ( attribute === undefined ) {
-
-		console.warn( 'USDZExporter: UVs missing.' );
-		return Array( count ).fill( '(0, 0)' ).join( ', ' );
-
-	}
+function buildVector2Array( attribute ) {
 
 	const array = [];
 
@@ -380,7 +373,7 @@ function buildVector2Array( attribute, count ) {
 
 }
 
-function buildPrimvars( attributes, count ) {
+function buildPrimvars( attributes ) {
 
 	let string = '';
 
@@ -392,7 +385,7 @@ function buildPrimvars( attributes, count ) {
 		if ( attribute !== undefined ) {
 
 			string += `
-		texCoord2f[] primvars:st${ id } = [${ buildVector2Array( attribute, count )}] (
+		texCoord2f[] primvars:st${ id } = [${ buildVector2Array( attribute )}] (
 			interpolation = "vertex"
 		)`;