{"id":16255623,"url":"https://github.com/grena/odin","last_synced_at":"2025-09-05T00:40:51.279Z","repository":{"id":75572998,"uuid":"158278425","full_name":"grena/odin","owner":"grena","description":":star: :earth_asia: Odin - The Celestial Planet Generator","archived":false,"fork":false,"pushed_at":"2019-04-09T15:11:44.000Z","size":512,"stargazers_count":8,"open_issues_count":3,"forks_count":2,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-08-30T23:46:37.464Z","etag":null,"topics":["art","generator","planet","procedural-generation","space"],"latest_commit_sha":null,"homepage":null,"language":"PHP","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/grena.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}},"created_at":"2018-11-19T19:25:22.000Z","updated_at":"2023-01-22T07:01:26.000Z","dependencies_parsed_at":null,"dependency_job_id":"ff912fd2-905e-4185-956c-9b88442ac441","html_url":"https://github.com/grena/odin","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/grena/odin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grena%2Fodin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grena%2Fodin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grena%2Fodin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grena%2Fodin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/grena","download_url":"https://codeload.github.com/grena/odin/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grena%2Fodin/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273695222,"owners_count":25151481,"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-09-04T02:00:08.968Z","response_time":61,"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":["art","generator","planet","procedural-generation","space"],"created_at":"2024-10-10T15:43:28.546Z","updated_at":"2025-09-05T00:40:51.256Z","avatar_url":"https://github.com/grena.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Odin - The Celestial Planet Generator\n\n![](odin-logo.png)\n\nOdin aims to render randomly generated planets, moons and star fields as PNG images.\n\n## Example\n\nHere is an picture entirely generated by Odin:\n![](example.png)\n\n## Render a planet\n\n```php\n$planet = new Odin\\Planet();\n$image = $planet\n    -\u003ediameter(300) // a 300px wide planet\n    -\u003elava()        // a planet with the lava biome\n    -\u003erender();\n    \n// $image is a \\SplFileObject, you're free to do what you want with it\n```\n\nA planet can have the following biomes: `toxic`, `forest`, `ashes`, `violet`, `lava`, `atoll`, `coldGaz`, `hotGaz`, `hydroGaz`.  \n\n\n## Render a moon\n\n```php\n$moon = new Odin\\Moon();\n$image = $moon\n    -\u003ediameter(150) // a 150px wide moon\n    -\u003erender();\n    \n// $image is a \\SplFileObject, you're free to do what you want with it\n```\n\n## Render multiple times an object\n\nIt's possible to render the same planet several times (it works also for moons and star fields). You'll get the same image results.\n\n```php\n$planet = new Odin\\Planet();\n$planet-\u003ediameter(300)-\u003elava();\n\n$firstImage = $planet-\u003erender();\n// do some other stuff...\n$secondImage = $planet-\u003erender();\n\n// $firstImage and $secondImage are two different files, but their content are identical\n```\n\n## Configure how objects are rendered\n\nObjects rendering can be configured. \n\n```php\n$configuration = new Odin\\Configuration();\n$planet = new Planet($configuration);\n```\n\n### Render objects in a specific directory\n\nIt's possible to define where the images will be rendered. By default, they will be generated in `/tmp`.\n\n```php\n$configuration = new Odin\\Configuration('my/custom/path/for/images');\n```\n\n### Render the same object later\n\nIt's possible to render the same object in different PHP processes or requests. To achieve that, you just need to pass the `seed` to your the configuration.\n\n```php\n$seed = 42;\n$moon = new Odin\\Configuration(null, $seed);\n```\n\n## Launch the tests\n\n```bash\n./vendor/bin/phpspec run\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrena%2Fodin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgrena%2Fodin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrena%2Fodin/lists"}