Ver código fonte

Provide vertices and indices necessary for PolyhedronGeometry.

Ondřej Španěl 7 anos atrás
pai
commit
36271fe82d
1 arquivos alterados com 16 adições e 4 exclusões
  1. 16 4
      test/unit/src/geometries/PolyhedronGeometry.tests.js

+ 16 - 4
test/unit/src/geometries/PolyhedronGeometry.tests.js

@@ -15,10 +15,16 @@ export default QUnit.module( 'Geometries', () => {
 		var geometries = undefined;
 		hooks.beforeEach( function () {
 
-			const parameters = {};
+            var vertices = [
+                1, 1, 1, 	- 1, - 1, 1, 	- 1, 1, - 1, 	1, - 1, - 1
+            ];
+
+            var indices = [
+                2, 1, 0, 	0, 3, 2,	1, 3, 0,	2, 3, 1
+            ];
 
 			geometries = [
-				new PolyhedronGeometry()
+				new PolyhedronGeometry(vertices, indices)
 			];
 
 		} );
@@ -51,10 +57,16 @@ export default QUnit.module( 'Geometries', () => {
 		var geometries = undefined;
 		hooks.beforeEach( function () {
 
-			const parameters = {};
+            var vertices = [
+                1, 1, 1, 	- 1, - 1, 1, 	- 1, 1, - 1, 	1, - 1, - 1
+            ];
+
+            var indices = [
+                2, 1, 0, 	0, 3, 2,	1, 3, 0,	2, 3, 1
+            ];
 
 			geometries = [
-				new PolyhedronBufferGeometry()
+				new PolyhedronBufferGeometry(vertices, indices)
 			];
 
 		} );