{"id":26149360,"url":"https://github.com/temidaradev/esset","last_synced_at":"2025-10-09T02:27:25.436Z","repository":{"id":262434910,"uuid":"887197484","full_name":"temidaradev/esset","owner":"temidaradev","description":"A basic asset implementer for ebiten","archived":false,"fork":false,"pushed_at":"2025-06-15T15:18:55.000Z","size":344,"stargazers_count":3,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-10T23:25:30.719Z","etag":null,"topics":["ebiten","ebitengine","go","go-library"],"latest_commit_sha":null,"homepage":"","language":"Go","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/temidaradev.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-11-12T10:34:46.000Z","updated_at":"2025-06-15T15:18:58.000Z","dependencies_parsed_at":"2024-11-12T12:34:56.629Z","dependency_job_id":"c65534fc-7c63-4d3a-8b31-fb17e6c03fe6","html_url":"https://github.com/temidaradev/esset","commit_stats":null,"previous_names":["temidaradev/esset"],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/temidaradev/esset","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/temidaradev%2Fesset","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/temidaradev%2Fesset/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/temidaradev%2Fesset/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/temidaradev%2Fesset/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/temidaradev","download_url":"https://codeload.github.com/temidaradev/esset/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/temidaradev%2Fesset/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279000781,"owners_count":26082906,"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-10-09T02:00:07.460Z","response_time":59,"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":["ebiten","ebitengine","go","go-library"],"created_at":"2025-03-11T05:30:09.259Z","updated_at":"2025-10-09T02:27:25.403Z","avatar_url":"https://github.com/temidaradev.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Go Reference](https://pkg.go.dev/badge/github.com/temidaradev/esset/v2.svg)](https://pkg.go.dev/github.com/temidaradev/esset/v2)\n\n# Esset\n\n[日本語](i18n/README_jp.md) [Türkçe](i18n/README_tr.md) [Slovenčina](i18n/README_sk.md)\n\nEsset is a basic asset implementer for ebitengine.\n\n# Usage\n\nFirst `go get github.com/temidaradev/esset` and create an assets folder if you don't have. After creating folder put .png assets into that folder and create `assets.go`. After this add\n\n```\n//go:embed *\nvar assets embed.FS\n```\n\nthis embed statement after import part. Now you can use esset as you asset implementer. It wants 2 parameters from you firstly embed statement and then your `\"asset.png\"`.\n\n## GetAsset\n\nHere is an example: `var Idle = esset.GetAsset(assets, \"path/to/your/asset.png\")`\n\n## GetMultipleAssets\n\nImportant thing is create a folder and put every single tile item (.png) like this\n\n\u003cimg src=\"resources/image.png\" height=\"400\"\u003e\n\nand then you can use that function easily like this: `var Tile = esset.GetMultipleAssets(assets, \"path/to/your/*.png\")` Because of you are selecting more than 1 image our `*ebiten.Image` is a slice you can select by index like this: `TileComponent := assets.Tile[0]` or if you need to get random asset from that folder you can do like this: `TileRandom := assets.Tile[rand.Intn(len(assets.Tile))]`\n\n## DrawText\n\nFor fonts you have to embed fonts seperataly and you should add a `text.Face` variable like this:\n\n```\n//go:embed path/to/your/font.ttf\nvar MyFont []byte\nvar FontFaceS text.Face\nvar FontFaceM text.Face\nvar FontFaceM text.Face\n```\n\nThen for not loading the font each time you should put `GetFont()` function into `init()` function which is in your main file (contains `Game{}`) like this:\n\n```\nfunc init() {\n\tassets.FontFaceS, _ = esset.GetFont(assets.MyFont, 48)\n}\n```\n\nAfter setting up the `GetFont()` function you are ready to use the `DrawText()` function\n\nNo need to create a special DrawOptions for this. Just (screen, text, posX, posY, text.Face, color)\n\nYou can use `esset.DrawText` func like this: `esset.DrawText(screen, \"wassup\", 100, 50, assets.FontFaceS, color.White)`\n\nMuch thanks to [@m110](https://github.com/m110) for source support \u003c3\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftemidaradev%2Fesset","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftemidaradev%2Fesset","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftemidaradev%2Fesset/lists"}