{"id":25209457,"url":"https://github.com/alexiush/dicer","last_synced_at":"2025-04-05T05:22:56.319Z","repository":{"id":250996958,"uuid":"828129489","full_name":"Alexiush/Dicer","owner":"Alexiush","description":"Unity package for procedural generation of dice of any size","archived":false,"fork":false,"pushed_at":"2024-07-31T06:29:01.000Z","size":40852,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-10T13:17:26.946Z","etag":null,"topics":["dice","dice-roller","procedural-generation","unity","unity-package","unity-ui"],"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/Alexiush.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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}},"created_at":"2024-07-13T07:50:45.000Z","updated_at":"2024-07-31T06:29:04.000Z","dependencies_parsed_at":"2024-07-31T07:59:59.798Z","dependency_job_id":null,"html_url":"https://github.com/Alexiush/Dicer","commit_stats":null,"previous_names":["alexiush/dicer"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Alexiush%2FDicer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Alexiush%2FDicer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Alexiush%2FDicer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Alexiush%2FDicer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Alexiush","download_url":"https://codeload.github.com/Alexiush/Dicer/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247290109,"owners_count":20914599,"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":["dice","dice-roller","procedural-generation","unity","unity-package","unity-ui"],"created_at":"2025-02-10T13:17:35.089Z","updated_at":"2025-04-05T05:22:56.294Z","avatar_url":"https://github.com/Alexiush.png","language":"C#","readme":"# Dicer 🎲\r\n\r\nDicer is a package for generating and managing dice of any size. \r\nIt includes creating dice procedurally, performing actual and fake rolls and using it all in 2d via automated prerendering.\r\n\r\nCurrently it includes only three types of shapes: tetrahedron, trapezohedra and bipyramids, which are not that popular, but allow creating fair dice of any size. \r\n\u003e Odd numbers are represented through repetition 🤓\r\n\r\n## Usage\r\n\r\n### Installation\r\n\r\nThe package can be installed through the UPM by the link `https://github.com/Alexiush/Dicer.git`.\r\n\r\n### In 3D (Worldspace)\r\n\r\nTo create a die with Dicer a `ProceduralDie` component should be added to the GameObject. \r\nThen you can proceed with setting the parameters of your dice and it's visuals: shape, number of sides, material, sides texture resolution and sources.\r\n\r\nThere are also other useful components for interactive dice: \r\n* `DiceCollider` - Managing physics initialization, so it happens after generation\r\n* `DiceThrower` - Creating artificial force and torque to immitate throw and sending events about the throw results\r\n* `DiceRotator` - Rotating dice towards the desired side\r\n\r\nThe package contains examples of URP materials to use with Dicer's dice, the main point is in using cubemaps for the main material and `_Mask` texture for numbers or any other symbols on sides textures.\r\n\r\n### In 2D (UI)\r\n\r\nUnity allows using 3D elements in UI. However, it is heavier than 2D and also can't be treated as most UI elements.\r\nDicer provides prerendering feature that allows to pack the generated die into `UIDieData` config with the sprites for it's sides and rolling animation.\r\nThere are also UI components for both legacy UI and UI Toolkit that use this data to show die in 2D.\r\n\r\n## Roadmap:\r\n\r\n* Popular shapes (DnD dice, platonic shapes)\r\n* Optimal texturing\r\n* Special effects for rolling, throwing, etc (Blur is prioritized)\r\n\r\n\u003e In a current state Dicer contains some parts that may not be absolutely correct or pretty underoptimized 😢, Fixing this is also on the roadmap\r\n\r\n## Credits\r\n\r\n* [CatLikeCoding tutorial on procedural meshes](https://catlikecoding.com/unity/tutorials/procedural-meshes/)\r\n* [NothkeUtils](https://github.com/nothke/unity-utils/blob/master/Runtime/RTUtils.cs) for rendering\r\n* [Dropdown attribute](https://assetstore.unity.com/packages/tools/utilities/dropdown-attribute-180951) - note that Dicer contains slightly modified version of it\r\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexiush%2Fdicer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falexiush%2Fdicer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexiush%2Fdicer/lists"}