{"id":13663352,"url":"https://github.com/mattatz/unity-verlet-simulator","last_synced_at":"2025-06-17T00:33:55.149Z","repository":{"id":151395091,"uuid":"104738320","full_name":"mattatz/unity-verlet-simulator","owner":"mattatz","description":"Simple verlet integration simulator for Unity.","archived":false,"fork":false,"pushed_at":"2019-03-23T01:20:12.000Z","size":48327,"stargazers_count":272,"open_issues_count":1,"forks_count":40,"subscribers_count":16,"default_branch":"master","last_synced_at":"2025-05-07T17:49:27.234Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mattatz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2017-09-25T10:51:39.000Z","updated_at":"2025-05-07T11:33:14.000Z","dependencies_parsed_at":"2023-07-07T07:46:07.320Z","dependency_job_id":null,"html_url":"https://github.com/mattatz/unity-verlet-simulator","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mattatz/unity-verlet-simulator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattatz%2Funity-verlet-simulator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattatz%2Funity-verlet-simulator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattatz%2Funity-verlet-simulator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattatz%2Funity-verlet-simulator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mattatz","download_url":"https://codeload.github.com/mattatz/unity-verlet-simulator/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattatz%2Funity-verlet-simulator/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260268575,"owners_count":22983600,"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:25.225Z","updated_at":"2025-06-17T00:33:55.117Z","avatar_url":"https://github.com/mattatz.png","language":"C#","funding_links":[],"categories":["C\\#","Physics"],"sub_categories":[],"readme":"unity-verlet-simulator\n=====================\n\nGPU-based simple verlet integration simulator for Unity.\n\n![Tentacles](https://raw.githubusercontent.com/mattatz/unity-verlet-simulator/master/Captures/Tentacles.gif)\n\n![GPUChainDemo](https://raw.githubusercontent.com/mattatz/unity-verlet-simulator/master/Captures/GPUChainDemo.gif)\n\n![GPUClothDemo](https://raw.githubusercontent.com/mattatz/unity-verlet-simulator/master/Captures/GPUClothDemo.gif)\n\n## Usage (chain structure example)\n\n```cs\n\n[SerializeField] ComputeShader compute; // GPUVerletSimulator.compute\nGPUVerletSimulator simulator;\n\nvoid Start() {\n    const float edgeLength = 0.5f;\n\n    // define nodes and edges.\n    var nodes = new GPUNode[nodesCount];\n    for(int i = 0; i \u003c nodesCount; i++)\n    {\n        var n = nodes[i];\n        var p = new Vector3(Random.value - 0.5f, i * edgeLength, Random.value - 0.5f);\n        n.position = n.prev = p;\n        n.decay = 1f;\n        nodes[i] = n;\n    }\n\n    var edgesCount = nodesCount - 1;\n    var edges = new GPUEdge[edgesCount];\n    for(int i = 0; i \u003c edgesCount; i++)\n    {\n        var e = edges[i];\n        e.a = i;\n        e.b = i + 1;\n        e.length = edgeLength;\n        edges[i] = e;\n    }\n\n    // create simulator instance.\n    simulator = new GPUVerletSimulator(nodes, edges);\n}\n\nvoid Update() {\n    const int iterations = 8;\n\n    // simulate\n    simulator.Step(compute);\n    for(int i = 0; i \u003c iterations; i++)\n    {\n        simulator.Solve(compute);\n    }\n}\n\n```\n\n## Sources\n\n- Advanced Character Physics - http://web.archive.org/web/20080410171619/http://www.teknikus.dk/tj/gdc2001.htm\n\n## Compatibility\n\ntested on Unity 2018.2.4f, windows10 (GTX 1060).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmattatz%2Funity-verlet-simulator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmattatz%2Funity-verlet-simulator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmattatz%2Funity-verlet-simulator/lists"}