{"id":13662592,"url":"https://github.com/sinbad/UnityMarchingSquares","last_synced_at":"2025-04-25T10:32:32.870Z","repository":{"id":139584280,"uuid":"293763134","full_name":"sinbad/UnityMarchingSquares","owner":"sinbad","description":null,"archived":true,"fork":false,"pushed_at":"2020-09-08T09:50:51.000Z","size":20,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-08-03T05:14:19.709Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sinbad.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2020-09-08T09:28:00.000Z","updated_at":"2024-03-08T16:42:30.000Z","dependencies_parsed_at":"2024-01-26T19:59:47.838Z","dependency_job_id":null,"html_url":"https://github.com/sinbad/UnityMarchingSquares","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sinbad%2FUnityMarchingSquares","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sinbad%2FUnityMarchingSquares/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sinbad%2FUnityMarchingSquares/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sinbad%2FUnityMarchingSquares/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sinbad","download_url":"https://codeload.github.com/sinbad/UnityMarchingSquares/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223996816,"owners_count":17238375,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-02T05:02:02.949Z","updated_at":"2024-11-10T18:30:56.121Z","avatar_url":"https://github.com/sinbad.png","language":"C#","funding_links":[],"categories":["C\\#"],"sub_categories":[],"readme":"# Unity Marching Squares Implementation\n\nI pulled this marching squares implementation out of an old prototype Thrust-a-like game I made for Unity in 2017 \nin order to share it, since I think it's quite generic and probably useful for others. It was built for Unity 2017 \nbut the code is pretty generic.\n\n## Features:\n\n* Given a 2D array of \"densities\"\n  * Building a background mesh for the solid areas\n  * Building line renderers for the edges\n  * Building EdgeColliders\n\n* Procedurally generating density maps where all areas are reachable\n\n## Classes: \n\n* Map: Holder for all the data structures for a single map.\n* IMapSource: An interface for providing a 2D array of density data to Map. This can be manually authored or generated.\n* MeshGenerator: Builds the background mesh for Map, builds colliders, and communicates with the edge generator\n* MapEdgeGfx: Builds line renderers for the edges of the solid areas\n* MapGenerator: Procedurally generates a map of density data which is always traversable, is an IMapSource\n  \n## How to use\n  \n 1. Create a GameObject in your level\n 2. Add the Map and MeshGenerator components to it\n 3. Add a MeshFilter component (this will hold the mesh)\n 4. Add an IMapSource component, e.g. a MapGenerator for a procedural map\n 5. Call Map.RefreshMap\n   \nYou'll want to tweak materials etc but everything is standard Unity.\n   \n \n  \n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsinbad%2FUnityMarchingSquares","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsinbad%2FUnityMarchingSquares","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsinbad%2FUnityMarchingSquares/lists"}