Cubees 8 лет назад
Родитель
Сommit
5f3086a94f
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      src/Mesh/babylon.meshBuilder.ts

+ 1 - 1
src/Mesh/babylon.meshBuilder.ts

@@ -793,7 +793,7 @@
         public static CreatePolygon(name: string, options: {shape: Vector3[], holes?: Vector3[][], depth?: number, updatable?: boolean, sideOrientation?: number, frontUVs?: Vector4, backUVs?: Vector4}, scene: Scene): Mesh {
             options.sideOrientation = MeshBuilder.updateSideOrientation(options.sideOrientation, scene);
 			var shape = options.shape;
-			var holes = options.holes;
+			var holes = options.holes || [];
 			var depth = options.depth || 0;
 			var contours: Array<Vector2> = [];
 			var hole: Array<Vector2> = [];