Repository: beinteractive/SVGMeshUnity Branch: master Commit: 6cda9e511f5f Files: 123 Total size: 345.3 KB Directory structure: gitextract_0qrg1gmc/ ├── .gitignore ├── Assets/ │ ├── Plugins/ │ │ └── Editor.meta │ ├── Plugins.meta │ ├── Rendering Assets/ │ │ ├── Lightweight Render Pipeline.asset │ │ ├── Lightweight Render Pipeline.asset.meta │ │ ├── Post-Process Stripping Config.asset │ │ └── Post-Process Stripping Config.asset.meta │ ├── Rendering Assets.meta │ ├── SVGMeshUnity/ │ │ ├── Runtime/ │ │ │ ├── Internals/ │ │ │ │ ├── BezierToVertex.cs │ │ │ │ ├── BezierToVertex.cs.meta │ │ │ │ ├── Cdt2d/ │ │ │ │ │ ├── BinarySearch.cs │ │ │ │ │ ├── BinarySearch.cs.meta │ │ │ │ │ ├── DelaunayRefine.cs │ │ │ │ │ ├── DelaunayRefine.cs.meta │ │ │ │ │ ├── Filter.cs │ │ │ │ │ ├── Filter.cs.meta │ │ │ │ │ ├── MonotoneTriangulation.cs │ │ │ │ │ ├── MonotoneTriangulation.cs.meta │ │ │ │ │ ├── Robust.cs │ │ │ │ │ ├── Robust.cs.meta │ │ │ │ │ ├── Triangles.cs │ │ │ │ │ ├── Triangles.cs.meta │ │ │ │ │ ├── Triangulation.cs │ │ │ │ │ └── Triangulation.cs.meta │ │ │ │ ├── Cdt2d.meta │ │ │ │ ├── Curve.cs │ │ │ │ ├── Curve.cs.meta │ │ │ │ ├── Int2.cs │ │ │ │ ├── Int2.cs.meta │ │ │ │ ├── Int3.cs │ │ │ │ ├── Int3.cs.meta │ │ │ │ ├── MeshData.cs │ │ │ │ ├── MeshData.cs.meta │ │ │ │ ├── Sort.cs │ │ │ │ ├── Sort.cs.meta │ │ │ │ ├── WorkBuffer.cs │ │ │ │ ├── WorkBuffer.cs.meta │ │ │ │ ├── WorkBufferPool.cs │ │ │ │ └── WorkBufferPool.cs.meta │ │ │ ├── Internals.meta │ │ │ ├── SVGData.cs │ │ │ ├── SVGData.cs.meta │ │ │ ├── SVGMesh.cs │ │ │ ├── SVGMesh.cs.meta │ │ │ ├── SVGMeshUnity.Runtime.asmdef │ │ │ └── SVGMeshUnity.Runtime.asmdef.meta │ │ └── Runtime.meta │ ├── SVGMeshUnity-Testing/ │ │ ├── Editor/ │ │ │ ├── Fixtures.cs │ │ │ ├── Fixtures.cs.meta │ │ │ ├── Internals/ │ │ │ │ ├── BezierToVertexTests.cs │ │ │ │ ├── BezierToVertexTests.cs.meta │ │ │ │ ├── Cdt2d/ │ │ │ │ │ ├── DelaunayRefineTests.cs │ │ │ │ │ ├── DelaunayRefineTests.cs.meta │ │ │ │ │ ├── FilterTests.cs │ │ │ │ │ ├── FilterTests.cs.meta │ │ │ │ │ ├── Fixtures.cs │ │ │ │ │ ├── Fixtures.cs.meta │ │ │ │ │ ├── MonotoneTriangulationTests.cs │ │ │ │ │ ├── MonotoneTriangulationTests.cs.meta │ │ │ │ │ ├── RobustTests.cs │ │ │ │ │ └── RobustTests.cs.meta │ │ │ │ └── Cdt2d.meta │ │ │ ├── Internals.meta │ │ │ ├── SVGDataTests.cs │ │ │ ├── SVGDataTests.cs.meta │ │ │ ├── SVGMeshUnity-Testing.Editor.asmdef │ │ │ └── SVGMeshUnity-Testing.Editor.asmdef.meta │ │ └── Editor.meta │ ├── SVGMeshUnity-Testing.meta │ ├── SVGMeshUnity.meta │ ├── Samples/ │ │ ├── Assets/ │ │ │ ├── Color 2.mat │ │ │ ├── Color 2.mat.meta │ │ │ ├── Color 3.mat │ │ │ ├── Color 3.mat.meta │ │ │ ├── Color.mat │ │ │ └── Color.mat.meta │ │ ├── Assets.meta │ │ ├── Scenes/ │ │ │ ├── Circle.unity │ │ │ ├── Circle.unity.meta │ │ │ ├── Cut.unity │ │ │ ├── Cut.unity.meta │ │ │ ├── Metaball.unity │ │ │ ├── Metaball.unity.meta │ │ │ ├── Move.unity │ │ │ ├── Move.unity.meta │ │ │ ├── ScriptedCurves.unity │ │ │ ├── ScriptedCurves.unity.meta │ │ │ ├── Simple.unity │ │ │ └── Simple.unity.meta │ │ ├── Scenes.meta │ │ ├── Scripts/ │ │ │ ├── Circle.cs │ │ │ ├── Circle.cs.meta │ │ │ ├── Cut.cs │ │ │ ├── Cut.cs.meta │ │ │ ├── MetaballBehaviour.cs │ │ │ ├── MetaballBehaviour.cs.meta │ │ │ ├── Move.cs │ │ │ ├── Move.cs.meta │ │ │ ├── ScriptedCurves.cs │ │ │ ├── ScriptedCurves.cs.meta │ │ │ ├── Simple.cs │ │ │ └── Simple.cs.meta │ │ └── Scripts.meta │ └── Samples.meta ├── Packages/ │ └── manifest.json ├── ProjectSettings/ │ ├── AudioManager.asset │ ├── ClusterInputManager.asset │ ├── DynamicsManager.asset │ ├── EditorBuildSettings.asset │ ├── EditorSettings.asset │ ├── GraphicsSettings.asset │ ├── InputManager.asset │ ├── NavMeshAreas.asset │ ├── NetworkManager.asset │ ├── Physics2DSettings.asset │ ├── PresetManager.asset │ ├── ProjectSettings.asset │ ├── ProjectVersion.txt │ ├── QualitySettings.asset │ ├── TagManager.asset │ ├── TimeManager.asset │ └── UnityConnectSettings.asset └── README.md ================================================ FILE CONTENTS ================================================ ================================================ FILE: .gitignore ================================================ .DS_Store /Library /Temp /Movies /Assets/Plugins/Editor/JetBrains* .idea *.sln *.csproj obj GeneratedShader.shader UberShader.shader ================================================ FILE: Assets/Plugins/Editor.meta ================================================ fileFormatVersion: 2 guid: 73d4632ce6e46454081ad6984856fee4 folderAsset: yes DefaultImporter: externalObjects: {} userData: assetBundleName: assetBundleVariant: ================================================ FILE: Assets/Plugins.meta ================================================ fileFormatVersion: 2 guid: ca2d50efbca8f49e587683c68c568310 folderAsset: yes DefaultImporter: externalObjects: {} userData: assetBundleName: assetBundleVariant: ================================================ FILE: Assets/Rendering Assets/Lightweight Render Pipeline.asset ================================================ %YAML 1.1 %TAG !u! tag:unity3d.com,2011: --- !u!114 &11400000 MonoBehaviour: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 0} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: bf2edee5c58d82540a51f03df9d42094, type: 3} m_Name: Lightweight Render Pipeline m_EditorClassIdentifier: kAssetVersion: 2 m_MaxPixelLights: 4 m_SupportsVertexLight: 0 m_RequireDepthTexture: 0 m_RequireSoftParticles: 0 m_SupportsHDR: 0 m_MSAA: 4 m_RenderScale: 1 m_ShadowType: 1 m_ShadowAtlasResolution: 2048 m_ShadowNearPlaneOffset: 2 m_ShadowDistance: 50 m_ShadowCascades: 2 m_Cascade2Split: 0.25 m_Cascade4Split: {x: 0.067, y: 0.2, z: 0.467} m_ResourcesAsset: {fileID: 11400000, guid: aac5a08c32552a14c89394b703f1978a, type: 2} ================================================ FILE: Assets/Rendering Assets/Lightweight Render Pipeline.asset.meta ================================================ fileFormatVersion: 2 guid: 3450f356d0f9942e3b26f29a5aeea0d1 NativeFormatImporter: externalObjects: {} mainObjectFileID: 11400000 userData: assetBundleName: assetBundleVariant: ================================================ FILE: Assets/Rendering Assets/Post-Process Stripping Config.asset ================================================ %YAML 1.1 %TAG !u! tag:unity3d.com,2011: --- !u!114 &11400000 MonoBehaviour: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 0} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 2f29da58f3a63f649a512733d24af22c, type: 3} m_Name: PostProcessStrippingConfig m_EditorClassIdentifier: stripUnsupportedShaders: 1 stripDebugShaders: 0 stripComputeShaders: 0 ================================================ FILE: Assets/Rendering Assets/Post-Process Stripping Config.asset.meta ================================================ fileFormatVersion: 2 guid: e62f417b9c684418da29800c82f945f1 NativeFormatImporter: externalObjects: {} mainObjectFileID: 11400000 userData: assetBundleName: assetBundleVariant: ================================================ FILE: Assets/Rendering Assets.meta ================================================ fileFormatVersion: 2 guid: 4acd1d27689444de2a0df7a5c297b977 folderAsset: yes DefaultImporter: externalObjects: {} userData: assetBundleName: assetBundleVariant: ================================================ FILE: Assets/SVGMeshUnity/Runtime/Internals/BezierToVertex.cs ================================================ using UnityEngine; namespace SVGMeshUnity.Internals { public class BezierToVertex { // https://github.com/mattdesl/svg-path-contours public float Scale = 1f; public float PathDistanceEpsilon = 1f; public int RecursionLimit = 8; public float FLTEpsilon = 1.19209290e-7f; public float AngleEpsilon = 0.01f; public float AngleTolerance = 0f; public float CuspLimit = 0f; public WorkBufferPool WorkBufferPool; private WorkBuffer WorkVertices; public void GetContours(SVGData svg, MeshData data) { WorkBufferPool.Get(ref WorkVertices); var pen = Vector2.zero; var curves = svg.Curves; var l = curves.Count; for (var i = 0; i < l; ++i) { var curve = curves[i]; if (curve.IsMove) { EmitWorkVerticesIfNeeded(data); } else { FillBezier(pen, curve.InControl, curve.OutControl, curve.Position); } pen = curve.Position; } EmitWorkVerticesIfNeeded(data); WorkBufferPool.Release(ref WorkVertices); } private void EmitWorkVerticesIfNeeded(MeshData data) { if (WorkVertices.UsedSize == 0) { return; } // TODO: Simplify data.AddVertices(WorkVertices); WorkVertices.Clear(); } ////// Based on: ////// https://github.com/pelson/antigrain/blob/master/agg-2.4/src/agg_curves.cpp private void FillBezier(Vector2 start, Vector2 c1, Vector2 c2, Vector2 end) { var distanceTolerance = PathDistanceEpsilon / Scale; distanceTolerance *= distanceTolerance; BeginFillBezier(start, c1, c2, end, distanceTolerance); } private void BeginFillBezier(Vector2 start, Vector2 c1, Vector2 c2, Vector2 end, float distanceTolerance) { WorkVertices.Push(ref start); RecursiveFillBezier(start, c1, c2, end, distanceTolerance, 0); WorkVertices.Push(ref end); } private void RecursiveFillBezier(Vector2 v1, Vector2 v2, Vector2 v3, Vector2 v4, float distanceTolerance, int level) { if (level > RecursionLimit) { return; } var pi = Mathf.PI; // Calculate all the mid-points of the line segments //---------------------- var v12 = (v1 + v2) / 2f; var v23 = (v2 + v3) / 2f; var v34 = (v3 + v4) / 2f; var v123 = (v12 + v23) / 2f; var v234 = (v23 + v34) / 2f; var v1234 = (v123 + v234) / 2f; // Enforce subdivision first time if (level > 0) { // Try to approximate the full cubic curve by a single straight line //------------------ var d = v4 - v1; var d2 = Mathf.Abs((v2.x - v4.x) * d.y - (v2.y - v4.y) * d.x); var d3 = Mathf.Abs((v3.x - v4.x) * d.y - (v3.y - v4.y) * d.x); if (d2 > FLTEpsilon && d3 > FLTEpsilon) { // Regular care //----------------- if ((d2 + d3) * (d2 + d3) <= distanceTolerance * (d.x * d.x + d.y * d.y)) { // If the curvature doesn't exceed the distanceTolerance value // we tend to finish subdivisions. //---------------------- if (AngleTolerance < AngleEpsilon) { WorkVertices.Push(ref v1234); return; } // Angle & Cusp Condition //---------------------- var a23 = Mathf.Atan2(v3.y - v2.y, v3.x - v2.x); var da1 = Mathf.Abs(a23 - Mathf.Atan2(v2.y - v1.y, v2.x - v1.x)); var da2 = Mathf.Abs(Mathf.Atan2(v4.y - v3.y, v4.x - v3.x) - a23); if (da1 >= pi) { da1 = 2 * pi - da1; } if (da2 >= pi) { da2 = 2 * pi - da2; } if (da1 + da2 < AngleTolerance) { // Finally we can stop the recursion //---------------------- WorkVertices.Push(ref v1234); return; } if (CuspLimit > 0f) { if (da1 > CuspLimit) { WorkVertices.Push(ref v2); return; } if (da2 > CuspLimit) { WorkVertices.Push(ref v3); return; } } } } else { if (d2 > FLTEpsilon) { // p1,p3,p4 are collinear, p2 is considerable //---------------------- if (d2 * d2 <= distanceTolerance * (d.x * d.x + d.y * d.y)) { if (AngleTolerance < AngleEpsilon) { WorkVertices.Push(ref v1234); return; } // Angle Condition //---------------------- var da1 = Mathf.Abs(Mathf.Atan2(v3.y - v2.y, v3.x - v2.x) - Mathf.Atan2(v2.y - v1.y, v2.x - v1.x)); if (da1 >= pi) { da1 = 2 * pi - da1; } if (da1 < AngleTolerance) { WorkVertices.Push(ref v2); WorkVertices.Push(ref v3); return; } if (CuspLimit > 0f) { if (da1 > CuspLimit) { WorkVertices.Push(ref v2); return; } } } } else if (d3 > FLTEpsilon) { // p1,p2,p4 are collinear, p3 is considerable //---------------------- if (d3 * d3 <= distanceTolerance * (d.x * d.x + d.y * d.y)) { if (AngleTolerance < AngleEpsilon) { WorkVertices.Push(ref v1234); return; } // Angle Condition //---------------------- var da1 = Mathf.Abs(Mathf.Atan2(v4.y - v3.y, v4.x - v3.x) - Mathf.Atan2(v3.y - v2.y, v3.x - v2.x)); if (da1 >= pi) { da1 = 2 * pi - da1; } if (da1 < AngleTolerance) { WorkVertices.Push(ref v2); WorkVertices.Push(ref v3); return; } if (CuspLimit > 0f) { if (da1 > CuspLimit) { WorkVertices.Push(ref v3); return; } } } } else { // Collinear case //----------------- var dx = v1234.x - (v1.x + v4.x) / 2f; var dy = v1234.y - (v1.y + v4.y) / 2f; if (dx * dx + dy * dy <= distanceTolerance) { WorkVertices.Push(ref v1234); return; } } } } // Continue subdivision //---------------------- RecursiveFillBezier(v1, v12, v123, v1234, distanceTolerance, level + 1); RecursiveFillBezier(v1234, v234, v34, v4, distanceTolerance, level + 1); } } } ================================================ FILE: Assets/SVGMeshUnity/Runtime/Internals/BezierToVertex.cs.meta ================================================ fileFormatVersion: 2 guid: d0446926ab40486abe8a0e4ab9380186 timeCreated: 1519697284 ================================================ FILE: Assets/SVGMeshUnity/Runtime/Internals/Cdt2d/BinarySearch.cs ================================================ using System; namespace SVGMeshUnity.Internals.Cdt2d { public static class BinarySearch { // https://github.com/mikolalysenko/binary-search-bounds public interface IComparer { int Compare(G x, E y); } public static int GE(G[] a, E y, IComparer c, int l, int h) { var i = h + 1; while (l <= h) { var m = (int) (uint) (l + h) >> 1; var x = a[m]; if (c.Compare(x, y) >= 0) { i = m; h = m - 1; } else { l = m + 1; } } return i; } public static int GE(G[] a, G y, int l, int h) where G : IComparable { var i = h + 1; while (l <= h) { var m = (int) (uint) (l + h) >> 1; var x = a[m]; if (x.CompareTo(y) >= 0) { i = m; h = m - 1; } else { l = m + 1; } } return i; } public static int GT(G[] a, E y, IComparer c, int l, int h) { var i = h + 1; while (l <= h) { var m = (int) (uint) (l + h) >> 1; var x = a[m]; if (c.Compare(x, y) > 0) { i = m; h = m - 1; } else { l = m + 1; } } return i; } public static int GT(G[] a, G y, int l, int h) where G : IComparable { var i = h + 1; while (l <= h) { var m = (int) (uint) (l + h) >> 1; var x = a[m]; if (x.CompareTo(y) > 0) { i = m; h = m - 1; } else { l = m + 1; } } return i; } public static int LT(G[] a, E y, IComparer c, int l, int h) { var i = l - 1; while (l <= h) { var m = (int) (uint) (l + h) >> 1; var x = a[m]; if (c.Compare(x, y) < 0) { i = m; l = m + 1; } else { h = m - 1; } } return i; } public static int LT(G[] a, G y, int l, int h) where G : IComparable { var i = l - 1; while (l <= h) { var m = (int) (uint) (l + h) >> 1; var x = a[m]; if (x.CompareTo(y) < 0) { i = m; l = m + 1; } else { h = m - 1; } } return i; } public static int LE(G[] a, E y, IComparer c, int l, int h) { var i = l - 1; while (l <= h) { var m = (int) (uint) (l + h) >> 1; var x = a[m]; if (c.Compare(x, y) <= 0) { i = m; l = m + 1; } else { h = m - 1; } } return i; } public static int LE(G[] a, G y, int l, int h) where G : IComparable { var i = l - 1; while (l <= h) { var m = (int) (uint) (l + h) >> 1; var x = a[m]; if (x.CompareTo(y) <= 0) { i = m; l = m + 1; } else { h = m - 1; } } return i; } public static int EQ(G[] a, E y, IComparer c, int l, int h) { while (l <= h) { var m = (int) (uint) (l + h) >> 1; var x = a[m]; var p = c.Compare(x, y); if (p == 0) { return m; } if (p <= 0) { l = m + 1; } else { h = m - 1; } } return -1; } public static int EQ(G[] a, G y, int l, int h) where G : IComparable { while (l <= h) { var m = (int) (uint) (l + h) >> 1; var x = a[m]; var p = x.CompareTo(y); if (p == 0) { return m; } if (p <= 0) { l = m + 1; } else { h = m - 1; } } return -1; } } } ================================================ FILE: Assets/SVGMeshUnity/Runtime/Internals/Cdt2d/BinarySearch.cs.meta ================================================ fileFormatVersion: 2 guid: ebc1111a29cd4d6c89f5458aa07da178 timeCreated: 1519710584 ================================================ FILE: Assets/SVGMeshUnity/Runtime/Internals/Cdt2d/DelaunayRefine.cs ================================================ using System.Collections.Generic; using System.Linq; using UnityEngine; namespace SVGMeshUnity.Internals.Cdt2d { public class DelaunayRefine { public WorkBufferPool WorkBufferPool; //Assume edges are sorted lexicographically public void RefineTriangles(Triangles triangles) { var stack = WorkBufferPool.Get(); var points = triangles.Vertices; var numPoints = points.Count; var stars = triangles.Stars; for (var a = 0; a < numPoints; ++a) { var star = stars[a]; var starData = star.Data; var sl = star.UsedSize; for (var j = 0; j < sl; ++j) { var s = starData[j]; var b = s.y; //If order is not consistent, then skip edge if (b < a) { continue; } //Check if edge is constrained if (triangles.IsConstraint(a, b)) { continue; } //Find opposite edge var x = s.x; var y = -1; for (var k = 0; k < sl; ++k) { if (starData[k].x == b) { y = starData[k].y; break; } } //If this is a boundary edge, don't flip it if (y < 0) { continue; } //If edge is in circle, flip it if (Robust.InSphere(points[a], points[b], points[x], points[y]) < 0f) { var v = new Int2(a, b); stack.Push(ref v); } } } while (stack.UsedSize > 0) { var v = stack.Pop(); var a = v.x; var b = v.y; //Find opposite pairs var x = -1; var y = -1; var star = stars[a]; var starData = star.Data; var sl = star.UsedSize; for (var i = 0; i < sl; ++i) { var s = starData[i].x; var t = starData[i].y; if (s == b) { y = t; } else if (t == b) { x = s; } } //If x/y are both valid then skip edge if (x < 0 || y < 0) { continue; } //If edge is now delaunay, then don't flip it if (Robust.InSphere(points[a], points[b], points[x], points[y]) >= 0f) { continue; } //Flip the edge triangles.Flip(a, b); //Test flipping neighboring edges TestFlip(points, triangles, stack, x, a, y); TestFlip(points, triangles, stack, a, y, x); TestFlip(points, triangles, stack, y, b, x); TestFlip(points, triangles, stack, b, x, y); } WorkBufferPool.Release(ref stack); } private void TestFlip(List points, Triangles triangles, WorkBuffer stack, int a, int b, int x) { var y = triangles.Opposite(a, b); //Test boundary edge if (y < 0) { return; } //Swap edge if order flipped if (b < a) { var tmp = a; a = b; b = tmp; tmp = x; x = y; y = tmp; } //Test if edge is constrained if (triangles.IsConstraint(a, b)) { return; } //Test if edge is delaunay if (Robust.InSphere(points[a], points[b], points[x], points[y]) < 0f) { var v = new Int2(a, b); stack.Push(ref v); } } } } ================================================ FILE: Assets/SVGMeshUnity/Runtime/Internals/Cdt2d/DelaunayRefine.cs.meta ================================================ fileFormatVersion: 2 guid: daf4535a11864f7e9737bf2657ad86e1 timeCreated: 1519795855 ================================================ FILE: Assets/SVGMeshUnity/Runtime/Internals/Cdt2d/Filter.cs ================================================ using System; using System.Collections.Generic; using System.Linq; using UnityEngine; namespace SVGMeshUnity.Internals.Cdt2d { public class Filter { public int Target; public bool Infinity; public WorkBufferPool WorkBufferPool; public void Do(Triangles triangles, List result) { using (var index = IndexCells(triangles)) { var cellN = index.Cells.UsedSize; if (result.Capacity < cellN * 3) { result.Capacity = cellN * 3; } result.Clear(); if (Target == 0) { if (Infinity) { FillTriangles(index.Cells, result); FillTriangles(index.Boundary, result); return; } else { FillTriangles(index.Cells, result); return; } } var side = 1; var active = index.Active; var next = index.Next; var flags = index.Flags; var flagsData = flags.Data; var cells = index.Cells; var constraint = index.Constraint; var constraintData = constraint.Data; var neighbor = index.Neighbor; var neighborData = neighbor.Data; while (active.UsedSize > 0 || next.UsedSize > 0) { while (active.UsedSize > 0) { var t = active.Pop(); if (flagsData[t] == -side) { continue; } flagsData[t] = side; for (var j = 0; j < 3; ++j) { var f = neighborData[3 * t + j]; if (f >= 0 && flagsData[f] == 0) { if (constraintData[3 * t + j]) { next.Push(ref f); } else { active.Push(ref f); flagsData[f] = side; } } } } //Swap arrays and loop var tmp = next; next = active; active = tmp; next.Clear(); side = -side; } FilterCells(cells, flags); FillTriangles(cells, result); if (Infinity) { FillTriangles(index.Boundary, result); } } } private class FaceIndex : IDisposable { public FaceIndex(WorkBufferPool pool) { WorkBufferPool = pool; pool.Get(ref Cells); pool.Get(ref Neighbor); pool.Get(ref Constraint); pool.Get(ref Flags); pool.Get(ref Active); pool.Get(ref Next); pool.Get(ref Boundary); } public WorkBuffer Cells; public WorkBuffer Neighbor; public WorkBuffer Constraint; public WorkBuffer Flags; public WorkBuffer Active; public WorkBuffer Next; public WorkBuffer Boundary; private WorkBufferPool WorkBufferPool; private bool Disposed = false; public void Dispose() { Dispose(true); } private void Dispose(bool disposing) { if (Disposed) { return; } if (disposing) { WorkBufferPool.Release(ref Boundary); WorkBufferPool.Release(ref Next); WorkBufferPool.Release(ref Active); WorkBufferPool.Release(ref Flags); WorkBufferPool.Release(ref Constraint); WorkBufferPool.Release(ref Neighbor); WorkBufferPool.Release(ref Cells); } Disposed = true; } public void Dump() { Debug.LogFormat("Cells:\n{0}\n", Dump(Cells)); Debug.LogFormat("Neighbor:\n{0}\n", Dump(Neighbor)); Debug.LogFormat("Flags:\n{0}\n", Dump(Flags)); Debug.LogFormat("Constraint:\n{0}\n", Dump(Constraint)); Debug.LogFormat("Active:\n{0}\n", Dump(Active)); Debug.LogFormat("Next:\n{0}\n", Dump(Next)); Debug.LogFormat("Boundary:\n{0}\n", Dump(Boundary)); } private string Dump(WorkBuffer buf) { return buf.Data.Take(buf.UsedSize).Aggregate("", (_, s) => _ + " " + s.ToString() + ",\n"); } } private FaceIndex IndexCells(Triangles triangles) { var zero = 0; var fals = false; var index = new FaceIndex(WorkBufferPool); triangles.Fill(index.Cells); //First get cells and canonicalize var cells = index.Cells; var nc = cells.UsedSize; var cellsData = cells.Data; for (var i = 0; i < nc; ++i) { var c = cellsData[i]; var x = c.x; var y = c.y; var z = c.z; if (y < z) { if (y < x) { c.x = y; c.y = z; c.z = x; cellsData[i] = c; } } else if (z < x) { c.x = z; c.y = x; c.z = y; cellsData[i] = c; } } WorkBuffer.Sort(cells); //Initialize flag array var flags = index.Flags; flags.Fill(ref zero, nc); //Build neighbor index, initialize queues var active = index.Active; var next = index.Next; var neighbor = index.Neighbor; var constraint = index.Constraint; var boundary = index.Boundary; neighbor.Fill(ref zero, nc * 3); constraint.Fill(ref fals, nc * 3); var flagsData = flags.Data; var neighborData = neighbor.Data; var constraintData = constraint.Data; for (var i = 0; i < nc; ++i) { var c = cellsData[i]; for (var j = 0; j < 3; ++j) { var x = 0; var y = 0; switch (j) { case 0: x = c.x; y = c.y; break; case 1: x = c.y; y = c.z; break; case 2: x = c.z; y = c.x; break; } var a = neighborData[3 * i + j] = Locate(cells, y, x, triangles.Opposite(y, x)); var b = constraintData[3 * i + j] = triangles.IsConstraint(x, y); if (a < 0) { if (b) { next.Push(ref i); } else { active.Push(ref i); flagsData[i] = 1; } if (Infinity) { var v = new Int3(y, x, -1); boundary.Push(ref v); } } } } return index; } private int Locate(WorkBuffer cells, int a, int b, int c) { var x = a; var y = b; var z = c; if (b < c) { if (b < a) { x = b; y = c; z = a; } } else if (c < a) { x = c; y = a; z = b; } if (x < 0) { return -1; } return BinarySearch.EQ(cells.Data, new Int3(x, y, z), 0, cells.UsedSize - 1); } private void FilterCells(WorkBuffer cells, WorkBuffer flags) { var ptr = 0; var n = cells.UsedSize; var cellsData = cells.Data; var flagsData = flags.Data; for (var i = 0; i < n; ++i) { if(flagsData[i] == Target) { cellsData[ptr++] = cellsData[i]; } } cells.RemoveLast(n - ptr); } private void FillTriangles(WorkBuffer from, List to) { var n = from.UsedSize; if (to.Capacity < n * 3) { to.Capacity = n * 3; } var data = from.Data; for (var i = 0; i < n; ++i) { var v = data[i]; to.Add(v.x); to.Add(v.y); to.Add(v.z); } } } } ================================================ FILE: Assets/SVGMeshUnity/Runtime/Internals/Cdt2d/Filter.cs.meta ================================================ fileFormatVersion: 2 guid: 1384c72d4a744c9db5fbd24870a9c0e5 timeCreated: 1519830352 ================================================ FILE: Assets/SVGMeshUnity/Runtime/Internals/Cdt2d/MonotoneTriangulation.cs ================================================ using System; using System.Collections.Generic; using System.Linq; using UnityEngine; namespace SVGMeshUnity.Internals.Cdt2d { public class MonotoneTriangulation { private static readonly bool Verbose = false; public WorkBufferPool WorkBufferPool; private enum EventType { Point = 0, End = 1, Start = 2, } //An event in the sweep line procedure private class Event : IComparable { public Vector2 A; public Vector2 B; public EventType Type; public int Index; //This is used to compare events for the sweep line procedure // Points are: // 1. sorted lexicographically // 2. sorted by type (point < end < start) // 3. segments sorted by winding order // 4. sorted by index public int CompareTo(Event b) { var d = 0; d = Sign(A.x - b.A.x); if (d != 0) return d; d = Sign(A.y - b.A.y); if (d != 0) return d; d = Type - b.Type; if (d != 0) return d; if (Type != EventType.Point) { d = Sign(Robust.Orientation(A, B, b.B)); if (d != 0) return d; } return Index - b.Index; } } //A partial convex hull fragment, made of two unimonotone polygons private class PartialHull { public Vector2 A; public Vector2 B; public int Index; public WorkBuffer LowerIds = new WorkBuffer(8); public WorkBuffer UpperIds = new WorkBuffer(8); } public void BuildTriangles(MeshData data) { var numPoints = data.Vertices.Count; var numEdges = data.Edges.Count; data.Triangles.Capacity = numPoints * 3; var events = WorkBufferPool.Get(); if (events.NewForClass == null) { events.NewForClass = () => new Event(); } //Create point events for (var i = 0; i < numPoints; ++i) { var e = events.Push(); e.A = data.Vertices[i]; e.B = Vector2.zero; e.Type = EventType.Point; e.Index = i; } //Create edge events for(var i=0; i b.x) { { var e = events.Push(); e.A = b; e.B = a; e.Type = EventType.Start; e.Index = i; } { var e = events.Push(); e.A = a; e.B = b; e.Type = EventType.End; e.Index = i; } } } //Sort events WorkBuffer.Sort(events); if (Verbose) { DumpEvents(events); } //Initialize hull var minX = events.Data[0].A.x - 1f; var hulls = WorkBufferPool.Get(); if (hulls.NewForClass == null) { hulls.NewForClass = () => new PartialHull(); } var h = hulls.Push(); h.A = new Vector2(minX, 1f); h.B = new Vector2(minX, 0f); h.Index = -1; h.LowerIds.Clear(); h.UpperIds.Clear(); //Process events in order var numEvents = events.UsedSize; for (var i = 0; i < numEvents; ++i) { var e = events.Data[i]; if (Verbose) { Debug.Log(""); Debug.Log(i); DumpEvent(e); } switch (e.Type) { case EventType.Point: AddPoint(data.Triangles, hulls, data.Vertices, e.A, e.Index); break; case EventType.Start: SplitHulls(hulls, e); break; case EventType.End: MergeHulls(hulls, e); break; } if (Verbose) { Debug.Log(""); } } WorkBufferPool.Release(ref hulls); WorkBufferPool.Release(ref events); } private static int Sign(float n) { if (n < 0f) { return -1; } if (n > 0f) { return 1; } return 0; } private void AddPoint(List cells, WorkBuffer hulls, List points, Vector2 p, int idx) { var lo = BinarySearch.LT(hulls.Data, p, TestPoint.Default, 0, hulls.UsedSize - 1); var hi = BinarySearch.GT(hulls.Data, p, TestPoint.Default, 0, hulls.UsedSize - 1); for (var i = lo; i < hi; ++i) { var hull = hulls.Data[i]; //Insert p into lower hull { var lowerIds = hull.LowerIds; var m = lowerIds.UsedSize; var lowerIdsData = lowerIds.Data; while (m > 1 && Robust.Orientation(points[lowerIdsData[m - 2]], points[lowerIdsData[m - 1]], p) > 0f) { cells.Add(lowerIdsData[m - 1]); cells.Add(lowerIdsData[m - 2]); cells.Add(idx); m -= 1; } if (m < lowerIds.UsedSize) { lowerIds.RemoveLast(lowerIds.UsedSize - m); } lowerIds.Push(ref idx); } //Insert p into upper hull { var upperIds = hull.UpperIds; var m = upperIds.UsedSize; var upperIdsData = upperIds.Data; while (m > 1 && Robust.Orientation(points[upperIdsData[m - 2]], points[upperIdsData[m - 1]], p) < 0f) { cells.Add(upperIdsData[m - 2]); cells.Add(upperIdsData[m - 1]); cells.Add(idx); m -= 1; } if (m < upperIds.UsedSize) { upperIds.RemoveLast(upperIds.UsedSize - m); } upperIds.Push(ref idx); } } if (Verbose) { Debug.Log("Add"); DumpHulls(hulls); hulls.Dump(); } } private void SplitHulls(WorkBuffer hulls, Event e) { var splitIdx = BinarySearch.LE(hulls.Data, e, FindSplit.Default, 0, hulls.UsedSize - 1); var hull = hulls.Data[splitIdx]; var upperIds = hull.UpperIds; var x = upperIds.Data[upperIds.UsedSize - 1]; hull.UpperIds = new WorkBuffer(8); hull.UpperIds.Push(ref x); var h = hulls.Insert(splitIdx + 1); h.A = e.A; h.B = e.B; h.Index = e.Index; h.LowerIds.Clear(); h.LowerIds.Push(ref x); h.UpperIds = upperIds; if (Verbose) { Debug.Log("Split: " + splitIdx); DumpHulls(hulls); hulls.Dump(); } } private void MergeHulls(WorkBuffer hulls, Event e) { //Swap pointers for merge search var tmp = e.A; e.A = e.B; e.B = tmp; var mergeIdx = BinarySearch.EQ(hulls.Data, e, FindSplit.Default, 0, hulls.UsedSize - 1); var upper = hulls.Data[mergeIdx]; var lower = hulls.Data[mergeIdx - 1]; lower.UpperIds = upper.UpperIds; hulls.RemoveAt(mergeIdx); if (Verbose) { Debug.Log("Merge: " + mergeIdx); DumpHulls(hulls); hulls.Dump(); } } private class TestPoint : BinarySearch.IComparer { public static readonly TestPoint Default = new TestPoint(); public int Compare(PartialHull hull, Vector2 p) { return Sign(Robust.Orientation(hull.A, hull.B, p)); } } private class FindSplit : BinarySearch.IComparer { public static readonly FindSplit Default = new FindSplit(); public int Compare(PartialHull hull, Event edge) { var d = 0; if (hull.A.x < edge.A.x) { d = Sign(Robust.Orientation(hull.A, hull.B, edge.A)); } else { d = Sign(Robust.Orientation(edge.B, edge.A, hull.A)); } if (d != 0) return d; if (edge.B.x < hull.B.x) { d = Sign(Robust.Orientation(hull.A, hull.B, edge.B)); } else { d = Sign(Robust.Orientation(edge.B, edge.A, hull.B)); } if (d != 0) return d; return hull.Index - edge.Index; } } #region Debug private void DumpEvent(Event _) { Debug.Log(string.Format("{{ a: {0}, b: {1}, type: {2}, idx: {3} }}", _.A, _.B, _.Type, _.Index)); } private void DumpEvents(WorkBuffer events) { Debug.Log(events.Data.Take(events.UsedSize) .Select(_ => string.Format("{{ a: {0}, b: {1}, type: {2}, idx: {3} }}", _.A, _.B, _.Type, _.Index)) .Aggregate("", (_, s) => _ + s + "\n")); } private void DumpHulls(WorkBuffer hulls) { Debug.Log(hulls.Data.Take(hulls.UsedSize) .Select(_ => string.Format("{{ a: {0}, b: {1}, idx: {2}, lowerIds: [ {3} ], upperIds: [ {4} ] }}", _.A, _.B, _.Index, ToString(_.LowerIds), ToString(_.UpperIds))) .Aggregate("", (_, s) => _ + s + "\n")); } private string ToString(WorkBuffer list) { return string.Join(", ", list.Data.Take(list.UsedSize).Select(_ => _.ToString()).ToArray()); } #endregion } } ================================================ FILE: Assets/SVGMeshUnity/Runtime/Internals/Cdt2d/MonotoneTriangulation.cs.meta ================================================ fileFormatVersion: 2 guid: f3f866907d0c43a086ba61429b3d2b8a timeCreated: 1519699803 ================================================ FILE: Assets/SVGMeshUnity/Runtime/Internals/Cdt2d/Robust.cs ================================================ using UnityEngine; namespace SVGMeshUnity.Internals.Cdt2d { public static class Robust { // https://github.com/mikolalysenko/robust-orientation // https://github.com/mikolalysenko/robust-in-sphere // https://github.com/mikolalysenko/robust-sum // https://github.com/mikolalysenko/robust-subtract // https://github.com/mikolalysenko/robust-scale // https://github.com/mikolalysenko/two-product // https://github.com/mikolalysenko/two-sum private static readonly float Epsilon = 1.1102230246251565e-16f; private static readonly float Errbound3 = (3.0f + 16.0f * Epsilon) * Epsilon; private static readonly float Splitter = +(Mathf.Pow(2f, 27f) + 1.0f); private static float[][] BufferPool = new float[32][]; private static int BufferPoolSize = 0; private static float[] GetTemporaryBuffer() { if (BufferPoolSize > 0) { return BufferPool[--BufferPoolSize]; } return new float[16]; } private static void ReleaseTemporaryBuffer(ref float[] buf) { if (BufferPool.Length == BufferPoolSize) { var newBufferPool = new float[BufferPool.Length + 32][]; BufferPool.CopyTo(newBufferPool, 0); BufferPool = newBufferPool; } BufferPool[BufferPoolSize++] = buf; buf = null; } public static float Orientation(Vector2 a, Vector2 b, Vector2 c) { var l = (a.y - c.y) * (b.x - c.x); var r = (a.x - c.x) * (b.y - c.y); var det = l - r; var s = 0f; if (l > 0) { if (r <= 0) { return det; } else { s = l + r; } } else if (l < 0) { if (r >= 0) { return det; } else { s = -(l + r); } } else { return det; } var tol = Errbound3 * s; if (det >= tol || det <= -tol) { return det; } var m0 = a; var m1 = b; var m2 = c; var sL = GetTemporaryBuffer(); var sR = GetTemporaryBuffer(); var p = GetTemporaryBuffer(); var n = GetTemporaryBuffer(); var d = GetTemporaryBuffer(); var pN = 0; var nN = 0; var dN = 0; var pL = GetTemporaryBuffer(); var pR = GetTemporaryBuffer(); var pLN = 0; var pRN = 0; TwoProd( m1.y, m2.x, sL); TwoProd(-m2.y, m1.x, sR); Sum(sL, 2, sR, 2, pL, out pLN); TwoProd( m0.y, m1.x, sL); TwoProd(-m1.y, m0.x, sR); Sum(sL, 2, sR, 2, pR, out pRN); Sum(pL, pLN, pR, pRN, p, out pN); ReleaseTemporaryBuffer(ref pL); ReleaseTemporaryBuffer(ref pR); TwoProd( m0.y, m2.x, sL); TwoProd(-m2.y, m0.x, sR); Sum(sL, 2, sR, 2, n, out nN); ReleaseTemporaryBuffer(ref sL); ReleaseTemporaryBuffer(ref sR); Sub(p, pN, n, nN, d, out dN); var result = d[dN - 1]; ReleaseTemporaryBuffer(ref p); ReleaseTemporaryBuffer(ref n); ReleaseTemporaryBuffer(ref d); return result; } public static float InSphere(Vector2 m0, Vector2 m1, Vector2 m2, Vector2 m3) { var w = GetTemporaryBuffer(); var wL = GetTemporaryBuffer(); var wR = GetTemporaryBuffer(); var wN = 0; var w0m1 = GetTemporaryBuffer(); var w0m2 = GetTemporaryBuffer(); var w0m3 = GetTemporaryBuffer(); var w1m0 = GetTemporaryBuffer(); var w1m2 = GetTemporaryBuffer(); var w1m3 = GetTemporaryBuffer(); var w2m0 = GetTemporaryBuffer(); var w2m1 = GetTemporaryBuffer(); var w2m3 = GetTemporaryBuffer(); var w3m0 = GetTemporaryBuffer(); var w3m1 = GetTemporaryBuffer(); var w3m2 = GetTemporaryBuffer(); var w0m1N = 0; var w0m2N = 0; var w0m3N = 0; var w1m0N = 0; var w1m2N = 0; var w1m3N = 0; var w2m0N = 0; var w2m1N = 0; var w2m3N = 0; var w3m0N = 0; var w3m1N = 0; var w3m2N = 0; TwoProd(m0[0], m0[0], wL); TwoProd(m0[1], m0[1], wR); Sum(wL, 2, wR, 2, w, out wN); Scale(w, wN, m1[0], w0m1, out w0m1N); Scale(w, wN, m2[0], w0m2, out w0m2N); Scale(w, wN, m3[0], w0m3, out w0m3N); TwoProd(m1[0], m1[0], wL); TwoProd(m1[1], m1[1], wR); Sum(wL, 2, wR, 2, w, out wN); Scale(w, wN, m0[0], w1m0, out w1m0N); Scale(w, wN, m2[0], w1m2, out w1m2N); Scale(w, wN, m3[0], w1m3, out w1m3N); TwoProd(m2[0], m2[0], wL); TwoProd(m2[1], m2[1], wR); Sum(wL, 2, wR, 2, w, out wN); Scale(w, wN, m0[0], w2m0, out w2m0N); Scale(w, wN, m1[0], w2m1, out w2m1N); Scale(w, wN, m3[0], w2m3, out w2m3N); TwoProd(m3[0], m3[0], wL); TwoProd(m3[1], m3[1], wR); Sum(wL, 2, wR, 2, w, out wN); Scale(w, wN, m0[0], w3m0, out w3m0N); Scale(w, wN, m1[0], w3m1, out w3m1N); Scale(w, wN, m2[0], w3m2, out w3m2N); ReleaseTemporaryBuffer(ref wL); ReleaseTemporaryBuffer(ref wR); ReleaseTemporaryBuffer(ref w); var p = GetTemporaryBuffer(); var n = GetTemporaryBuffer(); var d = GetTemporaryBuffer(); var pN = 0; var nN = 0; var dN = 0; var pL = GetTemporaryBuffer(); var pR = GetTemporaryBuffer(); var pLN = 0; var pRN = 0; var pLLL = GetTemporaryBuffer(); var pLL = GetTemporaryBuffer(); var pLRLL = GetTemporaryBuffer(); var pLRL = GetTemporaryBuffer(); var pLRRL = GetTemporaryBuffer(); var pLRR = GetTemporaryBuffer(); var pLR = GetTemporaryBuffer(); var pLLLN = 0; var pLLN = 0; var pLRLLN = 0; var pLRLN = 0; var pLRRLN = 0; var pLRRN = 0; var pLRN = 0; Sub(w3m2, w3m2N, w2m3, w2m3N, pLLL, out pLLLN); Scale(pLLL, pLLLN, m1[1], pLL, out pLLN); Sub(w3m1, w3m1N, w1m3, w1m3N, pLRLL, out pLRLLN); Scale(pLRLL, pLRLLN, -m2[1], pLRL, out pLRLN); Sub(w2m1, w2m1N, w1m2, w1m2N, pLRRL, out pLRRLN); Scale(pLRRL, pLRRLN, m3[1], pLRR, out pLRRN); Sum(pLRL, pLRLN, pLRR, pLRRN, pLR, out pLRN); Sum(pLL, pLLN, pLR, pLRN, pL, out pLN); ReleaseTemporaryBuffer(ref pLLL); ReleaseTemporaryBuffer(ref pLL); ReleaseTemporaryBuffer(ref pLRLL); ReleaseTemporaryBuffer(ref pLRL); ReleaseTemporaryBuffer(ref pLRRL); ReleaseTemporaryBuffer(ref pLRR); ReleaseTemporaryBuffer(ref pLR); var pRLL = GetTemporaryBuffer(); var pRL = GetTemporaryBuffer(); var pRRLL = GetTemporaryBuffer(); var pRRL = GetTemporaryBuffer(); var pRRRL = GetTemporaryBuffer(); var pRRR = GetTemporaryBuffer(); var pRR = GetTemporaryBuffer(); var pRLLN = 0; var pRLN = 0; var pRRLLN = 0; var pRRLN = 0; var pRRRLN = 0; var pRRRN = 0; var pRRN = 0; Sub(w3m1, w3m1N, w1m3, w1m3N, pRLL, out pRLLN); Scale(pRLL, pRLLN, m0[1], pRL, out pRLN); Sub(w3m0, w3m0N, w0m3, w0m3N, pRRLL, out pRRLLN); Scale(pRRLL, pRRLLN, -m1[1], pRRL, out pRRLN); Sub(w1m0, w1m0N, w0m1, w0m1N, pRRRL, out pRRRLN); Scale(pRRRL, pRRRLN, m3[1], pRRR, out pRRRN); Sum(pRRL, pRRLN, pRRR, pRRRN, pRR, out pRRN); Sum(pRL, pRLN, pRR, pRRN, pR, out pRN); ReleaseTemporaryBuffer(ref pRLL); ReleaseTemporaryBuffer(ref pRL); ReleaseTemporaryBuffer(ref pRRLL); ReleaseTemporaryBuffer(ref pRRL); ReleaseTemporaryBuffer(ref pRRRL); ReleaseTemporaryBuffer(ref pRRR); ReleaseTemporaryBuffer(ref pRR); Sum(pL, pLN, pR, pRN, p, out pN); ReleaseTemporaryBuffer(ref pL); ReleaseTemporaryBuffer(ref pR); var nL = GetTemporaryBuffer(); var nR = GetTemporaryBuffer(); var nLN = 0; var nRN = 0; var nLLL = GetTemporaryBuffer(); var nLL = GetTemporaryBuffer(); var nLRLL = GetTemporaryBuffer(); var nLRL = GetTemporaryBuffer(); var nLRRL = GetTemporaryBuffer(); var nLRR = GetTemporaryBuffer(); var nLR = GetTemporaryBuffer(); var nLLLN = 0; var nLLN = 0; var nLRLLN = 0; var nLRLN = 0; var nLRRLN = 0; var nLRRN = 0; var nLRN = 0; Sub(w3m2, w3m2N, w2m3, w2m3N, nLLL, out nLLLN); Scale(nLLL, nLLLN, m0[1], nLL, out nLLN); Sub(w3m0, w3m0N, w0m3, w0m3N, nLRLL, out nLRLLN); Scale(nLRLL, nLRLLN, -m2[1], nLRL, out nLRLN); Sub(w2m0, w2m0N, w0m2, w0m2N, nLRRL, out nLRRLN); Scale(nLRRL, nLRRLN, m3[1], nLRR, out nLRRN); Sum(nLRL, nLRLN, nLRR, nLRRN, nLR, out nLRN); Sum(nLL, nLLN, nLR, nLRN, nL, out nLN); ReleaseTemporaryBuffer(ref nLLL); ReleaseTemporaryBuffer(ref nLL); ReleaseTemporaryBuffer(ref nLRLL); ReleaseTemporaryBuffer(ref nLRL); ReleaseTemporaryBuffer(ref nLRRL); ReleaseTemporaryBuffer(ref nLRR); ReleaseTemporaryBuffer(ref nLR); var nRLL = GetTemporaryBuffer(); var nRL = GetTemporaryBuffer(); var nRRLL = GetTemporaryBuffer(); var nRRL = GetTemporaryBuffer(); var nRRRL = GetTemporaryBuffer(); var nRRR = GetTemporaryBuffer(); var nRR = GetTemporaryBuffer(); var nRLLN = 0; var nRLN = 0; var nRRLLN = 0; var nRRLN = 0; var nRRRLN = 0; var nRRRN = 0; var nRRN = 0; Sub(w2m1, w2m1N, w1m2, w1m2N, nRLL, out nRLLN); Scale(nRLL, nRLLN, m0[1], nRL, out nRLN); Sub(w2m0, w2m0N, w0m2, w0m2N, nRRLL, out nRRLLN); Scale(nRRLL, nRRLLN, -m1[1], nRRL, out nRRLN); Sub(w1m0, w1m0N, w0m1, w0m1N, nRRRL, out nRRRLN); Scale(nRRRL, nRRRLN, m2[1], nRRR, out nRRRN); Sum(nRRL, nRRLN, nRRR, nRRRN, nRR, out nRRN); Sum(nRL, nRLN, nRR, nRRN, nR, out nRN); ReleaseTemporaryBuffer(ref nRLL); ReleaseTemporaryBuffer(ref nRL); ReleaseTemporaryBuffer(ref nRRLL); ReleaseTemporaryBuffer(ref nRRL); ReleaseTemporaryBuffer(ref nRRRL); ReleaseTemporaryBuffer(ref nRRR); ReleaseTemporaryBuffer(ref nRR); Sum(nL, nLN, nR, nRN, n, out nN); ReleaseTemporaryBuffer(ref nL); ReleaseTemporaryBuffer(ref nR); ReleaseTemporaryBuffer(ref w0m1); ReleaseTemporaryBuffer(ref w0m2); ReleaseTemporaryBuffer(ref w0m3); ReleaseTemporaryBuffer(ref w1m0); ReleaseTemporaryBuffer(ref w1m2); ReleaseTemporaryBuffer(ref w1m3); ReleaseTemporaryBuffer(ref w2m0); ReleaseTemporaryBuffer(ref w2m1); ReleaseTemporaryBuffer(ref w2m3); ReleaseTemporaryBuffer(ref w3m0); ReleaseTemporaryBuffer(ref w3m1); ReleaseTemporaryBuffer(ref w3m2); Sub(p, pN, n, nN, d, out dN); var result = d[dN - 1]; ReleaseTemporaryBuffer(ref p); ReleaseTemporaryBuffer(ref n); ReleaseTemporaryBuffer(ref d); return result; } private static void TwoProd(float a, float b, float[] result) { var x = a * b; var c = Splitter * a; var abig = c - a; var ahi = c - abig; var alo = a - ahi; var d = Splitter * b; var bbig = d - b; var bhi = d - bbig; var blo = b - bhi; var err1 = x - (ahi * bhi); var err2 = err1 - (alo * bhi); var err3 = err2 - (ahi * blo); var y = alo * blo - err3; result[0] = y; result[1] = x; } private static void TwoSum(float a, float b, float[] result) { var x = a + b; var bv = x - a; var av = x - bv; var br = b - bv; var ar = a - av; result[0] = ar + br; result[1] = x; } private static void Sum(float[] e, int eN, float[] f, int fN, float[] result, out int resultN) { if(eN == 1 && fN == 1) { ScalarScalar(e[0], f[0], result, out resultN); return; } resultN = 0; var eptr = 0; var fptr = 0; var ei = e[eptr]; var ea = Mathf.Abs(ei); var fi = f[fptr]; var fa = Mathf.Abs(fi); var a = 0f; var b = 0f; if (ea < fa) { b = ei; eptr += 1; if (eptr < eN) { ei = e[eptr]; ea = Mathf.Abs(ei); } } else { b = fi; fptr += 1; if (fptr < fN) { fi = f[fptr]; fa = Mathf.Abs(fi); } } if ((eptr < eN && ea < fa) || (fptr >= fN)) { a = ei; eptr += 1; if (eptr < eN) { ei = e[eptr]; ea = Mathf.Abs(ei); } } else { a = fi; fptr += 1; if (fptr < fN) { fi = f[fptr]; fa = Mathf.Abs(fi); } } var x = a + b; var bv = x - a; var y = b - bv; var q0 = y; var q1 = x; var _x = 0f; var _bv = 0f; var _av = 0f; var _br = 0f; var _ar = 0f; while (eptr < eN && fptr < fN) { if (ea < fa) { a = ei; eptr += 1; if (eptr < eN) { ei = e[eptr]; ea = Mathf.Abs(ei); } } else { a = fi; fptr += 1; if (fptr < fN) { fi = f[fptr]; fa = Mathf.Abs(fi); } } b = q0; x = a + b; bv = x - a; y = b - bv; if (y != 0f) { result[resultN++] = y; } _x = q1 + x; _bv = _x - q1; _av = _x - _bv; _br = x - _bv; _ar = q1 - _av; q0 = _ar + _br; q1 = _x; } while (eptr < eN) { a = ei; b = q0; x = a + b; bv = x - a; y = b - bv; if (y != 0f) { result[resultN++] = y; } _x = q1 + x; _bv = _x - q1; _av = _x - _bv; _br = x - _bv; _ar = q1 - _av; q0 = _ar + _br; q1 = _x; eptr += 1; if (eptr < eN) { ei = e[eptr]; } } while (fptr < fN) { a = fi; b = q0; x = a + b; bv = x - a; y = b - bv; if (y != 0f) { result[resultN++] = y; } _x = q1 + x; _bv = _x - q1; _av = _x - _bv; _br = x - _bv; _ar = q1 - _av; q0 = _ar + _br; q1 = _x; fptr += 1; if (fptr < fN) { fi = f[fptr]; } } if (q0 != 0f) { result[resultN++] = q0; } if (q1 != 0f) { result[resultN++] = q1; } if (resultN == 0) { result[resultN++] = 0f; } } private static void Sub(float[] e, int eN, float[] f, int fN, float[] result, out int resultN) { if (eN == 1 && fN == 1) { ScalarScalar(e[0], -f[0], result, out resultN); return; } resultN = 0; var eptr = 0; var fptr = 0; var ei = e[eptr]; var ea = Mathf.Abs(ei); var fi = -f[fptr]; var fa = Mathf.Abs(fi); var a = 0f; var b = 0f; if (ea < fa) { b = ei; eptr += 1; if (eptr < eN) { ei = e[eptr]; ea = Mathf.Abs(ei); } } else { b = fi; fptr += 1; if (fptr < fN) { fi = -f[fptr]; fa = Mathf.Abs(fi); } } if ((eptr < eN && ea < fa) || (fptr >= fN)) { a = ei; eptr += 1; if (eptr < eN) { ei = e[eptr]; ea = Mathf.Abs(ei); } } else { a = fi; fptr += 1; if (fptr < fN) { fi = -f[fptr]; fa = Mathf.Abs(fi); } } var x = a + b; var bv = x - a; var y = b - bv; var q0 = y; var q1 = x; var _x = 0f; var _bv = 0f; var _av = 0f; var _br = 0f; var _ar = 0f; while (eptr < eN && fptr < fN) { if (ea < fa) { a = ei; eptr += 1; if (eptr < eN) { ei = e[eptr]; ea = Mathf.Abs(ei); } } else { a = fi; fptr += 1; if (fptr < fN) { fi = -f[fptr]; fa = Mathf.Abs(fi); } } b = q0; x = a + b; bv = x - a; y = b - bv; if (y != 0f) { result[resultN++] = y; } _x = q1 + x; _bv = _x - q1; _av = _x - _bv; _br = x - _bv; _ar = q1 - _av; q0 = _ar + _br; q1 = _x; } while (eptr < eN) { a = ei; b = q0; x = a + b; bv = x - a; y = b - bv; if (y != 0f) { result[resultN++] = y; } _x = q1 + x; _bv = _x - q1; _av = _x - _bv; _br = x - _bv; _ar = q1 - _av; q0 = _ar + _br; q1 = _x; eptr += 1; if (eptr < eN) { ei = e[eptr]; } } while (fptr < fN) { a = fi; b = q0; x = a + b; bv = x - a; y = b - bv; if (y != 0f) { result[resultN++] = y; } _x = q1 + x; _bv = _x - q1; _av = _x - _bv; _br = x - _bv; _ar = q1 - _av; q0 = _ar + _br; q1 = _x; fptr += 1; if (fptr < fN) { fi = -f[fptr]; } } if (q0 != 0f) { result[resultN++] = q0; } if (q1 != 0f) { result[resultN++] = q1; } if (resultN == 0) { result[resultN++] = 0.0f; } } private static void Scale(float[] e, int eN, float scale, float[] result, out int resultN) { if (eN == 1) { var ts = GetTemporaryBuffer(); TwoProd(e[0], scale, ts); if (ts[0] != 0f) { result[0] = ts[0]; result[1] = ts[1]; resultN = 2; ReleaseTemporaryBuffer(ref ts); return; } result[0] = ts[1]; resultN = 1; ReleaseTemporaryBuffer(ref ts); return; } var q = GetTemporaryBuffer(); var t = GetTemporaryBuffer(); q[0] = 0.1f; q[1] = 0.1f; t[0] = 0.1f; t[1] = 0.1f; resultN = 0; TwoProd(e[0], scale, q); if (q[0] != 0f) { result[resultN++] = q[0]; } for (var i = 1; i < eN; ++i) { TwoProd(e[i], scale, t); var pq = q[1]; TwoSum(pq, t[0], q); if (q[0] != 0f) { result[resultN++] = q[0]; } var a = t[1]; var b = q[1]; var x = a + b; var bv = x - a; var y = b - bv; q[1] = x; if (y != 0f) { result[resultN++] = y; } } if (q[1] != 0f) { result[resultN++] = q[1]; } ReleaseTemporaryBuffer(ref q); ReleaseTemporaryBuffer(ref t); if (resultN == 0) { result[resultN++] = 0.0f; } } //Easy case: Add two scalars private static void ScalarScalar(float a, float b, float[] result, out int resultN) { var x = a + b; var bv = x - a; var av = x - bv; var br = b - bv; var ar = a - av; var y = ar + br; if (y != 0f) { result[0] = y; result[1] = x; resultN = 2; return; } result[0] = x; resultN = 1; } } } ================================================ FILE: Assets/SVGMeshUnity/Runtime/Internals/Cdt2d/Robust.cs.meta ================================================ fileFormatVersion: 2 guid: 76852b2115774598947fe907402ed9fd timeCreated: 1519703003 ================================================ FILE: Assets/SVGMeshUnity/Runtime/Internals/Cdt2d/Triangles.cs ================================================ using System; using System.Collections.Generic; using UnityEngine; namespace SVGMeshUnity.Internals.Cdt2d { public class Triangles { public Triangles(MeshData data) { PrivateVertices = data.Vertices; CreateStars(data.Vertices.Count); CreateEdges(data.Edges); CreateTriangles(data.Triangles); } public List Vertices { get { return PrivateVertices; } } public WorkBuffer[] Stars { get { return PrivateStars; } } private List PrivateVertices; private WorkBuffer[] PrivateStars; private Int2[] Edges; private void CreateStars(int n) { var stars = new WorkBuffer[n]; for (var i = 0; i < n; ++i) { stars[i] = new WorkBuffer(16); } PrivateStars = stars; } private void CreateEdges(List source) { var l = source.Count; var edges = new Int2[l]; for (var i = 0; i < l; ++i) { var edge = source[i]; if (edge.y < edge.x) { var x = edge.x; edge.x = edge.y; edge.y = x; } edges[i] = edge; } Sort.QuickSort(edges, 0, edges.Length - 1); Edges = edges; } private void CreateTriangles(List source) { var l = source.Count; for (var i = 0; i < l; i += 3) { AddTriangle(source[i + 0], source[i + 1], source[i + 2]); } } public void AddTriangle(int i, int j, int k) { var jk = new Int2(j, k); var ki = new Int2(k, i); var ij = new Int2(i, j); PrivateStars[i].Push(ref jk); PrivateStars[j].Push(ref ki); PrivateStars[k].Push(ref ij); } public void RemoveTriangle(int i, int j, int k) { RemovePair(PrivateStars[i], j, k); RemovePair(PrivateStars[j], k, i); RemovePair(PrivateStars[k], i, j); } private void RemovePair(WorkBuffer list, int j, int k) { var n = list.UsedSize; var data = list.Data; for (var i = 0; i < n; ++i) { var s = data[i]; if (s.x == j && s.y == k) { data[i] = data[n - 1]; list.RemoveLast(1); return; } } } public int Opposite(int j, int i) { var list = PrivateStars[i]; var n = list.UsedSize; var data = list.Data; for (var k = 0; k < n; ++k) { if (data[k].y == j) { return data[k].x; } } return -1; } public void Flip(int i, int j) { var a = Opposite(i, j); var b = Opposite(j, i); RemoveTriangle(i, j, a); RemoveTriangle(j, i, b); AddTriangle(i, b, a); AddTriangle(j, a, b); } public bool IsConstraint(int i, int j) { var e = new Int2(Mathf.Min(i, j), Mathf.Max(i, j)); return BinarySearch.EQ(Edges, e, 0, Edges.Length) >= 0; } public void Fill(List triangles) { var n = PrivateStars.Length; if (triangles.Capacity < n) { triangles.Capacity = n; } triangles.Clear(); for(var i = 0; i < n; ++i) { var list = PrivateStars[i]; var data = list.Data; var m = list.UsedSize; for(var j = 0; j < m; ++j) { var s = data[j]; if(i < Mathf.Min(s.x, s.y)) { triangles.Add(i); triangles.Add(s.x); triangles.Add(s.y); } } } } public void Fill(WorkBuffer triangles) { var n = PrivateStars.Length; triangles.Extend(n); triangles.Clear(); for(var i = 0; i < n; ++i) { var list = PrivateStars[i]; var data = list.Data; var m = list.UsedSize; for(var j = 0; j < m; ++j) { var s = data[j]; if(i < Mathf.Min(s.x, s.y)) { var v = new Int3(i, s.x, s.y); triangles.Push(ref v); } } } } } } ================================================ FILE: Assets/SVGMeshUnity/Runtime/Internals/Cdt2d/Triangles.cs.meta ================================================ fileFormatVersion: 2 guid: 0ae927e5d9354637b7361e1a99ac6aa9 timeCreated: 1519790845 ================================================ FILE: Assets/SVGMeshUnity/Runtime/Internals/Cdt2d/Triangulation.cs ================================================ namespace SVGMeshUnity.Internals.Cdt2d { public class Triangulation { // https://github.com/mikolalysenko/cdt2d public bool Delaunay = true; public bool Interior = true; public bool Exterior = true; public bool Infinity = false; public WorkBufferPool WorkBufferPool; private MonotoneTriangulation MonotoneTriangulation = new MonotoneTriangulation(); private DelaunayRefine DelaunayRefine = new DelaunayRefine(); private Filter Filter = new Filter(); public void BuildTriangles(MeshData data) { //Handle trivial case if ((!Interior && !Exterior) || data.Vertices.Count == 0) { return; } //Construct initial triangulation MonotoneTriangulation.WorkBufferPool = WorkBufferPool; MonotoneTriangulation.BuildTriangles(data); //If delaunay refinement needed, then improve quality by edge flipping if (Delaunay || Interior != Exterior || Infinity) { //Index all of the cells to support fast neighborhood queries var triangles = new Triangles(data); //Run edge flipping if (Delaunay) { DelaunayRefine.WorkBufferPool = WorkBufferPool; DelaunayRefine.RefineTriangles(triangles); } Filter.WorkBufferPool = WorkBufferPool; Filter.Infinity = Infinity; //Filter points if (!Exterior) { Filter.Target = -1; Filter.Do(triangles, data.Triangles); return; } if (!Interior) { Filter.Target = 1; Filter.Do(triangles, data.Triangles); return; } if (Infinity) { Filter.Target = 0; Filter.Do(triangles, data.Triangles); return; } triangles.Fill(data.Triangles); } } } } ================================================ FILE: Assets/SVGMeshUnity/Runtime/Internals/Cdt2d/Triangulation.cs.meta ================================================ fileFormatVersion: 2 guid: 781d3a8656524a829b4205bab46ef8de timeCreated: 1519698011 ================================================ FILE: Assets/SVGMeshUnity/Runtime/Internals/Cdt2d.meta ================================================ fileFormatVersion: 2 guid: 532f777b59434eef9747b681c744be7e timeCreated: 1519699774 ================================================ FILE: Assets/SVGMeshUnity/Runtime/Internals/Curve.cs ================================================ using UnityEngine; namespace SVGMeshUnity.Internals { public struct Curve { public bool IsMove; public Vector2 Position; public Vector2 InControl; public Vector2 OutControl; } } ================================================ FILE: Assets/SVGMeshUnity/Runtime/Internals/Curve.cs.meta ================================================ fileFormatVersion: 2 guid: 6d1543b2c42a4cf6a556b45007e9a7d7 timeCreated: 1519625420 ================================================ FILE: Assets/SVGMeshUnity/Runtime/Internals/Int2.cs ================================================ using System; namespace SVGMeshUnity.Internals { public struct Int2 : IComparable { public Int2(int x, int y) { this.x = x; this.y = y; } public int x; public int y; public int CompareTo(Int2 b) { var d = x - b.x; if (d != 0) return d; return y - b.y; } } } ================================================ FILE: Assets/SVGMeshUnity/Runtime/Internals/Int2.cs.meta ================================================ fileFormatVersion: 2 guid: d8e3039a00c54f89a570bbde07b4932d timeCreated: 1519872919 ================================================ FILE: Assets/SVGMeshUnity/Runtime/Internals/Int3.cs ================================================ using System; namespace SVGMeshUnity.Internals { public struct Int3 : IComparable { public Int3(int x, int y, int z) { this.x = x; this.y = y; this.z = z; } public int x; public int y; public int z; public int CompareTo(Int3 b) { var d = 0; d = x - b.x; if (d != 0) return d; d = y - b.y; if (d != 0) return d; return z - b.z; } } } ================================================ FILE: Assets/SVGMeshUnity/Runtime/Internals/Int3.cs.meta ================================================ fileFormatVersion: 2 guid: 518c1f26691e43c3a27c0837c39e25f4 timeCreated: 1519873038 ================================================ FILE: Assets/SVGMeshUnity/Runtime/Internals/MeshData.cs ================================================ using System.Collections; using System.Collections.Generic; using System.Linq; using UnityEngine; namespace SVGMeshUnity.Internals { public class MeshData { public MeshData() { Vertices = new List(); Edges = new List(); Triangles = new List(); VertexIndices = new Hashtable(); } public List Vertices { get; private set; } public List Edges { get; private set; } public List Triangles { get; private set; } private Hashtable VertexIndices; public void Clear() { Vertices.Clear(); Edges.Clear(); Triangles.Clear(); VertexIndices.Clear(); } public void AddVertices(WorkBuffer buffer) { var firstEdgeIdx = -1; var prevEdgeidx = -1; var vertices = Vertices; var edges = Edges; var indicies = VertexIndices; var size = buffer.UsedSize; var data = buffer.Data; for (var i = 0; i < size; ++i) { var v = data[i]; var idx = -1; var index = indicies[v]; if (index != null) { idx = (int) index; } if (idx == -1) { vertices.Add(v); idx = vertices.Count - 1; indicies[v] = idx; } if (idx == prevEdgeidx) { continue; } if (i == 0) { firstEdgeIdx = idx; } else { edges.Add(new Int2(prevEdgeidx, idx)); } prevEdgeidx = idx; } if (prevEdgeidx != firstEdgeIdx) { edges.Add(new Int2(prevEdgeidx, firstEdgeIdx)); } } public void MakeUnityFriendly() { { var vertices = Vertices; var l = vertices.Count; for (var i = 0; i < l; ++i) { var v = vertices[i]; v.y *= -1f; vertices[i] = v; } } { var triangles = Triangles; var l = triangles.Count; for (var i = 0; i < l; i += 3) { var a = triangles[i + 0]; var b = triangles[i + 1]; var c = triangles[i + 2]; triangles[i + 0] = b; triangles[i + 1] = c; triangles[i + 2] = a; } } } public void Upload(Mesh m) { m.Clear(); m.SetVertices(Vertices); m.SetTriangles(Triangles, 0); m.RecalculateBounds(); m.RecalculateNormals(); } public void DumpTriangles() { Debug.Log(Triangles.Aggregate("", (_, i) => _ + i.ToString() + "\n")); } } } ================================================ FILE: Assets/SVGMeshUnity/Runtime/Internals/MeshData.cs.meta ================================================ fileFormatVersion: 2 guid: 71c31466ffeb411f87eeb5849aaf19b2 timeCreated: 1519696938 ================================================ FILE: Assets/SVGMeshUnity/Runtime/Internals/Sort.cs ================================================ using System; namespace SVGMeshUnity.Internals { public static class Sort where T : IComparable { public static void QuickSort(T[] elements, int left, int right) { var i = left; var j = right; var pivot = elements[(left + right) >> 1]; while (i <= j) { while (elements[i].CompareTo(pivot) < 0) { ++i; } while (elements[j].CompareTo(pivot) > 0) { --j; } if (i <= j) { // Swap var tmp = elements[i]; elements[i] = elements[j]; elements[j] = tmp; i++; j--; } } // Recursive calls if (left < j) { QuickSort(elements, left, j); } if (i < right) { QuickSort(elements, i, right); } } } } ================================================ FILE: Assets/SVGMeshUnity/Runtime/Internals/Sort.cs.meta ================================================ fileFormatVersion: 2 guid: c8b61e3455704b8780c63fbcd0724afd timeCreated: 1519879160 ================================================ FILE: Assets/SVGMeshUnity/Runtime/Internals/WorkBuffer.cs ================================================ using System; using System.Linq; using UnityEngine; namespace SVGMeshUnity.Internals { public class WorkBuffer { public WorkBuffer(int size = 32) { GrowSize = size; PrivateData = new T[size]; } public T[] Data { get { return PrivateData; } } public int UsedSize { get { return PrivateUsedSize; } } public Func NewForClass; private int GrowSize; private T[] PrivateData; private int PrivateUsedSize; private void Grow(int size) { var newPrivateData = new T[size]; PrivateData.CopyTo(newPrivateData, 0); PrivateData = newPrivateData; } private void GrowIfNeeded() { if (PrivateData.Length == PrivateUsedSize) { Grow(PrivateData.Length + GrowSize); } } public void Extend(int size) { if (PrivateData.Length < size) { Grow(size); } } public void Fill(ref T val, int n) { if (PrivateData.Length < n) { Grow(n); } for (var i = 0; i < n; ++i) { PrivateData[i] = val; } PrivateUsedSize = n; } public void Push(ref T val) { GrowIfNeeded(); PrivateData[PrivateUsedSize] = val; ++PrivateUsedSize; } public T Push() { GrowIfNeeded(); var val = PrivateData[PrivateUsedSize]; if (val == null) { val = NewForClass(); PrivateData[PrivateUsedSize] = val; } ++PrivateUsedSize; return val; } public T Pop() { var val = PrivateData[PrivateUsedSize - 1]; --PrivateUsedSize; return val; } public T Insert(int index) { if (index == PrivateUsedSize) { return Push(); } GrowIfNeeded(); var val = PrivateData[PrivateUsedSize]; for (var i = PrivateUsedSize - 1; i >= index; --i) { PrivateData[i + 1] = PrivateData[i]; } if (val == null) { val = NewForClass(); } PrivateData[index] = val; ++PrivateUsedSize; return val; } public void RemoveAt(int index) { var old = PrivateData[index]; for (var i = index; i < PrivateUsedSize - 1; ++i) { PrivateData[i] = PrivateData[i + 1]; } PrivateData[PrivateUsedSize - 1] = old; --PrivateUsedSize; } public static void Sort(WorkBuffer buf) where G : IComparable { Internals.Sort.QuickSort(buf.PrivateData, 0, buf.PrivateUsedSize - 1); } public void RemoveLast(int n) { PrivateUsedSize -= n; } public void Clear() { PrivateUsedSize = 0; } public void Dump() { Debug.Log(PrivateData.Take(PrivateUsedSize).Aggregate("", (_, s) => _ + s.ToString() + "\n")); } public void DumpHash() { Debug.LogFormat("{0}{1}", PrivateUsedSize, PrivateData.Select(_ => string.Format("{0:x}",_ != null ? _.GetHashCode() : 0)).Aggregate("", (_, s) => _ + ", " + s)); } } } ================================================ FILE: Assets/SVGMeshUnity/Runtime/Internals/WorkBuffer.cs.meta ================================================ fileFormatVersion: 2 guid: c9f5042ad1d1418ebe4901c4d1a76acf timeCreated: 1519696456 ================================================ FILE: Assets/SVGMeshUnity/Runtime/Internals/WorkBufferPool.cs ================================================ using System; using System.Collections.Generic; namespace SVGMeshUnity.Internals { public class WorkBufferPool { private readonly Dictionary> Pool = new Dictionary>(); public WorkBuffer Get() { Stack list; WorkBuffer buf = null; if (Pool.TryGetValue(typeof(T), out list)) { if (list.Count > 0) { buf = (WorkBuffer)list.Pop(); } } return buf ?? new WorkBuffer(); } public void Get(ref WorkBuffer buf) { buf = Get(); } public void Release(ref WorkBuffer buf) { Stack list; buf.Clear(); if (!Pool.TryGetValue(typeof(T), out list)) { Pool[typeof(T)] = list = new Stack(); } list.Push(buf); buf = null; } } } ================================================ FILE: Assets/SVGMeshUnity/Runtime/Internals/WorkBufferPool.cs.meta ================================================ fileFormatVersion: 2 guid: 4e9185cc3eef4289807b77668196dd7f timeCreated: 1519698762 ================================================ FILE: Assets/SVGMeshUnity/Runtime/Internals.meta ================================================ fileFormatVersion: 2 guid: 5591c3a24384418190c7d9686b4f915b timeCreated: 1519625297 ================================================ FILE: Assets/SVGMeshUnity/Runtime/SVGData.cs ================================================ using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Text.RegularExpressions; using SVGMeshUnity.Internals; using UnityEngine; namespace SVGMeshUnity { public class SVGData { // https://github.com/jkroso/abs-svg-path // https://github.com/jkroso/normalize-svg-path // https://github.com/colinmeinke/svg-arc-to-cubic-bezier // https://github.com/jkroso/parse-svg-path internal List Curves = new List(); private Vector2 Start; private Vector2 Current; private Nullable Bezier; private Nullable Quad; public void Clear() { Curves.Clear(); Start = Vector2.zero; Current = Vector2.zero; Bezier = null; Quad = null; } public void Move(float x, float y) { Move(new Vector2(x, y)); } public void MoveRelative(float x, float y) { Move(Current.x + x, Current.y + y); } public void Move(Vector2 v) { Curves.Add(new Curve() { IsMove = true, Position = v, }); Current = v; Bezier = null; Quad = null; } public void MoveRelative(Vector2 v) { Move(Current + v); } public void Curve(float inX, float inY, float outX, float outY, float x, float y) { Curve(new Vector2(inX, inY), new Vector2(outX, outY), new Vector2(x, y)); } public void Curve(Vector2 inControl, Vector2 outControl, Vector2 v) { CurveInternal(inControl, outControl, v); Bezier = outControl; } private void CurveInternal(Vector2 inControl, Vector2 outControl, Vector2 v) { Curves.Add(new Curve() { Position = v, InControl = inControl, OutControl = outControl, }); Current = v; Bezier = null; Quad = null; } public void CurveRelative(float inX, float inY, float outX, float outY, float x, float y) { CurveRelative(new Vector2(inX, inY), new Vector2(outX, outY), new Vector2(x, y)); } public void CurveRelative(Vector2 inControl, Vector2 outControl, Vector2 v) { Curve(Current + inControl, Current + outControl, Current + v); } public void CurveSmooth(float controlX, float controlY, float x, float y) { CurveSmooth(new Vector2(controlX, controlY), new Vector2(x, y)); } public void CurveSmooth(Vector2 control, Vector2 v) { Curve(Bezier != null ? Current * 2f - Bezier.Value : Current, control, v); } public void CurveSmoothRelative(float controlX, float controlY, float x, float y) { CurveSmoothRelative(new Vector2(controlX, controlY), new Vector2(x, y)); } public void CurveSmoothRelative(Vector2 control, Vector2 v) { CurveSmooth(Current + control, Current + v); } public void Quadratic(float controlX, float controlY, float x, float y) { Quadratic(new Vector2(controlX, controlY), new Vector2(x, y)); } public void Quadratic(Vector2 control, Vector2 v) { CurveInternal(Current / 3f + (2f / 3f) * control, v / 3f + (2f / 3f) * control, v); Quad = control; } public void QuadraticRelative(float controlX, float controlY, float x, float y) { QuadraticRelative(new Vector2(controlX, controlY), new Vector2(x, y)); } public void QuadraticRelative(Vector2 control, Vector2 v) { Quadratic(Current + control, Current + v); } public void QuadraticSmooth(float x, float y) { QuadraticSmooth(new Vector2(x, y)); } public void QuadraticSmooth(Vector2 v) { Quadratic(Quad != null ? Current * 2f - Quad.Value : Current, v); } public void QuadraticSmoothRelative(float x, float y) { QuadraticSmooth(Current.x + x, Current.y + y); } public void QuadraticSmoothRelative(Vector2 v) { QuadraticSmooth(Current + v); } public void Arc(float radiusX, float radiusY, float xAxisRotation, bool largeArcFlag, bool sweepFlag, float x, float y) { Arc(new Vector2(radiusX, radiusY), xAxisRotation, largeArcFlag, sweepFlag, new Vector2(x, y)); } public void ArcRelative(float radiusX, float radiusY, float xAxisRotation, bool largeArcFlag, bool sweepFlag, float x, float y) { ArcRelative(new Vector2(radiusX, radiusY), xAxisRotation, largeArcFlag, sweepFlag, new Vector2(x, y)); } public void ArcRelative(Vector2 radius, float xAxisRotation, bool largeArcFlag, bool sweepFlag, Vector2 v) { Arc(radius, xAxisRotation, largeArcFlag, sweepFlag, Current + v); } public void Line(float x, float y) { Line(new Vector2(x, y)); } public void Line(Vector2 v) { CurveInternal(Current, v, v); } public void LineRelative(float x, float y) { Line(Current.x + x, Current.y + y); } public void LineRelative(Vector2 v) { Line(Current + v); } public void LineHorizontal(float x) { Line(x, Current.y); } public void LineHorizontalRelative(float x) { LineHorizontal(Current.x + x); } public void LineVertical(float y) { Line(Current.x, y); } public void LineVerticalRelative(float y) { LineVertical(Current.y + y); } public void Close() { Line(Start); } #region Arc public void Arc(Vector2 radius, float xAxisRotation, bool largeArcFlag, bool sweepFlag, Vector2 v) { if (radius.x == 0f || radius.y == 0f) { return; } const float TAU = Mathf.PI * 2f; var sinphi = Mathf.Sin(xAxisRotation * TAU / 360f); var cosphi = Mathf.Cos(xAxisRotation * TAU / 360f); var pxp = cosphi * (Current.x - v.x) / 2f + sinphi * (Current.y - v.y) / 2f; var pyp = -sinphi * (Current.x - v.x) / 2f + cosphi * (Current.y - v.y) / 2f; if (pxp == 0f && pyp == 0f) { return; } var rx = Mathf.Abs(radius.x); var ry = Mathf.Abs(radius.y); var lambda = Mathf.Pow(pxp, 2f) / Mathf.Pow(rx, 2f) + Mathf.Pow(pyp, 2f) / Mathf.Pow(ry, 2); if (lambda > 1f) { rx *= Mathf.Sqrt(lambda); ry *= Mathf.Sqrt(lambda); } var rxsq = Mathf.Pow(rx, 2f); var rysq = Mathf.Pow(ry, 2f); var pxpsq = Mathf.Pow(pxp, 2f); var pypsq = Mathf.Pow(pyp, 2f); var radicant = (rxsq * rysq) - (rxsq * pypsq) - (rysq * pxpsq); if (radicant < 0f) { radicant = 0f; } radicant /= (rxsq * pypsq) + (rysq * pxpsq); radicant = Mathf.Sqrt(radicant) * (largeArcFlag == sweepFlag ? -1f : 1f); var centerxp = radicant * rx / ry * pyp; var centeryp = radicant * -ry / rx * pxp; var centerx = cosphi * centerxp - sinphi * centeryp + (Current.x + v.x) / 2f; var centery = sinphi * centerxp + cosphi * centeryp + (Current.y + v.y) / 2f; var vx1 = (pxp - centerxp) / rx; var vy1 = (pyp - centeryp) / ry; var vx2 = (-pxp - centerxp) / rx; var vy2 = (-pyp - centeryp) / ry; var ang1 = VectorAngle(1, 0f, vx1, vy1); var ang2 = VectorAngle(vx1, vy1, vx2, vy2); if (sweepFlag == false && ang2 > 0f) { ang2 -= TAU; } if (sweepFlag == true && ang2 < 0f) { ang2 += TAU; } var segments = Mathf.Max(Mathf.Ceil(Mathf.Abs(ang2) / (TAU / 4f)), 1f); ang2 /= segments; for (var i = 0; i < segments; ++i) { var a = 4f / 3f * Mathf.Tan(ang2 / 4f); var x1 = Mathf.Cos(ang1); var y1 = Mathf.Sin(ang1); var x2 = Mathf.Cos(ang1 + ang2); var y2 = Mathf.Sin(ang1 + ang2); var curve0 = new Vector2(x1 - y1 * a, y1 + x1 * a); var curve1 = new Vector2(x2 + y2 * a, y2 - x2 * a); var curve2 = new Vector2(x2, y2); MapToEllipse(ref curve0, rx, ry, cosphi, sinphi, centerx, centery); MapToEllipse(ref curve1, rx, ry, cosphi, sinphi, centerx, centery); MapToEllipse(ref curve2, rx, ry, cosphi, sinphi, centerx, centery); CurveInternal(curve0, curve1, curve2); ang1 += ang2; } } private float VectorAngle(float ux, float uy, float vx, float vy) { var sign = Mathf.Sign(ux * vy - uy * vx); var umag = Mathf.Sqrt(ux * ux + uy * uy); var vmag = Mathf.Sqrt(ux * ux + uy * uy); var dot = ux * vx + uy * vy; var div = dot / (umag * vmag); if (div > 1f) { div = 1f; } if (div < -1f) { div = -1f; } return sign * Mathf.Acos(div); } private void MapToEllipse(ref Vector2 v, float rx, float ry, float cosphi, float sinphi, float centerx, float centery) { var x = v.x * rx; var y = v.y * ry; v.x = cosphi * x - sinphi * y + centerx; v.y = sinphi * x + cosphi * y + centery; } #endregion #region Path Parser private static readonly Regex Segment = new Regex("([astvzqmhlc])([^astvzqmhlc]*)", RegexOptions.IgnoreCase | RegexOptions.Multiline); private static readonly Dictionary ArgumentLengthes = new Dictionary() { { "a", 7 }, { "c", 6 }, { "h", 1 }, { "l", 2 }, { "m", 2 }, { "q", 4 }, { "s", 4 }, { "t", 2 }, { "v", 1 }, { "z", 0 } }; public void Path(string data) { var args = new float[32]; var numArgs = 0; foreach (Match seg in Segment.Matches(data)) { var command = seg.Groups[1].Value; var type = command.ToLower(); ParseArgs(seg.Groups[2].Value, ref args, out numArgs); var argsIndex = 0; if (type == "m" && numArgs > 2) { LoadCommand(command, type, args, numArgs, ref argsIndex); type = "l"; command = command == "m" ? "l" : "L"; } for (;;) { if (LoadCommand(command, type, args, numArgs, ref argsIndex)) { break; } } } } private bool LoadCommand(string command, string type, float[] args, int numArgs, ref int argsIndex) { if (argsIndex == numArgs) { return true; } var len = ArgumentLengthes[type]; if (argsIndex + len > numArgs) { throw new ArgumentException("Malformed path data"); } var i = argsIndex; switch (command) { case "A": Arc(args[i + 0], args[i + 1], args[i + 2], args[i + 3] > 0f, args[i + 4] > 0f, args[i + 5], args[i + 6]); break; case "a": ArcRelative(args[i + 0], args[i + 1], args[i + 2], args[i + 3] > 0f, args[i + 4] > 0f, args[i + 5], args[i + 6]); break; case "C": Curve(args[i + 0], args[i + 1], args[i + 2], args[i + 3], args[i + 4], args[i + 5]); break; case "c": CurveRelative(args[i + 0], args[i + 1], args[i + 2], args[i + 3], args[i + 4], args[i + 5]); break; case "H": LineHorizontal(args[i + 0]); break; case "h": LineHorizontalRelative(args[i + 0]); break; case "L": Line(args[i + 0], args[i + 1]); break; case "l": LineRelative(args[i + 0], args[i + 1]); break; case "M": Move(args[i + 0], args[i + 1]); break; case "m": MoveRelative(args[i + 0], args[i + 1]); break; case "Q": Quadratic(args[i + 0], args[i + 1], args[i + 2], args[i + 3]); break; case "q": QuadraticRelative(args[i + 0], args[i + 1], args[i + 2], args[i + 3]); break; case "S": CurveSmooth(args[i + 0], args[i + 1], args[i + 2], args[i + 3]); break; case "s": CurveSmoothRelative(args[i + 0], args[i + 1], args[i + 2], args[i + 3]); break; case "T": QuadraticSmooth(args[i + 0], args[i + 1]); break; case "t": QuadraticSmoothRelative(args[i + 0], args[i + 1]); break; case "V": LineVertical(args[i + 0]); break; case "v": LineVerticalRelative(args[i + 0]); break; case "Z": case "z": Close(); break; } argsIndex += len; return false; } private void ParseArgs(string s, ref float[] args, out int numArgs) { numArgs = 0; var l = s.Length; var buf = new StringBuilder(16); var lastIsE = false; var includesDot = false; for (var i = 0; i < l; ++i) { var isBreak = false; var c = s[i]; switch (c) { case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': buf.Append(c); lastIsE = false; break; case '.': if (includesDot) { isBreak = true; --i; } else { buf.Append(c); includesDot = true; lastIsE = false; } break; case 'e': buf.Append(c); lastIsE = true; break; case '+': case '-': if (buf.Length > 0 && !lastIsE) { isBreak = true; --i; } else { buf.Append(c); lastIsE = false; } break; default: isBreak = true; break; } if (isBreak || i == l - 1) { if (buf.Length > 0) { if (args.Length == numArgs) { var newArgs = new float[args.Length + 32]; args.CopyTo(newArgs, 0); args = newArgs; } args[numArgs] = float.Parse(buf.ToString()); numArgs++; buf.Length = 0; lastIsE = false; includesDot = false; } } } } #endregion #region Debug public string Dump() { return Curves .Select(_ => { if (_.IsMove) { return string.Format("M {0} {1}", _.Position.x, _.Position.y); } else { return string.Format("C {0} {1}, {2} {3}, {4} {5}", _.InControl.x, _.InControl.y, _.OutControl.x, _.OutControl.y, _.Position.x, _.Position.y); } }) .Aggregate("", (_, s) => _ + s + " "); } #endregion } } ================================================ FILE: Assets/SVGMeshUnity/Runtime/SVGData.cs.meta ================================================ fileFormatVersion: 2 guid: 7927a8fbe7ef84ebc95a11f2b57680f5 MonoImporter: externalObjects: {} serializedVersion: 2 defaultReferences: [] executionOrder: 0 icon: {instanceID: 0} userData: assetBundleName: assetBundleVariant: ================================================ FILE: Assets/SVGMeshUnity/Runtime/SVGMesh.cs ================================================ using SVGMeshUnity.Internals; using SVGMeshUnity.Internals.Cdt2d; using UnityEngine; namespace SVGMeshUnity { public class SVGMesh : MonoBehaviour { // https://github.com/mattdesl/adaptive-bezier-curve public float Scale = 1f; public bool Delaunay = false; public bool Interior = true; public bool Exterior = false; public bool Infinity = false; private static WorkBufferPool WorkBufferPool = new WorkBufferPool(); private MeshData MeshData = new MeshData(); private Mesh Mesh; private BezierToVertex BezierToVertex; private Triangulation Triangulation; private void Awake() { BezierToVertex = new BezierToVertex(); BezierToVertex.WorkBufferPool = WorkBufferPool; Triangulation = new Triangulation(); Triangulation.WorkBufferPool = WorkBufferPool; } public void Fill(SVGData svg) { MeshData.Clear(); // convert curves into discrete points BezierToVertex.Scale = Scale; BezierToVertex.GetContours(svg, MeshData); // triangulate mesh Triangulation.Delaunay = Delaunay; Triangulation.Interior = Interior; Triangulation.Exterior = Exterior; Triangulation.Infinity = Infinity; Triangulation.BuildTriangles(MeshData); if (Mesh == null) { Mesh = new Mesh(); Mesh.MarkDynamic(); } MeshData.MakeUnityFriendly(); MeshData.Upload(Mesh); var filter = GetComponent(); if (filter != null) { filter.sharedMesh = Mesh; } } } } ================================================ FILE: Assets/SVGMeshUnity/Runtime/SVGMesh.cs.meta ================================================ fileFormatVersion: 2 guid: 3646afd5fb564c6b914c04b46d4417c8 timeCreated: 1519635751 ================================================ FILE: Assets/SVGMeshUnity/Runtime/SVGMeshUnity.Runtime.asmdef ================================================ { "name": "SVGMeshUnity" } ================================================ FILE: Assets/SVGMeshUnity/Runtime/SVGMeshUnity.Runtime.asmdef.meta ================================================ fileFormatVersion: 2 guid: 13ced72b5c60b45cda3a649cd6d40f5b AssemblyDefinitionImporter: externalObjects: {} userData: assetBundleName: assetBundleVariant: ================================================ FILE: Assets/SVGMeshUnity/Runtime.meta ================================================ fileFormatVersion: 2 guid: 94fbdbadf09ef49a29dd40de42e1631f folderAsset: yes DefaultImporter: externalObjects: {} userData: assetBundleName: assetBundleVariant: ================================================ FILE: Assets/SVGMeshUnity-Testing/Editor/Fixtures.cs ================================================ using System.Collections.Generic; using SVGMeshUnity.Internals; using UnityEngine; namespace SVGMeshUnity { public static class Fixtures { public static readonly string TwitterBirdPathSource = @"M10,0.4c-5.302,0-9.6,4.298-9.6,9.6s4.298,9.6,9.6,9.6s9.6-4.298,9.6-9.6S15.302,0.4,10,0.4z M13.905,8.264 c0.004,0.082,0.005,0.164,0.005,0.244c0,2.5-1.901,5.381-5.379,5.381c-1.068,0-2.062-0.312-2.898-0.85 c0.147,0.018,0.298,0.025,0.451,0.025c0.886,0,1.701-0.301,2.348-0.809c-0.827-0.016-1.525-0.562-1.766-1.312 c0.115,0.021,0.233,0.033,0.355,0.033c0.172,0,0.34-0.023,0.498-0.066c-0.865-0.174-1.517-0.938-1.517-1.854V9.033 C6.257,9.174,6.549,9.26,6.859,9.27C6.351,8.93,6.018,8.352,6.018,7.695c0-0.346,0.093-0.672,0.256-0.951 c0.933,1.144,2.325,1.896,3.897,1.977c-0.033-0.139-0.049-0.283-0.049-0.432c0-1.043,0.846-1.891,1.891-1.891 c0.543,0,1.035,0.23,1.38,0.598c0.431-0.086,0.835-0.242,1.2-0.459c-0.141,0.441-0.44,0.812-0.831,1.047 c0.383-0.047,0.747-0.148,1.086-0.299C14.595,7.664,14.274,7.998,13.905,8.264z"; public static readonly string TwitterBirdPathCurve = @"M 10 0.4 C 4.698 0.4, 0.3999996 4.698, 0.3999996 10 C 0.3999996 15.302, 4.697999 19.6, 10 19.6 C 15.302 19.6, 19.6 15.302, 19.6 10 C 19.6 4.698, 15.302 0.4, 10 0.4 M 13.905 8.264 C 13.909 8.346, 13.91 8.427999, 13.91 8.508 C 13.91 11.008, 12.009 13.889, 8.531 13.889 C 7.463 13.889, 6.469 13.577, 5.633 13.039 C 5.78 13.057, 5.931 13.064, 6.084001 13.064 C 6.970001 13.064, 7.785001 12.763, 8.432001 12.255 C 7.605001 12.239, 6.907001 11.693, 6.666001 10.943 C 6.781001 10.964, 6.899001 10.976, 7.021001 10.976 C 7.193001 10.976, 7.361001 10.953, 7.519001 10.91 C 6.654001 10.736, 6.002002 9.971999, 6.002002 9.055999 C 6.002002 9.055999, 6.002002 9.033, 6.002002 9.033 C 6.257 9.174, 6.549 9.26, 6.859 9.27 C 6.351 8.93, 6.018 8.352, 6.018 7.695 C 6.018 7.349, 6.111 7.023, 6.274 6.744 C 7.207 7.888, 8.599 8.64, 10.171 8.721001 C 10.138 8.582001, 10.122 8.438001, 10.122 8.289001 C 10.122 7.246, 10.968 6.398001, 12.013 6.398001 C 12.556 6.398001, 13.048 6.628001, 13.393 6.996001 C 13.824 6.910001, 14.228 6.754001, 14.593 6.537001 C 14.452 6.978001, 14.153 7.349, 13.762 7.584001 C 14.145 7.537001, 14.509 7.436001, 14.848 7.285001 C 14.595 7.664, 14.274 7.998, 13.905 8.264 "; public static List TwitterBirdPathCurveVertices = new List() { new Vector2(10f, 0.4f), new Vector2(9.505979430004883f, 0.4124912719726563f), new Vector2(8.537999318725586f, 0.5106119995117188f), new Vector2(7.600788242797852f, 0.7022293090820312f), new Vector2(6.699171398706055f, 0.9825180053710938f), new Vector2(5.837973982934571f, 1.3466528930664063f), new Vector2(5.022021191967774f, 1.789808776855469f), new Vector2(4.256138222290039f, 2.3071604614257812f), new Vector2(3.5451502703857423f, 2.8938827514648438f), new Vector2(2.8938825327392577f, 3.545150451660156f), new Vector2(2.307160205834961f, 4.25613836669922f), new Vector2(1.7898084861572268f, 5.0220213012695325f), new Vector2(1.3466525701904297f, 5.837974060058594f), new Vector2(0.9825176544189453f, 6.699171447753905f), new Vector2(0.7022289353271486f, 7.600788269042969f), new Vector2(0.5106116093994142f, 8.537999328613282f), new Vector2(0.41249087312011723f, 9.505979431152344f), new Vector2(0.3999996f, 10f), new Vector2(0.4124908702819824f, 10.494020568847656f), new Vector2(0.5106115855041504f, 11.462000671386718f), new Vector2(0.7022288735290527f, 12.399211730957031f), new Vector2(0.9825175422668456f, 13.300828552246093f), new Vector2(1.3466523996276856f, 14.162025939941405f), new Vector2(1.7898082535217288f, 14.977978698730467f), new Vector2(2.307159911859131f, 15.743861633300781f), new Vector2(2.893882182550049f, 16.454849548339848f), new Vector2(3.5451498735046383f, 17.106117248535156f), new Vector2(4.256137792633057f, 17.69283953857422f), new Vector2(5.022020747845458f, 18.21019122314453f), new Vector2(5.837973547052002f, 18.653347106933595f), new Vector2(6.699170998162842f, 19.017481994628906f), new Vector2(7.600787909088134f, 19.297770690917968f), new Vector2(8.537999087738037f, 19.489388000488283f), new Vector2(9.505979342022705f, 19.587508728027345f), new Vector2(10f, 19.6f), new Vector2(10.494020568847656f, 19.587508728027345f), new Vector2(11.462000671386718f, 19.489388000488283f), new Vector2(12.399211730957031f, 19.297770690917968f), new Vector2(13.300828552246093f, 19.017481994628906f), new Vector2(14.162025939941405f, 18.653347106933595f), new Vector2(14.977978698730467f, 18.21019122314453f), new Vector2(15.743861633300781f, 17.69283953857422f), new Vector2(16.454849548339848f, 17.106117248535156f), new Vector2(17.106117248535156f, 16.454849548339848f), new Vector2(17.69283953857422f, 15.743861633300781f), new Vector2(18.21019122314453f, 14.977978698730467f), new Vector2(18.653347106933595f, 14.162025939941405f), new Vector2(19.017481994628906f, 13.300828552246093f), new Vector2(19.297770690917968f, 12.399211730957031f), new Vector2(19.489388000488283f, 11.462000671386718f), new Vector2(19.587508728027345f, 10.494020568847656f), new Vector2(19.6f, 10f), new Vector2(19.587508728027345f, 9.505979431152344f), new Vector2(19.489388000488283f, 8.537999328613282f), new Vector2(19.297770690917968f, 7.600788269042969f), new Vector2(19.017481994628906f, 6.699171447753905f), new Vector2(18.653347106933595f, 5.837974060058594f), new Vector2(18.21019122314453f, 5.0220213012695325f), new Vector2(17.69283953857422f, 4.25613836669922f), new Vector2(17.106117248535156f, 3.545150451660156f), new Vector2(16.454849548339848f, 2.8938827514648438f), new Vector2(15.743861633300781f, 2.3071604614257812f), new Vector2(14.977978698730467f, 1.789808776855469f), new Vector2(14.162025939941405f, 1.3466528930664063f), new Vector2(13.300828552246093f, 0.9825180053710938f), new Vector2(12.399211730957031f, 0.7022293090820312f), new Vector2(11.462000671386718f, 0.5106119995117188f), new Vector2(10.494020568847656f, 0.4124912719726563f), new Vector2(13.905f, 8.264f), new Vector2(13.90746875f, 8.325468609375001f), new Vector2(13.90978125f, 8.447655828125f), new Vector2(13.91f, 8.508f), new Vector2(13.8878017578125f, 8.980418457031249f), new Vector2(13.711639648437501f, 9.932931152343748f), new Vector2(13.3629541015625f, 10.863822753906248f), new Vector2(12.8455419921875f, 11.734866699218749f), new Vector2(12.163200195312502f, 12.50783642578125f), new Vector2(11.319725585937501f, 13.14450537109375f), new Vector2(10.3189150390625f, 13.60664697265625f), new Vector2(9.1645654296875f, 13.85603466796875f), new Vector2(8.531f, 13.889f), new Vector2(8.1341328125f, 13.87454296875f), new Vector2(7.3651484375f, 13.76191015625f), new Vector2(6.6357265624999995f, 13.54437109375f), new Vector2(5.9537421875000005f, 13.22998828125f), new Vector2(5.633f, 13.039f), new Vector2(5.7439687656250005f, 13.0505f), new Vector2(5.969656671875f, 13.062625f), new Vector2(6.084001f, 13.064f), new Vector2(6.412733421875f, 13.050074218750002f), new Vector2(7.0456826406249995f, 12.941972656249998f), new Vector2(7.638366234375001f, 12.73421484375f), new Vector2(8.181690453125f, 12.43561328125f), new Vector2(8.432001f, 12.255f), new Vector2(8.1285635f, 12.224792968750002f), new Vector2(7.5733447499999995f, 12.03059765625f), new Vector2(7.112626f, 11.68349609375f), new Vector2(6.777157249999999f, 11.214050781249998f), new Vector2(6.666001f, 10.943f), new Vector2(6.752829125f, 10.957015625f), new Vector2(6.930235375f, 10.973796875000001f), new Vector2(7.021001f, 10.976f), new Vector2(7.149157250000001f, 10.971734375f), new Vector2(7.398719750000001f, 10.938453125f), new Vector2(7.519001f, 10.91f), new Vector2(7.205467839843751f, 10.817949175781251f), new Vector2(6.65888608203125f, 10.48844108984375f), new Vector2(6.25391379296875f, 9.999276660156248f), new Vector2(6.03170703515625f, 9.39151857421875f), new Vector2(6.002002f, 9.055999f), new Vector2(6.002002f, 9.05240540625f), new Vector2(6.002002f, 9.03659359375f), new Vector2(6.002002f, 9.033f), new Vector2(6.19989146875f, 9.128109375000001f), new Vector2(6.63017190625f, 9.248578125f), new Vector2(6.859f, 9.27f), new Vector2(6.67701171875f, 9.131654296874999f), new Vector2(6.36966015625f, 8.795478515625f), new Vector2(6.15015234375f, 8.392412109375f), new Vector2(6.03330078125f, 7.937361328125f), new Vector2(6.018f, 7.695f), new Vector2(6.035078125f, 7.439671875f), new Vector2(6.165234375f, 6.961640624999999f), new Vector2(6.274f, 6.744f), new Vector2(6.644845703125f, 7.154080080078124f), new Vector2(7.502552734375f, 7.850912162109375f), new Vector2(8.493150390624999f, 8.361510009765626f), new Vector2(9.590482421874999f, 8.659717466796875f), new Vector2(10.171f, 8.721001f), new Vector2(10.149421874999998f, 8.6158135f), new Vector2(10.125015625f, 8.3998135f), new Vector2(10.122f, 8.289001f), new Vector2(10.131756103515624f, 8.095882915283205f), new Vector2(10.206961669921876f, 7.727183978271485f), new Vector2(10.444787109375f, 7.232326732421876f), new Vector2(10.955447265624999f, 6.721315189453125f), new Vector2(11.450440673828126f, 6.483133970947266f), new Vector2(11.819552490234376f, 6.407779065185546f), new Vector2(12.013f, 6.398001f), new Vector2(12.214046875f, 6.4086025625f), new Vector2(12.597296875000001f, 6.4901806875f), new Vector2(12.947921875f, 6.645071312500001f), new Vector2(13.256921875000002f, 6.864649437500001f), new Vector2(13.393f, 6.996001f), new Vector2(13.711f, 6.9185166250000005f), new Vector2(14.312124999999998f, 6.688172874999999f), new Vector2(14.593f, 6.537001f), new Vector2(14.45865625f, 6.8535946093749995f), new Vector2(14.03696875f, 7.383281828125f), new Vector2(13.762f, 7.584001f), new Vector2(14.04559375f, 7.538688500000001f), new Vector2(14.589156249999998f, 7.3888135f), new Vector2(14.848f, 7.285001f), new Vector2(14.6458125f, 7.560453546874999f), new Vector2(14.172437500000001f, 8.052109390625f) }; public static List TwitterBirdPathCurveEdges = new List() { new Int2(0, 1), new Int2(1, 2), new Int2(2, 3), new Int2(3, 4), new Int2(4, 5), new Int2(5, 6), new Int2(6, 7), new Int2(7, 8), new Int2(8, 9), new Int2(9, 10), new Int2(10, 11), new Int2(11, 12), new Int2(12, 13), new Int2(13, 14), new Int2(14, 15), new Int2(15, 16), new Int2(16, 17), new Int2(17, 18), new Int2(18, 19), new Int2(19, 20), new Int2(20, 21), new Int2(21, 22), new Int2(22, 23), new Int2(23, 24), new Int2(24, 25), new Int2(25, 26), new Int2(26, 27), new Int2(27, 28), new Int2(28, 29), new Int2(29, 30), new Int2(30, 31), new Int2(31, 32), new Int2(32, 33), new Int2(33, 34), new Int2(34, 35), new Int2(35, 36), new Int2(36, 37), new Int2(37, 38), new Int2(38, 39), new Int2(39, 40), new Int2(40, 41), new Int2(41, 42), new Int2(42, 43), new Int2(43, 44), new Int2(44, 45), new Int2(45, 46), new Int2(46, 47), new Int2(47, 48), new Int2(48, 49), new Int2(49, 50), new Int2(50, 51), new Int2(51, 52), new Int2(52, 53), new Int2(53, 54), new Int2(54, 55), new Int2(55, 56), new Int2(56, 57), new Int2(57, 58), new Int2(58, 59), new Int2(59, 60), new Int2(60, 61), new Int2(61, 62), new Int2(62, 63), new Int2(63, 64), new Int2(64, 65), new Int2(65, 66), new Int2(66, 67), new Int2(67, 0), new Int2(68, 69), new Int2(69, 70), new Int2(70, 71), new Int2(71, 72), new Int2(72, 73), new Int2(73, 74), new Int2(74, 75), new Int2(75, 76), new Int2(76, 77), new Int2(77, 78), new Int2(78, 79), new Int2(79, 80), new Int2(80, 81), new Int2(81, 82), new Int2(82, 83), new Int2(83, 84), new Int2(84, 85), new Int2(85, 86), new Int2(86, 87), new Int2(87, 88), new Int2(88, 89), new Int2(89, 90), new Int2(90, 91), new Int2(91, 92), new Int2(92, 93), new Int2(93, 94), new Int2(94, 95), new Int2(95, 96), new Int2(96, 97), new Int2(97, 98), new Int2(98, 99), new Int2(99, 100), new Int2(100, 101), new Int2(101, 102), new Int2(102, 103), new Int2(103, 104), new Int2(104, 105), new Int2(105, 106), new Int2(106, 107), new Int2(107, 108), new Int2(108, 109), new Int2(109, 110), new Int2(110, 111), new Int2(111, 112), new Int2(112, 113), new Int2(113, 114), new Int2(114, 115), new Int2(115, 116), new Int2(116, 117), new Int2(117, 118), new Int2(118, 119), new Int2(119, 120), new Int2(120, 121), new Int2(121, 122), new Int2(122, 123), new Int2(123, 124), new Int2(124, 125), new Int2(125, 126), new Int2(126, 127), new Int2(127, 128), new Int2(128, 129), new Int2(129, 130), new Int2(130, 131), new Int2(131, 132), new Int2(132, 133), new Int2(133, 134), new Int2(134, 135), new Int2(135, 136), new Int2(136, 137), new Int2(137, 138), new Int2(138, 139), new Int2(139, 140), new Int2(140, 141), new Int2(141, 142), new Int2(142, 143), new Int2(143, 144), new Int2(144, 145), new Int2(145, 146), new Int2(146, 147), new Int2(147, 148), new Int2(148, 149), new Int2(149, 150), new Int2(150, 151), new Int2(151, 152), new Int2(152, 153), new Int2(153, 154), new Int2(154, 68) }; } } ================================================ FILE: Assets/SVGMeshUnity-Testing/Editor/Fixtures.cs.meta ================================================ fileFormatVersion: 2 guid: 7e28830823784187ba366b3ca0e03d1a timeCreated: 1519739019 ================================================ FILE: Assets/SVGMeshUnity-Testing/Editor/Internals/BezierToVertexTests.cs ================================================ using NUnit.Framework; using UnityEngine.TestTools.Utils; namespace SVGMeshUnity.Internals { public class BezierToVertexTests { private BezierToVertex BezierToVertex; [SetUp] public void SetUp() { BezierToVertex = new BezierToVertex(); BezierToVertex.WorkBufferPool = new WorkBufferPool(); } [Test] public void GetContours() { var svg = new SVGData(); svg.Path(Fixtures.TwitterBirdPathCurve); var mesh = new MeshData(); BezierToVertex.Scale = 10f; BezierToVertex.GetContours(svg, mesh); Assert.That(mesh.Vertices, Is.EqualTo(Fixtures.TwitterBirdPathCurveVertices).Using(Vector3EqualityComparer.Instance)); Assert.That(mesh.Edges, Is.EqualTo(Fixtures.TwitterBirdPathCurveEdges)); } } } ================================================ FILE: Assets/SVGMeshUnity-Testing/Editor/Internals/BezierToVertexTests.cs.meta ================================================ fileFormatVersion: 2 guid: 75b27d2ee3774457a9947329de2f0983 timeCreated: 1519739379 ================================================ FILE: Assets/SVGMeshUnity-Testing/Editor/Internals/Cdt2d/DelaunayRefineTests.cs ================================================ using NUnit.Framework; namespace SVGMeshUnity.Internals.Cdt2d { public class DelaunayRefineTests { private DelaunayRefine DelaunayRefine; [SetUp] public void SetUp() { DelaunayRefine = new DelaunayRefine(); DelaunayRefine.WorkBufferPool = new WorkBufferPool(); } [Test] public void RefineTriangles() { var mesh = new MeshData(); mesh.Vertices.AddRange(Fixtures.TwitterBirdVertices); mesh.Edges.AddRange(Fixtures.TwitterBirdEdges); mesh.Triangles.AddRange(Fixtures.TwitterBirdMonotoneTriangles); var triangles = new Triangles(mesh); DelaunayRefine.RefineTriangles(triangles); triangles.Fill(mesh.Triangles); Assert.AreEqual(Fixtures.TwitterBirdDelaunayRefinedTriangles, mesh.Triangles); } } } ================================================ FILE: Assets/SVGMeshUnity-Testing/Editor/Internals/Cdt2d/DelaunayRefineTests.cs.meta ================================================ fileFormatVersion: 2 guid: 2da56f293abe4469afa9ac3a2a6da579 timeCreated: 1519796055 ================================================ FILE: Assets/SVGMeshUnity-Testing/Editor/Internals/Cdt2d/FilterTests.cs ================================================ using NUnit.Framework; namespace SVGMeshUnity.Internals.Cdt2d { public class FilterTests { private MeshData Mesh; private Triangles Triangles; private Filter Filter; [SetUp] public void SetUp() { Mesh = new MeshData(); Mesh.Vertices.AddRange(Fixtures.TwitterBirdVertices); Mesh.Edges.AddRange(Fixtures.TwitterBirdEdges); Mesh.Triangles.AddRange(Fixtures.TwitterBirdMonotoneTriangles); Triangles = new Triangles(Mesh); var delaunay = new DelaunayRefine(); delaunay.WorkBufferPool = new WorkBufferPool(); delaunay.RefineTriangles(Triangles); Filter = new Filter(); Filter.WorkBufferPool = new WorkBufferPool(); } [Test] public void ExteriorFilter() { Filter.Target = -1; Filter.Do(Triangles, Mesh.Triangles); Assert.AreEqual(Fixtures.TwitterBirdExteriorFilteredTriangles, Mesh.Triangles); } [Test] public void InteriorFilter() { Filter.Target = 1; Filter.Do(Triangles, Mesh.Triangles); Assert.AreEqual(Fixtures.TwitterBirdInteriorFilteredTriangles, Mesh.Triangles); } } } ================================================ FILE: Assets/SVGMeshUnity-Testing/Editor/Internals/Cdt2d/FilterTests.cs.meta ================================================ fileFormatVersion: 2 guid: de2f8028a7b44c28b354c0095c2b769d timeCreated: 1519830612 ================================================ FILE: Assets/SVGMeshUnity-Testing/Editor/Internals/Cdt2d/Fixtures.cs ================================================ using System.Collections.Generic; using UnityEngine; namespace SVGMeshUnity.Internals.Cdt2d { public static class Fixtures { public static readonly List TwitterBirdVertices = new List() { new Vector2(17.32109375f, 6.3678125f), new Vector2(17.326406249999998f, 6.6121875f), new Vector2(17.315895843505857f, 7.203846130371094f), new Vector2(17.2274201965332f, 8.152161926269532f), new Vector2(17.05138278198242f, 9.104024108886719f), new Vector2(16.788737213134763f, 10.049890686035155f), new Vector2(16.440437103271485f, 10.980219665527343f), new Vector2(16.007436065673826f, 11.885469055175781f), new Vector2(15.490687713623046f, 12.756096862792969f), new Vector2(14.89114566040039f, 13.582561096191405f), new Vector2(14.209763519287108f, 14.355319763183594f), new Vector2(13.44749490356445f, 15.064830871582032f), new Vector2(12.605293426513672f, 15.701552429199218f), new Vector2(11.684112701416014f, 16.25594244384766f), new Vector2(10.68490634155273f, 16.718458923339842f), new Vector2(9.608627960205077f, 17.07955987548828f), new Vector2(8.456231170654295f, 17.32970330810547f), new Vector2(7.228669586181639f, 17.459347229003903f), new Vector2(5.794472656249999f, 17.44705078125f), new Vector2(4.259199218749998f, 17.22171484375f), new Vector2(2.8029570312499983f, 16.78703515625f), new Vector2(1.440933593749998f, 16.15969921875f), new Vector2(1.022749999999998f, 15.802046875000002f), new Vector2(1.4727499999999978f, 15.828640625000002f), new Vector2(2.3566699218749982f, 15.804072265625f), new Vector2(3.620744140624998f, 15.587576171875002f), new Vector2(4.804052734374999f, 15.172283203125001f), new Vector2(5.888501953124998f, 14.576662109375002f), new Vector2(6.081598388671873f, 14.198935791015625f), new Vector2(5.490656494140623f, 14.092149169921875f), new Vector2(4.935298583984373f, 13.897489501953125f), new Vector2(4.423247314453124f, 13.622562255859375f), new Vector2(3.9622253417968736f, 13.274972900390626f), new Vector2(3.5599553222656235f, 12.862326904296875f), new Vector2(3.224159912109373f, 12.392229736328126f), new Vector2(2.9625617675781237f, 11.872286865234376f), new Vector2(3.035796874999998f, 11.624453125f), new Vector2(3.390890624999998f, 11.657734375f), new Vector2(3.828578124999998f, 11.653625000000002f), new Vector2(4.326734374999999f, 11.587750000000002f), new Vector2(4.248393310546873f, 11.452169921875f), new Vector2(3.646260009765623f, 11.216861328125f), new Vector2(3.0994450683593726f, 10.886537109375f), new Vector2(2.6182023925781226f, 10.471416015625f), new Vector2(2.212785888671873f, 9.981716796875002f), new Vector2(1.8934494628906233f, 9.427658203125002f), new Vector2(1.6704470214843732f, 8.819458984375f), new Vector2(1.5540324707031234f, 8.167337890625003f), new Vector2(1.5389999999999984f, 7.816156250000001f), new Vector2(1.5389999999999984f, 7.792843750000001f), new Vector2(1.9340156249999982f, 7.971484375000001f), new Vector2(2.7926718749999986f, 8.211453125f), new Vector2(2.885970703124998f, 7.978060546875001f), new Vector2(2.2722714843749987f, 7.307259765625001f), new Vector2(1.8334628906249986f, 6.502818359375001f), new Vector2(1.5996386718749982f, 5.5946425781250015f), new Vector2(1.6031562499999983f, 4.601390625000001f), new Vector2(1.8634687499999982f, 3.647796875000002f), new Vector2(2.440603515624999f, 3.632124755859376f), new Vector2(3.2213105468749994f, 4.412032470703126f), new Vector2(4.078470703124999f, 5.108672607421876f), new Vector2(5.005427734374999f, 5.715470947265626f), new Vector2(5.995525390625f, 6.225853271484377f), new Vector2(7.042107421875f, 6.633245361328126f), new Vector2(8.138517578125f, 6.931072998046876f), new Vector2(9.278099609375f, 7.112761962890627f), new Vector2(9.81984375f, 6.948375000000001f), new Vector2(9.77115625f, 6.517875f), new Vector2(9.784477294921874f, 5.91119482421875f), new Vector2(9.934613525390624f, 5.174939941406249f), new Vector2(10.220364990234375f, 4.498462402343749f), new Vector2(10.626579345703124f, 3.8969262695312494f), new Vector2(11.138104248046876f, 3.3854956054687486f), new Vector2(11.739787353515627f, 2.979334472656249f), new Vector2(12.416476318359376f, 2.69360693359375f), new Vector2(13.153018798828125f, 2.5434770507812496f), new Vector2(13.940962890625002f, 2.5450703125f), new Vector2(14.706591796875001f, 2.7073046874999998f), new Vector2(15.406548828125f, 3.0156015624999997f), new Vector2(16.023302734375005f, 3.4530859375f), new Vector2(16.929265625000003f, 3.5609062499999995f), new Vector2(18.130296875000006f, 3.10046875f), new Vector2(18.571658203125f, 3.1225078124999994f), new Vector2(18.248240234375f, 3.7236796875f), new Vector2(17.825212890625f, 4.253414062499999f), new Vector2(17.315419921875f, 4.699335937500001f), new Vector2(17.59771875f, 4.797703125000001f), new Vector2(18.682656249999997f, 4.499859375000001f), new Vector2(18.7959375f, 4.843265625000001f), new Vector2(17.8505625f, 5.823421875f), new Vector2(0.799999999999998f, 15.779f), new Vector2(1.5389999999999984f, 7.7810000000000015f), new Vector2(1.5389999999999984f, 7.828000000000001f), new Vector2(1.5689999999999984f, 5.1110000000000015f), new Vector2(1.699999999999998f, 15.832f), new Vector2(2.0809999999999986f, 3.213000000000002f), new Vector2(2.8619999999999983f, 11.596f), new Vector2(3.2489999999999983f, 8.254000000000001f), new Vector2(3.5719999999999983f, 11.662f), new Vector2(4.566999999999998f, 11.531f), new Vector2(6.387999999999998f, 14.217f), new Vector2(6.586999999999998f, 17.476f), new Vector2(9.765f, 6.297f), new Vector2(9.862f, 7.158f), new Vector2(13.539000000000001f, 2.5239999999999996f), new Vector2(16.295f, 3.715f), new Vector2(17.032f, 4.8870000000000005f), new Vector2(17.316f, 6.246f), new Vector2(17.326999999999998f, 6.734f), new Vector2(18.692f, 2.799f), new Vector2(19.2f, 4.293f) }; public static readonly List TwitterBirdEdges = new List() { new Int2(0, 1), new Int2(0, 107), new Int2(1, 108), new Int2(2, 3), new Int2(2, 108), new Int2(3, 4), new Int2(4, 5), new Int2(5, 6), new Int2(6, 7), new Int2(7, 8), new Int2(8, 9), new Int2(9, 10), new Int2(10, 11), new Int2(11, 12), new Int2(12, 13), new Int2(13, 14), new Int2(14, 15), new Int2(15, 16), new Int2(16, 17), new Int2(17, 101), new Int2(18, 19), new Int2(18, 101), new Int2(19, 20), new Int2(20, 21), new Int2(21, 90), new Int2(22, 23), new Int2(22, 90), new Int2(23, 94), new Int2(24, 25), new Int2(24, 94), new Int2(25, 26), new Int2(26, 27), new Int2(27, 100), new Int2(28, 29), new Int2(28, 100), new Int2(29, 30), new Int2(30, 31), new Int2(31, 32), new Int2(32, 33), new Int2(33, 34), new Int2(34, 35), new Int2(35, 96), new Int2(36, 37), new Int2(36, 96), new Int2(37, 98), new Int2(38, 39), new Int2(38, 98), new Int2(39, 99), new Int2(40, 41), new Int2(40, 99), new Int2(41, 42), new Int2(42, 43), new Int2(43, 44), new Int2(44, 45), new Int2(45, 46), new Int2(46, 47), new Int2(47, 92), new Int2(48, 49), new Int2(48, 92), new Int2(49, 91), new Int2(50, 51), new Int2(50, 91), new Int2(51, 97), new Int2(52, 53), new Int2(52, 97), new Int2(53, 54), new Int2(54, 55), new Int2(55, 93), new Int2(56, 57), new Int2(56, 93), new Int2(57, 95), new Int2(58, 59), new Int2(58, 95), new Int2(59, 60), new Int2(60, 61), new Int2(61, 62), new Int2(62, 63), new Int2(63, 64), new Int2(64, 65), new Int2(65, 103), new Int2(66, 67), new Int2(66, 103), new Int2(67, 102), new Int2(68, 69), new Int2(68, 102), new Int2(69, 70), new Int2(70, 71), new Int2(71, 72), new Int2(72, 73), new Int2(73, 74), new Int2(74, 75), new Int2(75, 104), new Int2(76, 77), new Int2(76, 104), new Int2(77, 78), new Int2(78, 79), new Int2(79, 105), new Int2(80, 81), new Int2(80, 105), new Int2(81, 109), new Int2(82, 83), new Int2(82, 109), new Int2(83, 84), new Int2(84, 85), new Int2(85, 106), new Int2(86, 87), new Int2(86, 106), new Int2(87, 110), new Int2(88, 89), new Int2(88, 110), new Int2(89, 107), new Int2(90, 90), new Int2(91, 91), new Int2(92, 92), new Int2(93, 93), new Int2(94, 94), new Int2(95, 95), new Int2(96, 96), new Int2(97, 97), new Int2(98, 98), new Int2(99, 99), new Int2(100, 100), new Int2(101, 101), new Int2(102, 102), new Int2(103, 103), new Int2(104, 104), new Int2(105, 105), new Int2(106, 106), new Int2(107, 107), new Int2(108, 108), new Int2(109, 109), new Int2(110, 110) }; public static readonly List TwitterBirdMonotoneTriangles = new List() { 90, 22, 21, 22, 90, 23, 21, 22, 23, 23, 90, 91, 23, 91, 49, 23, 49, 48, 23, 48, 92, 92, 48, 47, 48, 49, 47, 49, 91, 47, 23, 92, 47, 91, 90, 93, 91, 93, 55, 93, 90, 56, 55, 93, 56, 47, 91, 46, 23, 47, 46, 23, 46, 94, 21, 23, 94, 55, 56, 54, 91, 55, 54, 54, 56, 57, 46, 91, 45, 94, 46, 45, 91, 54, 50, 45, 91, 50, 54, 57, 95, 45, 50, 44, 94, 45, 44, 54, 95, 53, 50, 54, 53, 94, 44, 24, 21, 94, 24, 53, 95, 58, 44, 50, 43, 24, 44, 43, 50, 53, 51, 43, 50, 51, 21, 24, 20, 24, 43, 96, 53, 58, 52, 51, 53, 52, 24, 96, 35, 96, 43, 36, 35, 96, 36, 43, 51, 42, 36, 43, 42, 58, 95, 59, 52, 58, 59, 35, 36, 34, 24, 35, 34, 52, 59, 97, 51, 52, 97, 42, 51, 97, 36, 42, 37, 34, 36, 37, 34, 37, 33, 24, 34, 33, 37, 42, 98, 33, 37, 98, 24, 33, 25, 20, 24, 25, 97, 59, 41, 42, 97, 41, 98, 42, 41, 98, 41, 38, 33, 98, 38, 33, 38, 32, 25, 33, 32, 59, 95, 60, 41, 59, 60, 41, 60, 40, 38, 41, 40, 20, 25, 19, 38, 40, 39, 32, 38, 39, 32, 39, 31, 25, 32, 31, 40, 60, 99, 39, 40, 99, 31, 39, 99, 25, 31, 26, 19, 25, 26, 99, 60, 30, 31, 99, 30, 26, 31, 30, 60, 95, 61, 30, 60, 61, 30, 61, 29, 26, 30, 29, 19, 26, 18, 26, 29, 27, 18, 26, 27, 61, 95, 62, 29, 61, 62, 29, 62, 28, 27, 29, 28, 28, 62, 100, 27, 28, 100, 18, 27, 100, 100, 62, 101, 18, 100, 101, 62, 95, 63, 101, 62, 63, 101, 63, 17, 63, 95, 64, 17, 63, 64, 17, 64, 16, 64, 95, 65, 16, 64, 65, 16, 65, 15, 65, 95, 102, 65, 102, 67, 102, 95, 68, 67, 102, 68, 67, 68, 66, 65, 67, 66, 66, 68, 103, 65, 66, 103, 15, 65, 103, 68, 95, 69, 103, 68, 69, 15, 103, 69, 69, 95, 70, 15, 69, 70, 70, 95, 71, 15, 70, 71, 15, 71, 14, 71, 95, 72, 14, 71, 72, 14, 72, 13, 72, 95, 73, 13, 72, 73, 73, 95, 74, 13, 73, 74, 13, 74, 12, 74, 95, 75, 12, 74, 75, 12, 75, 11, 11, 75, 104, 11, 104, 76, 11, 76, 10, 10, 76, 77, 10, 77, 9, 9, 77, 78, 9, 78, 8, 8, 78, 7, 7, 78, 79, 7, 79, 105, 7, 105, 6, 6, 105, 5, 105, 79, 80, 79, 78, 80, 78, 77, 80, 5, 105, 80, 5, 80, 106, 5, 106, 4, 4, 106, 3, 106, 80, 85, 3, 106, 2, 2, 106, 107, 2, 107, 0, 2, 0, 1, 2, 1, 108, 106, 85, 86, 107, 106, 86, 85, 80, 84, 86, 85, 84, 107, 86, 89, 108, 1, 89, 1, 0, 89, 0, 107, 89, 2, 108, 89, 3, 2, 89, 4, 3, 89, 80, 77, 81, 77, 76, 81, 84, 80, 81, 84, 81, 83, 86, 84, 83, 83, 81, 82, 83, 82, 87, 86, 83, 87, 89, 86, 87, 81, 76, 109, 82, 81, 109, 87, 82, 109, 89, 87, 88, 4, 89, 88, 5, 4, 88, 6, 5, 88, 87, 109, 110, 88, 87, 110, 6, 88, 110 }; public static readonly List TwitterBirdDelaunayRefinedTriangles = new List() { 0, 107, 89, 0, 1, 103, 0, 89, 1, 0, 103, 107, 1, 108, 103, 1, 89, 108, 2, 103, 108, 2, 3, 103, 2, 108, 89, 2, 88, 3, 2, 89, 88, 3, 4, 103, 3, 88, 4, 4, 88, 110, 4, 5, 103, 4, 110, 5, 5, 110, 6, 5, 6, 103, 6, 7, 103, 7, 8, 103, 8, 9, 103, 9, 10, 103, 10, 11, 103, 11, 12, 103, 12, 13, 100, 12, 100, 103, 13, 14, 100, 14, 15, 100, 15, 16, 100, 16, 17, 100, 17, 27, 100, 17, 101, 27, 18, 19, 26, 18, 26, 27, 18, 27, 101, 19, 20, 25, 19, 25, 26, 20, 21, 24, 20, 24, 25, 21, 90, 22, 21, 22, 23, 21, 23, 94, 21, 94, 24, 22, 34, 23, 22, 90, 34, 23, 34, 94, 24, 32, 25, 24, 33, 32, 24, 94, 33, 25, 31, 26, 25, 32, 31, 26, 31, 30, 26, 30, 29, 26, 29, 27, 27, 29, 28, 27, 28, 100, 28, 29, 99, 28, 99, 100, 29, 30, 99, 30, 31, 99, 31, 32, 99, 32, 33, 39, 32, 39, 99, 33, 34, 38, 33, 38, 39, 33, 94, 34, 34, 35, 37, 34, 98, 38, 34, 37, 98, 34, 90, 35, 35, 36, 37, 35, 96, 36, 35, 90, 96, 36, 41, 37, 36, 42, 41, 36, 96, 42, 37, 41, 98, 38, 98, 41, 38, 41, 40, 38, 40, 39, 39, 40, 99, 40, 41, 97, 40, 97, 99, 41, 42, 97, 42, 43, 97, 42, 96, 43, 43, 44, 97, 43, 96, 44, 44, 45, 51, 44, 51, 97, 44, 90, 45, 44, 96, 90, 45, 46, 51, 45, 90, 46, 46, 90, 47, 46, 50, 51, 46, 47, 50, 47, 92, 50, 47, 90, 92, 48, 50, 92, 48, 90, 49, 48, 49, 50, 48, 92, 90, 49, 90, 91, 49, 91, 50, 50, 52, 51, 50, 91, 53, 50, 53, 52, 51, 52, 97, 52, 53, 60, 52, 60, 61, 52, 61, 97, 53, 91, 54, 53, 54, 60, 54, 91, 55, 54, 55, 60, 55, 91, 93, 55, 93, 59, 55, 59, 60, 56, 93, 90, 56, 57, 58, 56, 58, 59, 56, 59, 93, 57, 95, 58, 58, 71, 59, 58, 95, 71, 59, 71, 60, 60, 70, 61, 60, 71, 70, 61, 70, 62, 61, 62, 97, 62, 69, 63, 62, 70, 69, 62, 63, 97, 63, 69, 64, 63, 99, 97, 63, 64, 99, 64, 69, 68, 64, 68, 102, 64, 102, 65, 64, 65, 99, 65, 66, 103, 65, 103, 100, 65, 67, 66, 65, 102, 67, 65, 100, 99, 66, 67, 103, 67, 102, 106, 67, 106, 103, 68, 71, 102, 68, 69, 70, 68, 70, 71, 71, 95, 72, 71, 72, 106, 71, 106, 102, 72, 95, 73, 72, 73, 75, 72, 75, 104, 72, 104, 106, 73, 95, 74, 73, 74, 75, 74, 95, 75, 76, 109, 77, 76, 106, 104, 76, 77, 106, 77, 109, 78, 77, 78, 106, 78, 109, 81, 78, 81, 80, 78, 79, 106, 78, 80, 79, 79, 105, 106, 79, 80, 105, 80, 83, 84, 80, 81, 83, 80, 85, 106, 80, 84, 85, 80, 106, 105, 81, 109, 82, 81, 82, 83, 82, 109, 110, 82, 110, 83, 83, 87, 84, 83, 110, 87, 84, 86, 85, 84, 87, 86, 85, 86, 106, 86, 88, 89, 86, 87, 88, 86, 89, 106, 87, 110, 88, 89, 107, 106, 90, 93, 91, 103, 106, 107 }; public static readonly List TwitterBirdExteriorFilteredTriangles = new List() { 0, 1, 103, 0, 103, 107, 1, 108, 103, 2, 3, 103, 2, 103, 108, 3, 4, 103, 4, 5, 103, 5, 6, 103, 6, 7, 103, 7, 8, 103, 8, 9, 103, 9, 10, 103, 10, 11, 103, 11, 12, 103, 12, 13, 100, 12, 100, 103, 13, 14, 100, 14, 15, 100, 15, 16, 100, 16, 17, 100, 17, 27, 100, 17, 101, 27, 18, 19, 26, 18, 26, 27, 18, 27, 101, 19, 20, 25, 19, 25, 26, 20, 21, 24, 20, 24, 25, 21, 22, 23, 21, 23, 94, 21, 90, 22, 21, 94, 24, 28, 29, 99, 28, 99, 100, 29, 30, 99, 30, 31, 99, 31, 32, 99, 32, 33, 39, 32, 39, 99, 33, 34, 38, 33, 38, 39, 34, 35, 37, 34, 37, 98, 34, 98, 38, 35, 36, 37, 35, 96, 36, 40, 41, 97, 40, 97, 99, 41, 42, 97, 42, 43, 97, 43, 44, 97, 44, 45, 51, 44, 51, 97, 45, 46, 51, 46, 47, 50, 46, 50, 51, 47, 92, 50, 48, 49, 50, 48, 50, 92, 49, 91, 50, 52, 53, 60, 52, 60, 61, 52, 61, 97, 53, 54, 60, 54, 55, 60, 55, 59, 60, 55, 93, 59, 56, 57, 58, 56, 58, 59, 56, 59, 93, 57, 95, 58, 61, 62, 97, 62, 63, 97, 63, 64, 99, 63, 99, 97, 64, 65, 99, 65, 100, 99, 65, 103, 100, 66, 67, 103, 67, 102, 106, 67, 106, 103, 68, 69, 70, 68, 70, 71, 68, 71, 102, 71, 72, 106, 71, 106, 102, 72, 73, 75, 72, 75, 104, 72, 104, 106, 73, 74, 75, 76, 77, 106, 76, 106, 104, 77, 78, 106, 78, 79, 106, 79, 105, 106, 80, 81, 83, 80, 83, 84, 80, 84, 85, 80, 85, 106, 80, 106, 105, 81, 82, 83, 81, 109, 82, 86, 87, 88, 86, 88, 89, 86, 89, 106, 87, 110, 88, 89, 107, 106, 103, 106, 107 }; public static readonly List TwitterBirdInteriorFilteredTriangles = new List() { 0, 89, 1, 0, 107, 89, 1, 89, 108, 2, 88, 3, 2, 89, 88, 2, 108, 89, 3, 88, 4, 4, 88, 110, 4, 110, 5, 5, 110, 6, 22, 34, 23, 22, 90, 34, 23, 34, 94, 24, 32, 25, 24, 33, 32, 24, 94, 33, 25, 31, 26, 25, 32, 31, 26, 29, 27, 26, 30, 29, 26, 31, 30, 27, 28, 100, 27, 29, 28, 33, 94, 34, 34, 90, 35, 35, 90, 96, 36, 41, 37, 36, 42, 41, 36, 96, 42, 37, 41, 98, 38, 40, 39, 38, 41, 40, 38, 98, 41, 39, 40, 99, 42, 96, 43, 43, 96, 44, 44, 90, 45, 44, 96, 90, 45, 90, 46, 46, 90, 47, 47, 90, 92, 48, 90, 49, 48, 92, 90, 49, 90, 91, 50, 52, 51, 50, 53, 52, 50, 91, 53, 51, 52, 97, 53, 91, 54, 54, 91, 55, 55, 91, 93, 56, 93, 90, 58, 71, 59, 58, 95, 71, 59, 71, 60, 60, 70, 61, 60, 71, 70, 61, 70, 62, 62, 69, 63, 62, 70, 69, 63, 69, 64, 64, 68, 102, 64, 69, 68, 64, 102, 65, 65, 66, 103, 65, 67, 66, 65, 102, 67, 71, 95, 72, 72, 95, 73, 73, 95, 74, 74, 95, 75, 76, 109, 77, 77, 109, 78, 78, 80, 79, 78, 81, 80, 78, 109, 81, 79, 80, 105, 82, 109, 110, 82, 110, 83, 83, 87, 84, 83, 110, 87, 84, 86, 85, 84, 87, 86, 85, 86, 106, 90, 93, 91 }; } } ================================================ FILE: Assets/SVGMeshUnity-Testing/Editor/Internals/Cdt2d/Fixtures.cs.meta ================================================ fileFormatVersion: 2 guid: 8044f46957cd4d29b198131b069c5634 timeCreated: 1519737279 ================================================ FILE: Assets/SVGMeshUnity-Testing/Editor/Internals/Cdt2d/MonotoneTriangulationTests.cs ================================================ using NUnit.Framework; namespace SVGMeshUnity.Internals.Cdt2d { public class MonotoneTriangulationTests { private MonotoneTriangulation MonotoneTriangulation; [SetUp] public void SetUp() { MonotoneTriangulation = new MonotoneTriangulation(); MonotoneTriangulation.WorkBufferPool = new WorkBufferPool(); } [Test] public void BuildTriangles() { var mesh = new MeshData(); mesh.Vertices.AddRange(Fixtures.TwitterBirdVertices); mesh.Edges.AddRange(Fixtures.TwitterBirdEdges); MonotoneTriangulation.BuildTriangles(mesh); Assert.AreEqual(Fixtures.TwitterBirdMonotoneTriangles, mesh.Triangles); } } } ================================================ FILE: Assets/SVGMeshUnity-Testing/Editor/Internals/Cdt2d/MonotoneTriangulationTests.cs.meta ================================================ fileFormatVersion: 2 guid: 11e4b874021e450aba4a60607c20f948 timeCreated: 1519738092 ================================================ FILE: Assets/SVGMeshUnity-Testing/Editor/Internals/Cdt2d/RobustTests.cs ================================================ using NUnit.Framework; using UnityEngine; namespace SVGMeshUnity.Internals.Cdt2d { public class RobustTests { [Test] public void Orientation() { Assert.IsTrue(Robust.Orientation( new Vector2(0.1f, 0.1f), new Vector2(0.1f, 0.1f), new Vector2(0.3f, 0.7f) ) == 0f); Assert.IsTrue(Robust.Orientation( new Vector2(0f, 0f), new Vector2(-1e-32f, 0f), new Vector2(0f, 1f) ) > 0f); Assert.IsTrue(Robust.Orientation( new Vector2(0f, 0f), new Vector2(1e-32f, 1e-32f), new Vector2(1f, 1f) ) == 0f); Assert.IsTrue(Robust.Orientation( new Vector2(0f, 0f), new Vector2(1e-32f, 0f), new Vector2(0f, 1f) ) < 0f); var x = 1e-32f; for (var i = 0; i < 32; ++i) { Assert.IsTrue(Robust.Orientation( new Vector2(-x, 0f), new Vector2(0f, 1f), new Vector2(x, 0f) ) > 0f); Assert.IsTrue(Robust.Orientation( new Vector2(-x, 0f), new Vector2(0f, 0f), new Vector2(x, 0f) ) == 0f); Assert.IsTrue(Robust.Orientation( new Vector2(-x, 0f), new Vector2(0f, -1f), new Vector2(x, 0f) ) < 0f, "x=" + x); Assert.IsTrue(Robust.Orientation( new Vector2(0f, 1f), new Vector2(0f, 0f), new Vector2(x, x) ) < 0f, "x=" + x); x *= 10f; } } [Test] public void InSphere() { Assert.IsTrue(Robust.InSphere( new Vector2(0f, -1f), new Vector2(1f, 0f), new Vector2(0f, 1f), new Vector2(-0.5f, 0f)) > 0f); Assert.IsTrue(Robust.InSphere( new Vector2(0f, -1f), new Vector2(1f, 0f), new Vector2(0f, 1f), new Vector2(-1f, 0f)) == 0f); Assert.IsTrue(Robust.InSphere( new Vector2(0f, -1f), new Vector2(1f, 0f), new Vector2(0f, 1f), new Vector2(-1.5f, 0f)) < 0f); var x = 1e-4f; for(var i = 0; i < 8; ++i) { Assert.IsTrue(Robust.InSphere( new Vector2(0f, x), new Vector2(-x, -x), new Vector2(x, -x), new Vector2(0f, 0f)) > 0f, "sphere test:" + x); Assert.IsTrue(Robust.InSphere( new Vector2(0f, x), new Vector2(-x, -x), new Vector2(x, -x), new Vector2(0f, 2f * x)) < 0f, "sphere test:" + x); Assert.IsTrue(Robust.InSphere( new Vector2(0f, x), new Vector2(-x, -x), new Vector2(x, -x), new Vector2(0f, x)) == 0f, "sphere test:" + x); x *= 10f; } } } } ================================================ FILE: Assets/SVGMeshUnity-Testing/Editor/Internals/Cdt2d/RobustTests.cs.meta ================================================ fileFormatVersion: 2 guid: 2782adb8771494ca4849c1a73706a4fd MonoImporter: externalObjects: {} serializedVersion: 2 defaultReferences: [] executionOrder: 0 icon: {instanceID: 0} userData: assetBundleName: assetBundleVariant: ================================================ FILE: Assets/SVGMeshUnity-Testing/Editor/Internals/Cdt2d.meta ================================================ fileFormatVersion: 2 guid: e0d1a4421b8e242bab1b370176c22ec4 folderAsset: yes DefaultImporter: externalObjects: {} userData: assetBundleName: assetBundleVariant: ================================================ FILE: Assets/SVGMeshUnity-Testing/Editor/Internals.meta ================================================ fileFormatVersion: 2 guid: 27d13dcbf225d42009e8381165b088aa folderAsset: yes DefaultImporter: externalObjects: {} userData: assetBundleName: assetBundleVariant: ================================================ FILE: Assets/SVGMeshUnity-Testing/Editor/SVGDataTests.cs ================================================ using NUnit.Framework; namespace SVGMeshUnity { public class SVGDataTests { [Test] public void ParseSVGPath() { var svg = new SVGData(); svg.Path(Fixtures.TwitterBirdPathSource); Assert.AreEqual(Fixtures.TwitterBirdPathCurve, svg.Dump()); } } } ================================================ FILE: Assets/SVGMeshUnity-Testing/Editor/SVGDataTests.cs.meta ================================================ fileFormatVersion: 2 guid: 9f2c3d69a8f84f93a8845392f7a77586 timeCreated: 1519737613 ================================================ FILE: Assets/SVGMeshUnity-Testing/Editor/SVGMeshUnity-Testing.Editor.asmdef ================================================ { "name": "SVGMeshUnity-Testing", "references": [ "SVGMeshUnity" ], "optionalUnityReferences": [ "TestAssemblies" ], "includePlatforms": [ "Editor" ], "excludePlatforms": [], "allowUnsafeCode": false } ================================================ FILE: Assets/SVGMeshUnity-Testing/Editor/SVGMeshUnity-Testing.Editor.asmdef.meta ================================================ fileFormatVersion: 2 guid: fb0df23c0b3714479b08eb3b7ce0daa9 AssemblyDefinitionImporter: externalObjects: {} userData: assetBundleName: assetBundleVariant: ================================================ FILE: Assets/SVGMeshUnity-Testing/Editor.meta ================================================ fileFormatVersion: 2 guid: 8a1a938f7014540a099c1ca8c160b21c folderAsset: yes DefaultImporter: externalObjects: {} userData: assetBundleName: assetBundleVariant: ================================================ FILE: Assets/SVGMeshUnity-Testing.meta ================================================ fileFormatVersion: 2 guid: c957290a655ba4a1ea4cb6597a8d3293 folderAsset: yes DefaultImporter: externalObjects: {} userData: assetBundleName: assetBundleVariant: ================================================ FILE: Assets/SVGMeshUnity.meta ================================================ fileFormatVersion: 2 guid: 72ed3891d26754a9b970f82b29df8fa2 folderAsset: yes DefaultImporter: externalObjects: {} userData: assetBundleName: assetBundleVariant: ================================================ FILE: Assets/Samples/Assets/Color 2.mat ================================================ %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: Color 2 m_Shader: {fileID: 4800000, guid: 650dd9526735d5b46b79224bc6e94025, type: 3} m_ShaderKeywords: m_LightmapFlags: 4 m_EnableInstancingVariants: 0 m_DoubleSidedGI: 0 m_CustomRenderQueue: -1 stringTagMap: {} disabledShaderPasses: [] m_SavedProperties: serializedVersion: 3 m_TexEnvs: - _BumpMap: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} - _DetailAlbedoMap: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} - _DetailMask: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} - _DetailNormalMap: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} - _EmissionMap: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} - _MainTex: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} - _MetallicGlossMap: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} - _OcclusionMap: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} - _ParallaxMap: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} - _SpecGlossMap: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} m_Floats: - _BumpScale: 1 - _Cutoff: 0.5 - _DetailNormalMapScale: 1 - _DstBlend: 0 - _GlossMapScale: 1 - _Glossiness: 0.5 - _GlossyReflections: 1 - _Metallic: 0 - _Mode: 0 - _OcclusionStrength: 1 - _Parallax: 0.02 - _SampleGI: 0 - _SmoothnessTextureChannel: 0 - _SpecularHighlights: 1 - _SrcBlend: 1 - _UVSec: 0 - _WorkflowMode: 1 - _ZWrite: 1 m_Colors: - _Color: {r: 1, g: 1, b: 1, a: 1} - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} - _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1} ================================================ FILE: Assets/Samples/Assets/Color 2.mat.meta ================================================ fileFormatVersion: 2 guid: f4224fb006eda42378257492a49fecb9 NativeFormatImporter: externalObjects: {} mainObjectFileID: 2100000 userData: assetBundleName: assetBundleVariant: ================================================ FILE: Assets/Samples/Assets/Color 3.mat ================================================ %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: Color 3 m_Shader: {fileID: 4800000, guid: 650dd9526735d5b46b79224bc6e94025, type: 3} m_ShaderKeywords: m_LightmapFlags: 4 m_EnableInstancingVariants: 0 m_DoubleSidedGI: 0 m_CustomRenderQueue: -1 stringTagMap: {} disabledShaderPasses: [] m_SavedProperties: serializedVersion: 3 m_TexEnvs: - _BumpMap: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} - _DetailAlbedoMap: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} - _DetailMask: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} - _DetailNormalMap: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} - _EmissionMap: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} - _MainTex: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} - _MetallicGlossMap: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} - _OcclusionMap: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} - _ParallaxMap: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} - _SpecGlossMap: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} m_Floats: - _BumpScale: 1 - _Cutoff: 0.5 - _DetailNormalMapScale: 1 - _DstBlend: 0 - _GlossMapScale: 1 - _Glossiness: 0.5 - _GlossyReflections: 1 - _Metallic: 0 - _Mode: 0 - _OcclusionStrength: 1 - _Parallax: 0.02 - _SampleGI: 0 - _SmoothnessTextureChannel: 0 - _SpecularHighlights: 1 - _SrcBlend: 1 - _UVSec: 0 - _WorkflowMode: 1 - _ZWrite: 1 m_Colors: - _Color: {r: 0.97558546, g: 1, b: 0, a: 1} - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} - _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1} ================================================ FILE: Assets/Samples/Assets/Color 3.mat.meta ================================================ fileFormatVersion: 2 guid: 8642200f3b6794d66b12b1845313a2a9 NativeFormatImporter: externalObjects: {} mainObjectFileID: 2100000 userData: assetBundleName: assetBundleVariant: ================================================ FILE: Assets/Samples/Assets/Color.mat ================================================ %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: Color m_Shader: {fileID: 4800000, guid: 650dd9526735d5b46b79224bc6e94025, type: 3} m_ShaderKeywords: m_LightmapFlags: 4 m_EnableInstancingVariants: 0 m_DoubleSidedGI: 0 m_CustomRenderQueue: -1 stringTagMap: {} disabledShaderPasses: [] m_SavedProperties: serializedVersion: 3 m_TexEnvs: - _BumpMap: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} - _DetailAlbedoMap: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} - _DetailMask: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} - _DetailNormalMap: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} - _EmissionMap: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} - _MainTex: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} - _MetallicGlossMap: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} - _OcclusionMap: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} - _ParallaxMap: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} - _SpecGlossMap: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} m_Floats: - _BumpScale: 1 - _Cutoff: 0.5 - _DetailNormalMapScale: 1 - _DstBlend: 0 - _GlossMapScale: 1 - _Glossiness: 0.5 - _GlossyReflections: 1 - _Metallic: 0 - _Mode: 0 - _OcclusionStrength: 1 - _Parallax: 0.02 - _SampleGI: 0 - _SmoothnessTextureChannel: 0 - _SpecularHighlights: 1 - _SrcBlend: 1 - _UVSec: 0 - _WorkflowMode: 1 - _ZWrite: 1 m_Colors: - _Color: {r: 1, g: 1, b: 1, a: 1} - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} - _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1} ================================================ FILE: Assets/Samples/Assets/Color.mat.meta ================================================ fileFormatVersion: 2 guid: cb96685d2fe4044aea3b1370980913a6 NativeFormatImporter: externalObjects: {} mainObjectFileID: 2100000 userData: assetBundleName: assetBundleVariant: ================================================ FILE: Assets/Samples/Assets.meta ================================================ fileFormatVersion: 2 guid: e8e37e76b886b457dac97bbc891f30fc folderAsset: yes DefaultImporter: externalObjects: {} userData: assetBundleName: assetBundleVariant: ================================================ FILE: Assets/Samples/Scenes/Circle.unity ================================================ %YAML 1.1 %TAG !u! tag:unity3d.com,2011: --- !u!29 &1 OcclusionCullingSettings: m_ObjectHideFlags: 0 serializedVersion: 2 m_OcclusionBakeSettings: smallestOccluder: 5 smallestHole: 0.25 backfaceThreshold: 100 m_SceneGUID: 00000000000000000000000000000000 m_OcclusionCullingData: {fileID: 0} --- !u!104 &2 RenderSettings: m_ObjectHideFlags: 0 serializedVersion: 9 m_Fog: 0 m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} m_FogMode: 3 m_FogDensity: 0.01 m_LinearFogStart: 0 m_LinearFogEnd: 300 m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} m_AmbientIntensity: 1 m_AmbientMode: 0 m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} m_HaloStrength: 0.5 m_FlareStrength: 1 m_FlareFadeSpeed: 3 m_HaloTexture: {fileID: 0} m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} m_DefaultReflectionMode: 0 m_DefaultReflectionResolution: 128 m_ReflectionBounces: 1 m_ReflectionIntensity: 1 m_CustomReflection: {fileID: 0} m_Sun: {fileID: 1526980366} m_IndirectSpecularColor: {r: 0.18028334, g: 0.22571334, b: 0.3069219, a: 1} m_UseRadianceAmbientProbe: 0 --- !u!157 &3 LightmapSettings: m_ObjectHideFlags: 0 serializedVersion: 11 m_GIWorkflowMode: 0 m_GISettings: serializedVersion: 2 m_BounceScale: 1 m_IndirectOutputScale: 1 m_AlbedoBoost: 1 m_TemporalCoherenceThreshold: 1 m_EnvironmentLightingMode: 0 m_EnableBakedLightmaps: 1 m_EnableRealtimeLightmaps: 0 m_LightmapEditorSettings: serializedVersion: 10 m_Resolution: 2 m_BakeResolution: 10 m_AtlasSize: 512 m_AO: 0 m_AOMaxDistance: 1 m_CompAOExponent: 1 m_CompAOExponentDirect: 0 m_Padding: 2 m_LightmapParameters: {fileID: 0} m_LightmapsBakeMode: 1 m_TextureCompression: 1 m_FinalGather: 0 m_FinalGatherFiltering: 1 m_FinalGatherRayCount: 256 m_ReflectionCompression: 2 m_MixedBakeMode: 2 m_BakeBackend: 1 m_PVRSampling: 1 m_PVRDirectSampleCount: 32 m_PVRSampleCount: 256 m_PVRBounces: 2 m_PVRFilterTypeDirect: 0 m_PVRFilterTypeIndirect: 0 m_PVRFilterTypeAO: 0 m_PVRFilteringMode: 1 m_PVRCulling: 1 m_PVRFilteringGaussRadiusDirect: 1 m_PVRFilteringGaussRadiusIndirect: 5 m_PVRFilteringGaussRadiusAO: 2 m_PVRFilteringAtrousPositionSigmaDirect: 0.5 m_PVRFilteringAtrousPositionSigmaIndirect: 2 m_PVRFilteringAtrousPositionSigmaAO: 1 m_ShowResolutionOverlay: 1 m_LightingDataAsset: {fileID: 0} m_UseShadowmask: 1 --- !u!196 &4 NavMeshSettings: serializedVersion: 2 m_ObjectHideFlags: 0 m_BuildSettings: serializedVersion: 2 agentTypeID: 0 agentRadius: 0.5 agentHeight: 2 agentSlope: 45 agentClimb: 0.4 ledgeDropHeight: 0 maxJumpAcrossDistance: 0 minRegionArea: 2 manualCellSize: 0 cellSize: 0.16666667 manualTileSize: 0 tileSize: 256 accuratePlacement: 0 debug: m_Flags: 0 m_NavMeshData: {fileID: 0} --- !u!1 &282840810 GameObject: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} serializedVersion: 5 m_Component: - component: {fileID: 282840814} - component: {fileID: 282840813} - component: {fileID: 282840811} m_Layer: 0 m_Name: Main Camera m_TagString: MainCamera m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!81 &282840811 AudioListener: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 282840810} m_Enabled: 1 --- !u!20 &282840813 Camera: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 282840810} m_Enabled: 1 serializedVersion: 2 m_ClearFlags: 2 m_BackGroundColor: {r: 0.21586865, g: 0.70255923, b: 0.9339623, a: 0} m_NormalizedViewPortRect: serializedVersion: 2 x: 0 y: 0 width: 1 height: 1 near clip plane: 0.3 far clip plane: 1000 field of view: 30 orthographic: 0 orthographic size: 5 m_Depth: -1 m_CullingMask: serializedVersion: 2 m_Bits: 4294967295 m_RenderingPath: -1 m_TargetTexture: {fileID: 0} m_TargetDisplay: 0 m_TargetEye: 3 m_HDR: 1 m_AllowMSAA: 0 m_AllowDynamicResolution: 0 m_ForceIntoRT: 1 m_OcclusionCulling: 1 m_StereoConvergence: 10 m_StereoSeparation: 0.022 --- !u!4 &282840814 Transform: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 282840810} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: -20} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 0} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &844179445 GameObject: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} serializedVersion: 5 m_Component: - component: {fileID: 844179449} - component: {fileID: 844179448} - component: {fileID: 844179447} - component: {fileID: 844179446} m_Layer: 0 m_Name: SVG Renderer m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!114 &844179446 MonoBehaviour: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 844179445} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 3646afd5fb564c6b914c04b46d4417c8, type: 3} m_Name: m_EditorClassIdentifier: Scale: 10 Delaunay: 0 Interior: 1 Exterior: 1 Infinity: 0 --- !u!23 &844179447 MeshRenderer: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 844179445} m_Enabled: 1 m_CastShadows: 1 m_ReceiveShadows: 1 m_DynamicOccludee: 1 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RenderingLayerMask: 4294967295 m_Materials: - {fileID: 2100000, guid: cb96685d2fe4044aea3b1370980913a6, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 m_StaticBatchRoot: {fileID: 0} m_ProbeAnchor: {fileID: 0} m_LightProbeVolumeOverride: {fileID: 0} m_ScaleInLightmap: 1 m_PreserveUVs: 0 m_IgnoreNormalsForChartDetection: 0 m_ImportantGI: 0 m_StitchLightmapSeams: 0 m_SelectedEditorRenderState: 3 m_MinimumChartSize: 4 m_AutoUVMaxDistance: 0.5 m_AutoUVMaxAngle: 89 m_LightmapParameters: {fileID: 0} m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 --- !u!33 &844179448 MeshFilter: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 844179445} m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} --- !u!4 &844179449 Transform: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 844179445} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 1217621049} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &1217621047 GameObject: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} serializedVersion: 5 m_Component: - component: {fileID: 1217621049} - component: {fileID: 1217621048} m_Layer: 0 m_Name: Circle m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!114 &1217621048 MonoBehaviour: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 1217621047} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: a2e2ff5e6bbee4f7c8b06c855c0c8431, type: 3} m_Name: m_EditorClassIdentifier: Mesh: {fileID: 844179446} --- !u!4 &1217621049 Transform: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 1217621047} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: - {fileID: 844179449} m_Father: {fileID: 0} m_RootOrder: 2 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &1526980365 GameObject: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} serializedVersion: 5 m_Component: - component: {fileID: 1526980367} - component: {fileID: 1526980366} m_Layer: 0 m_Name: Directional Light m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!108 &1526980366 Light: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 1526980365} m_Enabled: 1 serializedVersion: 8 m_Type: 1 m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} m_Intensity: 1 m_Range: 10 m_SpotAngle: 30 m_CookieSize: 10 m_Shadows: m_Type: 2 m_Resolution: 2 m_CustomResolution: -1 m_Strength: 1 m_Bias: 0.005 m_NormalBias: 0.1 m_NearPlane: 5 m_Cookie: {fileID: 0} m_DrawHalo: 0 m_Flare: {fileID: 0} m_RenderMode: 0 m_CullingMask: serializedVersion: 2 m_Bits: 4294967295 m_Lightmapping: 1 m_AreaSize: {x: 1, y: 1} m_BounceIntensity: 1 m_ColorTemperature: 6570 m_UseColorTemperature: 0 m_ShadowRadius: 0 m_ShadowAngle: 0 --- !u!4 &1526980367 Transform: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 1526980365} m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261} m_LocalPosition: {x: 0, y: 3, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 0} m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} ================================================ FILE: Assets/Samples/Scenes/Circle.unity.meta ================================================ fileFormatVersion: 2 guid: 19aa2558bd51344ecb3c2827023d6b72 DefaultImporter: externalObjects: {} userData: assetBundleName: assetBundleVariant: ================================================ FILE: Assets/Samples/Scenes/Cut.unity ================================================ %YAML 1.1 %TAG !u! tag:unity3d.com,2011: --- !u!29 &1 OcclusionCullingSettings: m_ObjectHideFlags: 0 serializedVersion: 2 m_OcclusionBakeSettings: smallestOccluder: 5 smallestHole: 0.25 backfaceThreshold: 100 m_SceneGUID: 00000000000000000000000000000000 m_OcclusionCullingData: {fileID: 0} --- !u!104 &2 RenderSettings: m_ObjectHideFlags: 0 serializedVersion: 9 m_Fog: 0 m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} m_FogMode: 3 m_FogDensity: 0.01 m_LinearFogStart: 0 m_LinearFogEnd: 300 m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} m_AmbientIntensity: 1 m_AmbientMode: 0 m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} m_HaloStrength: 0.5 m_FlareStrength: 1 m_FlareFadeSpeed: 3 m_HaloTexture: {fileID: 0} m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} m_DefaultReflectionMode: 0 m_DefaultReflectionResolution: 128 m_ReflectionBounces: 1 m_ReflectionIntensity: 1 m_CustomReflection: {fileID: 0} m_Sun: {fileID: 1526980366} m_IndirectSpecularColor: {r: 0.18028334, g: 0.22571334, b: 0.3069219, a: 1} m_UseRadianceAmbientProbe: 0 --- !u!157 &3 LightmapSettings: m_ObjectHideFlags: 0 serializedVersion: 11 m_GIWorkflowMode: 0 m_GISettings: serializedVersion: 2 m_BounceScale: 1 m_IndirectOutputScale: 1 m_AlbedoBoost: 1 m_TemporalCoherenceThreshold: 1 m_EnvironmentLightingMode: 0 m_EnableBakedLightmaps: 1 m_EnableRealtimeLightmaps: 0 m_LightmapEditorSettings: serializedVersion: 10 m_Resolution: 2 m_BakeResolution: 10 m_AtlasSize: 512 m_AO: 0 m_AOMaxDistance: 1 m_CompAOExponent: 1 m_CompAOExponentDirect: 0 m_Padding: 2 m_LightmapParameters: {fileID: 0} m_LightmapsBakeMode: 1 m_TextureCompression: 1 m_FinalGather: 0 m_FinalGatherFiltering: 1 m_FinalGatherRayCount: 256 m_ReflectionCompression: 2 m_MixedBakeMode: 2 m_BakeBackend: 1 m_PVRSampling: 1 m_PVRDirectSampleCount: 32 m_PVRSampleCount: 256 m_PVRBounces: 2 m_PVRFilterTypeDirect: 0 m_PVRFilterTypeIndirect: 0 m_PVRFilterTypeAO: 0 m_PVRFilteringMode: 1 m_PVRCulling: 1 m_PVRFilteringGaussRadiusDirect: 1 m_PVRFilteringGaussRadiusIndirect: 5 m_PVRFilteringGaussRadiusAO: 2 m_PVRFilteringAtrousPositionSigmaDirect: 0.5 m_PVRFilteringAtrousPositionSigmaIndirect: 2 m_PVRFilteringAtrousPositionSigmaAO: 1 m_ShowResolutionOverlay: 1 m_LightingDataAsset: {fileID: 0} m_UseShadowmask: 1 --- !u!196 &4 NavMeshSettings: serializedVersion: 2 m_ObjectHideFlags: 0 m_BuildSettings: serializedVersion: 2 agentTypeID: 0 agentRadius: 0.5 agentHeight: 2 agentSlope: 45 agentClimb: 0.4 ledgeDropHeight: 0 maxJumpAcrossDistance: 0 minRegionArea: 2 manualCellSize: 0 cellSize: 0.16666667 manualTileSize: 0 tileSize: 256 accuratePlacement: 0 debug: m_Flags: 0 m_NavMeshData: {fileID: 0} --- !u!1 &282840810 GameObject: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} serializedVersion: 5 m_Component: - component: {fileID: 282840814} - component: {fileID: 282840813} - component: {fileID: 282840811} m_Layer: 0 m_Name: Main Camera m_TagString: MainCamera m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!81 &282840811 AudioListener: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 282840810} m_Enabled: 1 --- !u!20 &282840813 Camera: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 282840810} m_Enabled: 1 serializedVersion: 2 m_ClearFlags: 2 m_BackGroundColor: {r: 0.06674972, g: 0.70920056, b: 0.9433962, a: 0} m_NormalizedViewPortRect: serializedVersion: 2 x: 0 y: 0 width: 1 height: 1 near clip plane: 0.3 far clip plane: 1000 field of view: 30 orthographic: 0 orthographic size: 5 m_Depth: -1 m_CullingMask: serializedVersion: 2 m_Bits: 4294967295 m_RenderingPath: -1 m_TargetTexture: {fileID: 0} m_TargetDisplay: 0 m_TargetEye: 3 m_HDR: 1 m_AllowMSAA: 0 m_AllowDynamicResolution: 0 m_ForceIntoRT: 1 m_OcclusionCulling: 1 m_StereoConvergence: 10 m_StereoSeparation: 0.022 --- !u!4 &282840814 Transform: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 282840810} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: -20} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 0} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &844179445 GameObject: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} serializedVersion: 5 m_Component: - component: {fileID: 844179449} - component: {fileID: 844179448} - component: {fileID: 844179447} - component: {fileID: 844179446} m_Layer: 0 m_Name: SVG Renderer m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 0 --- !u!114 &844179446 MonoBehaviour: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 844179445} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 3646afd5fb564c6b914c04b46d4417c8, type: 3} m_Name: m_EditorClassIdentifier: Scale: 20 Delaunay: 0 Interior: 1 Exterior: 1 Infinity: 0 --- !u!23 &844179447 MeshRenderer: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 844179445} m_Enabled: 1 m_CastShadows: 1 m_ReceiveShadows: 1 m_DynamicOccludee: 1 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RenderingLayerMask: 4294967295 m_Materials: - {fileID: 2100000, guid: cb96685d2fe4044aea3b1370980913a6, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 m_StaticBatchRoot: {fileID: 0} m_ProbeAnchor: {fileID: 0} m_LightProbeVolumeOverride: {fileID: 0} m_ScaleInLightmap: 1 m_PreserveUVs: 0 m_IgnoreNormalsForChartDetection: 0 m_ImportantGI: 0 m_StitchLightmapSeams: 0 m_SelectedEditorRenderState: 3 m_MinimumChartSize: 4 m_AutoUVMaxDistance: 0.5 m_AutoUVMaxAngle: 89 m_LightmapParameters: {fileID: 0} m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 --- !u!33 &844179448 MeshFilter: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 844179445} m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} --- !u!4 &844179449 Transform: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 844179445} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 1217621049} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &1217621047 GameObject: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} serializedVersion: 5 m_Component: - component: {fileID: 1217621049} - component: {fileID: 1217621048} m_Layer: 0 m_Name: Cut m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!114 &1217621048 MonoBehaviour: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 1217621047} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: b84498ce3fe84d25938244fbf07b7494, type: 3} m_Name: m_EditorClassIdentifier: Prefab: {fileID: 844179445} LineMesh: {fileID: 1955285918} --- !u!4 &1217621049 Transform: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 1217621047} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: - {fileID: 844179449} - {fileID: 1955285917} m_Father: {fileID: 0} m_RootOrder: 2 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &1526980365 GameObject: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} serializedVersion: 5 m_Component: - component: {fileID: 1526980367} - component: {fileID: 1526980366} m_Layer: 0 m_Name: Directional Light m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!108 &1526980366 Light: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 1526980365} m_Enabled: 1 serializedVersion: 8 m_Type: 1 m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} m_Intensity: 1 m_Range: 10 m_SpotAngle: 30 m_CookieSize: 10 m_Shadows: m_Type: 2 m_Resolution: 2 m_CustomResolution: -1 m_Strength: 1 m_Bias: 0.005 m_NormalBias: 0.1 m_NearPlane: 5 m_Cookie: {fileID: 0} m_DrawHalo: 0 m_Flare: {fileID: 0} m_RenderMode: 0 m_CullingMask: serializedVersion: 2 m_Bits: 4294967295 m_Lightmapping: 1 m_AreaSize: {x: 1, y: 1} m_BounceIntensity: 1 m_ColorTemperature: 6570 m_UseColorTemperature: 0 m_ShadowRadius: 0 m_ShadowAngle: 0 --- !u!4 &1526980367 Transform: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 1526980365} m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261} m_LocalPosition: {x: 0, y: 3, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 0} m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} --- !u!1 &1955285916 GameObject: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} serializedVersion: 5 m_Component: - component: {fileID: 1955285917} - component: {fileID: 1955285920} - component: {fileID: 1955285919} - component: {fileID: 1955285918} m_Layer: 0 m_Name: Line SVG Renderer m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!4 &1955285917 Transform: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 1955285916} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: -0.01} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 1217621049} m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!114 &1955285918 MonoBehaviour: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 1955285916} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 3646afd5fb564c6b914c04b46d4417c8, type: 3} m_Name: m_EditorClassIdentifier: Scale: 20 Delaunay: 0 Interior: 1 Exterior: 1 Infinity: 0 --- !u!23 &1955285919 MeshRenderer: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 1955285916} m_Enabled: 1 m_CastShadows: 1 m_ReceiveShadows: 1 m_DynamicOccludee: 1 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RenderingLayerMask: 4294967295 m_Materials: - {fileID: 2100000, guid: 8642200f3b6794d66b12b1845313a2a9, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 m_StaticBatchRoot: {fileID: 0} m_ProbeAnchor: {fileID: 0} m_LightProbeVolumeOverride: {fileID: 0} m_ScaleInLightmap: 1 m_PreserveUVs: 0 m_IgnoreNormalsForChartDetection: 0 m_ImportantGI: 0 m_StitchLightmapSeams: 0 m_SelectedEditorRenderState: 3 m_MinimumChartSize: 4 m_AutoUVMaxDistance: 0.5 m_AutoUVMaxAngle: 89 m_LightmapParameters: {fileID: 0} m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 --- !u!33 &1955285920 MeshFilter: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 1955285916} m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} ================================================ FILE: Assets/Samples/Scenes/Cut.unity.meta ================================================ fileFormatVersion: 2 guid: d86071ddf13f24391ae2ee6944d56a3a DefaultImporter: externalObjects: {} userData: assetBundleName: assetBundleVariant: ================================================ FILE: Assets/Samples/Scenes/Metaball.unity ================================================ %YAML 1.1 %TAG !u! tag:unity3d.com,2011: --- !u!29 &1 OcclusionCullingSettings: m_ObjectHideFlags: 0 serializedVersion: 2 m_OcclusionBakeSettings: smallestOccluder: 5 smallestHole: 0.25 backfaceThreshold: 100 m_SceneGUID: 00000000000000000000000000000000 m_OcclusionCullingData: {fileID: 0} --- !u!104 &2 RenderSettings: m_ObjectHideFlags: 0 serializedVersion: 9 m_Fog: 0 m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} m_FogMode: 3 m_FogDensity: 0.01 m_LinearFogStart: 0 m_LinearFogEnd: 300 m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} m_AmbientIntensity: 1 m_AmbientMode: 0 m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} m_HaloStrength: 0.5 m_FlareStrength: 1 m_FlareFadeSpeed: 3 m_HaloTexture: {fileID: 0} m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} m_DefaultReflectionMode: 0 m_DefaultReflectionResolution: 128 m_ReflectionBounces: 1 m_ReflectionIntensity: 1 m_CustomReflection: {fileID: 0} m_Sun: {fileID: 1526980366} m_IndirectSpecularColor: {r: 0.18028334, g: 0.22571334, b: 0.3069219, a: 1} m_UseRadianceAmbientProbe: 0 --- !u!157 &3 LightmapSettings: m_ObjectHideFlags: 0 serializedVersion: 11 m_GIWorkflowMode: 0 m_GISettings: serializedVersion: 2 m_BounceScale: 1 m_IndirectOutputScale: 1 m_AlbedoBoost: 1 m_TemporalCoherenceThreshold: 1 m_EnvironmentLightingMode: 0 m_EnableBakedLightmaps: 1 m_EnableRealtimeLightmaps: 0 m_LightmapEditorSettings: serializedVersion: 10 m_Resolution: 2 m_BakeResolution: 10 m_AtlasSize: 512 m_AO: 0 m_AOMaxDistance: 1 m_CompAOExponent: 1 m_CompAOExponentDirect: 0 m_Padding: 2 m_LightmapParameters: {fileID: 0} m_LightmapsBakeMode: 1 m_TextureCompression: 1 m_FinalGather: 0 m_FinalGatherFiltering: 1 m_FinalGatherRayCount: 256 m_ReflectionCompression: 2 m_MixedBakeMode: 2 m_BakeBackend: 1 m_PVRSampling: 1 m_PVRDirectSampleCount: 32 m_PVRSampleCount: 256 m_PVRBounces: 2 m_PVRFilterTypeDirect: 0 m_PVRFilterTypeIndirect: 0 m_PVRFilterTypeAO: 0 m_PVRFilteringMode: 1 m_PVRCulling: 1 m_PVRFilteringGaussRadiusDirect: 1 m_PVRFilteringGaussRadiusIndirect: 5 m_PVRFilteringGaussRadiusAO: 2 m_PVRFilteringAtrousPositionSigmaDirect: 0.5 m_PVRFilteringAtrousPositionSigmaIndirect: 2 m_PVRFilteringAtrousPositionSigmaAO: 1 m_ShowResolutionOverlay: 1 m_LightingDataAsset: {fileID: 0} m_UseShadowmask: 1 --- !u!196 &4 NavMeshSettings: serializedVersion: 2 m_ObjectHideFlags: 0 m_BuildSettings: serializedVersion: 2 agentTypeID: 0 agentRadius: 0.5 agentHeight: 2 agentSlope: 45 agentClimb: 0.4 ledgeDropHeight: 0 maxJumpAcrossDistance: 0 minRegionArea: 2 manualCellSize: 0 cellSize: 0.16666667 manualTileSize: 0 tileSize: 256 accuratePlacement: 0 debug: m_Flags: 0 m_NavMeshData: {fileID: 0} --- !u!1 &282840810 GameObject: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} serializedVersion: 5 m_Component: - component: {fileID: 282840814} - component: {fileID: 282840813} - component: {fileID: 282840811} m_Layer: 0 m_Name: Main Camera m_TagString: MainCamera m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!81 &282840811 AudioListener: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 282840810} m_Enabled: 1 --- !u!20 &282840813 Camera: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 282840810} m_Enabled: 1 serializedVersion: 2 m_ClearFlags: 2 m_BackGroundColor: {r: 0, g: 0.7083578, b: 1, a: 0} m_NormalizedViewPortRect: serializedVersion: 2 x: 0 y: 0 width: 1 height: 1 near clip plane: 0.3 far clip plane: 1000 field of view: 30 orthographic: 0 orthographic size: 5 m_Depth: -1 m_CullingMask: serializedVersion: 2 m_Bits: 4294967295 m_RenderingPath: -1 m_TargetTexture: {fileID: 0} m_TargetDisplay: 0 m_TargetEye: 3 m_HDR: 1 m_AllowMSAA: 0 m_AllowDynamicResolution: 0 m_ForceIntoRT: 1 m_OcclusionCulling: 1 m_StereoConvergence: 10 m_StereoSeparation: 0.022 --- !u!4 &282840814 Transform: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 282840810} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: -20} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 0} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &844179445 GameObject: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} serializedVersion: 5 m_Component: - component: {fileID: 844179449} - component: {fileID: 844179448} - component: {fileID: 844179447} - component: {fileID: 844179446} m_Layer: 0 m_Name: Circle 1 SVG Renderer m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!114 &844179446 MonoBehaviour: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 844179445} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 3646afd5fb564c6b914c04b46d4417c8, type: 3} m_Name: m_EditorClassIdentifier: Scale: 20 Delaunay: 0 Interior: 1 Exterior: 1 Infinity: 0 --- !u!23 &844179447 MeshRenderer: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 844179445} m_Enabled: 1 m_CastShadows: 1 m_ReceiveShadows: 1 m_DynamicOccludee: 1 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RenderingLayerMask: 4294967295 m_Materials: - {fileID: 2100000, guid: f4224fb006eda42378257492a49fecb9, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 m_StaticBatchRoot: {fileID: 0} m_ProbeAnchor: {fileID: 0} m_LightProbeVolumeOverride: {fileID: 0} m_ScaleInLightmap: 1 m_PreserveUVs: 0 m_IgnoreNormalsForChartDetection: 0 m_ImportantGI: 0 m_StitchLightmapSeams: 0 m_SelectedEditorRenderState: 3 m_MinimumChartSize: 4 m_AutoUVMaxDistance: 0.5 m_AutoUVMaxAngle: 89 m_LightmapParameters: {fileID: 0} m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 --- !u!33 &844179448 MeshFilter: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 844179445} m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} --- !u!4 &844179449 Transform: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 844179445} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: -3, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 1217621049} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &846115539 GameObject: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} serializedVersion: 5 m_Component: - component: {fileID: 846115543} - component: {fileID: 846115542} - component: {fileID: 846115541} - component: {fileID: 846115540} m_Layer: 0 m_Name: Metaball SVG Renderer m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!114 &846115540 MonoBehaviour: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 846115539} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 3646afd5fb564c6b914c04b46d4417c8, type: 3} m_Name: m_EditorClassIdentifier: Scale: 20 Delaunay: 0 Interior: 1 Exterior: 0 Infinity: 0 --- !u!23 &846115541 MeshRenderer: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 846115539} m_Enabled: 1 m_CastShadows: 1 m_ReceiveShadows: 1 m_DynamicOccludee: 1 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RenderingLayerMask: 4294967295 m_Materials: - {fileID: 2100000, guid: f4224fb006eda42378257492a49fecb9, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 m_StaticBatchRoot: {fileID: 0} m_ProbeAnchor: {fileID: 0} m_LightProbeVolumeOverride: {fileID: 0} m_ScaleInLightmap: 1 m_PreserveUVs: 0 m_IgnoreNormalsForChartDetection: 0 m_ImportantGI: 0 m_StitchLightmapSeams: 0 m_SelectedEditorRenderState: 3 m_MinimumChartSize: 4 m_AutoUVMaxDistance: 0.5 m_AutoUVMaxAngle: 89 m_LightmapParameters: {fileID: 0} m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 --- !u!33 &846115542 MeshFilter: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 846115539} m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} --- !u!4 &846115543 Transform: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 846115539} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: -0.001} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 1217621049} m_RootOrder: 2 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &1217621047 GameObject: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} serializedVersion: 5 m_Component: - component: {fileID: 1217621049} - component: {fileID: 1217621048} m_Layer: 0 m_Name: Metaball m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!114 &1217621048 MonoBehaviour: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 1217621047} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: fe7ce92f7a0454b6f9b8e855e7e2a2d3, type: 3} m_Name: m_EditorClassIdentifier: Circle1Mesh: {fileID: 844179446} Circle2Mesh: {fileID: 1736451195} MetaballMesh: {fileID: 846115540} --- !u!4 &1217621049 Transform: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 1217621047} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: - {fileID: 844179449} - {fileID: 1736451198} - {fileID: 846115543} m_Father: {fileID: 0} m_RootOrder: 2 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &1526980365 GameObject: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} serializedVersion: 5 m_Component: - component: {fileID: 1526980367} - component: {fileID: 1526980366} m_Layer: 0 m_Name: Directional Light m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!108 &1526980366 Light: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 1526980365} m_Enabled: 1 serializedVersion: 8 m_Type: 1 m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} m_Intensity: 1 m_Range: 10 m_SpotAngle: 30 m_CookieSize: 10 m_Shadows: m_Type: 2 m_Resolution: 2 m_CustomResolution: -1 m_Strength: 1 m_Bias: 0.005 m_NormalBias: 0.1 m_NearPlane: 5 m_Cookie: {fileID: 0} m_DrawHalo: 0 m_Flare: {fileID: 0} m_RenderMode: 0 m_CullingMask: serializedVersion: 2 m_Bits: 4294967295 m_Lightmapping: 1 m_AreaSize: {x: 1, y: 1} m_BounceIntensity: 1 m_ColorTemperature: 6570 m_UseColorTemperature: 0 m_ShadowRadius: 0 m_ShadowAngle: 0 --- !u!4 &1526980367 Transform: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 1526980365} m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261} m_LocalPosition: {x: 0, y: 10, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 0} m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} --- !u!1 &1736451194 GameObject: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} serializedVersion: 5 m_Component: - component: {fileID: 1736451198} - component: {fileID: 1736451197} - component: {fileID: 1736451196} - component: {fileID: 1736451195} m_Layer: 0 m_Name: Circle 2 SVG Renderer m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!114 &1736451195 MonoBehaviour: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 1736451194} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 3646afd5fb564c6b914c04b46d4417c8, type: 3} m_Name: m_EditorClassIdentifier: Scale: 20 Delaunay: 0 Interior: 1 Exterior: 1 Infinity: 0 --- !u!23 &1736451196 MeshRenderer: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 1736451194} m_Enabled: 1 m_CastShadows: 1 m_ReceiveShadows: 1 m_DynamicOccludee: 1 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RenderingLayerMask: 4294967295 m_Materials: - {fileID: 2100000, guid: f4224fb006eda42378257492a49fecb9, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 m_StaticBatchRoot: {fileID: 0} m_ProbeAnchor: {fileID: 0} m_LightProbeVolumeOverride: {fileID: 0} m_ScaleInLightmap: 1 m_PreserveUVs: 0 m_IgnoreNormalsForChartDetection: 0 m_ImportantGI: 0 m_StitchLightmapSeams: 0 m_SelectedEditorRenderState: 3 m_MinimumChartSize: 4 m_AutoUVMaxDistance: 0.5 m_AutoUVMaxAngle: 89 m_LightmapParameters: {fileID: 0} m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 --- !u!33 &1736451197 MeshFilter: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 1736451194} m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} --- !u!4 &1736451198 Transform: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 1736451194} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 1217621049} m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ================================================ FILE: Assets/Samples/Scenes/Metaball.unity.meta ================================================ fileFormatVersion: 2 guid: 4432038db77764231a447121c5c89763 DefaultImporter: externalObjects: {} userData: assetBundleName: assetBundleVariant: ================================================ FILE: Assets/Samples/Scenes/Move.unity ================================================ %YAML 1.1 %TAG !u! tag:unity3d.com,2011: --- !u!29 &1 OcclusionCullingSettings: m_ObjectHideFlags: 0 serializedVersion: 2 m_OcclusionBakeSettings: smallestOccluder: 5 smallestHole: 0.25 backfaceThreshold: 100 m_SceneGUID: 00000000000000000000000000000000 m_OcclusionCullingData: {fileID: 0} --- !u!104 &2 RenderSettings: m_ObjectHideFlags: 0 serializedVersion: 9 m_Fog: 0 m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} m_FogMode: 3 m_FogDensity: 0.01 m_LinearFogStart: 0 m_LinearFogEnd: 300 m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} m_AmbientIntensity: 1 m_AmbientMode: 0 m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} m_HaloStrength: 0.5 m_FlareStrength: 1 m_FlareFadeSpeed: 3 m_HaloTexture: {fileID: 0} m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} m_DefaultReflectionMode: 0 m_DefaultReflectionResolution: 128 m_ReflectionBounces: 1 m_ReflectionIntensity: 1 m_CustomReflection: {fileID: 0} m_Sun: {fileID: 1526980366} m_IndirectSpecularColor: {r: 0.18028334, g: 0.22571334, b: 0.3069219, a: 1} m_UseRadianceAmbientProbe: 0 --- !u!157 &3 LightmapSettings: m_ObjectHideFlags: 0 serializedVersion: 11 m_GIWorkflowMode: 0 m_GISettings: serializedVersion: 2 m_BounceScale: 1 m_IndirectOutputScale: 1 m_AlbedoBoost: 1 m_TemporalCoherenceThreshold: 1 m_EnvironmentLightingMode: 0 m_EnableBakedLightmaps: 1 m_EnableRealtimeLightmaps: 0 m_LightmapEditorSettings: serializedVersion: 10 m_Resolution: 2 m_BakeResolution: 10 m_AtlasSize: 512 m_AO: 0 m_AOMaxDistance: 1 m_CompAOExponent: 1 m_CompAOExponentDirect: 0 m_Padding: 2 m_LightmapParameters: {fileID: 0} m_LightmapsBakeMode: 1 m_TextureCompression: 1 m_FinalGather: 0 m_FinalGatherFiltering: 1 m_FinalGatherRayCount: 256 m_ReflectionCompression: 2 m_MixedBakeMode: 2 m_BakeBackend: 1 m_PVRSampling: 1 m_PVRDirectSampleCount: 32 m_PVRSampleCount: 256 m_PVRBounces: 2 m_PVRFilterTypeDirect: 0 m_PVRFilterTypeIndirect: 0 m_PVRFilterTypeAO: 0 m_PVRFilteringMode: 1 m_PVRCulling: 1 m_PVRFilteringGaussRadiusDirect: 1 m_PVRFilteringGaussRadiusIndirect: 5 m_PVRFilteringGaussRadiusAO: 2 m_PVRFilteringAtrousPositionSigmaDirect: 0.5 m_PVRFilteringAtrousPositionSigmaIndirect: 2 m_PVRFilteringAtrousPositionSigmaAO: 1 m_ShowResolutionOverlay: 1 m_LightingDataAsset: {fileID: 0} m_UseShadowmask: 1 --- !u!196 &4 NavMeshSettings: serializedVersion: 2 m_ObjectHideFlags: 0 m_BuildSettings: serializedVersion: 2 agentTypeID: 0 agentRadius: 0.5 agentHeight: 2 agentSlope: 45 agentClimb: 0.4 ledgeDropHeight: 0 maxJumpAcrossDistance: 0 minRegionArea: 2 manualCellSize: 0 cellSize: 0.16666667 manualTileSize: 0 tileSize: 256 accuratePlacement: 0 debug: m_Flags: 0 m_NavMeshData: {fileID: 0} --- !u!1 &7448486 GameObject: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} serializedVersion: 5 m_Component: - component: {fileID: 7448490} - component: {fileID: 7448489} - component: {fileID: 7448488} - component: {fileID: 7448487} m_Layer: 0 m_Name: Tail SVG Renderer m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!114 &7448487 MonoBehaviour: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 7448486} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 3646afd5fb564c6b914c04b46d4417c8, type: 3} m_Name: m_EditorClassIdentifier: Scale: 20 Delaunay: 0 Interior: 1 Exterior: 1 Infinity: 0 --- !u!23 &7448488 MeshRenderer: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 7448486} m_Enabled: 1 m_CastShadows: 1 m_ReceiveShadows: 1 m_DynamicOccludee: 1 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RenderingLayerMask: 4294967295 m_Materials: - {fileID: 2100000, guid: f4224fb006eda42378257492a49fecb9, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 m_StaticBatchRoot: {fileID: 0} m_ProbeAnchor: {fileID: 0} m_LightProbeVolumeOverride: {fileID: 0} m_ScaleInLightmap: 1 m_PreserveUVs: 0 m_IgnoreNormalsForChartDetection: 0 m_ImportantGI: 0 m_StitchLightmapSeams: 0 m_SelectedEditorRenderState: 3 m_MinimumChartSize: 4 m_AutoUVMaxDistance: 0.5 m_AutoUVMaxAngle: 89 m_LightmapParameters: {fileID: 0} m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 --- !u!33 &7448489 MeshFilter: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 7448486} m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} --- !u!4 &7448490 Transform: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 7448486} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 1786584329} m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &158464436 GameObject: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} serializedVersion: 5 m_Component: - component: {fileID: 158464440} - component: {fileID: 158464439} - component: {fileID: 158464438} - component: {fileID: 158464437} m_Layer: 0 m_Name: Head SVG Renderer m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!114 &158464437 MonoBehaviour: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 158464436} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 3646afd5fb564c6b914c04b46d4417c8, type: 3} m_Name: m_EditorClassIdentifier: Scale: 20 Delaunay: 0 Interior: 1 Exterior: 1 Infinity: 0 --- !u!23 &158464438 MeshRenderer: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 158464436} m_Enabled: 1 m_CastShadows: 1 m_ReceiveShadows: 1 m_DynamicOccludee: 1 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RenderingLayerMask: 4294967295 m_Materials: - {fileID: 2100000, guid: f4224fb006eda42378257492a49fecb9, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 m_StaticBatchRoot: {fileID: 0} m_ProbeAnchor: {fileID: 0} m_LightProbeVolumeOverride: {fileID: 0} m_ScaleInLightmap: 1 m_PreserveUVs: 0 m_IgnoreNormalsForChartDetection: 0 m_ImportantGI: 0 m_StitchLightmapSeams: 0 m_SelectedEditorRenderState: 3 m_MinimumChartSize: 4 m_AutoUVMaxDistance: 0.5 m_AutoUVMaxAngle: 89 m_LightmapParameters: {fileID: 0} m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 --- !u!33 &158464439 MeshFilter: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 158464436} m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} --- !u!4 &158464440 Transform: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 158464436} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 1603712451} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &282840810 GameObject: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} serializedVersion: 5 m_Component: - component: {fileID: 282840814} - component: {fileID: 282840813} - component: {fileID: 282840811} m_Layer: 0 m_Name: Main Camera m_TagString: MainCamera m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!81 &282840811 AudioListener: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 282840810} m_Enabled: 1 --- !u!20 &282840813 Camera: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 282840810} m_Enabled: 1 serializedVersion: 2 m_ClearFlags: 2 m_BackGroundColor: {r: 0, g: 0.7083578, b: 1, a: 0} m_NormalizedViewPortRect: serializedVersion: 2 x: 0 y: 0 width: 1 height: 1 near clip plane: 0.3 far clip plane: 1000 field of view: 30 orthographic: 0 orthographic size: 5 m_Depth: -1 m_CullingMask: serializedVersion: 2 m_Bits: 4294967295 m_RenderingPath: -1 m_TargetTexture: {fileID: 0} m_TargetDisplay: 0 m_TargetEye: 3 m_HDR: 1 m_AllowMSAA: 0 m_AllowDynamicResolution: 0 m_ForceIntoRT: 1 m_OcclusionCulling: 1 m_StereoConvergence: 10 m_StereoSeparation: 0.022 --- !u!4 &282840814 Transform: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 282840810} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: -20} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 0} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &299379088 GameObject: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} serializedVersion: 5 m_Component: - component: {fileID: 299379092} - component: {fileID: 299379091} - component: {fileID: 299379090} - component: {fileID: 299379089} m_Layer: 0 m_Name: Body SVG Renderer m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!114 &299379089 MonoBehaviour: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 299379088} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 3646afd5fb564c6b914c04b46d4417c8, type: 3} m_Name: m_EditorClassIdentifier: Scale: 10 Delaunay: 0 Interior: 1 Exterior: 0 Infinity: 0 --- !u!23 &299379090 MeshRenderer: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 299379088} m_Enabled: 1 m_CastShadows: 1 m_ReceiveShadows: 1 m_DynamicOccludee: 1 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RenderingLayerMask: 4294967295 m_Materials: - {fileID: 2100000, guid: f4224fb006eda42378257492a49fecb9, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 m_StaticBatchRoot: {fileID: 0} m_ProbeAnchor: {fileID: 0} m_LightProbeVolumeOverride: {fileID: 0} m_ScaleInLightmap: 1 m_PreserveUVs: 0 m_IgnoreNormalsForChartDetection: 0 m_ImportantGI: 0 m_StitchLightmapSeams: 0 m_SelectedEditorRenderState: 3 m_MinimumChartSize: 4 m_AutoUVMaxDistance: 0.5 m_AutoUVMaxAngle: 89 m_LightmapParameters: {fileID: 0} m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 --- !u!33 &299379091 MeshFilter: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 299379088} m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} --- !u!4 &299379092 Transform: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 299379088} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: -0.001} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 1603712451} m_RootOrder: 2 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &844179445 GameObject: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} serializedVersion: 5 m_Component: - component: {fileID: 844179449} - component: {fileID: 844179448} - component: {fileID: 844179447} - component: {fileID: 844179446} m_Layer: 0 m_Name: Head SVG Renderer m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!114 &844179446 MonoBehaviour: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 844179445} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 3646afd5fb564c6b914c04b46d4417c8, type: 3} m_Name: m_EditorClassIdentifier: Scale: 20 Delaunay: 0 Interior: 1 Exterior: 1 Infinity: 0 --- !u!23 &844179447 MeshRenderer: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 844179445} m_Enabled: 1 m_CastShadows: 1 m_ReceiveShadows: 1 m_DynamicOccludee: 1 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RenderingLayerMask: 4294967295 m_Materials: - {fileID: 2100000, guid: f4224fb006eda42378257492a49fecb9, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 m_StaticBatchRoot: {fileID: 0} m_ProbeAnchor: {fileID: 0} m_LightProbeVolumeOverride: {fileID: 0} m_ScaleInLightmap: 1 m_PreserveUVs: 0 m_IgnoreNormalsForChartDetection: 0 m_ImportantGI: 0 m_StitchLightmapSeams: 0 m_SelectedEditorRenderState: 3 m_MinimumChartSize: 4 m_AutoUVMaxDistance: 0.5 m_AutoUVMaxAngle: 89 m_LightmapParameters: {fileID: 0} m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 --- !u!33 &844179448 MeshFilter: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 844179445} m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} --- !u!4 &844179449 Transform: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 844179445} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 1217621049} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &846115539 GameObject: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} serializedVersion: 5 m_Component: - component: {fileID: 846115543} - component: {fileID: 846115542} - component: {fileID: 846115541} - component: {fileID: 846115540} m_Layer: 0 m_Name: Body SVG Renderer m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!114 &846115540 MonoBehaviour: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 846115539} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 3646afd5fb564c6b914c04b46d4417c8, type: 3} m_Name: m_EditorClassIdentifier: Scale: 10 Delaunay: 0 Interior: 1 Exterior: 0 Infinity: 0 --- !u!23 &846115541 MeshRenderer: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 846115539} m_Enabled: 1 m_CastShadows: 1 m_ReceiveShadows: 1 m_DynamicOccludee: 1 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RenderingLayerMask: 4294967295 m_Materials: - {fileID: 2100000, guid: f4224fb006eda42378257492a49fecb9, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 m_StaticBatchRoot: {fileID: 0} m_ProbeAnchor: {fileID: 0} m_LightProbeVolumeOverride: {fileID: 0} m_ScaleInLightmap: 1 m_PreserveUVs: 0 m_IgnoreNormalsForChartDetection: 0 m_ImportantGI: 0 m_StitchLightmapSeams: 0 m_SelectedEditorRenderState: 3 m_MinimumChartSize: 4 m_AutoUVMaxDistance: 0.5 m_AutoUVMaxAngle: 89 m_LightmapParameters: {fileID: 0} m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 --- !u!33 &846115542 MeshFilter: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 846115539} m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} --- !u!4 &846115543 Transform: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 846115539} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: -0.001} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 1217621049} m_RootOrder: 2 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &1079791005 GameObject: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} serializedVersion: 5 m_Component: - component: {fileID: 1079791009} - component: {fileID: 1079791008} - component: {fileID: 1079791007} - component: {fileID: 1079791006} m_Layer: 0 m_Name: Tail SVG Renderer m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!114 &1079791006 MonoBehaviour: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 1079791005} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 3646afd5fb564c6b914c04b46d4417c8, type: 3} m_Name: m_EditorClassIdentifier: Scale: 20 Delaunay: 0 Interior: 1 Exterior: 1 Infinity: 0 --- !u!23 &1079791007 MeshRenderer: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 1079791005} m_Enabled: 1 m_CastShadows: 1 m_ReceiveShadows: 1 m_DynamicOccludee: 1 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RenderingLayerMask: 4294967295 m_Materials: - {fileID: 2100000, guid: f4224fb006eda42378257492a49fecb9, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 m_StaticBatchRoot: {fileID: 0} m_ProbeAnchor: {fileID: 0} m_LightProbeVolumeOverride: {fileID: 0} m_ScaleInLightmap: 1 m_PreserveUVs: 0 m_IgnoreNormalsForChartDetection: 0 m_ImportantGI: 0 m_StitchLightmapSeams: 0 m_SelectedEditorRenderState: 3 m_MinimumChartSize: 4 m_AutoUVMaxDistance: 0.5 m_AutoUVMaxAngle: 89 m_LightmapParameters: {fileID: 0} m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 --- !u!33 &1079791008 MeshFilter: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 1079791005} m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} --- !u!4 &1079791009 Transform: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 1079791005} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 1603712451} m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &1217621047 GameObject: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} serializedVersion: 5 m_Component: - component: {fileID: 1217621049} - component: {fileID: 1217621048} m_Layer: 0 m_Name: Move m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!114 &1217621048 MonoBehaviour: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 1217621047} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: ee73e1f19ad0d455bb6879994b42733b, type: 3} m_Name: m_EditorClassIdentifier: R: 0.5 IntervalRate: 1 HeadMesh: {fileID: 844179446} TailMesh: {fileID: 1736451195} BodyMesh: {fileID: 846115540} --- !u!4 &1217621049 Transform: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 1217621047} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: - {fileID: 844179449} - {fileID: 1736451198} - {fileID: 846115543} m_Father: {fileID: 0} m_RootOrder: 2 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &1431270879 GameObject: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} serializedVersion: 5 m_Component: - component: {fileID: 1431270883} - component: {fileID: 1431270882} - component: {fileID: 1431270881} - component: {fileID: 1431270880} m_Layer: 0 m_Name: Head SVG Renderer m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!114 &1431270880 MonoBehaviour: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 1431270879} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 3646afd5fb564c6b914c04b46d4417c8, type: 3} m_Name: m_EditorClassIdentifier: Scale: 20 Delaunay: 0 Interior: 1 Exterior: 1 Infinity: 0 --- !u!23 &1431270881 MeshRenderer: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 1431270879} m_Enabled: 1 m_CastShadows: 1 m_ReceiveShadows: 1 m_DynamicOccludee: 1 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RenderingLayerMask: 4294967295 m_Materials: - {fileID: 2100000, guid: f4224fb006eda42378257492a49fecb9, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 m_StaticBatchRoot: {fileID: 0} m_ProbeAnchor: {fileID: 0} m_LightProbeVolumeOverride: {fileID: 0} m_ScaleInLightmap: 1 m_PreserveUVs: 0 m_IgnoreNormalsForChartDetection: 0 m_ImportantGI: 0 m_StitchLightmapSeams: 0 m_SelectedEditorRenderState: 3 m_MinimumChartSize: 4 m_AutoUVMaxDistance: 0.5 m_AutoUVMaxAngle: 89 m_LightmapParameters: {fileID: 0} m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 --- !u!33 &1431270882 MeshFilter: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 1431270879} m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} --- !u!4 &1431270883 Transform: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 1431270879} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 1786584329} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &1453577286 GameObject: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} serializedVersion: 5 m_Component: - component: {fileID: 1453577290} - component: {fileID: 1453577289} - component: {fileID: 1453577288} - component: {fileID: 1453577287} m_Layer: 0 m_Name: Body SVG Renderer m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!114 &1453577287 MonoBehaviour: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 1453577286} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 3646afd5fb564c6b914c04b46d4417c8, type: 3} m_Name: m_EditorClassIdentifier: Scale: 10 Delaunay: 0 Interior: 1 Exterior: 0 Infinity: 0 --- !u!23 &1453577288 MeshRenderer: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 1453577286} m_Enabled: 1 m_CastShadows: 1 m_ReceiveShadows: 1 m_DynamicOccludee: 1 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RenderingLayerMask: 4294967295 m_Materials: - {fileID: 2100000, guid: f4224fb006eda42378257492a49fecb9, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 m_StaticBatchRoot: {fileID: 0} m_ProbeAnchor: {fileID: 0} m_LightProbeVolumeOverride: {fileID: 0} m_ScaleInLightmap: 1 m_PreserveUVs: 0 m_IgnoreNormalsForChartDetection: 0 m_ImportantGI: 0 m_StitchLightmapSeams: 0 m_SelectedEditorRenderState: 3 m_MinimumChartSize: 4 m_AutoUVMaxDistance: 0.5 m_AutoUVMaxAngle: 89 m_LightmapParameters: {fileID: 0} m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 --- !u!33 &1453577289 MeshFilter: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 1453577286} m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} --- !u!4 &1453577290 Transform: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 1453577286} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: -0.001} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 1786584329} m_RootOrder: 2 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &1526980365 GameObject: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} serializedVersion: 5 m_Component: - component: {fileID: 1526980367} - component: {fileID: 1526980366} m_Layer: 0 m_Name: Directional Light m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!108 &1526980366 Light: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 1526980365} m_Enabled: 1 serializedVersion: 8 m_Type: 1 m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} m_Intensity: 1 m_Range: 10 m_SpotAngle: 30 m_CookieSize: 10 m_Shadows: m_Type: 2 m_Resolution: 2 m_CustomResolution: -1 m_Strength: 1 m_Bias: 0.005 m_NormalBias: 0.1 m_NearPlane: 5 m_Cookie: {fileID: 0} m_DrawHalo: 0 m_Flare: {fileID: 0} m_RenderMode: 0 m_CullingMask: serializedVersion: 2 m_Bits: 4294967295 m_Lightmapping: 1 m_AreaSize: {x: 1, y: 1} m_BounceIntensity: 1 m_ColorTemperature: 6570 m_UseColorTemperature: 0 m_ShadowRadius: 0 m_ShadowAngle: 0 --- !u!4 &1526980367 Transform: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 1526980365} m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261} m_LocalPosition: {x: 0, y: 3, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 0} m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} --- !u!1 &1603712449 GameObject: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} serializedVersion: 5 m_Component: - component: {fileID: 1603712451} - component: {fileID: 1603712450} m_Layer: 0 m_Name: Move m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!114 &1603712450 MonoBehaviour: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 1603712449} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: ee73e1f19ad0d455bb6879994b42733b, type: 3} m_Name: m_EditorClassIdentifier: R: 0.190962 IntervalRate: 0.6666667 HeadMesh: {fileID: 158464437} TailMesh: {fileID: 1079791006} BodyMesh: {fileID: 299379089} --- !u!4 &1603712451 Transform: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 1603712449} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: -0.002} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: - {fileID: 158464440} - {fileID: 1079791009} - {fileID: 299379092} m_Father: {fileID: 0} m_RootOrder: 4 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &1736451194 GameObject: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} serializedVersion: 5 m_Component: - component: {fileID: 1736451198} - component: {fileID: 1736451197} - component: {fileID: 1736451196} - component: {fileID: 1736451195} m_Layer: 0 m_Name: Tail SVG Renderer m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!114 &1736451195 MonoBehaviour: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 1736451194} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 3646afd5fb564c6b914c04b46d4417c8, type: 3} m_Name: m_EditorClassIdentifier: Scale: 20 Delaunay: 0 Interior: 1 Exterior: 1 Infinity: 0 --- !u!23 &1736451196 MeshRenderer: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 1736451194} m_Enabled: 1 m_CastShadows: 1 m_ReceiveShadows: 1 m_DynamicOccludee: 1 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RenderingLayerMask: 4294967295 m_Materials: - {fileID: 2100000, guid: f4224fb006eda42378257492a49fecb9, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 m_StaticBatchRoot: {fileID: 0} m_ProbeAnchor: {fileID: 0} m_LightProbeVolumeOverride: {fileID: 0} m_ScaleInLightmap: 1 m_PreserveUVs: 0 m_IgnoreNormalsForChartDetection: 0 m_ImportantGI: 0 m_StitchLightmapSeams: 0 m_SelectedEditorRenderState: 3 m_MinimumChartSize: 4 m_AutoUVMaxDistance: 0.5 m_AutoUVMaxAngle: 89 m_LightmapParameters: {fileID: 0} m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 --- !u!33 &1736451197 MeshFilter: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 1736451194} m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} --- !u!4 &1736451198 Transform: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 1736451194} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 1217621049} m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &1786584327 GameObject: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} serializedVersion: 5 m_Component: - component: {fileID: 1786584329} - component: {fileID: 1786584328} m_Layer: 0 m_Name: Move m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!114 &1786584328 MonoBehaviour: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 1786584327} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: ee73e1f19ad0d455bb6879994b42733b, type: 3} m_Name: m_EditorClassIdentifier: R: 0.190962 IntervalRate: 0.6666667 HeadMesh: {fileID: 1431270880} TailMesh: {fileID: 7448487} BodyMesh: {fileID: 1453577287} --- !u!4 &1786584329 Transform: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 1786584327} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: -0.001} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: - {fileID: 1431270883} - {fileID: 7448490} - {fileID: 1453577290} m_Father: {fileID: 0} m_RootOrder: 3 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ================================================ FILE: Assets/Samples/Scenes/Move.unity.meta ================================================ fileFormatVersion: 2 guid: f085850555e714718a443257ddb693eb DefaultImporter: externalObjects: {} userData: assetBundleName: assetBundleVariant: ================================================ FILE: Assets/Samples/Scenes/ScriptedCurves.unity ================================================ %YAML 1.1 %TAG !u! tag:unity3d.com,2011: --- !u!29 &1 OcclusionCullingSettings: m_ObjectHideFlags: 0 serializedVersion: 2 m_OcclusionBakeSettings: smallestOccluder: 5 smallestHole: 0.25 backfaceThreshold: 100 m_SceneGUID: 00000000000000000000000000000000 m_OcclusionCullingData: {fileID: 0} --- !u!104 &2 RenderSettings: m_ObjectHideFlags: 0 serializedVersion: 9 m_Fog: 0 m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} m_FogMode: 3 m_FogDensity: 0.01 m_LinearFogStart: 0 m_LinearFogEnd: 300 m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} m_AmbientIntensity: 1 m_AmbientMode: 0 m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} m_HaloStrength: 0.5 m_FlareStrength: 1 m_FlareFadeSpeed: 3 m_HaloTexture: {fileID: 0} m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} m_DefaultReflectionMode: 0 m_DefaultReflectionResolution: 128 m_ReflectionBounces: 1 m_ReflectionIntensity: 1 m_CustomReflection: {fileID: 0} m_Sun: {fileID: 1526980366} m_IndirectSpecularColor: {r: 0.18028334, g: 0.22571334, b: 0.3069219, a: 1} m_UseRadianceAmbientProbe: 0 --- !u!157 &3 LightmapSettings: m_ObjectHideFlags: 0 serializedVersion: 11 m_GIWorkflowMode: 0 m_GISettings: serializedVersion: 2 m_BounceScale: 1 m_IndirectOutputScale: 1 m_AlbedoBoost: 1 m_TemporalCoherenceThreshold: 1 m_EnvironmentLightingMode: 0 m_EnableBakedLightmaps: 1 m_EnableRealtimeLightmaps: 0 m_LightmapEditorSettings: serializedVersion: 10 m_Resolution: 2 m_BakeResolution: 10 m_AtlasSize: 512 m_AO: 0 m_AOMaxDistance: 1 m_CompAOExponent: 1 m_CompAOExponentDirect: 0 m_Padding: 2 m_LightmapParameters: {fileID: 0} m_LightmapsBakeMode: 1 m_TextureCompression: 1 m_FinalGather: 0 m_FinalGatherFiltering: 1 m_FinalGatherRayCount: 256 m_ReflectionCompression: 2 m_MixedBakeMode: 2 m_BakeBackend: 1 m_PVRSampling: 1 m_PVRDirectSampleCount: 32 m_PVRSampleCount: 256 m_PVRBounces: 2 m_PVRFilterTypeDirect: 0 m_PVRFilterTypeIndirect: 0 m_PVRFilterTypeAO: 0 m_PVRFilteringMode: 1 m_PVRCulling: 1 m_PVRFilteringGaussRadiusDirect: 1 m_PVRFilteringGaussRadiusIndirect: 5 m_PVRFilteringGaussRadiusAO: 2 m_PVRFilteringAtrousPositionSigmaDirect: 0.5 m_PVRFilteringAtrousPositionSigmaIndirect: 2 m_PVRFilteringAtrousPositionSigmaAO: 1 m_ShowResolutionOverlay: 1 m_LightingDataAsset: {fileID: 0} m_UseShadowmask: 1 --- !u!196 &4 NavMeshSettings: serializedVersion: 2 m_ObjectHideFlags: 0 m_BuildSettings: serializedVersion: 2 agentTypeID: 0 agentRadius: 0.5 agentHeight: 2 agentSlope: 45 agentClimb: 0.4 ledgeDropHeight: 0 maxJumpAcrossDistance: 0 minRegionArea: 2 manualCellSize: 0 cellSize: 0.16666667 manualTileSize: 0 tileSize: 256 accuratePlacement: 0 debug: m_Flags: 0 m_NavMeshData: {fileID: 0} --- !u!1 &282840810 GameObject: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} serializedVersion: 5 m_Component: - component: {fileID: 282840814} - component: {fileID: 282840813} - component: {fileID: 282840811} m_Layer: 0 m_Name: Main Camera m_TagString: MainCamera m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!81 &282840811 AudioListener: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 282840810} m_Enabled: 1 --- !u!20 &282840813 Camera: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 282840810} m_Enabled: 1 serializedVersion: 2 m_ClearFlags: 2 m_BackGroundColor: {r: 0.21586865, g: 0.70255923, b: 0.9339623, a: 0} m_NormalizedViewPortRect: serializedVersion: 2 x: 0 y: 0 width: 1 height: 1 near clip plane: 0.3 far clip plane: 1000 field of view: 30 orthographic: 0 orthographic size: 5 m_Depth: -1 m_CullingMask: serializedVersion: 2 m_Bits: 4294967295 m_RenderingPath: -1 m_TargetTexture: {fileID: 0} m_TargetDisplay: 0 m_TargetEye: 3 m_HDR: 1 m_AllowMSAA: 0 m_AllowDynamicResolution: 0 m_ForceIntoRT: 1 m_OcclusionCulling: 1 m_StereoConvergence: 10 m_StereoSeparation: 0.022 --- !u!4 &282840814 Transform: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 282840810} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: -20} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 0} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &844179445 GameObject: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} serializedVersion: 5 m_Component: - component: {fileID: 844179449} - component: {fileID: 844179448} - component: {fileID: 844179447} - component: {fileID: 844179446} m_Layer: 0 m_Name: SVG Renderer m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!114 &844179446 MonoBehaviour: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 844179445} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 3646afd5fb564c6b914c04b46d4417c8, type: 3} m_Name: m_EditorClassIdentifier: Scale: 20 Delaunay: 0 Interior: 1 Exterior: 0 Infinity: 0 --- !u!23 &844179447 MeshRenderer: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 844179445} m_Enabled: 1 m_CastShadows: 1 m_ReceiveShadows: 1 m_DynamicOccludee: 1 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RenderingLayerMask: 4294967295 m_Materials: - {fileID: 2100000, guid: cb96685d2fe4044aea3b1370980913a6, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 m_StaticBatchRoot: {fileID: 0} m_ProbeAnchor: {fileID: 0} m_LightProbeVolumeOverride: {fileID: 0} m_ScaleInLightmap: 1 m_PreserveUVs: 0 m_IgnoreNormalsForChartDetection: 0 m_ImportantGI: 0 m_StitchLightmapSeams: 0 m_SelectedEditorRenderState: 3 m_MinimumChartSize: 4 m_AutoUVMaxDistance: 0.5 m_AutoUVMaxAngle: 89 m_LightmapParameters: {fileID: 0} m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 --- !u!33 &844179448 MeshFilter: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 844179445} m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} --- !u!4 &844179449 Transform: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 844179445} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 1217621049} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &1217621047 GameObject: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} serializedVersion: 5 m_Component: - component: {fileID: 1217621049} - component: {fileID: 1217621048} m_Layer: 0 m_Name: Scripted Curves m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!114 &1217621048 MonoBehaviour: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 1217621047} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: e367ad552ec3e49d6b721365f4fb2f1c, type: 3} m_Name: m_EditorClassIdentifier: Mesh: {fileID: 844179446} --- !u!4 &1217621049 Transform: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 1217621047} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: - {fileID: 844179449} m_Father: {fileID: 0} m_RootOrder: 2 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &1526980365 GameObject: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} serializedVersion: 5 m_Component: - component: {fileID: 1526980367} - component: {fileID: 1526980366} m_Layer: 0 m_Name: Directional Light m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!108 &1526980366 Light: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 1526980365} m_Enabled: 1 serializedVersion: 8 m_Type: 1 m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} m_Intensity: 1 m_Range: 10 m_SpotAngle: 30 m_CookieSize: 10 m_Shadows: m_Type: 2 m_Resolution: 2 m_CustomResolution: -1 m_Strength: 1 m_Bias: 0.005 m_NormalBias: 0.1 m_NearPlane: 5 m_Cookie: {fileID: 0} m_DrawHalo: 0 m_Flare: {fileID: 0} m_RenderMode: 0 m_CullingMask: serializedVersion: 2 m_Bits: 4294967295 m_Lightmapping: 1 m_AreaSize: {x: 1, y: 1} m_BounceIntensity: 1 m_ColorTemperature: 6570 m_UseColorTemperature: 0 m_ShadowRadius: 0 m_ShadowAngle: 0 --- !u!4 &1526980367 Transform: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 1526980365} m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261} m_LocalPosition: {x: 0, y: 3, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 0} m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} ================================================ FILE: Assets/Samples/Scenes/ScriptedCurves.unity.meta ================================================ fileFormatVersion: 2 guid: 0d972eba989374d6aa9f7085a4b06c2a DefaultImporter: externalObjects: {} userData: assetBundleName: assetBundleVariant: ================================================ FILE: Assets/Samples/Scenes/Simple.unity ================================================ %YAML 1.1 %TAG !u! tag:unity3d.com,2011: --- !u!29 &1 OcclusionCullingSettings: m_ObjectHideFlags: 0 serializedVersion: 2 m_OcclusionBakeSettings: smallestOccluder: 5 smallestHole: 0.25 backfaceThreshold: 100 m_SceneGUID: 00000000000000000000000000000000 m_OcclusionCullingData: {fileID: 0} --- !u!104 &2 RenderSettings: m_ObjectHideFlags: 0 serializedVersion: 9 m_Fog: 0 m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} m_FogMode: 3 m_FogDensity: 0.01 m_LinearFogStart: 0 m_LinearFogEnd: 300 m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} m_AmbientIntensity: 1 m_AmbientMode: 0 m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} m_HaloStrength: 0.5 m_FlareStrength: 1 m_FlareFadeSpeed: 3 m_HaloTexture: {fileID: 0} m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} m_DefaultReflectionMode: 0 m_DefaultReflectionResolution: 128 m_ReflectionBounces: 1 m_ReflectionIntensity: 1 m_CustomReflection: {fileID: 0} m_Sun: {fileID: 1526980366} m_IndirectSpecularColor: {r: 0.18028334, g: 0.22571334, b: 0.3069219, a: 1} m_UseRadianceAmbientProbe: 0 --- !u!157 &3 LightmapSettings: m_ObjectHideFlags: 0 serializedVersion: 11 m_GIWorkflowMode: 0 m_GISettings: serializedVersion: 2 m_BounceScale: 1 m_IndirectOutputScale: 1 m_AlbedoBoost: 1 m_TemporalCoherenceThreshold: 1 m_EnvironmentLightingMode: 0 m_EnableBakedLightmaps: 1 m_EnableRealtimeLightmaps: 0 m_LightmapEditorSettings: serializedVersion: 10 m_Resolution: 2 m_BakeResolution: 10 m_AtlasSize: 512 m_AO: 0 m_AOMaxDistance: 1 m_CompAOExponent: 1 m_CompAOExponentDirect: 0 m_Padding: 2 m_LightmapParameters: {fileID: 0} m_LightmapsBakeMode: 1 m_TextureCompression: 1 m_FinalGather: 0 m_FinalGatherFiltering: 1 m_FinalGatherRayCount: 256 m_ReflectionCompression: 2 m_MixedBakeMode: 2 m_BakeBackend: 1 m_PVRSampling: 1 m_PVRDirectSampleCount: 32 m_PVRSampleCount: 256 m_PVRBounces: 2 m_PVRFilterTypeDirect: 0 m_PVRFilterTypeIndirect: 0 m_PVRFilterTypeAO: 0 m_PVRFilteringMode: 1 m_PVRCulling: 1 m_PVRFilteringGaussRadiusDirect: 1 m_PVRFilteringGaussRadiusIndirect: 5 m_PVRFilteringGaussRadiusAO: 2 m_PVRFilteringAtrousPositionSigmaDirect: 0.5 m_PVRFilteringAtrousPositionSigmaIndirect: 2 m_PVRFilteringAtrousPositionSigmaAO: 1 m_ShowResolutionOverlay: 1 m_LightingDataAsset: {fileID: 0} m_UseShadowmask: 1 --- !u!196 &4 NavMeshSettings: serializedVersion: 2 m_ObjectHideFlags: 0 m_BuildSettings: serializedVersion: 2 agentTypeID: 0 agentRadius: 0.5 agentHeight: 2 agentSlope: 45 agentClimb: 0.4 ledgeDropHeight: 0 maxJumpAcrossDistance: 0 minRegionArea: 2 manualCellSize: 0 cellSize: 0.16666667 manualTileSize: 0 tileSize: 256 accuratePlacement: 0 debug: m_Flags: 0 m_NavMeshData: {fileID: 0} --- !u!1 &282840810 GameObject: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} serializedVersion: 5 m_Component: - component: {fileID: 282840814} - component: {fileID: 282840813} - component: {fileID: 282840811} m_Layer: 0 m_Name: Main Camera m_TagString: MainCamera m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!81 &282840811 AudioListener: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 282840810} m_Enabled: 1 --- !u!20 &282840813 Camera: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 282840810} m_Enabled: 1 serializedVersion: 2 m_ClearFlags: 2 m_BackGroundColor: {r: 0.21586865, g: 0.70255923, b: 0.9339623, a: 0} m_NormalizedViewPortRect: serializedVersion: 2 x: 0 y: 0 width: 1 height: 1 near clip plane: 0.3 far clip plane: 1000 field of view: 30 orthographic: 0 orthographic size: 5 m_Depth: -1 m_CullingMask: serializedVersion: 2 m_Bits: 4294967295 m_RenderingPath: -1 m_TargetTexture: {fileID: 0} m_TargetDisplay: 0 m_TargetEye: 3 m_HDR: 1 m_AllowMSAA: 0 m_AllowDynamicResolution: 0 m_ForceIntoRT: 1 m_OcclusionCulling: 1 m_StereoConvergence: 10 m_StereoSeparation: 0.022 --- !u!4 &282840814 Transform: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 282840810} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: -50} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 0} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &844179445 GameObject: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} serializedVersion: 5 m_Component: - component: {fileID: 844179449} - component: {fileID: 844179448} - component: {fileID: 844179447} - component: {fileID: 844179446} m_Layer: 0 m_Name: SVG Renderer m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!114 &844179446 MonoBehaviour: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 844179445} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 3646afd5fb564c6b914c04b46d4417c8, type: 3} m_Name: m_EditorClassIdentifier: Scale: 10 Delaunay: 0 Interior: 1 Exterior: 0 Infinity: 0 --- !u!23 &844179447 MeshRenderer: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 844179445} m_Enabled: 1 m_CastShadows: 1 m_ReceiveShadows: 1 m_DynamicOccludee: 1 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RenderingLayerMask: 4294967295 m_Materials: - {fileID: 2100000, guid: cb96685d2fe4044aea3b1370980913a6, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 m_StaticBatchRoot: {fileID: 0} m_ProbeAnchor: {fileID: 0} m_LightProbeVolumeOverride: {fileID: 0} m_ScaleInLightmap: 1 m_PreserveUVs: 0 m_IgnoreNormalsForChartDetection: 0 m_ImportantGI: 0 m_StitchLightmapSeams: 0 m_SelectedEditorRenderState: 3 m_MinimumChartSize: 4 m_AutoUVMaxDistance: 0.5 m_AutoUVMaxAngle: 89 m_LightmapParameters: {fileID: 0} m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 --- !u!33 &844179448 MeshFilter: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 844179445} m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} --- !u!4 &844179449 Transform: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 844179445} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: -9, y: 9, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 1217621049} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &1217621047 GameObject: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} serializedVersion: 5 m_Component: - component: {fileID: 1217621049} - component: {fileID: 1217621048} m_Layer: 0 m_Name: Simple m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!114 &1217621048 MonoBehaviour: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 1217621047} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 8365665d205cd4aa0ab4bac914001458, type: 3} m_Name: m_EditorClassIdentifier: Mesh: {fileID: 844179446} --- !u!4 &1217621049 Transform: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 1217621047} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: - {fileID: 844179449} m_Father: {fileID: 0} m_RootOrder: 2 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &1526980365 GameObject: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} serializedVersion: 5 m_Component: - component: {fileID: 1526980367} - component: {fileID: 1526980366} m_Layer: 0 m_Name: Directional Light m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!108 &1526980366 Light: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 1526980365} m_Enabled: 1 serializedVersion: 8 m_Type: 1 m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} m_Intensity: 1 m_Range: 10 m_SpotAngle: 30 m_CookieSize: 10 m_Shadows: m_Type: 2 m_Resolution: 2 m_CustomResolution: -1 m_Strength: 1 m_Bias: 0.005 m_NormalBias: 0.1 m_NearPlane: 5 m_Cookie: {fileID: 0} m_DrawHalo: 0 m_Flare: {fileID: 0} m_RenderMode: 0 m_CullingMask: serializedVersion: 2 m_Bits: 4294967295 m_Lightmapping: 1 m_AreaSize: {x: 1, y: 1} m_BounceIntensity: 1 m_ColorTemperature: 6570 m_UseColorTemperature: 0 m_ShadowRadius: 0 m_ShadowAngle: 0 --- !u!4 &1526980367 Transform: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 1526980365} m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261} m_LocalPosition: {x: 0, y: 3, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 0} m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} ================================================ FILE: Assets/Samples/Scenes/Simple.unity.meta ================================================ fileFormatVersion: 2 guid: 99c9720ab356a0642a771bea13969a05 DefaultImporter: externalObjects: {} userData: assetBundleName: assetBundleVariant: ================================================ FILE: Assets/Samples/Scenes.meta ================================================ fileFormatVersion: 2 guid: e5b34f571e4134002a9b28c72cc16d5c folderAsset: yes DefaultImporter: externalObjects: {} userData: assetBundleName: assetBundleVariant: ================================================ FILE: Assets/Samples/Scripts/Circle.cs ================================================ using SVGMeshUnity; using UnityEngine; public class Circle : MonoBehaviour { [SerializeField] private SVGMesh Mesh; private SVGData SVG; void Start() { SVG = new SVGData(); } void Update() { SVG.Clear(); for (var i = 0; i < 4; ++i) { var angle0 = Mathf.PI * 0.5f * (i + 0); var angle1 = Mathf.PI * 0.5f * (i + 1); var r = 3f; var x0 = Mathf.Cos(angle0) * r; var y0 = Mathf.Sin(angle0) * r; var x1 = Mathf.Cos(angle1) * r; var y1 = Mathf.Sin(angle1) * r; var a = r * (4f / 3f) * Mathf.Tan((angle1 - angle0) / 4f); var inAngle = angle0 + Mathf.PI * 0.5f; var inX = x0 + Mathf.Cos(inAngle) * a; var inY = y0 + Mathf.Sin(inAngle) * a; var outAngle = angle1 - Mathf.PI * 0.5f; var outX = x1 + Mathf.Cos(outAngle) * a; var outY = y1 + Mathf.Sin(outAngle) * a; if (i == 0) { SVG.Move(x0, y0); } SVG.Curve(inX, inY, outX, outY, x1, y1); } Mesh.Fill(SVG); } } ================================================ FILE: Assets/Samples/Scripts/Circle.cs.meta ================================================ fileFormatVersion: 2 guid: a2e2ff5e6bbee4f7c8b06c855c0c8431 MonoImporter: externalObjects: {} serializedVersion: 2 defaultReferences: [] executionOrder: 0 icon: {instanceID: 0} userData: assetBundleName: assetBundleVariant: ================================================ FILE: Assets/Samples/Scripts/Cut.cs ================================================ using System; using System.Collections.Generic; using System.Linq; using SVGMeshUnity; using UnityEngine; using Random = UnityEngine.Random; public class Cut : MonoBehaviour { class Rect : MonoBehaviour { public Vector2 A; public Vector2 B; public Vector2 C; public Vector2 D; public Vector2 PrevA; public Vector2 PrevB; public Vector2 PrevC; public Vector2 PrevD; public Vector4 R; public Vector2 Velocity; public Func, Rect> NewRect; private SVGData SVG; private SVGMesh Mesh; void Start() { SVG = new SVGData(); Mesh = GetComponent(); PrevA = A; PrevB = B; PrevC = C; PrevD = D; Render(); } void Update() { Update(Time.deltaTime); Render(); } private void Update(float dt) { R = Vector4.Lerp(Vector4.one * 0.6f, R, Mathf.Exp(-0.5f * dt)); PrevA = A; PrevB = B; PrevC = C; PrevD = D; A += Velocity; B += Velocity; C += Velocity; D += Velocity; Velocity = Vector2.Lerp(Vector2.zero, Velocity, Mathf.Exp(-5f * dt)); } private void Render() { SVG.Clear(); Draw(SVG); Mesh.Fill(SVG); } private void Draw(SVGData svg) { DrawR(svg, A, D, B, R.x, true); DrawR(svg, B, A, C, R.y); DrawR(svg, C, B, D, R.z); DrawR(svg, D, C, A, R.w); } private void DrawR(SVGData svg, Vector2 p, Vector2 pPrev, Vector2 pNext, float r, bool first = false) { var angle0 = Mathf.Atan2(p.y - pNext.y, p.x - pNext.x); var angle1 = Mathf.Atan2(p.y - pPrev.y, p.x - pPrev.x); if (angle0 > angle1) { angle0 = angle0 - Mathf.PI * 2f; } var angleBetween = Mathf.Lerp(angle0, angle1, 0.5f); var cx = p.x - Mathf.Cos(angleBetween) * r * Mathf.Sqrt(2f); var cy = p.y - Mathf.Sin(angleBetween) * r * Mathf.Sqrt(2f); var x0 = cx + Mathf.Cos(angle0) * r; var y0 = cy + Mathf.Sin(angle0) * r; var x1 = cx + Mathf.Cos(angle1) * r; var y1 = cy + Mathf.Sin(angle1) * r; var a = r * (4f / 3f) * Mathf.Tan((angle1 - angle0) / 4f); var inAngle = angle0 + Mathf.PI * 0.5f; var inX = x0 + Mathf.Cos(inAngle) * a; var inY = y0 + Mathf.Sin(inAngle) * a; var outAngle = angle1 - Mathf.PI * 0.5f; var outX = x1 + Mathf.Cos(outAngle) * a; var outY = y1 + Mathf.Sin(outAngle) * a; if (first) { svg.Move(x0, y0); } else { svg.Line(x0, y0); } svg.Curve(inX, inY, outX, outY, x1, y1); } public void Split(Vector2 p1, Vector2 p2, List rects) { var ab = GetIntersection(p1, p2, A, B); var bc = GetIntersection(p1, p2, B, C); var cd = GetIntersection(p1, p2, C, D); var da = GetIntersection(p1, p2, D, A); var vel = Random.Range(0.001f, 0.002f) * 6f; var vel2 = Random.Range(0.006f, 0.007f) * 6f; if (ab != null && cd != null) { rects.Add(NewRect(r => { r.A = A; r.B = ab.Value; r.C = cd.Value; r.D = D; r.R = new Vector4(R.x, 0f, 0f, R.w); r.Velocity = Velocity + new Vector2(vel, vel2); })); rects.Add(NewRect(r => { r.A = ab.Value; r.B = B; r.C = C; r.D = cd.Value; r.R = new Vector4(0f, R.y, R.z, 0f); r.Velocity = Velocity - new Vector2(vel, vel2); })); Destroy(gameObject); } if (bc != null && da != null) { rects.Remove(this); rects.Add(NewRect(r => { r.A = A; r.B = B; r.C = bc.Value; r.D = da.Value; r.R = new Vector4(R.x, R.y, 0f, 0f); r.Velocity = Velocity + new Vector2(vel2, vel); })); rects.Add(NewRect(r => { r.A = da.Value; r.B = bc.Value; r.C = C; r.D = D; r.R = new Vector4(0f, 0f, R.z, R.w); r.Velocity = Velocity - new Vector2(vel2, vel); })); Destroy(gameObject); } } private Vector2? GetIntersection(Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4) { var d = (p2.x - p1.x) * (p4.y - p3.y) - (p2.y - p1.y) * (p4.x - p3.x); if (d == 0f) { return null; } var u = ((p3.x - p1.x) * (p4.y - p3.y) - (p3.y - p1.y) * (p4.x - p3.x)) / d; var v = ((p3.x - p1.x) * (p2.y - p1.y) - (p3.y - p1.y) * (p2.x - p1.x)) / d; if (u < 0.0f || u > 1.0f) { return null; } if (v < 0.0f || v > 1.0f) { return null; } return Vector2.Lerp(p1, p2, u); } public bool HitTest(Rect other) { var vel = 0.01f; if (IsCollided(A, B, other)) { Velocity += Vector2.down * vel; other.Velocity += Vector2.up * vel; return true; } if (IsCollided(B, C, other)) { Velocity += Vector2.right * vel; other.Velocity += Vector2.left * vel; return true; } if (IsCollided(C, D, other)) { Velocity += Vector2.up * vel; other.Velocity += Vector2.down * vel; return true; } if (IsCollided(D, A, other)) { Velocity += Vector2.left * vel; other.Velocity += Vector2.right * vel; return true; } return false; } private bool IsCollided(Vector2 p1, Vector2 p2, Rect other) { return GetIntersection(p1, p2, other.A, other.PrevA) != null || GetIntersection(p1, p2, other.B, other.PrevB) != null || GetIntersection(p1, p2, other.C, other.PrevC) != null || GetIntersection(p1, p2, other.D, other.PrevD) != null; } } [SerializeField] private GameObject Prefab; [SerializeField] private SVGMesh LineMesh; private List Rects = new List(); private SVGData LineSVG; private Vector2 DragStart; private bool IsDragging; void Start() { Rects.Add(NewRect(r => { r.A = new Vector2(3f, 3f); r.B = new Vector2(-3f, 3f); r.C = new Vector2(-3f, -3f); r.D = new Vector2(3f, -3f); })); LineSVG = new SVGData(); } void Update() { Rects.RemoveAll(r => r == null); for (var i = 0; i < Rects.Count; ++i) { for (var j = i + 1; j < Rects.Count; ++j) { if (Rects[i].HitTest(Rects[j])) { continue; } if (Rects[j].HitTest(Rects[i])) { continue; } } } LineSVG.Clear(); if (IsDragging) { var p = GetMousePoint(); if (Input.GetMouseButton(0)) { DrawLine(LineSVG, DragStart, p); } else { IsDragging = false; foreach (var r in Rects.ToList()) { r.Split(DragStart, p, Rects); } } } else { if (Input.GetMouseButtonDown(0)) { DragStart = GetMousePoint(); IsDragging = true; } } LineMesh.Fill(LineSVG); } private Vector2 GetMousePoint() { var ray = Camera.main.ScreenPointToRay(Input.mousePosition); var enter = 0f; if (new Plane(Vector3.forward, Vector3.zero).Raycast(ray, out enter)) { return Vector2.Scale(ray.GetPoint(enter), new Vector2(1f, -1f)); } return Vector2.zero; } private Rect NewRect(Action f) { var g = Instantiate(Prefab, transform); var r = g.AddComponent(); r.NewRect = NewRect; f(r); g.SetActive(true); return r; } private void DrawLine(SVGData svg, Vector2 from, Vector2 to) { var r = 0.07f; var length = (to - from).magnitude; var angle = Mathf.Atan2(to.y - from.y, to.x - from.x); var matrix = new Matrix4x4(); matrix.SetTRS((Vector3)from, Quaternion.Euler(new Vector3(0f, 0f, angle * Mathf.Rad2Deg)), Vector3.one); var lineW = 1.7f; var interval = 0.2f; var s = 0f; for (;;) { var len = Mathf.Min(lineW, length - s); var a = new Vector2(s + len, r); var b = new Vector2(s, r); var c = new Vector2(s, -r); var d = new Vector2(s + len, -r); DrawR(svg, a, d, b, r, matrix, true); DrawR(svg, b, a, c, r, matrix); DrawR(svg, c, b, d, r, matrix); DrawR(svg, d, c, a, r, matrix); s += lineW + interval; if (s > length) { break; } } } private void DrawR(SVGData svg, Vector2 p, Vector2 pPrev, Vector2 pNext, float r, Matrix4x4 matrix, bool first = false) { var angle0 = Mathf.Atan2(p.y - pNext.y, p.x - pNext.x); var angle1 = Mathf.Atan2(p.y - pPrev.y, p.x - pPrev.x); if (angle0 > angle1) { angle0 = angle0 - Mathf.PI * 2f; } var angleBetween = Mathf.Lerp(angle0, angle1, 0.5f); var cx = p.x - Mathf.Cos(angleBetween) * r * Mathf.Sqrt(2f); var cy = p.y - Mathf.Sin(angleBetween) * r * Mathf.Sqrt(2f); var x0 = cx + Mathf.Cos(angle0) * r; var y0 = cy + Mathf.Sin(angle0) * r; var x1 = cx + Mathf.Cos(angle1) * r; var y1 = cy + Mathf.Sin(angle1) * r; var a = r * (4f / 3f) * Mathf.Tan((angle1 - angle0) / 4f); var inAngle = angle0 + Mathf.PI * 0.5f; var inX = x0 + Mathf.Cos(inAngle) * a; var inY = y0 + Mathf.Sin(inAngle) * a; var outAngle = angle1 - Mathf.PI * 0.5f; var outX = x1 + Mathf.Cos(outAngle) * a; var outY = y1 + Mathf.Sin(outAngle) * a; var p0 = matrix.MultiplyPoint(new Vector3(x0, y0)); var p1 = matrix.MultiplyPoint(new Vector3(x1, y1)); var pIn = matrix.MultiplyPoint(new Vector3(inX, inY)); var pOut = matrix.MultiplyPoint(new Vector3(outX, outY)); if (first) { svg.Move(p0); } else { svg.Line(p0); } svg.Curve(pIn, pOut, p1); } } ================================================ FILE: Assets/Samples/Scripts/Cut.cs.meta ================================================ fileFormatVersion: 2 guid: b84498ce3fe84d25938244fbf07b7494 timeCreated: 1520214682 ================================================ FILE: Assets/Samples/Scripts/MetaballBehaviour.cs ================================================ using SVGMeshUnity; using UnityEngine; public class MetaballBehaviour : MonoBehaviour { [SerializeField] private SVGMesh Circle1Mesh; [SerializeField] private SVGMesh Circle2Mesh; [SerializeField] private SVGMesh MetaballMesh; private SVGData Circle1SVG; private SVGData Circle2SVG; private SVGData MetaballSVG; void Start() { Circle1SVG = new SVGData(); Circle2SVG = new SVGData(); MetaballSVG = new SVGData(); } void Update() { Circle1SVG.Clear(); Circle2SVG.Clear(); MetaballSVG.Clear(); var c1 = (Vector2) Circle1Mesh.transform.localPosition; var c2 = (Vector2) Circle2Mesh.transform.localPosition; var c1R = 1f; var c2R = 1.2f; var v = Mathf.Max(0.5f, 1.3f - Mathf.Clamp01((c2 - c1).magnitude / 8f)); Circle(Circle1SVG, Vector2.zero, c1R); Circle(Circle2SVG, Vector2.zero, c2R); Metaball(MetaballSVG, c1, c1R, c2, c2R, v); Circle1Mesh.Fill(Circle1SVG); Circle2Mesh.Fill(Circle2SVG); MetaballMesh.Fill(MetaballSVG); } private void Circle(SVGData svg, Vector2 c, float r) { for (var i = 0; i < 4; ++i) { var angle0 = Mathf.PI * 0.5f * (i + 0); var angle1 = Mathf.PI * 0.5f * (i + 1); var x0 = c.x + Mathf.Cos(angle0) * r; var y0 = c.y - Mathf.Sin(angle0) * r; var x1 = c.x + Mathf.Cos(angle1) * r; var y1 = c.y - Mathf.Sin(angle1) * r; var a = r * (4f / 3f) * Mathf.Tan((angle1 - angle0) / 4f); var inAngle = angle0 + Mathf.PI * 0.5f; var inX = x0 + Mathf.Cos(inAngle) * a; var inY = y0 - Mathf.Sin(inAngle) * a; var outAngle = angle1 - Mathf.PI * 0.5f; var outX = x1 + Mathf.Cos(outAngle) * a; var outY = y1 - Mathf.Sin(outAngle) * a; if (i == 0) { svg.Move(x0, y0); } svg.Curve(inX, inY, outX, outY, x1, y1); } } // http://shspage.com/aijs/ private void Metaball(SVGData svg, Vector2 c1, float r1, Vector2 c2, float r2, float v) { if (r1 == 0f || r2 == 0f) { return; } var pi2 = Mathf.PI / 2f; var d = (c2 - c1).magnitude; var u1 = 0f; var u2 = 0f; if (d <= Mathf.Abs(r1 - r2)) { return; } else if (d < r1 + r2) { // case circles are overlapping u1 = Mathf.Acos((r1 * r1 + d * d - r2 * r2) / (2 * r1 * d)); u2 = Mathf.Acos((r2 * r2 + d * d - r1 * r1) / (2 * r2 * d)); } var t1 = Mathf.Atan2(c2.y - c1.y, c2.x - c1.x); var t2 = Mathf.Acos((r1 - r2) / d); var t1a = t1 + u1 + (t2 - u1) * v; var t1b = t1 - u1 - (t2 - u1) * v; var t2a = t1 + Mathf.PI - u2 - (Mathf.PI - u2 - t2) * v; var t2b = t1 - Mathf.PI + u2 + (Mathf.PI - u2 - t2) * v; var p1a = PointOnCircle(c1, t1a, r1); var p1b = PointOnCircle(c1, t1b, r1); var p2a = PointOnCircle(c2, t2a, r2); var p2b = PointOnCircle(c2, t2b, r2); // define handle length by the distance between both ends of the curve to draw var handle_len_rate = 2; var d2 = Mathf.Min(v * handle_len_rate, (p2a - p1a).magnitude / (r1 + r2)); d2 *= Mathf.Min(1, d * 2 / (r1 + r2)); // case circles are overlapping r1 *= d2; r2 *= d2; svg.Move(p1a); svg.Curve(PointOnCircle(p1a, t1a - pi2, r1), PointOnCircle(p2a, t2a + pi2, r2), p2a); svg.Line(p2b); svg.Curve(PointOnCircle(p2b, t2b - pi2, r2), PointOnCircle(p1b, t1b + pi2, r1), p1b); svg.Line(p1a); } private Vector2 PointOnCircle(Vector2 c, float angle, float r) { return c + new Vector2(Mathf.Cos(angle), Mathf.Sin(angle)) * r; } } ================================================ FILE: Assets/Samples/Scripts/MetaballBehaviour.cs.meta ================================================ fileFormatVersion: 2 guid: fe7ce92f7a0454b6f9b8e855e7e2a2d3 MonoImporter: externalObjects: {} serializedVersion: 2 defaultReferences: [] executionOrder: 0 icon: {instanceID: 0} userData: assetBundleName: assetBundleVariant: ================================================ FILE: Assets/Samples/Scripts/Move.cs ================================================ using SVGMeshUnity; using UnityEngine; public class Move : MonoBehaviour { [SerializeField] private float R = 0.5f; [SerializeField] private float IntervalRate = 1f; [SerializeField] private SVGMesh HeadMesh; [SerializeField] private SVGMesh TailMesh; [SerializeField] private SVGMesh BodyMesh; private SVGData HeadSVG; private SVGData TailSVG; private SVGData BodySVG; private Vector2 Head; private Vector2 Tail; private Vector2 To; private float HeadR; private float TailR; private float Interval; private float FollowTime; void Start() { HeadSVG = new SVGData(); TailSVG = new SVGData(); BodySVG = new SVGData(); Head = RandomField(); Tail = Head; } void Update() { HeadSVG.Clear(); TailSVG.Clear(); BodySVG.Clear(); Update(Time.deltaTime); var v = Mathf.Max(0.7f, 1.3f - Mathf.Clamp01((Head - Tail).magnitude / 3f)); Circle(HeadSVG, Head, HeadR); Circle(TailSVG, Tail, TailR); Metaball(BodySVG, Head, HeadR, Tail, TailR, v); HeadMesh.Fill(HeadSVG); TailMesh.Fill(TailSVG); BodyMesh.Fill(BodySVG); } private void Update(float dt) { Interval -= dt; FollowTime -= dt; if (Interval <= 0f) { To = RandomField(); To = Head + Vector2.ClampMagnitude(To - Head, 2f); HeadR = R * 0.15f; TailR = R; Interval = Random.Range(1.5f, 2.6f) * IntervalRate; FollowTime = Random.Range(0.15f, 0.25f); } Head = Vector2.Lerp(To, Head, Mathf.Exp(-5f * dt)); if (FollowTime <= 0f) { Tail = Vector2.Lerp(Head, Tail, Mathf.Exp(-5f * dt)); if (FollowTime <= -0.4f) { TailR = Mathf.Lerp(R, TailR, Mathf.Exp(-4f * dt)); } else { TailR = Mathf.Lerp(R * 0.05f, TailR, Mathf.Exp(-6f * dt)); } HeadR = Mathf.Lerp(R, HeadR, Mathf.Exp(-3f * dt)); } } private Vector2 RandomField() { return new Vector2(Random.Range(-4f, 4f), Random.Range(-4f, 4f)); } private void Circle(SVGData svg, Vector2 c, float r) { for (var i = 0; i < 4; ++i) { var angle0 = Mathf.PI * 0.5f * (i + 0); var angle1 = Mathf.PI * 0.5f * (i + 1); var x0 = c.x + Mathf.Cos(angle0) * r; var y0 = c.y - Mathf.Sin(angle0) * r; var x1 = c.x + Mathf.Cos(angle1) * r; var y1 = c.y - Mathf.Sin(angle1) * r; var a = r * (4f / 3f) * Mathf.Tan((angle1 - angle0) / 4f); var inAngle = angle0 + Mathf.PI * 0.5f; var inX = x0 + Mathf.Cos(inAngle) * a; var inY = y0 - Mathf.Sin(inAngle) * a; var outAngle = angle1 - Mathf.PI * 0.5f; var outX = x1 + Mathf.Cos(outAngle) * a; var outY = y1 - Mathf.Sin(outAngle) * a; if (i == 0) { svg.Move(x0, y0); } svg.Curve(inX, inY, outX, outY, x1, y1); } } // http://shspage.com/aijs/ private void Metaball(SVGData svg, Vector2 c1, float r1, Vector2 c2, float r2, float v) { if (r1 == 0f || r2 == 0f) { return; } var pi2 = Mathf.PI / 2f; var d = (c2 - c1).magnitude; var u1 = 0f; var u2 = 0f; if (d <= Mathf.Abs(r1 - r2)) { return; } else if (d < r1 + r2) { // case circles are overlapping u1 = Mathf.Acos((r1 * r1 + d * d - r2 * r2) / (2 * r1 * d)); u2 = Mathf.Acos((r2 * r2 + d * d - r1 * r1) / (2 * r2 * d)); } var t1 = Mathf.Atan2(c2.y - c1.y, c2.x - c1.x); var t2 = Mathf.Acos((r1 - r2) / d); var t1a = t1 + u1 + (t2 - u1) * v; var t1b = t1 - u1 - (t2 - u1) * v; var t2a = t1 + Mathf.PI - u2 - (Mathf.PI - u2 - t2) * v; var t2b = t1 - Mathf.PI + u2 + (Mathf.PI - u2 - t2) * v; var p1a = PointOnCircle(c1, t1a, r1); var p1b = PointOnCircle(c1, t1b, r1); var p2a = PointOnCircle(c2, t2a, r2); var p2b = PointOnCircle(c2, t2b, r2); // define handle length by the distance between both ends of the curve to draw var handle_len_rate = 2; var d2 = Mathf.Min(v * handle_len_rate, (p2a - p1a).magnitude / (r1 + r2)); d2 *= Mathf.Min(1, d * 2 / (r1 + r2)); // case circles are overlapping r1 *= d2; r2 *= d2; svg.Move(p1a); svg.Curve(PointOnCircle(p1a, t1a - pi2, r1), PointOnCircle(p2a, t2a + pi2, r2), p2a); svg.Line(p2b); svg.Curve(PointOnCircle(p2b, t2b - pi2, r2), PointOnCircle(p1b, t1b + pi2, r1), p1b); svg.Line(p1a); } private Vector2 PointOnCircle(Vector2 c, float angle, float r) { return c + new Vector2(Mathf.Cos(angle), Mathf.Sin(angle)) * r; } } ================================================ FILE: Assets/Samples/Scripts/Move.cs.meta ================================================ fileFormatVersion: 2 guid: ee73e1f19ad0d455bb6879994b42733b MonoImporter: externalObjects: {} serializedVersion: 2 defaultReferences: [] executionOrder: 0 icon: {instanceID: 0} userData: assetBundleName: assetBundleVariant: ================================================ FILE: Assets/Samples/Scripts/ScriptedCurves.cs ================================================ using SVGMeshUnity; using UnityEngine; public class ScriptedCurves : MonoBehaviour { [SerializeField] private SVGMesh Mesh; private SVGData SVG; void Start() { SVG = new SVGData(); } /** void Update() { SVG.Clear(); var r = 3f; for (var i = 0; i < 4; ++i) { var t = Time.time * 2f; var i0 = i; var i1 = (i + 1) % 4; var a = Mathf.PI * 0.25f; // (t / (Mathf.PI * 2f)) * Mathf.PI; var angle0 = a + Mathf.PI * 0.5f * i0; var angle1 = a + Mathf.PI * 0.5f * i1; var x0 = Mathf.Cos(angle0) * r; var y0 = Mathf.Sin(angle0) * r; var x1 = Mathf.Cos(angle1) * r; var y1 = Mathf.Sin(angle1) * r; var cx = x0 + (x1 - x0) * 0.5f; var cy = y0 + (y1 - y0) * 0.5f; var ca = Mathf.Atan2(cy, cx); var cr = 0.75f + Mathf.Sin(t) * 1.5f; cx += Mathf.Cos(ca) * cr; cy += Mathf.Sin(ca) * cr; if (i == 0) { SVG.Move(x0, y0); } SVG.Curve(cx, cy, cx, cy, x1, y1); } Mesh.Fill(SVG); } /**/ /**/ void Update() { SVG.Clear(); var resolution = 5; var radius = 3f; SVG.Move(NoisedR(radius, 0), 0f); for (var i = 0; i < resolution; ++i) { var i0 = i; var i1 = (i + 1) % resolution; var angle0 = Mathf.PI * 2f * ((float) i0 / resolution); var angle1 = Mathf.PI * 2f * ((float) i1 / resolution); var r0 = NoisedR(radius, i0); var r1 = NoisedR(radius, i1); var x0 = Mathf.Cos(angle0) * r0; var y0 = Mathf.Sin(angle0) * r0; var x1 = Mathf.Cos(angle1) * r1; var y1 = Mathf.Sin(angle1) * r1; var cx = x0 + (x1 - x0) * 0.5f; var cy = y0 + (y1 - y0) * 0.5f; var ca = Mathf.Atan2(cy, cx); var cr = 0.3f + (Mathf.PerlinNoise(Time.time, i * -100f) - 0.5f) * 1.15f; cx += Mathf.Cos(ca) * cr; cy += Mathf.Sin(ca) * cr; SVG.Curve(cx, cy, cx, cy, x1, y1); } Mesh.Fill(SVG); } private float NoisedR(float r, float randomize) { return r + (Mathf.PerlinNoise(Time.time, randomize * 10f) - 0.5f) * 0.5f; } /**/ } ================================================ FILE: Assets/Samples/Scripts/ScriptedCurves.cs.meta ================================================ fileFormatVersion: 2 guid: e367ad552ec3e49d6b721365f4fb2f1c MonoImporter: externalObjects: {} serializedVersion: 2 defaultReferences: [] executionOrder: 0 icon: {instanceID: 0} userData: assetBundleName: assetBundleVariant: ================================================ FILE: Assets/Samples/Scripts/Simple.cs ================================================ using SVGMeshUnity; using UnityEngine; public class Simple : MonoBehaviour { private static readonly string SVG_PATH = @"M17.316,6.246c0.008,0.162,0.011,0.326,0.011,0.488c0,4.99-3.797,10.742-10.74,10.742c-2.133,0-4.116-0.625-5.787-1.697 c0.296,0.035,0.596,0.053,0.9,0.053c1.77,0,3.397-0.604,4.688-1.615c-1.651-0.031-3.046-1.121-3.526-2.621 c0.23,0.043,0.467,0.066,0.71,0.066c0.345,0,0.679-0.045,0.995-0.131c-1.727-0.348-3.028-1.873-3.028-3.703c0-0.016,0-0.031,0-0.047 c0.509,0.283,1.092,0.453,1.71,0.473c-1.013-0.678-1.68-1.832-1.68-3.143c0-0.691,0.186-1.34,0.512-1.898 C3.942,5.498,6.725,7,9.862,7.158C9.798,6.881,9.765,6.594,9.765,6.297c0-2.084,1.689-3.773,3.774-3.773 c1.086,0,2.067,0.457,2.756,1.191c0.859-0.17,1.667-0.484,2.397-0.916c-0.282,0.881-0.881,1.621-1.66,2.088 c0.764-0.092,1.49-0.293,2.168-0.594C18.694,5.051,18.054,5.715,17.316,6.246z"; // @"M10,0.4c-5.302,0-9.6,4.298-9.6,9.6s4.298,9.6,9.6,9.6s9.6-4.298,9.6-9.6S15.302,0.4,10,0.4z M13.905,8.264 // c0.004,0.082,0.005,0.164,0.005,0.244c0,2.5-1.901,5.381-5.379,5.381c-1.068,0-2.062-0.312-2.898-0.85 // c0.147,0.018,0.298,0.025,0.451,0.025c0.886,0,1.701-0.301,2.348-0.809c-0.827-0.016-1.525-0.562-1.766-1.312 // c0.115,0.021,0.233,0.033,0.355,0.033c0.172,0,0.34-0.023,0.498-0.066c-0.865-0.174-1.517-0.938-1.517-1.854V9.033 // C6.257,9.174,6.549,9.26,6.859,9.27C6.351,8.93,6.018,8.352,6.018,7.695c0-0.346,0.093-0.672,0.256-0.951 // c0.933,1.144,2.325,1.896,3.897,1.977c-0.033-0.139-0.049-0.283-0.049-0.432c0-1.043,0.846-1.891,1.891-1.891 // c0.543,0,1.035,0.23,1.38,0.598c0.431-0.086,0.835-0.242,1.2-0.459c-0.141,0.441-0.44,0.812-0.831,1.047 // c0.383-0.047,0.747-0.148,1.086-0.299C14.595,7.664,14.274,7.998,13.905,8.264z"; [SerializeField] private SVGMesh Mesh; private SVGData SVG; void Start() { SVG = new SVGData(); SVG.Path(SVG_PATH); // Debug.Log(SVG.Dump()); } void Update() { Mesh.Fill(SVG); } } ================================================ FILE: Assets/Samples/Scripts/Simple.cs.meta ================================================ fileFormatVersion: 2 guid: 8365665d205cd4aa0ab4bac914001458 MonoImporter: externalObjects: {} serializedVersion: 2 defaultReferences: [] executionOrder: 0 icon: {instanceID: 0} userData: assetBundleName: assetBundleVariant: ================================================ FILE: Assets/Samples/Scripts.meta ================================================ fileFormatVersion: 2 guid: d391f615779684746aed7cad474b687d folderAsset: yes DefaultImporter: externalObjects: {} userData: assetBundleName: assetBundleVariant: ================================================ FILE: Assets/Samples.meta ================================================ fileFormatVersion: 2 guid: 4f704ae4b4f98ae41a0bce26658850c1 folderAsset: yes DefaultImporter: externalObjects: {} userData: assetBundleName: assetBundleVariant: ================================================ FILE: Packages/manifest.json ================================================ { "dependencies": { "com.unity.render-pipelines.lightweight": "1.0.1-beta", "com.unity.shadergraph": "1.0.0-beta", "com.unity.package-manager-ui": "1.8.1", "com.unity.ads": "exclude", "com.unity.analytics": "exclude", "com.unity.purchasing": "exclude", "com.unity.standardevents": "exclude" } } ================================================ FILE: ProjectSettings/AudioManager.asset ================================================ %YAML 1.1 %TAG !u! tag:unity3d.com,2011: --- !u!11 &1 AudioManager: m_ObjectHideFlags: 0 m_Volume: 1 Rolloff Scale: 1 Doppler Factor: 1 Default Speaker Mode: 2 m_SampleRate: 0 m_DSPBufferSize: 1024 m_VirtualVoiceCount: 512 m_RealVoiceCount: 32 m_SpatializerPlugin: m_AmbisonicDecoderPlugin: m_DisableAudio: 0 m_VirtualizeEffects: 1 ================================================ FILE: ProjectSettings/ClusterInputManager.asset ================================================ %YAML 1.1 %TAG !u! tag:unity3d.com,2011: --- !u!236 &1 ClusterInputManager: m_ObjectHideFlags: 0 m_Inputs: [] ================================================ FILE: ProjectSettings/DynamicsManager.asset ================================================ %YAML 1.1 %TAG !u! tag:unity3d.com,2011: --- !u!55 &1 PhysicsManager: m_ObjectHideFlags: 0 serializedVersion: 7 m_Gravity: {x: 0, y: -9.81, z: 0} m_DefaultMaterial: {fileID: 0} m_BounceThreshold: 2 m_SleepThreshold: 0.005 m_DefaultContactOffset: 0.01 m_DefaultSolverIterations: 6 m_DefaultSolverVelocityIterations: 1 m_QueriesHitBackfaces: 0 m_QueriesHitTriggers: 1 m_EnableAdaptiveForce: 0 m_ClothInterCollisionDistance: 0 m_ClothInterCollisionStiffness: 0 m_ContactsGeneration: 1 m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff m_AutoSimulation: 1 m_AutoSyncTransforms: 1 m_ClothInterCollisionSettingsToggle: 0 m_ContactPairsMode: 0 m_BroadphaseType: 0 m_WorldBounds: m_Center: {x: 0, y: 0, z: 0} m_Extent: {x: 250, y: 250, z: 250} m_WorldSubdivisions: 8 ================================================ FILE: ProjectSettings/EditorBuildSettings.asset ================================================ %YAML 1.1 %TAG !u! tag:unity3d.com,2011: --- !u!1045 &1 EditorBuildSettings: m_ObjectHideFlags: 0 serializedVersion: 2 m_Scenes: - enabled: 1 path: Assets/Scenes/SampleScene.unity guid: 99c9720ab356a0642a771bea13969a05 m_configObjects: {} ================================================ FILE: ProjectSettings/EditorSettings.asset ================================================ %YAML 1.1 %TAG !u! tag:unity3d.com,2011: --- !u!159 &1 EditorSettings: m_ObjectHideFlags: 0 serializedVersion: 7 m_ExternalVersionControlSupport: Visible Meta Files m_SerializationMode: 2 m_LineEndingsForNewScripts: 2 m_DefaultBehaviorMode: 0 m_SpritePackerMode: 0 m_SpritePackerPaddingPower: 1 m_EtcTextureCompressorBehavior: 1 m_EtcTextureFastCompressor: 1 m_EtcTextureNormalCompressor: 2 m_EtcTextureBestCompressor: 4 m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd m_ProjectGenerationRootNamespace: m_UserGeneratedProjectSuffix: m_CollabEditorSettings: inProgressEnabled: 1 ================================================ FILE: ProjectSettings/GraphicsSettings.asset ================================================ %YAML 1.1 %TAG !u! tag:unity3d.com,2011: --- !u!30 &1 GraphicsSettings: m_ObjectHideFlags: 0 serializedVersion: 12 m_Deferred: m_Mode: 1 m_Shader: {fileID: 69, guid: 0000000000000000f000000000000000, type: 0} m_DeferredReflections: m_Mode: 1 m_Shader: {fileID: 74, guid: 0000000000000000f000000000000000, type: 0} m_ScreenSpaceShadows: m_Mode: 1 m_Shader: {fileID: 64, guid: 0000000000000000f000000000000000, type: 0} m_LegacyDeferred: m_Mode: 1 m_Shader: {fileID: 63, guid: 0000000000000000f000000000000000, type: 0} m_DepthNormals: m_Mode: 1 m_Shader: {fileID: 62, guid: 0000000000000000f000000000000000, type: 0} m_MotionVectors: m_Mode: 1 m_Shader: {fileID: 75, guid: 0000000000000000f000000000000000, type: 0} m_LightHalo: m_Mode: 1 m_Shader: {fileID: 105, guid: 0000000000000000f000000000000000, type: 0} m_LensFlare: m_Mode: 1 m_Shader: {fileID: 102, guid: 0000000000000000f000000000000000, type: 0} m_AlwaysIncludedShaders: - {fileID: 7, guid: 0000000000000000f000000000000000, type: 0} - {fileID: 15104, guid: 0000000000000000f000000000000000, type: 0} - {fileID: 15105, guid: 0000000000000000f000000000000000, type: 0} - {fileID: 15106, guid: 0000000000000000f000000000000000, type: 0} - {fileID: 10753, guid: 0000000000000000f000000000000000, type: 0} - {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0} m_PreloadedShaders: [] m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} m_CustomRenderPipeline: {fileID: 11400000, guid: 3450f356d0f9942e3b26f29a5aeea0d1, type: 2} m_TransparencySortMode: 0 m_TransparencySortAxis: {x: 0, y: 0, z: 1} m_DefaultRenderingPath: 1 m_DefaultMobileRenderingPath: 1 m_TierSettings: [] m_LightmapStripping: 0 m_FogStripping: 0 m_InstancingStripping: 0 m_LightmapKeepPlain: 1 m_LightmapKeepDirCombined: 1 m_LightmapKeepDynamicPlain: 1 m_LightmapKeepDynamicDirCombined: 1 m_LightmapKeepShadowMask: 1 m_LightmapKeepSubtractive: 1 m_FogKeepLinear: 1 m_FogKeepExp: 1 m_FogKeepExp2: 1 m_AlbedoSwatchInfos: [] m_LightsUseLinearIntensity: 1 m_LightsUseColorTemperature: 0 ================================================ FILE: ProjectSettings/InputManager.asset ================================================ %YAML 1.1 %TAG !u! tag:unity3d.com,2011: --- !u!13 &1 InputManager: m_ObjectHideFlags: 0 serializedVersion: 2 m_Axes: - serializedVersion: 3 m_Name: Horizontal descriptiveName: descriptiveNegativeName: negativeButton: left positiveButton: right altNegativeButton: a altPositiveButton: d gravity: 3 dead: 0.001 sensitivity: 3 snap: 1 invert: 0 type: 0 axis: 0 joyNum: 0 - serializedVersion: 3 m_Name: Vertical descriptiveName: descriptiveNegativeName: negativeButton: down positiveButton: up altNegativeButton: s altPositiveButton: w gravity: 3 dead: 0.001 sensitivity: 3 snap: 1 invert: 0 type: 0 axis: 0 joyNum: 0 - serializedVersion: 3 m_Name: Fire1 descriptiveName: descriptiveNegativeName: negativeButton: positiveButton: left ctrl altNegativeButton: altPositiveButton: mouse 0 gravity: 1000 dead: 0.001 sensitivity: 1000 snap: 0 invert: 0 type: 0 axis: 0 joyNum: 0 - serializedVersion: 3 m_Name: Fire2 descriptiveName: descriptiveNegativeName: negativeButton: positiveButton: left alt altNegativeButton: altPositiveButton: mouse 1 gravity: 1000 dead: 0.001 sensitivity: 1000 snap: 0 invert: 0 type: 0 axis: 0 joyNum: 0 - serializedVersion: 3 m_Name: Fire3 descriptiveName: descriptiveNegativeName: negativeButton: positiveButton: left shift altNegativeButton: altPositiveButton: mouse 2 gravity: 1000 dead: 0.001 sensitivity: 1000 snap: 0 invert: 0 type: 0 axis: 0 joyNum: 0 - serializedVersion: 3 m_Name: Jump descriptiveName: descriptiveNegativeName: negativeButton: positiveButton: space altNegativeButton: altPositiveButton: gravity: 1000 dead: 0.001 sensitivity: 1000 snap: 0 invert: 0 type: 0 axis: 0 joyNum: 0 - serializedVersion: 3 m_Name: Mouse X descriptiveName: descriptiveNegativeName: negativeButton: positiveButton: altNegativeButton: altPositiveButton: gravity: 0 dead: 0 sensitivity: 0.1 snap: 0 invert: 0 type: 1 axis: 0 joyNum: 0 - serializedVersion: 3 m_Name: Mouse Y descriptiveName: descriptiveNegativeName: negativeButton: positiveButton: altNegativeButton: altPositiveButton: gravity: 0 dead: 0 sensitivity: 0.1 snap: 0 invert: 0 type: 1 axis: 1 joyNum: 0 - serializedVersion: 3 m_Name: Mouse ScrollWheel descriptiveName: descriptiveNegativeName: negativeButton: positiveButton: altNegativeButton: altPositiveButton: gravity: 0 dead: 0 sensitivity: 0.1 snap: 0 invert: 0 type: 1 axis: 2 joyNum: 0 - serializedVersion: 3 m_Name: Horizontal descriptiveName: descriptiveNegativeName: negativeButton: positiveButton: altNegativeButton: altPositiveButton: gravity: 0 dead: 0.19 sensitivity: 1 snap: 0 invert: 0 type: 2 axis: 0 joyNum: 0 - serializedVersion: 3 m_Name: Vertical descriptiveName: descriptiveNegativeName: negativeButton: positiveButton: altNegativeButton: altPositiveButton: gravity: 0 dead: 0.19 sensitivity: 1 snap: 0 invert: 1 type: 2 axis: 1 joyNum: 0 - serializedVersion: 3 m_Name: Fire1 descriptiveName: descriptiveNegativeName: negativeButton: positiveButton: joystick button 0 altNegativeButton: altPositiveButton: gravity: 1000 dead: 0.001 sensitivity: 1000 snap: 0 invert: 0 type: 0 axis: 0 joyNum: 0 - serializedVersion: 3 m_Name: Fire2 descriptiveName: descriptiveNegativeName: negativeButton: positiveButton: joystick button 1 altNegativeButton: altPositiveButton: gravity: 1000 dead: 0.001 sensitivity: 1000 snap: 0 invert: 0 type: 0 axis: 0 joyNum: 0 - serializedVersion: 3 m_Name: Fire3 descriptiveName: descriptiveNegativeName: negativeButton: positiveButton: joystick button 2 altNegativeButton: altPositiveButton: gravity: 1000 dead: 0.001 sensitivity: 1000 snap: 0 invert: 0 type: 0 axis: 0 joyNum: 0 - serializedVersion: 3 m_Name: Jump descriptiveName: descriptiveNegativeName: negativeButton: positiveButton: joystick button 3 altNegativeButton: altPositiveButton: gravity: 1000 dead: 0.001 sensitivity: 1000 snap: 0 invert: 0 type: 0 axis: 0 joyNum: 0 - serializedVersion: 3 m_Name: Submit descriptiveName: descriptiveNegativeName: negativeButton: positiveButton: return altNegativeButton: altPositiveButton: joystick button 0 gravity: 1000 dead: 0.001 sensitivity: 1000 snap: 0 invert: 0 type: 0 axis: 0 joyNum: 0 - serializedVersion: 3 m_Name: Submit descriptiveName: descriptiveNegativeName: negativeButton: positiveButton: enter altNegativeButton: altPositiveButton: space gravity: 1000 dead: 0.001 sensitivity: 1000 snap: 0 invert: 0 type: 0 axis: 0 joyNum: 0 - serializedVersion: 3 m_Name: Cancel descriptiveName: descriptiveNegativeName: negativeButton: positiveButton: escape altNegativeButton: altPositiveButton: joystick button 1 gravity: 1000 dead: 0.001 sensitivity: 1000 snap: 0 invert: 0 type: 0 axis: 0 joyNum: 0 ================================================ FILE: ProjectSettings/NavMeshAreas.asset ================================================ %YAML 1.1 %TAG !u! tag:unity3d.com,2011: --- !u!126 &1 NavMeshProjectSettings: m_ObjectHideFlags: 0 serializedVersion: 2 areas: - name: Walkable cost: 1 - name: Not Walkable cost: 1 - name: Jump cost: 2 - name: cost: 1 - name: cost: 1 - name: cost: 1 - name: cost: 1 - name: cost: 1 - name: cost: 1 - name: cost: 1 - name: cost: 1 - name: cost: 1 - name: cost: 1 - name: cost: 1 - name: cost: 1 - name: cost: 1 - name: cost: 1 - name: cost: 1 - name: cost: 1 - name: cost: 1 - name: cost: 1 - name: cost: 1 - name: cost: 1 - name: cost: 1 - name: cost: 1 - name: cost: 1 - name: cost: 1 - name: cost: 1 - name: cost: 1 - name: cost: 1 - name: cost: 1 - name: cost: 1 m_LastAgentTypeID: -887442657 m_Settings: - serializedVersion: 2 agentTypeID: 0 agentRadius: 0.5 agentHeight: 2 agentSlope: 45 agentClimb: 0.75 ledgeDropHeight: 0 maxJumpAcrossDistance: 0 minRegionArea: 2 manualCellSize: 0 cellSize: 0.16666667 manualTileSize: 0 tileSize: 256 accuratePlacement: 0 debug: m_Flags: 0 m_SettingNames: - Humanoid ================================================ FILE: ProjectSettings/NetworkManager.asset ================================================ %YAML 1.1 %TAG !u! tag:unity3d.com,2011: --- !u!149 &1 NetworkManager: m_ObjectHideFlags: 0 m_DebugLevel: 0 m_Sendrate: 15 m_AssetToPrefab: {} ================================================ FILE: ProjectSettings/Physics2DSettings.asset ================================================ %YAML 1.1 %TAG !u! tag:unity3d.com,2011: --- !u!19 &1 Physics2DSettings: m_ObjectHideFlags: 0 serializedVersion: 3 m_Gravity: {x: 0, y: -9.81} m_DefaultMaterial: {fileID: 0} m_VelocityIterations: 8 m_PositionIterations: 3 m_VelocityThreshold: 1 m_MaxLinearCorrection: 0.2 m_MaxAngularCorrection: 8 m_MaxTranslationSpeed: 100 m_MaxRotationSpeed: 360 m_BaumgarteScale: 0.2 m_BaumgarteTimeOfImpactScale: 0.75 m_TimeToSleep: 0.5 m_LinearSleepTolerance: 0.01 m_AngularSleepTolerance: 2 m_DefaultContactOffset: 0.01 m_AutoSimulation: 1 m_QueriesHitTriggers: 1 m_QueriesStartInColliders: 1 m_ChangeStopsCallbacks: 0 m_CallbacksOnDisable: 1 m_AutoSyncTransforms: 1 m_AlwaysShowColliders: 0 m_ShowColliderSleep: 1 m_ShowColliderContacts: 0 m_ShowColliderAABB: 0 m_ContactArrowScale: 0.2 m_ColliderAwakeColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.7529412} m_ColliderAsleepColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.36078432} m_ColliderContactColor: {r: 1, g: 0, b: 1, a: 0.6862745} m_ColliderAABBColor: {r: 1, g: 1, b: 0, a: 0.2509804} m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff ================================================ FILE: ProjectSettings/PresetManager.asset ================================================ %YAML 1.1 %TAG !u! tag:unity3d.com,2011: --- !u!1386491679 &1 PresetManager: m_ObjectHideFlags: 0 m_DefaultList: - type: m_NativeTypeID: 108 m_ManagedTypePPtr: {fileID: 0} m_ManagedTypeFallback: defaultPresets: - m_Preset: {fileID: 2655988077585873504, guid: c1cf8506f04ef2c4a88b64b6c4202eea, type: 2} - type: m_NativeTypeID: 1020 m_ManagedTypePPtr: {fileID: 0} m_ManagedTypeFallback: defaultPresets: - m_Preset: {fileID: 2655988077585873504, guid: 0cd792cc87e492d43b4e95b205fc5cc6, type: 2} - type: m_NativeTypeID: 1006 m_ManagedTypePPtr: {fileID: 0} m_ManagedTypeFallback: defaultPresets: - m_Preset: {fileID: 2655988077585873504, guid: 7a99f8aa944efe94cb9bd74562b7d5f9, type: 2} ================================================ FILE: ProjectSettings/ProjectSettings.asset ================================================ %YAML 1.1 %TAG !u! tag:unity3d.com,2011: --- !u!129 &1 PlayerSettings: m_ObjectHideFlags: 0 serializedVersion: 15 productGUID: f636d9259e1b048d79b389459f8e10e2 AndroidProfiler: 0 AndroidFilterTouchesWhenObscured: 0 AndroidEnableSustainedPerformanceMode: 0 defaultScreenOrientation: 4 targetDevice: 2 useOnDemandResources: 0 accelerometerFrequency: 60 companyName: DefaultCompany productName: SVGMeshUnity defaultCursor: {fileID: 0} cursorHotspot: {x: 0, y: 0} m_SplashScreenBackgroundColor: {r: 0.13725491, g: 0.12156863, b: 0.1254902, a: 1} m_ShowUnitySplashScreen: 1 m_ShowUnitySplashLogo: 1 m_SplashScreenOverlayOpacity: 1 m_SplashScreenAnimation: 1 m_SplashScreenLogoStyle: 1 m_SplashScreenDrawMode: 0 m_SplashScreenBackgroundAnimationZoom: 1 m_SplashScreenLogoAnimationZoom: 1 m_SplashScreenBackgroundLandscapeAspect: 1 m_SplashScreenBackgroundPortraitAspect: 1 m_SplashScreenBackgroundLandscapeUvs: serializedVersion: 2 x: 0 y: 0 width: 1 height: 1 m_SplashScreenBackgroundPortraitUvs: serializedVersion: 2 x: 0 y: 0 width: 1 height: 1 m_SplashScreenLogos: [] m_VirtualRealitySplashScreen: {fileID: 0} m_HolographicTrackingLossScreen: {fileID: 0} defaultScreenWidth: 1024 defaultScreenHeight: 768 defaultScreenWidthWeb: 960 defaultScreenHeightWeb: 600 m_StereoRenderingPath: 0 m_ActiveColorSpace: 1 m_MTRendering: 1 m_StackTraceTypes: 010000000100000001000000010000000100000001000000 iosShowActivityIndicatorOnLoading: -1 androidShowActivityIndicatorOnLoading: -1 tizenShowActivityIndicatorOnLoading: -1 iosAppInBackgroundBehavior: 0 displayResolutionDialog: 1 iosAllowHTTPDownload: 1 allowedAutorotateToPortrait: 1 allowedAutorotateToPortraitUpsideDown: 1 allowedAutorotateToLandscapeRight: 1 allowedAutorotateToLandscapeLeft: 1 useOSAutorotation: 1 use32BitDisplayBuffer: 1 preserveFramebufferAlpha: 0 disableDepthAndStencilBuffers: 0 androidBlitType: 0 defaultIsNativeResolution: 1 macRetinaSupport: 1 runInBackground: 1 captureSingleScreen: 0 muteOtherAudioSources: 0 Prepare IOS For Recording: 0 Force IOS Speakers When Recording: 0 deferSystemGesturesMode: 0 hideHomeButton: 0 submitAnalytics: 1 usePlayerLog: 1 bakeCollisionMeshes: 0 forceSingleInstance: 0 resizableWindow: 0 useMacAppStoreValidation: 0 macAppStoreCategory: public.app-category.games gpuSkinning: 1 graphicsJobs: 1 xboxPIXTextureCapture: 0 xboxEnableAvatar: 0 xboxEnableKinect: 0 xboxEnableKinectAutoTracking: 0 xboxEnableFitness: 0 visibleInBackground: 1 allowFullscreenSwitch: 1 graphicsJobMode: 0 fullscreenMode: 1 xboxSpeechDB: 0 xboxEnableHeadOrientation: 0 xboxEnableGuest: 0 xboxEnablePIXSampling: 0 metalFramebufferOnly: 0 n3dsDisableStereoscopicView: 0 n3dsEnableSharedListOpt: 1 n3dsEnableVSync: 0 xboxOneResolution: 0 xboxOneSResolution: 0 xboxOneXResolution: 3 xboxOneMonoLoggingLevel: 0 xboxOneLoggingLevel: 1 xboxOneDisableEsram: 0 xboxOnePresentImmediateThreshold: 0 videoMemoryForVertexBuffers: 0 psp2PowerMode: 0 psp2AcquireBGM: 1 m_SupportedAspectRatios: 4:3: 1 5:4: 1 16:10: 1 16:9: 1 Others: 1 bundleVersion: 0.1 preloadedAssets: [] metroInputSource: 0 wsaTransparentSwapchain: 0 m_HolographicPauseOnTrackingLoss: 1 xboxOneDisableKinectGpuReservation: 0 xboxOneEnable7thCore: 0 vrSettings: cardboard: depthFormat: 0 enableTransitionView: 0 daydream: depthFormat: 0 useSustainedPerformanceMode: 0 enableVideoLayer: 0 useProtectedVideoMemory: 0 minimumSupportedHeadTracking: 0 maximumSupportedHeadTracking: 1 hololens: depthFormat: 1 depthBufferSharingEnabled: 0 enable360StereoCapture: 0 oculus: sharedDepthBuffer: 0 dashSupport: 0 protectGraphicsMemory: 0 useHDRDisplay: 0 m_ColorGamuts: 00000000 targetPixelDensity: 30 resolutionScalingMode: 0 androidSupportedAspectRatio: 1 androidMaxAspectRatio: 2.1 applicationIdentifier: {} buildNumber: {} AndroidBundleVersionCode: 1 AndroidMinSdkVersion: 16 AndroidTargetSdkVersion: 0 AndroidPreferredInstallLocation: 1 aotOptions: stripEngineCode: 1 iPhoneStrippingLevel: 0 iPhoneScriptCallOptimization: 0 ForceInternetPermission: 0 ForceSDCardPermission: 0 CreateWallpaper: 0 APKExpansionFiles: 0 keepLoadedShadersAlive: 0 StripUnusedMeshComponents: 1 VertexChannelCompressionMask: 4054 iPhoneSdkVersion: 988 iOSTargetOSVersionString: 8.0 tvOSSdkVersion: 0 tvOSRequireExtendedGameController: 0 tvOSTargetOSVersionString: 9.0 uIPrerenderedIcon: 0 uIRequiresPersistentWiFi: 0 uIRequiresFullScreen: 1 uIStatusBarHidden: 1 uIExitOnSuspend: 0 uIStatusBarStyle: 0 iPhoneSplashScreen: {fileID: 0} iPhoneHighResSplashScreen: {fileID: 0} iPhoneTallHighResSplashScreen: {fileID: 0} iPhone47inSplashScreen: {fileID: 0} iPhone55inPortraitSplashScreen: {fileID: 0} iPhone55inLandscapeSplashScreen: {fileID: 0} iPhone58inPortraitSplashScreen: {fileID: 0} iPhone58inLandscapeSplashScreen: {fileID: 0} iPadPortraitSplashScreen: {fileID: 0} iPadHighResPortraitSplashScreen: {fileID: 0} iPadLandscapeSplashScreen: {fileID: 0} iPadHighResLandscapeSplashScreen: {fileID: 0} appleTVSplashScreen: {fileID: 0} appleTVSplashScreen2x: {fileID: 0} tvOSSmallIconLayers: [] tvOSSmallIconLayers2x: [] tvOSLargeIconLayers: [] tvOSLargeIconLayers2x: [] tvOSTopShelfImageLayers: [] tvOSTopShelfImageLayers2x: [] tvOSTopShelfImageWideLayers: [] tvOSTopShelfImageWideLayers2x: [] iOSLaunchScreenType: 0 iOSLaunchScreenPortrait: {fileID: 0} iOSLaunchScreenLandscape: {fileID: 0} iOSLaunchScreenBackgroundColor: serializedVersion: 2 rgba: 0 iOSLaunchScreenFillPct: 100 iOSLaunchScreenSize: 100 iOSLaunchScreenCustomXibPath: iOSLaunchScreeniPadType: 0 iOSLaunchScreeniPadImage: {fileID: 0} iOSLaunchScreeniPadBackgroundColor: serializedVersion: 2 rgba: 0 iOSLaunchScreeniPadFillPct: 100 iOSLaunchScreeniPadSize: 100 iOSLaunchScreeniPadCustomXibPath: iOSUseLaunchScreenStoryboard: 0 iOSLaunchScreenCustomStoryboardPath: iOSDeviceRequirements: [] iOSURLSchemes: [] iOSBackgroundModes: 0 iOSMetalForceHardShadows: 0 metalEditorSupport: 1 metalAPIValidation: 1 iOSRenderExtraFrameOnPause: 0 appleDeveloperTeamID: iOSManualSigningProvisioningProfileID: tvOSManualSigningProvisioningProfileID: appleEnableAutomaticSigning: 0 iOSRequireARKit: 0 appleEnableProMotion: 0 clonedFromGUID: 56e7a2d3a00f33d44bdd161b773c35b5 templatePackageId: com.unity.3dempty@0.0.2 templateDefaultScene: Assets/Scenes/SampleScene.unity AndroidTargetArchitectures: 5 AndroidSplashScreenScale: 0 androidSplashScreen: {fileID: 0} AndroidKeystoreName: AndroidKeyaliasName: AndroidTVCompatibility: 1 AndroidIsGame: 1 AndroidEnableTango: 0 androidEnableBanner: 1 androidUseLowAccuracyLocation: 0 m_AndroidBanners: - width: 320 height: 180 banner: {fileID: 0} androidGamepadSupportLevel: 0 resolutionDialogBanner: {fileID: 0} m_BuildTargetIcons: [] m_BuildTargetPlatformIcons: [] m_BuildTargetBatching: - m_BuildTarget: Standalone m_StaticBatching: 1 m_DynamicBatching: 0 m_BuildTargetGraphicsAPIs: [] m_BuildTargetVRSettings: - m_BuildTarget: Standalone m_Enabled: 0 m_Devices: - Oculus - OpenVR m_BuildTargetEnableVuforiaSettings: [] openGLRequireES31: 0 openGLRequireES31AEP: 0 m_TemplateCustomTags: {} mobileMTRendering: Android: 1 iPhone: 1 tvOS: 1 m_BuildTargetGroupLightmapEncodingQuality: [] playModeTestRunnerEnabled: 0 runPlayModeTestAsEditModeTest: 0 actionOnDotNetUnhandledException: 1 enableInternalProfiler: 0 logObjCUncaughtExceptions: 1 enableCrashReportAPI: 0 cameraUsageDescription: locationUsageDescription: microphoneUsageDescription: switchNetLibKey: switchSocketMemoryPoolSize: 6144 switchSocketAllocatorPoolSize: 128 switchSocketConcurrencyLimit: 14 switchScreenResolutionBehavior: 2 switchUseCPUProfiler: 0 switchApplicationID: 0x01004b9000490000 switchNSODependencies: switchTitleNames_0: switchTitleNames_1: switchTitleNames_2: switchTitleNames_3: switchTitleNames_4: switchTitleNames_5: switchTitleNames_6: switchTitleNames_7: switchTitleNames_8: switchTitleNames_9: switchTitleNames_10: switchTitleNames_11: switchTitleNames_12: switchTitleNames_13: switchTitleNames_14: switchPublisherNames_0: switchPublisherNames_1: switchPublisherNames_2: switchPublisherNames_3: switchPublisherNames_4: switchPublisherNames_5: switchPublisherNames_6: switchPublisherNames_7: switchPublisherNames_8: switchPublisherNames_9: switchPublisherNames_10: switchPublisherNames_11: switchPublisherNames_12: switchPublisherNames_13: switchPublisherNames_14: switchIcons_0: {fileID: 0} switchIcons_1: {fileID: 0} switchIcons_2: {fileID: 0} switchIcons_3: {fileID: 0} switchIcons_4: {fileID: 0} switchIcons_5: {fileID: 0} switchIcons_6: {fileID: 0} switchIcons_7: {fileID: 0} switchIcons_8: {fileID: 0} switchIcons_9: {fileID: 0} switchIcons_10: {fileID: 0} switchIcons_11: {fileID: 0} switchIcons_12: {fileID: 0} switchIcons_13: {fileID: 0} switchIcons_14: {fileID: 0} switchSmallIcons_0: {fileID: 0} switchSmallIcons_1: {fileID: 0} switchSmallIcons_2: {fileID: 0} switchSmallIcons_3: {fileID: 0} switchSmallIcons_4: {fileID: 0} switchSmallIcons_5: {fileID: 0} switchSmallIcons_6: {fileID: 0} switchSmallIcons_7: {fileID: 0} switchSmallIcons_8: {fileID: 0} switchSmallIcons_9: {fileID: 0} switchSmallIcons_10: {fileID: 0} switchSmallIcons_11: {fileID: 0} switchSmallIcons_12: {fileID: 0} switchSmallIcons_13: {fileID: 0} switchSmallIcons_14: {fileID: 0} switchManualHTML: switchAccessibleURLs: switchLegalInformation: switchMainThreadStackSize: 1048576 switchPresenceGroupId: switchLogoHandling: 0 switchReleaseVersion: 0 switchDisplayVersion: 1.0.0 switchStartupUserAccount: 0 switchTouchScreenUsage: 0 switchSupportedLanguagesMask: 0 switchLogoType: 0 switchApplicationErrorCodeCategory: switchUserAccountSaveDataSize: 0 switchUserAccountSaveDataJournalSize: 0 switchApplicationAttribute: 0 switchCardSpecSize: -1 switchCardSpecClock: -1 switchRatingsMask: 0 switchRatingsInt_0: 0 switchRatingsInt_1: 0 switchRatingsInt_2: 0 switchRatingsInt_3: 0 switchRatingsInt_4: 0 switchRatingsInt_5: 0 switchRatingsInt_6: 0 switchRatingsInt_7: 0 switchRatingsInt_8: 0 switchRatingsInt_9: 0 switchRatingsInt_10: 0 switchRatingsInt_11: 0 switchLocalCommunicationIds_0: switchLocalCommunicationIds_1: switchLocalCommunicationIds_2: switchLocalCommunicationIds_3: switchLocalCommunicationIds_4: switchLocalCommunicationIds_5: switchLocalCommunicationIds_6: switchLocalCommunicationIds_7: switchParentalControl: 0 switchAllowsScreenshot: 1 switchAllowsVideoCapturing: 1 switchAllowsRuntimeAddOnContentInstall: 0 switchDataLossConfirmation: 0 switchSupportedNpadStyles: 3 switchSocketConfigEnabled: 0 switchTcpInitialSendBufferSize: 32 switchTcpInitialReceiveBufferSize: 64 switchTcpAutoSendBufferSizeMax: 256 switchTcpAutoReceiveBufferSizeMax: 256 switchUdpSendBufferSize: 9 switchUdpReceiveBufferSize: 42 switchSocketBufferEfficiency: 4 switchSocketInitializeEnabled: 1 switchNetworkInterfaceManagerInitializeEnabled: 1 switchPlayerConnectionEnabled: 1 ps4NPAgeRating: 12 ps4NPTitleSecret: ps4NPTrophyPackPath: ps4ParentalLevel: 11 ps4ContentID: ED1633-NPXX51362_00-0000000000000000 ps4Category: 0 ps4MasterVersion: 01.00 ps4AppVersion: 01.00 ps4AppType: 0 ps4ParamSfxPath: ps4VideoOutPixelFormat: 0 ps4VideoOutInitialWidth: 1920 ps4VideoOutBaseModeInitialWidth: 1920 ps4VideoOutReprojectionRate: 60 ps4PronunciationXMLPath: ps4PronunciationSIGPath: ps4BackgroundImagePath: ps4StartupImagePath: ps4StartupImagesFolder: ps4IconImagesFolder: ps4SaveDataImagePath: ps4SdkOverride: ps4BGMPath: ps4ShareFilePath: ps4ShareOverlayImagePath: ps4PrivacyGuardImagePath: ps4NPtitleDatPath: ps4RemotePlayKeyAssignment: -1 ps4RemotePlayKeyMappingDir: ps4PlayTogetherPlayerCount: 0 ps4EnterButtonAssignment: 1 ps4ApplicationParam1: 0 ps4ApplicationParam2: 0 ps4ApplicationParam3: 0 ps4ApplicationParam4: 0 ps4DownloadDataSize: 0 ps4GarlicHeapSize: 2048 ps4ProGarlicHeapSize: 2560 ps4Passcode: frAQBc8Wsa1xVPfvJcrgRYwTiizs2trQ ps4pnSessions: 1 ps4pnPresence: 1 ps4pnFriends: 1 ps4pnGameCustomData: 1 playerPrefsSupport: 0 enableApplicationExit: 0 restrictedAudioUsageRights: 0 ps4UseResolutionFallback: 0 ps4ReprojectionSupport: 0 ps4UseAudio3dBackend: 0 ps4SocialScreenEnabled: 0 ps4ScriptOptimizationLevel: 0 ps4Audio3dVirtualSpeakerCount: 14 ps4attribCpuUsage: 0 ps4PatchPkgPath: ps4PatchLatestPkgPath: ps4PatchChangeinfoPath: ps4PatchDayOne: 0 ps4attribUserManagement: 0 ps4attribMoveSupport: 0 ps4attrib3DSupport: 0 ps4attribShareSupport: 0 ps4attribExclusiveVR: 0 ps4disableAutoHideSplash: 0 ps4videoRecordingFeaturesUsed: 0 ps4contentSearchFeaturesUsed: 0 ps4attribEyeToEyeDistanceSettingVR: 0 ps4IncludedModules: [] monoEnv: psp2Splashimage: {fileID: 0} psp2NPTrophyPackPath: psp2NPSupportGBMorGJP: 0 psp2NPAgeRating: 12 psp2NPTitleDatPath: psp2NPCommsID: psp2NPCommunicationsID: psp2NPCommsPassphrase: psp2NPCommsSig: psp2ParamSfxPath: psp2ManualPath: psp2LiveAreaGatePath: psp2LiveAreaBackroundPath: psp2LiveAreaPath: psp2LiveAreaTrialPath: psp2PatchChangeInfoPath: psp2PatchOriginalPackage: psp2PackagePassword: F69AzBlax3CF3EDNhm3soLBPh71Yexui psp2KeystoneFile: psp2MemoryExpansionMode: 0 psp2DRMType: 0 psp2StorageType: 0 psp2MediaCapacity: 0 psp2DLCConfigPath: psp2ThumbnailPath: psp2BackgroundPath: psp2SoundPath: psp2TrophyCommId: psp2TrophyPackagePath: psp2PackagedResourcesPath: psp2SaveDataQuota: 10240 psp2ParentalLevel: 1 psp2ShortTitle: Not Set psp2ContentID: IV0000-ABCD12345_00-0123456789ABCDEF psp2Category: 0 psp2MasterVersion: 01.00 psp2AppVersion: 01.00 psp2TVBootMode: 0 psp2EnterButtonAssignment: 2 psp2TVDisableEmu: 0 psp2AllowTwitterDialog: 1 psp2Upgradable: 0 psp2HealthWarning: 0 psp2UseLibLocation: 0 psp2InfoBarOnStartup: 0 psp2InfoBarColor: 0 psp2ScriptOptimizationLevel: 0 splashScreenBackgroundSourceLandscape: {fileID: 0} splashScreenBackgroundSourcePortrait: {fileID: 0} spritePackerPolicy: webGLMemorySize: 256 webGLExceptionSupport: 1 webGLNameFilesAsHashes: 0 webGLDataCaching: 0 webGLDebugSymbols: 0 webGLEmscriptenArgs: webGLModulesDirectory: webGLTemplate: APPLICATION:Default webGLAnalyzeBuildSize: 0 webGLUseEmbeddedResources: 0 webGLCompressionFormat: 1 webGLLinkerTarget: 0 scriptingDefineSymbols: 1: UNITY_POST_PROCESSING_STACK_V2 4: UNITY_POST_PROCESSING_STACK_V2 7: UNITY_POST_PROCESSING_STACK_V2 13: UNITY_POST_PROCESSING_STACK_V2 17: UNITY_POST_PROCESSING_STACK_V2 18: UNITY_POST_PROCESSING_STACK_V2 19: UNITY_POST_PROCESSING_STACK_V2 21: UNITY_POST_PROCESSING_STACK_V2 23: UNITY_POST_PROCESSING_STACK_V2 24: UNITY_POST_PROCESSING_STACK_V2 25: UNITY_POST_PROCESSING_STACK_V2 26: UNITY_POST_PROCESSING_STACK_V2 27: UNITY_POST_PROCESSING_STACK_V2 platformArchitecture: {} scriptingBackend: {} il2cppCompilerConfiguration: {} incrementalIl2cppBuild: {} allowUnsafeCode: 0 additionalIl2CppArgs: scriptingRuntimeVersion: 0 apiCompatibilityLevelPerPlatform: {} m_RenderingPath: 1 m_MobileRenderingPath: 1 metroPackageName: Template_3D metroPackageVersion: metroCertificatePath: metroCertificatePassword: metroCertificateSubject: metroCertificateIssuer: metroCertificateNotAfter: 0000000000000000 metroApplicationDescription: Template_3D wsaImages: {} metroTileShortName: metroCommandLineArgsFile: metroTileShowName: 0 metroMediumTileShowName: 0 metroLargeTileShowName: 0 metroWideTileShowName: 0 metroDefaultTileSize: 1 metroTileForegroundText: 2 metroTileBackgroundColor: {r: 0.13333334, g: 0.17254902, b: 0.21568628, a: 0} metroSplashScreenBackgroundColor: {r: 0.12941177, g: 0.17254902, b: 0.21568628, a: 1} metroSplashScreenUseBackgroundColor: 0 platformCapabilities: {} metroFTAName: metroFTAFileTypes: [] metroProtocolName: metroCompilationOverrides: 1 tizenProductDescription: tizenProductURL: tizenSigningProfileName: tizenGPSPermissions: 0 tizenMicrophonePermissions: 0 tizenDeploymentTarget: tizenDeploymentTargetType: -1 tizenMinOSVersion: 1 n3dsUseExtSaveData: 0 n3dsCompressStaticMem: 1 n3dsExtSaveDataNumber: 0x12345 n3dsStackSize: 131072 n3dsTargetPlatform: 2 n3dsRegion: 7 n3dsMediaSize: 0 n3dsLogoStyle: 3 n3dsTitle: GameName n3dsProductCode: n3dsApplicationId: 0xFF3FF XboxOneProductId: XboxOneUpdateKey: XboxOneSandboxId: XboxOneContentId: XboxOneTitleId: XboxOneSCId: XboxOneGameOsOverridePath: XboxOnePackagingOverridePath: XboxOneAppManifestOverridePath: XboxOnePackageEncryption: 0 XboxOnePackageUpdateGranularity: 2 XboxOneDescription: XboxOneLanguage: - enus XboxOneCapability: [] XboxOneGameRating: {} XboxOneIsContentPackage: 0 XboxOneEnableGPUVariability: 0 XboxOneSockets: {} XboxOneSplashScreen: {fileID: 0} XboxOneAllowedProductIds: [] XboxOnePersistentLocalStorageSize: 0 xboxOneScriptCompiler: 0 vrEditorSettings: daydream: daydreamIconForeground: {fileID: 0} daydreamIconBackground: {fileID: 0} cloudServicesEnabled: UNet: 1 facebookSdkVersion: 7.9.4 apiCompatibilityLevel: 2 cloudProjectId: projectName: Template_3D organizationId: cloudEnabled: 0 enableNativePlatformBackendsForNewInputSystem: 0 disableOldInputManagerSupport: 0 ================================================ FILE: ProjectSettings/ProjectVersion.txt ================================================ m_EditorVersion: 2018.1.0b9 ================================================ FILE: ProjectSettings/QualitySettings.asset ================================================ %YAML 1.1 %TAG !u! tag:unity3d.com,2011: --- !u!47 &1 QualitySettings: m_ObjectHideFlags: 0 serializedVersion: 5 m_CurrentQuality: 4 m_QualitySettings: - serializedVersion: 2 name: Very Low pixelLightCount: 0 shadows: 0 shadowResolution: 0 shadowProjection: 1 shadowCascades: 1 shadowDistance: 15 shadowNearPlaneOffset: 3 shadowCascade2Split: 0.33333334 shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} shadowmaskMode: 0 blendWeights: 1 textureQuality: 1 anisotropicTextures: 0 antiAliasing: 0 softParticles: 0 softVegetation: 0 realtimeReflectionProbes: 0 billboardsFaceCameraPosition: 0 vSyncCount: 0 lodBias: 0.3 maximumLODLevel: 0 particleRaycastBudget: 4 asyncUploadTimeSlice: 2 asyncUploadBufferSize: 4 resolutionScalingFixedDPIFactor: 1 excludedTargetPlatforms: [] - serializedVersion: 2 name: Low pixelLightCount: 0 shadows: 0 shadowResolution: 0 shadowProjection: 1 shadowCascades: 1 shadowDistance: 20 shadowNearPlaneOffset: 3 shadowCascade2Split: 0.33333334 shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} shadowmaskMode: 0 blendWeights: 2 textureQuality: 0 anisotropicTextures: 0 antiAliasing: 0 softParticles: 0 softVegetation: 0 realtimeReflectionProbes: 0 billboardsFaceCameraPosition: 0 vSyncCount: 0 lodBias: 0.4 maximumLODLevel: 0 particleRaycastBudget: 16 asyncUploadTimeSlice: 2 asyncUploadBufferSize: 4 resolutionScalingFixedDPIFactor: 1 excludedTargetPlatforms: [] - serializedVersion: 2 name: Medium pixelLightCount: 1 shadows: 1 shadowResolution: 0 shadowProjection: 1 shadowCascades: 1 shadowDistance: 20 shadowNearPlaneOffset: 3 shadowCascade2Split: 0.33333334 shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} shadowmaskMode: 0 blendWeights: 2 textureQuality: 0 anisotropicTextures: 1 antiAliasing: 0 softParticles: 0 softVegetation: 0 realtimeReflectionProbes: 0 billboardsFaceCameraPosition: 0 vSyncCount: 1 lodBias: 0.7 maximumLODLevel: 0 particleRaycastBudget: 64 asyncUploadTimeSlice: 2 asyncUploadBufferSize: 4 resolutionScalingFixedDPIFactor: 1 excludedTargetPlatforms: [] - serializedVersion: 2 name: High pixelLightCount: 2 shadows: 2 shadowResolution: 1 shadowProjection: 1 shadowCascades: 2 shadowDistance: 40 shadowNearPlaneOffset: 3 shadowCascade2Split: 0.33333334 shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} shadowmaskMode: 1 blendWeights: 2 textureQuality: 0 anisotropicTextures: 1 antiAliasing: 2 softParticles: 0 softVegetation: 1 realtimeReflectionProbes: 1 billboardsFaceCameraPosition: 1 vSyncCount: 1 lodBias: 1 maximumLODLevel: 0 particleRaycastBudget: 256 asyncUploadTimeSlice: 2 asyncUploadBufferSize: 4 resolutionScalingFixedDPIFactor: 1 excludedTargetPlatforms: [] - serializedVersion: 2 name: Very High pixelLightCount: 3 shadows: 2 shadowResolution: 2 shadowProjection: 1 shadowCascades: 2 shadowDistance: 40 shadowNearPlaneOffset: 3 shadowCascade2Split: 0.33333334 shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} shadowmaskMode: 1 blendWeights: 4 textureQuality: 0 anisotropicTextures: 1 antiAliasing: 4 softParticles: 1 softVegetation: 1 realtimeReflectionProbes: 1 billboardsFaceCameraPosition: 1 vSyncCount: 1 lodBias: 1.5 maximumLODLevel: 0 particleRaycastBudget: 1024 asyncUploadTimeSlice: 2 asyncUploadBufferSize: 4 resolutionScalingFixedDPIFactor: 1 excludedTargetPlatforms: [] - serializedVersion: 2 name: Ultra pixelLightCount: 4 shadows: 2 shadowResolution: 2 shadowProjection: 1 shadowCascades: 4 shadowDistance: 150 shadowNearPlaneOffset: 3 shadowCascade2Split: 0.33333334 shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} shadowmaskMode: 1 blendWeights: 4 textureQuality: 0 anisotropicTextures: 1 antiAliasing: 4 softParticles: 1 softVegetation: 1 realtimeReflectionProbes: 1 billboardsFaceCameraPosition: 1 vSyncCount: 1 lodBias: 2 maximumLODLevel: 0 particleRaycastBudget: 4096 asyncUploadTimeSlice: 2 asyncUploadBufferSize: 4 resolutionScalingFixedDPIFactor: 1 excludedTargetPlatforms: [] m_PerPlatformDefaultQuality: Android: 2 Nintendo 3DS: 5 Nintendo Switch: 5 PS4: 5 PSP2: 2 Standalone: 5 Tizen: 2 WebGL: 3 WiiU: 5 Windows Store Apps: 5 XboxOne: 5 iPhone: 2 tvOS: 2 ================================================ FILE: ProjectSettings/TagManager.asset ================================================ %YAML 1.1 %TAG !u! tag:unity3d.com,2011: --- !u!78 &1 TagManager: serializedVersion: 2 tags: [] layers: - Default - TransparentFX - Ignore Raycast - - Water - UI - - - PostProcessing - - - - - - - - - - - - - - - - - - - - - - - m_SortingLayers: - name: Default uniqueID: 0 locked: 0 ================================================ FILE: ProjectSettings/TimeManager.asset ================================================ %YAML 1.1 %TAG !u! tag:unity3d.com,2011: --- !u!5 &1 TimeManager: m_ObjectHideFlags: 0 Fixed Timestep: 0.0167 Maximum Allowed Timestep: 0.1 m_TimeScale: 1 Maximum Particle Timestep: 0.03 ================================================ FILE: ProjectSettings/UnityConnectSettings.asset ================================================ %YAML 1.1 %TAG !u! tag:unity3d.com,2011: --- !u!310 &1 UnityConnectSettings: m_ObjectHideFlags: 0 m_Enabled: 0 m_TestMode: 0 m_TestEventUrl: m_TestConfigUrl: m_TestInitMode: 0 CrashReportingSettings: m_EventUrl: https://perf-events.cloud.unity3d.com/api/events/crashes m_NativeEventUrl: https://perf-events.cloud.unity3d.com/symbolicate m_Enabled: 0 m_CaptureEditorExceptions: 1 UnityPurchasingSettings: m_Enabled: 0 m_TestMode: 0 UnityAnalyticsSettings: m_Enabled: 1 m_InitializeOnStartup: 1 m_TestMode: 0 m_TestEventUrl: m_TestConfigUrl: UnityAdsSettings: m_Enabled: 0 m_InitializeOnStartup: 1 m_TestMode: 0 m_IosGameId: m_AndroidGameId: m_GameIds: {} m_GameId: PerformanceReportingSettings: m_Enabled: 0 ================================================ FILE: README.md ================================================ # SVGMeshUnity typo Generates mesh from [SVG path](https://github.com/beinteractive/SVGMeshUnity/blob/de472c2f716329e2991f75fcab9bd7253cc8ff12/Assets/Samples/Scripts/Simple.cs#L8-L14) in realtime for Unity. This is a port of https://github.com/mattdesl/svg-mesh-3d ## Install Copy `Assets/SVGMeshUnity` directory to your Assets directory. Add a `SVGMesh` component to a GameObject that has `MeshFilter` and `MeshRenderer`. inspector ## Usage ### Create mesh from SVG path twitter twtitter-wire ```C# var mesh = GetComponent(); var svg = new SVGData(); svg.Path("M17.316,6.246c0.008,0.162,0.011,... and so on"); mesh.Fill(svg); ``` Simply create an instance of `SVGData` and set SVG path data string by calling `SVGData.Path()`. Then call `Mesh.Fill()`, a mesh will be generated. ### Create mesh from code Instead of use SVG path data, you can directly make path data in your code. ```C# void Update() { SVG.Clear(); var resolution = 5; var radius = 3f; SVG.Move(NoisedR(radius, 0), 0f); for (var i = 0; i < resolution; ++i) { var i0 = i; var i1 = (i + 1) % resolution; var angle0 = Mathf.PI * 2f * ((float) i0 / resolution); var angle1 = Mathf.PI * 2f * ((float) i1 / resolution); var r0 = NoisedR(radius, i0); var r1 = NoisedR(radius, i1); var x0 = Mathf.Cos(angle0) * r0; var y0 = Mathf.Sin(angle0) * r0; var x1 = Mathf.Cos(angle1) * r1; var y1 = Mathf.Sin(angle1) * r1; var cx = x0 + (x1 - x0) * 0.5f; var cy = y0 + (y1 - y0) * 0.5f; var ca = Mathf.Atan2(cy, cx); var cr = 0.3f + (Mathf.PerlinNoise(Time.time, i * -100f) - 0.5f) * 1.15f; cx += Mathf.Cos(ca) * cr; cy += Mathf.Sin(ca) * cr; SVG.Curve(cx, cy, cx, cy, x1, y1); } Mesh.Fill(SVG); } private float NoisedR(float r, float randomize) { return r + (Mathf.PerlinNoise(Time.time, randomize * 10f) - 0.5f) * 0.5f; } ``` ```C# public class Move : MonoBehaviour { [SerializeField] private float R = 0.5f; [SerializeField] private float IntervalRate = 1f; [SerializeField] private SVGMesh HeadMesh; [SerializeField] private SVGMesh TailMesh; [SerializeField] private SVGMesh BodyMesh; private SVGData HeadSVG; private SVGData TailSVG; private SVGData BodySVG; private Vector2 Head; private Vector2 Tail; private Vector2 To; private float HeadR; private float TailR; private float Interval; private float FollowTime; void Start() { HeadSVG = new SVGData(); TailSVG = new SVGData(); BodySVG = new SVGData(); Head = RandomField(); Tail = Head; } void Update() { HeadSVG.Clear(); TailSVG.Clear(); BodySVG.Clear(); Update(Time.deltaTime); var v = Mathf.Max(0.7f, 1.3f - Mathf.Clamp01((Head - Tail).magnitude / 3f)); Circle(HeadSVG, Head, HeadR); Circle(TailSVG, Tail, TailR); Metaball(BodySVG, Head, HeadR, Tail, TailR, v); HeadMesh.Fill(HeadSVG); TailMesh.Fill(TailSVG); BodyMesh.Fill(BodySVG); } private void Update(float dt) { Interval -= dt; FollowTime -= dt; if (Interval <= 0f) { To = RandomField(); To = Head + Vector2.ClampMagnitude(To - Head, 2f); HeadR = R * 0.15f; TailR = R; Interval = Random.Range(1.5f, 2.6f) * IntervalRate; FollowTime = Random.Range(0.15f, 0.25f); } Head = Vector2.Lerp(To, Head, Mathf.Exp(-5f * dt)); if (FollowTime <= 0f) { Tail = Vector2.Lerp(Head, Tail, Mathf.Exp(-5f * dt)); if (FollowTime <= -0.4f) { TailR = Mathf.Lerp(R, TailR, Mathf.Exp(-4f * dt)); } else { TailR = Mathf.Lerp(R * 0.05f, TailR, Mathf.Exp(-6f * dt)); } HeadR = Mathf.Lerp(R, HeadR, Mathf.Exp(-3f * dt)); } } private Vector2 RandomField() { return new Vector2(Random.Range(-4f, 4f), Random.Range(-4f, 4f)); } private void Circle(SVGData svg, Vector2 c, float r) { for (var i = 0; i < 4; ++i) { var angle0 = Mathf.PI * 0.5f * (i + 0); var angle1 = Mathf.PI * 0.5f * (i + 1); var x0 = c.x + Mathf.Cos(angle0) * r; var y0 = c.y - Mathf.Sin(angle0) * r; var x1 = c.x + Mathf.Cos(angle1) * r; var y1 = c.y - Mathf.Sin(angle1) * r; var a = r * (4f / 3f) * Mathf.Tan((angle1 - angle0) / 4f); var inAngle = angle0 + Mathf.PI * 0.5f; var inX = x0 + Mathf.Cos(inAngle) * a; var inY = y0 - Mathf.Sin(inAngle) * a; var outAngle = angle1 - Mathf.PI * 0.5f; var outX = x1 + Mathf.Cos(outAngle) * a; var outY = y1 - Mathf.Sin(outAngle) * a; if (i == 0) { svg.Move(x0, y0); } svg.Curve(inX, inY, outX, outY, x1, y1); } } // http://shspage.com/aijs/ private void Metaball(SVGData svg, Vector2 c1, float r1, Vector2 c2, float r2, float v) { if (r1 == 0f || r2 == 0f) { return; } var pi2 = Mathf.PI / 2f; var d = (c2 - c1).magnitude; var u1 = 0f; var u2 = 0f; if (d <= Mathf.Abs(r1 - r2)) { return; } else if (d < r1 + r2) { // case circles are overlapping u1 = Mathf.Acos((r1 * r1 + d * d - r2 * r2) / (2 * r1 * d)); u2 = Mathf.Acos((r2 * r2 + d * d - r1 * r1) / (2 * r2 * d)); } var t1 = Mathf.Atan2(c2.y - c1.y, c2.x - c1.x); var t2 = Mathf.Acos((r1 - r2) / d); var t1a = t1 + u1 + (t2 - u1) * v; var t1b = t1 - u1 - (t2 - u1) * v; var t2a = t1 + Mathf.PI - u2 - (Mathf.PI - u2 - t2) * v; var t2b = t1 - Mathf.PI + u2 + (Mathf.PI - u2 - t2) * v; var p1a = PointOnCircle(c1, t1a, r1); var p1b = PointOnCircle(c1, t1b, r1); var p2a = PointOnCircle(c2, t2a, r2); var p2b = PointOnCircle(c2, t2b, r2); // define handle length by the distance between both ends of the curve to draw var handle_len_rate = 2; var d2 = Mathf.Min(v * handle_len_rate, (p2a - p1a).magnitude / (r1 + r2)); d2 *= Mathf.Min(1, d * 2 / (r1 + r2)); // case circles are overlapping r1 *= d2; r2 *= d2; svg.Move(p1a); svg.Curve(PointOnCircle(p1a, t1a - pi2, r1), PointOnCircle(p2a, t2a + pi2, r2), p2a); svg.Line(p2b); svg.Curve(PointOnCircle(p2b, t2b - pi2, r2), PointOnCircle(p1b, t1b + pi2, r1), p1b); svg.Line(p1a); } private Vector2 PointOnCircle(Vector2 c, float angle, float r) { return c + new Vector2(Mathf.Cos(angle), Mathf.Sin(angle)) * r; } } ``` Use `SVGData.Move`, `SVGData.Line`, `SVGData.Curve`, ... and so on. Create realtime path as you like. ### Options The following options are provided in SVGMesh component. - `Delaunay` (default `false`) - whether to use Delaunay triangulation - Delaunay triangulation is slower, but looks better - `Scale` (default `1`) - a positive number, the scale at which to [approximate the curves](https://github.com/mattdesl/adaptive-bezier-curve) from the SVG paths - higher number leads to smoother corners, but slower triangulation - `Interior` if set, only return interior faces. See note. (Default `true`) - `Exterior` if set, only return exterior faces. See note. (Default `false`) - `Infinity` if set, then the triangulation is augmented with a [point at infinity](https://en.wikipedia.org/wiki/Point_at_infinity) represented by the index `-1`. (Default `false`) ## License MIT