Forráskód Böngészése

Provide shape necessary for ShapeGeometry.

Ondřej Španěl 7 éve
szülő
commit
e1174d34fa
1 módosított fájl, 12 hozzáadás és 4 törlés
  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
 	ShapeBufferGeometry
 } from '../../../../src/geometries/ShapeGeometry';
 } from '../../../../src/geometries/ShapeGeometry';
 
 
+import {Shape} from '../../../../src/extras/core/Shape';
+
 export default QUnit.module( 'Geometries', () => {
 export default QUnit.module( 'Geometries', () => {
 
 
 	QUnit.module( 'ShapeGeometry', ( hooks ) => {
 	QUnit.module( 'ShapeGeometry', ( hooks ) => {
@@ -15,10 +17,13 @@ export default QUnit.module( 'Geometries', () => {
 		var geometries = undefined;
 		var geometries = undefined;
 		hooks.beforeEach( function () {
 		hooks.beforeEach( function () {
 
 
-			const parameters = {};
+            var triangleShape = new Shape();
+            triangleShape.moveTo( 0, -1 );
+            triangleShape.lineTo( 1, 1 );
+            triangleShape.lineTo( -1, 1 );
 
 
 			geometries = [
 			geometries = [
-				new ShapeGeometry()
+				new ShapeGeometry(triangleShape)
 			];
 			];
 
 
 		} );
 		} );
@@ -51,10 +56,13 @@ export default QUnit.module( 'Geometries', () => {
 		var geometries = undefined;
 		var geometries = undefined;
 		hooks.beforeEach( function () {
 		hooks.beforeEach( function () {
 
 
-			const parameters = {};
+            var triangleShape = new Shape();
+            triangleShape.moveTo( 0, -1 );
+            triangleShape.lineTo( 1, 1 );
+            triangleShape.lineTo( -1, 1 );
 
 
 			geometries = [
 			geometries = [
-				new ShapeBufferGeometry()
+				new ShapeBufferGeometry(triangleShape)
 			];
 			];
 
 
 		} );
 		} );