Ver código fonte

Provide shape necessary for ShapeGeometry.

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

+ 12 - 4
test/unit/src/geometries/ShapeGeometry.tests.js

@@ -8,6 +8,8 @@ import {
 	ShapeBufferGeometry
 } from '../../../../src/geometries/ShapeGeometry';
 
+import {Shape} from '../../../../src/extras/core/Shape';
+
 export default QUnit.module( 'Geometries', () => {
 
 	QUnit.module( 'ShapeGeometry', ( hooks ) => {
@@ -15,10 +17,13 @@ export default QUnit.module( 'Geometries', () => {
 		var geometries = undefined;
 		hooks.beforeEach( function () {
 
-			const parameters = {};
+            var triangleShape = new Shape();
+            triangleShape.moveTo( 0, -1 );
+            triangleShape.lineTo( 1, 1 );
+            triangleShape.lineTo( -1, 1 );
 
 			geometries = [
-				new ShapeGeometry()
+				new ShapeGeometry(triangleShape)
 			];
 
 		} );
@@ -51,10 +56,13 @@ export default QUnit.module( 'Geometries', () => {
 		var geometries = undefined;
 		hooks.beforeEach( function () {
 
-			const parameters = {};
+            var triangleShape = new Shape();
+            triangleShape.moveTo( 0, -1 );
+            triangleShape.lineTo( 1, 1 );
+            triangleShape.lineTo( -1, 1 );
 
 			geometries = [
-				new ShapeBufferGeometry()
+				new ShapeBufferGeometry(triangleShape)
 			];
 
 		} );