{"id":43997321,"url":"https://github.com/taigrr/trophy","last_synced_at":"2026-04-03T00:42:46.295Z","repository":{"id":335776515,"uuid":"1146957881","full_name":"taigrr/trophy","owner":"taigrr","description":"Terminal 3D Model Viewer - View OBJ and GLB files in your terminal","archived":false,"fork":false,"pushed_at":"2026-02-01T02:53:31.000Z","size":95,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-02-01T13:44:08.005Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"0bsd","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/taigrr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":"taigrr"}},"created_at":"2026-02-01T00:28:18.000Z","updated_at":"2026-02-01T04:07:49.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/taigrr/trophy","commit_stats":null,"previous_names":["taigrr/trophy"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/taigrr/trophy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taigrr%2Ftrophy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taigrr%2Ftrophy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taigrr%2Ftrophy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taigrr%2Ftrophy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/taigrr","download_url":"https://codeload.github.com/taigrr/trophy/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taigrr%2Ftrophy/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29257504,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-09T04:11:57.159Z","status":"ssl_error","status_checked_at":"2026-02-09T04:11:56.117Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":[],"created_at":"2026-02-07T12:00:44.128Z","updated_at":"2026-02-09T05:01:44.194Z","avatar_url":"https://github.com/taigrr.png","language":"Go","funding_links":["https://github.com/sponsors/taigrr"],"categories":["Table of Contents"],"sub_categories":[],"readme":"# Trophy 🏆\n\nTerminal 3D Model Viewer - View OBJ, GLB, and STL files directly in your terminal.\n\n![Trophy Demo](docs/demo.gif)\n\n## Features\n\n- **OBJ, GLB \u0026 STL Support** - Load standard 3D model formats\n- **Embedded Textures** - Automatically extracts and applies GLB textures\n- **Interactive Controls** - Rotate, zoom, and spin models with mouse/keyboard\n- **Software Rendering** - No GPU required, works over SSH\n- **Springy Physics** - Smooth, satisfying rotation with momentum\n\n## Installation\n\n```bash\ngo install github.com/taigrr/trophy/cmd/trophy@latest\n```\n\n## Usage\n\n```bash\ntrophy model.glb              # View a GLB model\ntrophy model.obj              # View an OBJ model\ntrophy model.stl              # View an STL model\ntrophy -texture tex.png model.obj  # Apply custom texture\ntrophy -bg 0,0,0 model.glb    # Black background\ntrophy -fps 60 model.glb      # Higher framerate\n```\n\n## Controls\n\n| Input        | Action                |\n| ------------ | --------------------- |\n| Mouse drag   | Rotate model          |\n| Scroll wheel | Zoom in/out           |\n| W/S          | Pitch up/down         |\n| A/D          | Yaw left/right        |\n| Q/E          | Roll                  |\n| Space        | Toggle spin mode      |\n| +/-          | Zoom                  |\n| R            | Reset view            |\n| T            | Toggle texture        |\n| X            | Toggle wireframe      |\n| B            | Toggle backface cull  |\n| L            | Position light        |\n| ?            | Toggle HUD overlay    |\n| Esc          | Quit                  |\n\n## Lighting\n\nPress `L` to enter lighting mode and drag to reposition the light source in real-time:\n\n![Lighting Demo](docs/lighting-demo.gif)\n\n## Library Usage\n\nTrophy's rendering packages can be used as a library:\n\n```go\nimport (\n    \"github.com/taigrr/trophy/pkg/models\"\n    \"github.com/taigrr/trophy/pkg/render\"\n    \"github.com/taigrr/trophy/pkg/math3d\"\n)\n\n// Load a model\nmesh, texture, _ := models.LoadGLBWithTexture(\"model.glb\")\n\n// Create renderer\nfb := render.NewFramebuffer(320, 200)\ncamera := render.NewCamera()\nrasterizer := render.NewRasterizer(camera, fb)\n\n// Render (uses optimized edge-function rasterizer)\nrasterizer.DrawMeshTexturedOpt(mesh, transform, texture, lightDir)\n```\n\n## Packages\n\n- `pkg/math3d` - 3D math (Vec2, Vec3, Vec4, Mat4)\n- `pkg/models` - Model loaders (OBJ, GLB/GLTF, STL)\n- `pkg/render` - Software rasterizer, camera, textures\n\n## Benchmarks\n\nRun with `go test -bench=. -benchmem ./...`\n\n### Math (pkg/math3d)\n\n| Benchmark      | ns/op | B/op | allocs/op |\n| -------------- | ----: | ---: | --------: |\n| Mat4Mul        | 74.86 |    0 |         0 |\n| Mat4MulVec4    |  6.84 |    0 |         0 |\n| Mat4MulVec3    |  8.24 |    0 |         0 |\n| Mat4Inverse    | 62.13 |    0 |         0 |\n| Vec3Normalize  |  7.41 |    0 |         0 |\n| Vec3Cross      |  2.47 |    0 |         0 |\n| Vec3Dot        |  2.48 |    0 |         0 |\n| Perspective    | 24.15 |    0 |         0 |\n| LookAt         | 33.66 |    0 |         0 |\n| ViewProjection | 71.32 |    0 |         0 |\n\n### Rendering (pkg/render)\n\n| Benchmark                  |  ns/op | B/op | allocs/op |\n| -------------------------- | -----: | ---: | --------: |\n| FrustumExtract             |  37.03 |    0 |         0 |\n| AABBIntersection (visible) |   9.96 |    0 |         0 |\n| AABBIntersection (culled)  |   7.76 |    0 |         0 |\n| TransformAABB              |  125.8 |    0 |         0 |\n| FrustumIntersectAABB       |   7.31 |    0 |         0 |\n| FrustumIntersectsSphere    |   4.91 |    0 |         0 |\n| DrawTriangleGouraud        |   4858 |    0 |         0 |\n| DrawTriangleGouraudOpt     |   3981 |    0 |         0 |\n| DrawMeshGouraud            |  55741 |    0 |         0 |\n| DrawMeshGouraudOpt         |  27868 |    0 |         0 |\n\n### Culling Performance\n\n| Benchmark                       |  ns/op | B/op | allocs/op |\n| ------------------------------- | -----: | ---: | --------: |\n| MeshRendering (with culling)    | 115793 |    0 |         0 |\n| MeshRendering (without culling) | 141766 |    0 |         0 |\n\nThe optimized rasterizer (`*Opt` variants) uses incremental edge functions instead of per-pixel barycentric recomputation, yielding **~18% speedup** on triangles and **~50% speedup** on full mesh rendering.\n\n_Benchmarks run on AMD EPYC 7642 48-Core, linux/amd64_\n\n## Credits\n\nBuilt with [Ultraviolet](https://github.com/charmbracelet/ultraviolet) for terminal rendering.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftaigrr%2Ftrophy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftaigrr%2Ftrophy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftaigrr%2Ftrophy/lists"}