浏览代码

Fix util_mesh_merge

luboslenco 1 月之前
父节点
当前提交
a55ba9854a
共有 1 个文件被更改,包括 4 次插入4 次删除
  1. 4 4
      base/sources/ts/util_mesh.ts

+ 4 - 4
base/sources/ts/util_mesh.ts

@@ -34,7 +34,7 @@ function util_mesh_merge(paint_objects: mesh_object_t[] = null) {
 	let ioff: i32 = 0;
 	for (let i: i32 = 0; i < paint_objects.length; ++i) {
 		let vas: vertex_array_t[] = paint_objects[i].data.vertex_arrays;
-		let ia: u32_array_t = paint_objects[i].data.index_array;
+		let ias: u32_array_t = paint_objects[i].data.index_array;
 		let scale: f32 = paint_objects[i].data.scale_pos;
 
 		// Pos
@@ -71,12 +71,12 @@ function util_mesh_merge(paint_objects: mesh_object_t[] = null) {
 			}
 		}
 		// Indices
-		for (let j: i32 = 0; j < ia.length; ++j) {
-			ia[j + ioff] = ia[j] + voff;
+		for (let j: i32 = 0; j < ias.length; ++j) {
+			ia[j + ioff] = ias[j] + voff;
 		}
 
 		voff += math_floor(vas[0].values.length / 4);
-		ioff += math_floor(ia.length);
+		ioff += math_floor(ias.length);
 	}
 
 	let raw: mesh_data_t = {