{"id":17590756,"url":"https://github.com/setanarut/ebitencm","last_synced_at":"2026-01-31T05:03:21.624Z","repository":{"id":257300392,"uuid":"857878237","full_name":"setanarut/ebitencm","owner":"setanarut","description":"ebitencm is setanarut/cm physics space drawing package","archived":false,"fork":false,"pushed_at":"2025-08-13T19:04:50.000Z","size":71,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-13T21:19:51.520Z","etag":null,"topics":["chipmunk","chipmunk-physics-engine","chipmunk2d","ebiten","ebiten-framework","ebiten-parts","ebitengine"],"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/setanarut.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}},"created_at":"2024-09-15T20:48:14.000Z","updated_at":"2025-08-13T19:04:53.000Z","dependencies_parsed_at":null,"dependency_job_id":"1e55447f-d3a3-4c42-bc20-1c78666ec374","html_url":"https://github.com/setanarut/ebitencm","commit_stats":{"total_commits":18,"total_committers":2,"mean_commits":9.0,"dds":"0.33333333333333337","last_synced_commit":"0815f3f3d0a1aa0e4fda272ba0d1f17ef040bb4d"},"previous_names":["setanarut/ebitencm"],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/setanarut/ebitencm","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/setanarut%2Febitencm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/setanarut%2Febitencm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/setanarut%2Febitencm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/setanarut%2Febitencm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/setanarut","download_url":"https://codeload.github.com/setanarut/ebitencm/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/setanarut%2Febitencm/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28929865,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-31T04:05:25.756Z","status":"ssl_error","status_checked_at":"2026-01-31T04:02:35.005Z","response_time":128,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["chipmunk","chipmunk-physics-engine","chipmunk2d","ebiten","ebiten-framework","ebiten-parts","ebitengine"],"created_at":"2024-10-22T04:24:34.098Z","updated_at":"2026-01-31T05:03:21.618Z","avatar_url":"https://github.com/setanarut.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![GoDoc](https://godoc.org/github.com/setanarut/ebitencm?status.svg)](https://pkg.go.dev/github.com/setanarut/ebitencm)\n\n![theo](https://github.com/user-attachments/assets/b7228738-33a1-4d87-9926-d373a66da6eb)\n\n# ebitencm\n\n**ebitencm** is *Drawer* for [setanarut/cm](https://github.com/setanarut/cm) Chipmunk physics space.\n\n# Features\n\n- Color theme customization for *Fill* and *Stroke* colors.\n- Detailed drawing options.\n- `drawer.GeoM{}` structure is provided for screen transformation. (Cameras)\n\n## Usage\n\nFirst create a drawer\n\n```Go\nvar drawer *ebitencm.Drawer = ebitencm.NewDrawer()\n```\n\nThen\n\n```go\nfunc (g *Game) Draw(screen *ebiten.Image) {\n\tdrawer.DrawSpace(space, screen)\n}\n```\n\n## Dragging\n\nIf you want to enable dragging, call the `HandleMouseEvent()` function within the `Update` method, passing the `*cm.Space` object. This will allow objects to be dragged using a mouse or touch device.\n\n```go\nfunc (g *Game) Update() error {\n\tdrawer.HandleMouseEvent(space)\n```\n\n## Camera transform\n\nUse `Drawer.GeoM{}` for all vertices transform. The cursor position is calculated according to this matrix.\n\n```Go\n// move the all space objects 100 pixels to the left (move camera to right)\ndrawer.GeoM.Translate(-100, 0)\n```\n\nHere is an example with the [setanarut/kamera](https://github.com/setanarut/kamera) package.\n\n```Go\nfunc (g *Game) Update() error {\n\tg.space.Step(1 / 60.0)\n\tg.cam.LookAt(x, y)\n\t// Apply camera transform to drawer\n\tg.drawer.GeoM.Reset()\n\tg.cam.ApplyCameraTransform(g.drawer.GeoM)\n\t// Enable cursor dragging\n\tg.drawer.HandleMouseEvent(g.space)\n```\n\n## Examples\n\nBrowse to the [examples](./examples/) folder for all examples.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsetanarut%2Febitencm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsetanarut%2Febitencm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsetanarut%2Febitencm/lists"}