From ee9a4fbabffb102e28aa29794d28bf39652e13fe Mon Sep 17 00:00:00 2001 From: Sean Mann Date: Mon, 25 Apr 2016 13:36:09 -0400 Subject: [PATCH] - 9 slice plane script, textures, mats, and test - CircleEquations -> Geometry and tests --- .gitignore | 2 + .../NGTools/Assets/Integration Tests.meta | 9 + .../Assets/Integration Tests/Editor.meta | 9 + .../Editor/Test9SlicedMesh.cs | 15 + .../Editor/Test9SlicedMesh.cs.meta | 12 + .../NGTools/Extensions/CircleEquations.cs | 41 --- .../_Scripts/NGTools/Extensions/Geometry.cs | 310 ++++++++++++++++++ ...rcleEquations.cs.meta => Geometry.cs.meta} | 0 .../Assets/_Scripts/NGTools/SlicedMesh.cs | 139 ++++++++ .../_Scripts/NGTools/SlicedMesh.cs.meta | 12 + .../NGTools/Tests/TestSphereGeneration.cs | 58 ++++ .../Tests/TestSphereGeneration.cs.meta | 12 + .../Editor/CircleEquations_Tests.cs | 10 +- NGTools_Unity/NGTools/Assets/_Shaders.meta | 9 + .../_Shaders/UnlitTransparentWColor.shader | 32 ++ .../UnlitTransparentWColor.shader.meta | 9 + NGTools_Unity/NGTools/Assets/_Textures.meta | 9 + .../Assets/_Textures/embossed9slice.png | Bin 0 -> 10520 bytes .../Assets/_Textures/embossed9slice.png.meta | 57 ++++ .../NGTools/Assets/_Textures/simple9slice.mat | 171 ++++++++++ .../Assets/_Textures/simple9slice.mat.meta | 8 + .../NGTools/Assets/_Textures/simple9slice.png | Bin 0 -> 4182 bytes .../Assets/_Textures/simple9slice.png.meta | 57 ++++ 23 files changed, 935 insertions(+), 46 deletions(-) create mode 100644 NGTools_Unity/NGTools/Assets/Integration Tests.meta create mode 100644 NGTools_Unity/NGTools/Assets/Integration Tests/Editor.meta create mode 100644 NGTools_Unity/NGTools/Assets/Integration Tests/Editor/Test9SlicedMesh.cs create mode 100644 NGTools_Unity/NGTools/Assets/Integration Tests/Editor/Test9SlicedMesh.cs.meta delete mode 100644 NGTools_Unity/NGTools/Assets/_Scripts/NGTools/Extensions/CircleEquations.cs create mode 100644 NGTools_Unity/NGTools/Assets/_Scripts/NGTools/Extensions/Geometry.cs rename NGTools_Unity/NGTools/Assets/_Scripts/NGTools/Extensions/{CircleEquations.cs.meta => Geometry.cs.meta} (100%) create mode 100644 NGTools_Unity/NGTools/Assets/_Scripts/NGTools/SlicedMesh.cs create mode 100644 NGTools_Unity/NGTools/Assets/_Scripts/NGTools/SlicedMesh.cs.meta create mode 100644 NGTools_Unity/NGTools/Assets/_Scripts/NGTools/Tests/TestSphereGeneration.cs create mode 100644 NGTools_Unity/NGTools/Assets/_Scripts/NGTools/Tests/TestSphereGeneration.cs.meta create mode 100644 NGTools_Unity/NGTools/Assets/_Shaders.meta create mode 100644 NGTools_Unity/NGTools/Assets/_Shaders/UnlitTransparentWColor.shader create mode 100644 NGTools_Unity/NGTools/Assets/_Shaders/UnlitTransparentWColor.shader.meta create mode 100644 NGTools_Unity/NGTools/Assets/_Textures.meta create mode 100644 NGTools_Unity/NGTools/Assets/_Textures/embossed9slice.png create mode 100644 NGTools_Unity/NGTools/Assets/_Textures/embossed9slice.png.meta create mode 100644 NGTools_Unity/NGTools/Assets/_Textures/simple9slice.mat create mode 100644 NGTools_Unity/NGTools/Assets/_Textures/simple9slice.mat.meta create mode 100644 NGTools_Unity/NGTools/Assets/_Textures/simple9slice.png create mode 100644 NGTools_Unity/NGTools/Assets/_Textures/simple9slice.png.meta diff --git a/.gitignore b/.gitignore index 429f3bb..05db137 100644 --- a/.gitignore +++ b/.gitignore @@ -23,3 +23,5 @@ NGTools_Unity/NGTools/Assets/UnityVS/ NGTools_Unity/NGTools/Assets/UnityTestTools/ NGTools_Unity/NGTools/logs/ NGTools_Unity/NGTools/debug.log +NGTools_Unity/NGTools/Assets/debug.log +NGTools_Unity/NGTools/Assets/debug.log.meta diff --git a/NGTools_Unity/NGTools/Assets/Integration Tests.meta b/NGTools_Unity/NGTools/Assets/Integration Tests.meta new file mode 100644 index 0000000..90110d3 --- /dev/null +++ b/NGTools_Unity/NGTools/Assets/Integration Tests.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: ec3aaaf606276a8418ee50bd8faed64c +folderAsset: yes +timeCreated: 1460481347 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/NGTools_Unity/NGTools/Assets/Integration Tests/Editor.meta b/NGTools_Unity/NGTools/Assets/Integration Tests/Editor.meta new file mode 100644 index 0000000..2f10941 --- /dev/null +++ b/NGTools_Unity/NGTools/Assets/Integration Tests/Editor.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 127925d9ab9cc8a4a9dc24a4e60e7b2c +folderAsset: yes +timeCreated: 1460481347 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/NGTools_Unity/NGTools/Assets/Integration Tests/Editor/Test9SlicedMesh.cs b/NGTools_Unity/NGTools/Assets/Integration Tests/Editor/Test9SlicedMesh.cs new file mode 100644 index 0000000..499ed46 --- /dev/null +++ b/NGTools_Unity/NGTools/Assets/Integration Tests/Editor/Test9SlicedMesh.cs @@ -0,0 +1,15 @@ +using UnityEngine; +using UnityEditor; + +public class Test9SlicedMesh : Editor +{ + [MenuItem("Edit/NGTools/Make 9-sliced mesh")] + static void Make9SlicedMesh() + { + GameObject go = new GameObject("9sliced"); + MeshFilter meshFilter = go.AddComponent(); + go.AddComponent(); + + meshFilter.mesh = Geometry.Create9SlicedMesh(); + } +} \ No newline at end of file diff --git a/NGTools_Unity/NGTools/Assets/Integration Tests/Editor/Test9SlicedMesh.cs.meta b/NGTools_Unity/NGTools/Assets/Integration Tests/Editor/Test9SlicedMesh.cs.meta new file mode 100644 index 0000000..4a0164c --- /dev/null +++ b/NGTools_Unity/NGTools/Assets/Integration Tests/Editor/Test9SlicedMesh.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 00e07ed26f0f3fb4db635e06d5a052c5 +timeCreated: 1460481351 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/NGTools_Unity/NGTools/Assets/_Scripts/NGTools/Extensions/CircleEquations.cs b/NGTools_Unity/NGTools/Assets/_Scripts/NGTools/Extensions/CircleEquations.cs deleted file mode 100644 index 48b993a..0000000 --- a/NGTools_Unity/NGTools/Assets/_Scripts/NGTools/Extensions/CircleEquations.cs +++ /dev/null @@ -1,41 +0,0 @@ -namespace UnityEngine -{ - public class CircleEquations - { - public static Vector2 PointOnCircle(float radius, float angleInDegrees, Vector2 origin) - { - // Convert from degrees to radians via multiplication by PI/180 - float x = (radius * Mathf.Cos(angleInDegrees * Mathf.PI / 180F)) + origin.x; - float y = (radius * Mathf.Sin(angleInDegrees * Mathf.PI / 180F)) + origin.y; - - x = Mathf.Clamp(x, float.MinValue, float.MaxValue); - y = Mathf.Clamp(y, float.MinValue, float.MaxValue); - - return new Vector2(x, y); - } - - public static float Circumference(float radius) - { - if (radius >= float.MaxValue) - return float.MaxValue; - - if (radius <= float.MinValue) - return float.MinValue; - - float circumference = (2f * Mathf.PI * radius); - return circumference; - } - - public static float Radius(float circumference) - { - if (circumference >= float.MaxValue) - return float.MaxValue; - - if (circumference <= float.MinValue) - return float.MinValue; - - - return (circumference / (2f * Mathf.PI)); - } - } -} diff --git a/NGTools_Unity/NGTools/Assets/_Scripts/NGTools/Extensions/Geometry.cs b/NGTools_Unity/NGTools/Assets/_Scripts/NGTools/Extensions/Geometry.cs new file mode 100644 index 0000000..9e34bfc --- /dev/null +++ b/NGTools_Unity/NGTools/Assets/_Scripts/NGTools/Extensions/Geometry.cs @@ -0,0 +1,310 @@ +using System.Collections.Generic; +using System.Linq; +namespace UnityEngine +{ + public class Geometry + { + public static Vector2 PointOnCircle(float radius, float angleInDegrees, Vector2 origin) + { + // Convert from degrees to radians via multiplication by PI/180 + float x = (radius * Mathf.Cos(angleInDegrees * Mathf.PI / 180F)) + origin.x; + float y = (radius * Mathf.Sin(angleInDegrees * Mathf.PI / 180F)) + origin.y; + + x = Mathf.Clamp(x, float.MinValue, float.MaxValue); + y = Mathf.Clamp(y, float.MinValue, float.MaxValue); + + return new Vector2(x, y); + } + + public static float Circumference(float radius) + { + if (radius >= float.MaxValue) + return float.MaxValue; + + if (radius <= float.MinValue) + return float.MinValue; + + float circumference = (2f * Mathf.PI * radius); + return circumference; + } + + public static float Radius(float circumference) + { + if (circumference >= float.MaxValue) + return float.MaxValue; + + if (circumference <= float.MinValue) + return float.MinValue; + + + return (circumference / (2f * Mathf.PI)); + } + + public static List GetFibonacciSphereVertices(int vertexCount = 1, bool randomize = true) + { + List vertices = new List(); + vertices.Capacity = vertexCount; + + float random = 1f; + + if (randomize) + random = Random.Range(0f, 1f) * vertexCount; + + float offset = 2f / vertexCount; + float increment = Mathf.PI * (3f - Mathf.Sqrt(5)); // what is 3 and 5? + + float x, y, z, r, phi; + for (int i = 0; i < vertexCount; i++) + { + y = ((i * offset) - 1) + (offset / 2f); + r = Mathf.Sqrt(1f - Mathf.Pow(y, 2)); + + phi = ((i + random) % vertexCount) * increment; + + x = Mathf.Cos(phi) * r; + z = Mathf.Sin(phi) * r; + + vertices.Add(new Vector3(x, y, z)); + } + + + return vertices; + } + + private static int GetMidpointIndex(Dictionary midpointIndices, List vertices, int i0, int i1) + { + + var edgeKey = string.Format("{0}_{1}", Mathf.Min(i0, i1), Mathf.Max(i0, i1)); + + var midpointIndex = -1; + + if (!midpointIndices.TryGetValue(edgeKey, out midpointIndex)) + { + var v0 = vertices[i0]; + var v1 = vertices[i1]; + + var midpoint = (v0 + v1) / 2f; + + if (vertices.Contains(midpoint)) + midpointIndex = vertices.IndexOf(midpoint); + else + { + midpointIndex = vertices.Count; + vertices.Add(midpoint); + midpointIndices.Add(edgeKey, midpointIndex); + } + } + + + return midpointIndex; + + } + + /// + /// i0 + /// / \ + /// m02-m01 + /// / \ / \ + /// i2---m12---i1 + /// + /// + /// + public static void Subdivide(List vectors, List indices, bool removeSourceTriangles) + { + var midpointIndices = new Dictionary(); + + var newIndices = new List(indices.Count * 4); + + if (!removeSourceTriangles) + newIndices.AddRange(indices); + + for (var i = 0; i < indices.Count - 2; i += 3) + { + var i0 = indices[i]; + var i1 = indices[i + 1]; + var i2 = indices[i + 2]; + + var m01 = GetMidpointIndex(midpointIndices, vectors, i0, i1); + var m12 = GetMidpointIndex(midpointIndices, vectors, i1, i2); + var m02 = GetMidpointIndex(midpointIndices, vectors, i2, i0); + + newIndices.AddRange( + new[] { + i0,m01,m02 + , + i1,m12,m01 + , + i2,m02,m12 + , + m02,m01,m12 + } + ); + + } + + indices.Clear(); + indices.AddRange(newIndices); + } + + /// + /// create a regular icosahedron (20-sided polyhedron) + /// + /// + /// You can create this programmatically instead of using the given vertex + /// and index list, but it's kind of a pain and rather pointless beyond a + /// learning exercise. + /// + public static void Icosahedron(List vertices, List indices) + { + + indices.AddRange( + new int[] + { + 0,4,1, + 0,9,4, + 9,5,4, + 4,5,8, + 4,8,1, + 8,10,1, + 8,3,10, + 5,3,8, + 5,2,3, + 2,7,3, + 7,10,3, + 7,6,10, + 7,11,6, + 11,0,6, + 0,1,6, + 6,1,10, + 9,0,11, + 9,11,2, + 9,2,5, + 7,2,11 + } + .Select(i => i + vertices.Count) + ); + + var X = 0.525731112119133606f; + var Z = 0.850650808352039932f; + + vertices.AddRange( + new[] + { + new Vector3(-X, 0f, Z), + new Vector3(X, 0f, Z), + new Vector3(-X, 0f, -Z), + new Vector3(X, 0f, -Z), + new Vector3(0f, Z, X), + new Vector3(0f, Z, -X), + new Vector3(0f, -Z, X), + new Vector3(0f, -Z, -X), + new Vector3(Z, X, 0f), + new Vector3(-Z, X, 0f), + new Vector3(Z, -X, 0f), + new Vector3(-Z, -X, 0f) + } + ); + + + } + + /// + /// Creates a smoothly subdivided icosahedron. + /// + /// + /// Vertex count is 2 + 10 * 4 ^ subdivisions (i.e. 12, 42, 162, 642, 2562, 10242...) + /// Subdivision is slow above 3. + /// Times: + /// 0,1,2 = 0ms + /// 3 = 43ms + /// 4 = 605ms + /// 5 = 9531ms + /// 6 = ???? + /// + public static List GetSubdividedIcosahedronVertices(int subdivisions = 0) + { + List vertices = new List(); + List indices = new List(); + + Icosahedron(vertices, indices); + + // Subdivide + for (int i = 0; i < subdivisions; i++) + Subdivide(vertices, indices, true); + + // Smooth vertices into a spherical shape + for (int i = 0; i < vertices.Count; i++) + vertices[i] = vertices[i].normalized; + + return vertices; + } + + + + public static Mesh Create9SlicedMesh(float border = 1f, float width = 3f, float height = 3f, float marginUV = 1f) + { + Mesh mesh = new Mesh(); + + mesh.vertices = new Vector3[] { + new Vector3(0, 0, 0), + new Vector3(border, 0, 0), + new Vector3(width - border, 0, 0), + new Vector3(width, 0, 0), + new Vector3(0, border, 0), + new Vector3(border, border, 0), + new Vector3(width - border, border, 0), + new Vector3(width, border, 0), + new Vector3(0, height - border, 0), + new Vector3(border, height - border, 0), + new Vector3(width - border, height - border, 0), + new Vector3(width, height - border, 0), + new Vector3(0, height, 0), + new Vector3(border, height, 0), + new Vector3(width - border, height, 0), + new Vector3(width, height, 0) + }; + + mesh.uv = new Vector2[] { + new Vector2(0, 0), + new Vector2(marginUV, 0), + new Vector2(1 - marginUV, 0), + new Vector2(1, 0), + new Vector2(0, marginUV), + new Vector2(marginUV, marginUV), + new Vector2(1 - marginUV, marginUV), + new Vector2(1, marginUV), + new Vector2(0, 1 - marginUV), + new Vector2(marginUV, 1 - marginUV), + new Vector2(1 - marginUV, 1 - marginUV), + new Vector2(1, 1 - marginUV), + new Vector2(0, 1), + new Vector2(marginUV, 1), + new Vector2(1 - marginUV, 1), + new Vector2(1, 1) + }; + + mesh.triangles = new int[] { + 0, 4, 5, + 0, 5, 1, + 1, 5, 6, + 1, 6, 2, + 2, 6, 7, + 2, 7, 3, + 4, 8, 9, + 4, 9, 5, + 5, 9, 10, // center plane + 5, 10, 6, // center plane + 6, 10, 11, + 6, 11, 7, + 8, 12, 13, + 8, 13, 9, + 9, 13, 14, + 9, 14, 10, + 10, 14, 15, + 10, 15, 11 + }; + + return mesh; + } + } +} diff --git a/NGTools_Unity/NGTools/Assets/_Scripts/NGTools/Extensions/CircleEquations.cs.meta b/NGTools_Unity/NGTools/Assets/_Scripts/NGTools/Extensions/Geometry.cs.meta similarity index 100% rename from NGTools_Unity/NGTools/Assets/_Scripts/NGTools/Extensions/CircleEquations.cs.meta rename to NGTools_Unity/NGTools/Assets/_Scripts/NGTools/Extensions/Geometry.cs.meta diff --git a/NGTools_Unity/NGTools/Assets/_Scripts/NGTools/SlicedMesh.cs b/NGTools_Unity/NGTools/Assets/_Scripts/NGTools/SlicedMesh.cs new file mode 100644 index 0000000..c22789f --- /dev/null +++ b/NGTools_Unity/NGTools/Assets/_Scripts/NGTools/SlicedMesh.cs @@ -0,0 +1,139 @@ +using UnityEngine; +[ExecuteInEditMode] +[RequireComponent(typeof(MeshRenderer), typeof(MeshFilter))] +public class SlicedMesh : MonoBehaviour +{ + [SerializeField] + private float borderThickness = 1.0f, width = 3.0f, height = 3.0f, marginUV = 0.5f; + + [SerializeField] + private bool updateInRealTime = false; + + private Mesh mesh = null; + + private float _b = 0.1f; + public float Border + { + get + { + return _b; + } + set + { + _b = value; + CreateSlicedMesh(); + } + } + + private float _w = 1.0f; + public float Width + { + get + { + return _w; + } + set + { + _w = value; + CreateSlicedMesh(); + } + } + + private float _h = 1.0f; + public float Height + { + get + { + return _h; + } + set + { + _h = value; + CreateSlicedMesh(); + } + } + + private float _m = 0.4f; + public float Margin + { + get + { + return _m; + } + set + { + _m = value; + CreateSlicedMesh(); + } + } + + private void Start() + { + Width = width; + Height = height; + Border = borderThickness; + Margin = marginUV; + CreateSlicedMesh(); + } + + private void LateUpdate() + { + if (updateInRealTime) + RealTimeMeshUpdate(); + } + + private void RealTimeMeshUpdate() + { + if (width != Width) + Width = width; + if (height != Height) + Height = height; + if (borderThickness != Border) + Border = borderThickness; + if (marginUV != Margin) + Margin = marginUV; + } + + private void CreateSlicedMesh() + { + if (mesh == null) + { + mesh = new Mesh(); + GetComponent().mesh = mesh; + } + mesh.vertices = new Vector3[] { + new Vector3(0, 0, 0), new Vector3(_b, 0, 0), new Vector3(_w-_b, 0, 0), new Vector3(_w, 0, 0), + new Vector3(0, _b, 0), new Vector3(_b, _b, 0), new Vector3(_w-_b, _b, 0), new Vector3(_w, _b, 0), + new Vector3(0, _h-_b, 0), new Vector3(_b, _h-_b, 0), new Vector3(_w-_b, _h-_b, 0), new Vector3(_w, _h-_b, 0), + new Vector3(0, _h, 0), new Vector3(_b, _h, 0), new Vector3(_w-_b, _h, 0), new Vector3(_w, _h, 0) + }; + + mesh.uv = new Vector2[] { + new Vector2(0, 0), new Vector2(_m, 0), new Vector2(1-_m, 0), new Vector2(1, 0), + new Vector2(0, _m), new Vector2(_m, _m), new Vector2(1-_m, _m), new Vector2(1, _m), + new Vector2(0, 1-_m), new Vector2(_m, 1-_m), new Vector2(1-_m, 1-_m), new Vector2(1, 1-_m), + new Vector2(0, 1), new Vector2(_m, 1), new Vector2(1-_m, 1), new Vector2(1, 1) + }; + + mesh.triangles = new int[] { + 0, 4, 5, + 0, 5, 1, + 1, 5, 6, + 1, 6, 2, + 2, 6, 7, + 2, 7, 3, + 4, 8, 9, + 4, 9, 5, + 5, 9, 10, //center plane + 5, 10, 6, //center plane + 6, 10, 11, + 6, 11, 7, + 8, 12, 13, + 8, 13, 9, + 9, 13, 14, + 9, 14, 10, + 10, 14, 15, + 10, 15, 11 + }; + } +} \ No newline at end of file diff --git a/NGTools_Unity/NGTools/Assets/_Scripts/NGTools/SlicedMesh.cs.meta b/NGTools_Unity/NGTools/Assets/_Scripts/NGTools/SlicedMesh.cs.meta new file mode 100644 index 0000000..974d24a --- /dev/null +++ b/NGTools_Unity/NGTools/Assets/_Scripts/NGTools/SlicedMesh.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: aba0e241698a56840abe51b055fd6a9d +timeCreated: 1460481982 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/NGTools_Unity/NGTools/Assets/_Scripts/NGTools/Tests/TestSphereGeneration.cs b/NGTools_Unity/NGTools/Assets/_Scripts/NGTools/Tests/TestSphereGeneration.cs new file mode 100644 index 0000000..914eeff --- /dev/null +++ b/NGTools_Unity/NGTools/Assets/_Scripts/NGTools/Tests/TestSphereGeneration.cs @@ -0,0 +1,58 @@ +using UnityEngine; +using System.Collections; +using System.Collections.Generic; +using System.Diagnostics; +using System.Text; +using Debug = UnityEngine.Debug; + +public class TestSphereGeneration : MonoBehaviour +{ + + Stopwatch stopwatch = new Stopwatch(); + + List vertices = new List(); + void Start() + { + //vertices = Geometry.GetFibonacciSphereVertices(100, false); + vertices = Geometry.GetSubdividedIcosahedronVertices(3); + + GameObject parent = new GameObject("parent"); + int vertexNum = 1; + foreach (var item in vertices) + { + GameObject go = GameObject.CreatePrimitive(PrimitiveType.Sphere); + go.name = vertexNum.ToString(); + vertexNum++; + go.transform.position = item * 3f; + //go.transform.localScale *= 0.1f; + go.transform.SetParent(parent.transform); + + } + + + + StartCoroutine(TestSubdivision()); + } + + IEnumerator TestSubdivision() + { + StringBuilder sb = new StringBuilder(); + for (int i = 0; i < 6; i++) + { + stopwatch.Reset(); + stopwatch.Start(); + vertices = Geometry.GetSubdividedIcosahedronVertices(i); + + string s = string.Format( + "subdivisions:{0} vertex count: {1} calculation time: {2}", + i, vertices.Count, stopwatch.ElapsedMilliseconds); + Debug.Log(s); + sb.AppendLine(s); + yield return new WaitForEndOfFrame(); + } + + Debug.Log(sb); + + } + +} diff --git a/NGTools_Unity/NGTools/Assets/_Scripts/NGTools/Tests/TestSphereGeneration.cs.meta b/NGTools_Unity/NGTools/Assets/_Scripts/NGTools/Tests/TestSphereGeneration.cs.meta new file mode 100644 index 0000000..006a2ad --- /dev/null +++ b/NGTools_Unity/NGTools/Assets/_Scripts/NGTools/Tests/TestSphereGeneration.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 13f006894a9bad04099a2c79113b9be8 +timeCreated: 1460357515 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/NGTools_Unity/NGTools/Assets/_Scripts/NGTools/Unit Tests/Editor/CircleEquations_Tests.cs b/NGTools_Unity/NGTools/Assets/_Scripts/NGTools/Unit Tests/Editor/CircleEquations_Tests.cs index 37ba88b..035cc50 100644 --- a/NGTools_Unity/NGTools/Assets/_Scripts/NGTools/Unit Tests/Editor/CircleEquations_Tests.cs +++ b/NGTools_Unity/NGTools/Assets/_Scripts/NGTools/Unit Tests/Editor/CircleEquations_Tests.cs @@ -33,9 +33,9 @@ public class CircleEquations_Tests [Test, TestCaseSource("CircumferenceRadiusConversionTests")] public void Circumference_Radius_Tests(float value) { - float circumference = CircleEquations.Circumference(value); - float radius = CircleEquations.Radius(circumference); - float circumferenceBack = CircleEquations.Circumference(radius); + float circumference = Geometry.Circumference(value); + float radius = Geometry.Radius(circumference); + float circumferenceBack = Geometry.Circumference(radius); Assert.AreEqual(value, radius, "Calculated radius does not equal input radius."); Assert.AreEqual(circumference, circumferenceBack, "Recalculated circumference does not equal initial circumference"); } @@ -44,7 +44,7 @@ public void Circumference_Radius_Tests(float value) [Test, TestCaseSource("CirclePoints")] public void PointOnCircle_Test(float radius, float angle, Vector2 expected, Vector2 center) { - Vector2 actual = CircleEquations.PointOnCircle(radius, angle, center); + Vector2 actual = Geometry.PointOnCircle(radius, angle, center); if (actual != expected) Assert.Fail("Expected: {0}\nActual: {1}", expected, actual); } @@ -54,7 +54,7 @@ public void PointOnCircle_Test(float radius, float angle, Vector2 expected, Vect public void PointOnCircle_Test_Fail() { Vector2 unexpected = new Vector2(1.707107f, 1.707107f); - Vector2 actual = CircleEquations.PointOnCircle(1, 0.785398f, Vector2.one); + Vector2 actual = Geometry.PointOnCircle(1, 0.785398f, Vector2.one); if (unexpected == actual) Assert.Fail("Unexpected: {0}\nActual: {1}", unexpected, actual); } diff --git a/NGTools_Unity/NGTools/Assets/_Shaders.meta b/NGTools_Unity/NGTools/Assets/_Shaders.meta new file mode 100644 index 0000000..6b1c1e4 --- /dev/null +++ b/NGTools_Unity/NGTools/Assets/_Shaders.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 9a4e327092cb35642a3135ae0b78b0e3 +folderAsset: yes +timeCreated: 1460484384 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/NGTools_Unity/NGTools/Assets/_Shaders/UnlitTransparentWColor.shader b/NGTools_Unity/NGTools/Assets/_Shaders/UnlitTransparentWColor.shader new file mode 100644 index 0000000..d7e8196 --- /dev/null +++ b/NGTools_Unity/NGTools/Assets/_Shaders/UnlitTransparentWColor.shader @@ -0,0 +1,32 @@ +Shader "Unlit/Transparent With Color" +{ + Properties + { + _Color("Color Tint", Color) = (1,1,1,1) + _MainTex("Base (RGB) Alpha (A)", 2D) = "white" + } + + Category + { + Lighting Off + ZWrite Off + //ZWrite On // uncomment if you have problems like the sprite disappear in some rotations. + Cull back + Blend SrcAlpha OneMinusSrcAlpha + //AlphaTest Greater 0.001 // uncomment if you have problems like the sprites or 3d text have white quads instead of alpha pixels. + Tags{ Queue = Transparent } + + SubShader + { + + Pass + { + SetTexture[_MainTex] + { + ConstantColor[_Color] + Combine Texture * constant + } + } + } + } +} \ No newline at end of file diff --git a/NGTools_Unity/NGTools/Assets/_Shaders/UnlitTransparentWColor.shader.meta b/NGTools_Unity/NGTools/Assets/_Shaders/UnlitTransparentWColor.shader.meta new file mode 100644 index 0000000..563b40d --- /dev/null +++ b/NGTools_Unity/NGTools/Assets/_Shaders/UnlitTransparentWColor.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 2fe87d8effc70ee4db6647310ba7aac4 +timeCreated: 1460484759 +licenseType: Free +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/NGTools_Unity/NGTools/Assets/_Textures.meta b/NGTools_Unity/NGTools/Assets/_Textures.meta new file mode 100644 index 0000000..5deafde --- /dev/null +++ b/NGTools_Unity/NGTools/Assets/_Textures.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 852bbc2f0b945494ebd2e310f0d76026 +folderAsset: yes +timeCreated: 1460481749 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/NGTools_Unity/NGTools/Assets/_Textures/embossed9slice.png b/NGTools_Unity/NGTools/Assets/_Textures/embossed9slice.png new file mode 100644 index 0000000000000000000000000000000000000000..164acc77e89f52ed6286c7447d0e62675f75ee5c GIT binary patch literal 10520 zcmd6N2~bnnvv&kVMi3{1kuAVzW)wj{MD}e&A>$~xU=|>Ru!%Mo<9=>;v@*WTfwD;`KXD)+466o!pv=s2B(K~Yp_@@+NgAQ>B^bR4q5xhXBJOkam zzCY{lcGc^$mz!re{-u{W2&7Sa_ROg(VFO==Ba^X$-2PdQ)M>+Ia%a^K7B@WYwmfcW2BykOcK8z(g9x9@Hx zzUaJjZjW4J+>Ws|Tx44?kvkm}lgCcz>%VEC|J+Lb^QYW!q5E3&DIrA|-WBYvY8p~3 z0eav1$B$(o(9Q#(n@tj+Z-LE79|M8nc7eVJ-flli$bf#r?fBQ@KOx%w=KtkH*_6E6 zIaeYHdL!~Q{1sSkXYc0&=r_hT;n--5gZeaWOKzH?u3NGdaBh&v4Nw2<05Yc8KTY+Y zGTGp*hCQ6Z^uRdc?iS7MH7dZer}hq}8;Ccr0Op$zGYg zO59qX3kEh4Xo)rzu0CM1*|GYjrmL~)G0PvAYoFj&we*yVYKV)3->T%KgE$}Wu(6!B z%Eex^MXV^oH-~FocZ0~Ka!*@?ufvi(+}-&z?5anr^Sgn+EnfjA-OB&8AHTFUqbVz| z$?2l{7GrZb7HdT_cRDX%hcAf5c3#Unnyz_;ge)WmN1JDa$|@=pZ*JajPViXyMq{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_Ux)XuW&DW6wdfkU5c4Ree~i*v)myWOvpBl=Apnw~;p*Bi)L_q}OD2BHb8S>copu zb4@*NHsBuudVl_bun&!u7Y-&XZeDz-3-?~OHT*hDWwgP|erY6LfcO^F1f;#jfo)(n2%PcIg8M`e zEM|*SQ>Lk0_N42!H~Rmuw~GB!S9q{vcbDTKGa>t|Zin@n$bcG3H$jyhSwk0o*Hs6y6ql%(&xrwfh zcC?O($veF-CfYBRvRJ~T0lILhjoW#Y+<0hYjtc^jUu#XJflrRu^3Y(E(m5}Tz{A8T zv`ii;NXfo{u92pWB~eSH9|!no`*@Vd($=F+ty#>QrWsTxQXLP;fXGUy1fXV{YDJJS zdl7K^y>bWg_o@C!weK$mwyyUG(RSJP?JYjK-_lj8cj(ZwRnxRxAgD#f30hlHnex=m z-XO3;_{TnuhS@bYVB`toBZicxA2gr`-v=In`MI6F=pz*zSbj&b=~Ea|VzM;>$*`r+ zrK??LkM=>>92Y}+4C>@@l_h<;K?*3) zOj{byddyKV&bWj2~eq{Gj)xZXI^LTo`BnYdHzV=w&IUyp-Qv1@6Wras- zN+#NSG%o>@ZWhlY{3*vh3^VrspTWKNul{>y`wIKF6mXzx#%}wY^OU~>Mjb(CZS2p` ItZ}#g19PjncmMzZ literal 0 HcmV?d00001 diff --git a/NGTools_Unity/NGTools/Assets/_Textures/embossed9slice.png.meta b/NGTools_Unity/NGTools/Assets/_Textures/embossed9slice.png.meta new file mode 100644 index 0000000..5cca1aa --- /dev/null +++ b/NGTools_Unity/NGTools/Assets/_Textures/embossed9slice.png.meta @@ -0,0 +1,57 @@ +fileFormatVersion: 2 +guid: 31c020d85fa66a34fa02f7635308ae1e +timeCreated: 1460484024 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 7 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/NGTools_Unity/NGTools/Assets/_Textures/simple9slice.mat b/NGTools_Unity/NGTools/Assets/_Textures/simple9slice.mat new file mode 100644 index 0000000..681dd20 --- /dev/null +++ b/NGTools_Unity/NGTools/Assets/_Textures/simple9slice.mat @@ -0,0 +1,171 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: simple9slice + m_Shader: {fileID: 4800000, guid: 2fe87d8effc70ee4db6647310ba7aac4, type: 3} + m_ShaderKeywords: _ALPHAPREMULTIPLY_ON + m_LightmapFlags: 5 + m_CustomRenderQueue: 3000 + stringTagMap: + RenderType: Transparent + m_SavedProperties: + serializedVersion: 2 + m_TexEnvs: + data: + first: + name: _MainTex + second: + m_Texture: {fileID: 2800000, guid: 31c020d85fa66a34fa02f7635308ae1e, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _BumpMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _DetailNormalMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _ParallaxMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _OcclusionMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _EmissionMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _DetailMask + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _DetailAlbedoMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _MetallicGlossMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + data: + first: + name: _SrcBlend + second: 1 + data: + first: + name: _DstBlend + second: 10 + data: + first: + name: _Cutoff + second: 0.5 + data: + first: + name: PixelSnap + second: 0 + data: + first: + name: _Parallax + second: 0.02 + data: + first: + name: _ZWrite + second: 0 + data: + first: + name: _Glossiness + second: 0.5 + data: + first: + name: _BumpScale + second: 1 + data: + first: + name: _OcclusionStrength + second: 1 + data: + first: + name: _DetailNormalMapScale + second: 1 + data: + first: + name: _UVSec + second: 0 + data: + first: + name: _Mode + second: 3 + data: + first: + name: _Metallic + second: 0 + data: + first: + name: _StencilComp + second: 8 + data: + first: + name: _Stencil + second: 0 + data: + first: + name: _StencilOp + second: 0 + data: + first: + name: _StencilWriteMask + second: 255 + data: + first: + name: _StencilReadMask + second: 255 + data: + first: + name: _ColorMask + second: 15 + data: + first: + name: _UseUIAlphaClip + second: 0 + m_Colors: + data: + first: + name: _EmissionColor + second: {r: 0, g: 0, b: 0, a: 1} + data: + first: + name: _Color + second: {r: 0.52305365, g: 0.49389058, b: 0.6397059, a: 1} diff --git a/NGTools_Unity/NGTools/Assets/_Textures/simple9slice.mat.meta b/NGTools_Unity/NGTools/Assets/_Textures/simple9slice.mat.meta new file mode 100644 index 0000000..219d52d --- /dev/null +++ b/NGTools_Unity/NGTools/Assets/_Textures/simple9slice.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: e4b6656b1d2f4d2429d03482eb637825 +timeCreated: 1460481777 +licenseType: Free +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/NGTools_Unity/NGTools/Assets/_Textures/simple9slice.png b/NGTools_Unity/NGTools/Assets/_Textures/simple9slice.png new file mode 100644 index 0000000000000000000000000000000000000000..ae579c569d08f2ba4dad2d2397de23d4281a2e98 GIT binary patch literal 4182 zcmeHLX;4#H7CwX}ECUflkX>33B&eN1x>^G*2#Cn4tq=$dfiyeF76vjZ1Sx40kwFv# z2*IU6BnfF{k+2wPmPXb_L4gKZ7(hV?ra@M5UYN3(a%yH;yJ~8fnji1H`|f?`RNZsy z``-7xvrZ1yveK&303d5~(DDcXiXglsC6JjKU;2;8O@(4bpnMtXONsW1@B#C$LcM*q z*o1ib`5f`_`idIfDXr8t4Gqcr#V}ginR?5hqM(FNfhnG z!-@yAW3c*G9cMZ&&+CcVZqOI+*N?&4q$ygN$Hgb{qJ9^58N%W z%w8Hkm2G6iz?f96+zb2T==ZUi)VV5*;jUeJ0EuHF@#3(B10bdZG#(1fNFpF<2!PBA zA2$ehBD4DVAukDY{#m8c<9PDx`j)zvyNWlC@CA&}yC(2c%~bueQ*8BSBjukxsI74| zTR7YhlhLr2YjkCA&AB)f9GG%zDZqKwpH#W4!{KV9yI#@BFZlSQz{Vh zyui#!oSt`EogJ|qoN|b`(0ccz3M^+lLrb*Atv0Z{R0g`1jD0^Fee?KQVh7c-Js6N1=>&_J)v+Y^=aX$?8Nf=O)!l?AKH4fXcSMN z`n|@mw1Fg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