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

Add warnings when trying to getShape for unsupported geometry types (#32372)

Co-authored-by: Michael Herzog <michael.herzog@human-interactive.org>
Solly 3 месяцев назад
Родитель
Сommit
0d38e1080a

+ 2 - 0
examples/jsm/physics/AmmoPhysics.js

@@ -66,6 +66,8 @@ async function AmmoPhysics() {
 
 		}
 
+		console.error( 'AmmoPhysics: Unsupported geometry type:', geometry.type );
+
 		return null;
 
 	}

+ 2 - 0
examples/jsm/physics/JoltPhysics.js

@@ -28,6 +28,8 @@ function getShape( geometry ) {
 
 	}
 
+	console.error( 'JoltPhysics: Unsupported geometry type:', geometry.type );
+
 	return null;
 
 }

+ 2 - 0
examples/jsm/physics/RapierPhysics.js

@@ -73,6 +73,8 @@ function getShape( geometry ) {
 
 	}
 
+	console.error( 'RapierPhysics: Unsupported geometry type:', geometry.type );
+
 	return null;
 
 }

粤ICP备19079148号