{"id":21141599,"url":"https://github.com/bjornbytes/lovr-icosphere","last_synced_at":"2025-07-09T05:32:06.625Z","repository":{"id":145427830,"uuid":"83284257","full_name":"bjornbytes/lovr-icosphere","owner":"bjornbytes","description":"Make spheres with LÖVR","archived":false,"fork":false,"pushed_at":"2024-04-09T18:16:52.000Z","size":3,"stargazers_count":3,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-05-02T00:44:06.540Z","etag":null,"topics":["lovr"],"latest_commit_sha":null,"homepage":null,"language":"Lua","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/bjornbytes.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,"roadmap":null,"authors":null,"dei":null}},"created_at":"2017-02-27T08:02:34.000Z","updated_at":"2024-04-09T18:16:55.000Z","dependencies_parsed_at":null,"dependency_job_id":"f0907d7a-5d77-4f76-88da-87f38c64a07b","html_url":"https://github.com/bjornbytes/lovr-icosphere","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/bjornbytes%2Flovr-icosphere","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bjornbytes%2Flovr-icosphere/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bjornbytes%2Flovr-icosphere/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bjornbytes%2Flovr-icosphere/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bjornbytes","download_url":"https://codeload.github.com/bjornbytes/lovr-icosphere/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225486664,"owners_count":17481947,"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":["lovr"],"created_at":"2024-11-20T07:32:15.500Z","updated_at":"2024-11-20T07:32:16.493Z","avatar_url":"https://github.com/bjornbytes.png","language":"Lua","funding_links":[],"categories":[],"sub_categories":[],"readme":"lovr-icosphere\n===\n\nA small library to generate icospheres with Lua and [LÖVR](https://github.com/bjornbytes/lovr).\nInspired by [this blog post](http://blog.andreaskahler.com/2009/06/creating-icosphere-mesh-in-code.html).\n\n\u003e Note: In LÖVR 0.7.1 and on, you can use the `lovr.graphics.sphere` function to draw filled\n\u003e spheres.  This library is still useful for drawing wireframe spheres or \"low-poly\" spheres.\n\nUsage\n---\n\n```lua\nlocal icosphere = require 'icosphere'\n\nfunction lovr.load()\n  local vertices, indices = icosphere(2)\n\n  mesh = lovr.graphics.newMesh(vertices, 'triangles')\n  mesh:setVertexMap(indices)\nend\n\nfunction lovr.draw()\n  lovr.graphics.setWireframe(true)\n  mesh:draw(0, 0, -1, .3, lovr.timer.getTime() * .3)\nend\n```\n\nDocumentation\n---\n\n```lua\nvertices, indices = icosphere(n)\n```\n\nThe library exports a single function.  The function accepts a single integer parameter `n`\nrepresenting the number of times to subdivide the sphere.  Higher numbers will yield smoother\ngeometry, but each subdivision will quadruple the number of vertices.  If `n` is zero or `nil`,\nan the function will generate a regular convex icosahedron with 12 vertices and 20 triangles.\n\nThe list of vertices can be passed directly to `lovr.graphics.newMesh`, and list of indices can\nbe used as the Mesh's vertex map.\n\nLicense\n---\n\nMIT, see [LICENSE](LICENSE) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbjornbytes%2Flovr-icosphere","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbjornbytes%2Flovr-icosphere","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbjornbytes%2Flovr-icosphere/lists"}