{"id":33022509,"url":"https://github.com/lazysquirrellabs/sphere_generator","last_synced_at":"2025-11-23T07:01:20.420Z","repository":{"id":236342530,"uuid":"792411691","full_name":"lazysquirrellabs/sphere_generator","owner":"lazysquirrellabs","description":"A small Unity package for generating spheres procedurally.","archived":false,"fork":false,"pushed_at":"2025-11-02T16:07:37.000Z","size":498,"stargazers_count":19,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-11-02T18:08:25.795Z","etag":null,"topics":["game-dev","game-development","unity","unity-package","unity-tool"],"latest_commit_sha":null,"homepage":"","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/lazysquirrellabs.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,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-04-26T16:03:41.000Z","updated_at":"2025-10-06T09:26:25.000Z","dependencies_parsed_at":"2024-06-09T13:40:10.317Z","dependency_job_id":"a716051a-3e9d-41fa-9ae0-696a17933e36","html_url":"https://github.com/lazysquirrellabs/sphere_generator","commit_stats":null,"previous_names":["matheusamazonas/sphere_generator","lazysquirrellabs/sphere_generator"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/lazysquirrellabs/sphere_generator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lazysquirrellabs%2Fsphere_generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lazysquirrellabs%2Fsphere_generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lazysquirrellabs%2Fsphere_generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lazysquirrellabs%2Fsphere_generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lazysquirrellabs","download_url":"https://codeload.github.com/lazysquirrellabs/sphere_generator/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lazysquirrellabs%2Fsphere_generator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":285914727,"owners_count":27252968,"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","status":"online","status_checked_at":"2025-11-23T02:00:06.149Z","response_time":135,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["game-dev","game-development","unity","unity-package","unity-tool"],"created_at":"2025-11-13T19:00:34.925Z","updated_at":"2025-11-23T07:01:20.415Z","avatar_url":"https://github.com/lazysquirrellabs.png","language":"C#","funding_links":[],"categories":["Game-Design-Tool"],"sub_categories":[],"readme":"# Sphere Generator\nSphere Generator is a free Unity tool for generating sphere meshes procedurally.\n\n[![openupm](https://img.shields.io/npm/v/com.lazysquirrellabs.spheregenerator?label=openupm\u0026registry_uri=https://package.openupm.com)](https://openupm.com/packages/com.lazysquirrellabs.spheregenerator/)\n\n![A display of examples of 12 different shapes representing 3 different sphere types (icosphere, cube sphere, UV sphere), each one with 4 examples with different vertex count.](https://blog.matheusamazonas.net/assets/images/post22/sphere_display.png)\n\n[![](https://minmax.lslabs.dev/assets/images/get_unity.webp)](https://assetstore.unity.com/packages/tools/modeling/spheres-generator-311994)\n\n## Contents\n- [Features](#features)\n- [Importing](#importing)\n\t- [Import via Unity Asset Store](#import-via-unity-asset-store)\n\t- [Import using a git URL](#import-using-a-git-url)\n\t- [Import with OpenUPM](#import-with-openupm)\n\t- [After importing](#after-importing)\n- [Usage](#usage)\n  - [Example](#example)\n- [Samples](#samples)\n- [Compatibility and dependencies](#compatibility-and-dependencies)\n- [Roadmap](#roadmap)\n- [Technical aspects](#technical-aspects)\n- [Contributing](#contributing)\n- [Getting help](#getting-help)\n- [License](#license)\n\n## Features\n- Support for different basic shapes:\n  - Icosphere (based on a regular icosahedron).\n  - Cube sphere.\n  - UV sphere.\n- Customizable radius and level of detail (a.k.a. fragmentation depth). \n\n## Importing\nThe first step is to import the library into your Unity project. There are three ways to do so: \n- [Via the Asset Store](#import-via-unity-asset-store).\n- Via the Package Manager:\n\t- [Using a git URL](#import-using-a-git-url). \n\t- [Using OpenUPM](#import-with-openupm).\n\n### Import via Unity Asset Store\nClick on the image below to visit the package's page on the Unity Asset Store. One there, follow the instructions to import it into your project.\n\n[![](https://minmax.lslabs.dev/assets/images/get_unity.webp)](https://assetstore.unity.com/packages/tools/modeling/spheres-generator-311994)\n\n### Import using a git URL\nThis approach uses Unity's Package Manager to add Sphere Generator to your project using the repo's git URL. To do so, navigate to `Window \u003e Package Manager` in Unity. Then click on the `+` and select \"Add package from git URL\":\n\n![](https://ttg.matheusamazonas.net/assets/images/upm_adding.png)\n\nNext, enter the following in the \"URL\" input field to install the latest version of Sphere Generator:\n```\nhttps://github.com/lazysquirrellabs/sphere_generator.git?path=Assets/Lazy Squirrel Labs/SphereGenerator\n```\nFinally, click on the \"Add\" button. The importing process should start automatically. Once it's done, Sphere Generator is ready to be used in the project. \n\n### Import with OpenUPM\nSphere Generator is available as a package on [OpenUPM](https://openupm.com/packages/com.lazysquirrellabs.spheregenerator/). To import Sphere Generator into your project via the command line, run the following command:\n```\nopenupm add com.lazysquirrellabs.spheregenerator\n```\nOnce the importing process is complete, Sphere Generator is ready to be used in the project. \n\n### After importing\nAfter importing , check the [Usage](#usage) section on how to use it and the [Samples](#samples) section on how to import and use the package samples.\n\n## Usage\nUsing Sphere Generator is straightforward. First, create a `SphereGenerator` (base class) instance by calling one of the supported sphere type constructors:\n```csharp\npublic CubeSphereGenerator(float radius, ushort depth);\npublic IcosphereGenerator(float radius, ushort depth);\npublic UVSphereGenerator(float radius, ushort depth);\n```\nWhere `radius` is the sphere radius and `depth` is the fragmentation depth (a.k.a. level of detail) of the to-be generated spheres. Check the documentation for valid parameter value ranges.\n\nOnce an instance of the `SphereGenerator` class is created, its `Generate` method can be called to generate a sphere mesh:\n```csharp\npublic Mesh Generate()\n```\nThe method returns a `Mesh` instance that represents the generated sphere. It is up to the user to control the lifetime of the `Mesh` instance.\n\n### Example\nLet's say we would like to create an icosphere with radius of 20 units, a fragmentation depth of 3, and use the generated mesh on a mesh filter that is used by a mesh renderer to display the sphere in the scene. The code below implements that inside an `Awake` method:\n```csharp\n[SerializeField] private MeshFilter _meshFilter;\n\nprivate void Awake()\n{\n    SphereGenerator generator = new IcosphereGenerator(20, 3);  \n    Mesh mesh = generator.Generate();\n    _meshFilter.mesh = mesh;\n}\n```\n\n## Samples\nThe package contains one sample named \"Display\". It displays the generational capabilities of the tool, displaying all supported sphere types with different depths. This sample is better displayed in the Scene view, with \"Shading Mode\" set to \"Shared wireframe\", so the vertices and triangles are visible. This sample was also used to generate the image at the top of this page.\n\nTo import the samples, open the Package Manager and select Sphere Generator in the packages list. Then find the Samples section on the right panel, and click on the \"Import\" button right next to the sample you would like to import. Once importing is finished, navigate to the `Assets/Samples/SphereGenerator` folder. Finally, open and play the scene from the sample you would like to test.\n\n## Compatibility and dependencies\nSphere Generator requires Unity 2022.3.X or above, its target API compatibility level is .NET Standard 2.1, and depends on the following packages:\n- `com.unity.collections`\n\n## Roadmap\nThe following basic shapes are planned to be implemented in future versions:\n- Truncated icosahedron.\n- Fibonacci.\n\n## Technical aspects\nSphere Generator's icosphere implementation has been discussed in the following blog post: [Generating an icosphere with code](https://blog.matheusamazonas.net/posts/generating_icosphere_with_code).\n\n## Contributing\nIf you would like to report a bug, please create an [issue](https://github.com/lazysquirrellabs/sphere_generator/issues). If you would like to contribute with bug fixing or small improvements, please open a Pull Request. If you would like to contribute with a new feature (regardless if it's in the roadmap or not), [contact the developer](https://matheusamazonas.net/contact.html).  \n\n## Getting help\nUse the [issues page](https://github.com/lazysquirrellabs/sphere_generator/issues) if there's a problem with your Sphere Generator setup, if something isn't working as expected, or if you would like to ask questions about the tool and its usage.\n\n## License\nSphere Generator is distributed under the terms of the MIT license. For more information, check the [LICENSE](LICENSE) file in this repository.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flazysquirrellabs%2Fsphere_generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flazysquirrellabs%2Fsphere_generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flazysquirrellabs%2Fsphere_generator/lists"}