From 8e82854d31ef3417631eda8ea3172b98bbbdf197 Mon Sep 17 00:00:00 2001 From: Mattias Edlund Date: Thu, 30 Apr 2020 20:43:42 +0200 Subject: [PATCH 1/3] ci(circleci): skip playmode tests for now --- .circleci/config.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 22bc43e..41c50ef 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -24,10 +24,10 @@ jobs: <<: *test-2019 environment: TEST_PLATFORM: editmode - test-playmode-2019: - <<: *test-2019 - environment: - TEST_PLATFORM: playmode +# test-playmode-2019: +# <<: *test-2019 +# environment: +# TEST_PLATFORM: playmode workflows: version: 2 @@ -35,5 +35,5 @@ workflows: jobs: - test-editmode-2019: context: Unity - - test-playmode-2019: - context: Unity +# - test-playmode-2019: +# context: Unity From e9d5def2eb6e18eed7e9f86943e5d32bf0721d60 Mon Sep 17 00:00:00 2001 From: is3D-1 Date: Fri, 1 May 2020 15:34:22 -0400 Subject: [PATCH 2/3] fix(mesh): bug related to degenerated triangle when using smart linking Reference array is not initialized properly for a degenerated triangle when using smart linking Smart linking can merge two very close triangle vertices together. For instance a triangle T(a,b,c) could become T(a,a,c) after smart linking. The UpdateReferences() function do not update the refs[] array correctly in this case because it overwrites the same ref cell twice and leaves the second ref cell not initialized because the indexer is updated only at the end of the function. --- Runtime/MeshSimplifier.cs | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/Runtime/MeshSimplifier.cs b/Runtime/MeshSimplifier.cs index 24dc544..a921d54 100644 --- a/Runtime/MeshSimplifier.cs +++ b/Runtime/MeshSimplifier.cs @@ -1,4 +1,4 @@ -#region License +#region License /* MIT License @@ -1176,19 +1176,15 @@ private void UpdateReferences() int v1 = triangles[i].v1; int v2 = triangles[i].v2; int start0 = vertices[v0].tstart; - int count0 = vertices[v0].tcount; + int count0 = vertices[v0].tcount++; int start1 = vertices[v1].tstart; - int count1 = vertices[v1].tcount; + int count1 = vertices[v1].tcount++; int start2 = vertices[v2].tstart; - int count2 = vertices[v2].tcount; + int count2 = vertices[v2].tcount++; refs[start0 + count0].Set(i, 0); refs[start1 + count1].Set(i, 1); refs[start2 + count2].Set(i, 2); - - ++vertices[v0].tcount; - ++vertices[v1].tcount; - ++vertices[v2].tcount; } } #endregion From 605c4e25dc02472d6fa1a4c23ed6161aae1dff9b Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Fri, 1 May 2020 19:35:03 +0000 Subject: [PATCH 3/3] chore(release): 2.3.3 [skip ci] ## [2.3.3](https://github.com/Whinarn/UnityMeshSimplifier/compare/v2.3.2...v2.3.3) (2020-05-01) ### Bug Fixes * **mesh:** bug related to degenerated triangle when using smart linking ([e9d5def](https://github.com/Whinarn/UnityMeshSimplifier/commit/e9d5def2eb6e18eed7e9f86943e5d32bf0721d60)) --- CHANGELOG.md | 7 +++++++ package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4e4dd8b..cd4b8d5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## [2.3.3](https://github.com/Whinarn/UnityMeshSimplifier/compare/v2.3.2...v2.3.3) (2020-05-01) + + +### Bug Fixes + +* **mesh:** bug related to degenerated triangle when using smart linking ([e9d5def](https://github.com/Whinarn/UnityMeshSimplifier/commit/e9d5def2eb6e18eed7e9f86943e5d32bf0721d60)) + ## [2.3.2](https://github.com/Whinarn/UnityMeshSimplifier/compare/v2.3.1...v2.3.2) (2020-04-30) diff --git a/package.json b/package.json index 1a625df..6af7028 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "com.whinarn.unitymeshsimplifier", "displayName": "Unity Mesh Simplifier", - "version": "2.3.2", + "version": "2.3.3", "unity": "2017.1", "description": "Simplifies 3D meshes with ease. Works both in the editor and during runtime in builds.", "type": "library",