{"id":18828530,"url":"https://github.com/bwasty/gltf-viewer","last_synced_at":"2025-04-04T14:06:30.447Z","repository":{"id":62439605,"uuid":"91272445","full_name":"bwasty/gltf-viewer","owner":"bwasty","description":"glTF 2.0 Viewer written in Rust","archived":false,"fork":false,"pushed_at":"2024-04-27T19:16:36.000Z","size":13261,"stargazers_count":192,"open_issues_count":9,"forks_count":32,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-03-28T13:06:55.765Z","etag":null,"topics":["3d-graphics","gltf","gltf-viewer","opengl","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bwasty.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2017-05-14T21:25:46.000Z","updated_at":"2025-03-22T04:39:36.000Z","dependencies_parsed_at":"2025-02-22T06:10:30.345Z","dependency_job_id":"6ed297ec-c163-4854-9082-6ec0c5b43558","html_url":"https://github.com/bwasty/gltf-viewer","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bwasty%2Fgltf-viewer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bwasty%2Fgltf-viewer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bwasty%2Fgltf-viewer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bwasty%2Fgltf-viewer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bwasty","download_url":"https://codeload.github.com/bwasty/gltf-viewer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247190226,"owners_count":20898699,"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":["3d-graphics","gltf","gltf-viewer","opengl","rust"],"created_at":"2024-11-08T01:30:20.726Z","updated_at":"2025-04-04T14:06:30.418Z","avatar_url":"https://github.com/bwasty.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gltf-viewer [![status](https://img.shields.io/badge/glTF-2%2E0-green.svg?style=flat)](https://github.com/KhronosGroup/glTF)\n[![crates.io](https://img.shields.io/crates/v/gltf-viewer.svg)](https://crates.io/crates/gltf-viewer)\n[![GitHub release](https://img.shields.io/github/release/bwasty/gltf-viewer.svg)](https://github.com/bwasty/gltf-viewer/releases/latest)\n [![](https://tokei.rs/b1/github/bwasty/gltf-viewer)](https://github.com/Aaronepower/tokei)\n [![Build Status](https://travis-ci.org/bwasty/gltf-viewer.svg?branch=master)](https://travis-ci.org/bwasty/gltf-viewer)\n [![Build status](https://ci.appveyor.com/api/projects/status/51ukh02thpb0r9cf/branch/master?svg=true)](https://ci.appveyor.com/project/bwasty/gltf-viewer/branch/master)\n [![Docker build status](https://img.shields.io/docker/build/bwasty/gltf-viewer.svg)](https://hub.docker.com/r/bwasty/gltf-viewer/tags/)\n [![Maintenance](https://img.shields.io/badge/maintenance-passively--maintained-yellowgreen.svg)](https://github.com/rust-lang/rfcs/blob/master/text/1824-crates.io-default-ranking.md#maintenance)\n\nRust [glTF 2.0](https://github.com/KhronosGroup/glTF) viewer, written using the [gltf](https://github.com/gltf-rs/gltf) crate and plain OpenGL.\n\n**Current state**: All [official sample models](https://github.com/KhronosGroup/glTF-Sample-Models/tree/master/2.0) can be loaded and are rendered with the [reference PBR shader](https://github.com/KhronosGroup/glTF-WebGL-PBR). Example: \u003cbr\u003e\n\u003cimg width=\"412\" alt=\"SciFiHelmet\" title=\"SciFiHelmet\" src=\"https://user-images.githubusercontent.com/1647415/30771307-d70dbd26-a044-11e7-9ed1-b0e2ba80198c.png\"\u003e\u003cbr\u003e\nGallery with all sample models: https://bwasty.github.io/gltf-viewer/0.3.0/\n\nSome glTF features are not yet implemented, most notably **animations**. See [#3](https://github.com/bwasty/gltf-viewer/issues/3) for details.\n\n## Installation\n### Binaries (Win/Linux/macOS)\nSee [Latest Release](https://github.com/bwasty/gltf-viewer/releases/latest)\n### From crate (requires [Rust](https://www.rust-lang.org))\n```shell\ncargo install gltf-viewer\n```\nLatest version (unstable):\n```shell\ncargo install --git https://github.com/bwasty/gltf-viewer.git\n```\n## Usage\n```\nUSAGE:\n    gltf-viewer [OPTIONS] \u003cFILE\u003e\n\nOPTIONS:\n    -v, --verbose                    Enable verbose logging (log level INFO). Can be repeated up to 3 times to increase\n                                     log level to DEBUG/TRACE)\n    -s, --screenshot \u003cFILE\u003e          Create screenshot (PNG)\n    -w, --width \u003cWIDTH\u003e              Width in pixels [default: 800]\n    -h, --height \u003cHEIGHT\u003e            Height in pixels [default: 600]\n    -c, --count \u003cCOUNT\u003e              Saves N screenshots of size WxH, rotating evenly spaced around the object [default:\n                                     1]\n        --headless                   Use real headless rendering for screenshots (default is a hidden window)\n                                     [EXPERIMENTAL - see README for details]\n        --straight                   Position camera in front of model if using default camera (i.e. glTF doesn't\n                                     contain a camera or `--cam-index -1` is passed).\n        --scene \u003cscene\u003e              Index of the scene to load [default: 0]\n        --cam-index \u003cCAM-INDEX\u003e      Use the glTF camera with the given index (starting at 0).\n                                     Fallback if there is none: determine 'nice' camera position based on the scene's\n                                     bounding box. Can be forced by passing -1.\n                                     Note: All other camera options are ignored if this one is given. [default: 0]\n        --cam-pos \u003cCAM-POS\u003e          Camera (aka eye) position override as comma-separated Vector3. Example: 1.2,3.4,5.6\n        --cam-target \u003cCAM-TARGET\u003e    Camera target (aka center) override as comma-separated Vector3. Example:\n                                     1.2,3.4,5.6\n        --cam-fovy \u003cCAM-FOVY\u003e        Vertical field of view ('zoom') in degrees. [default: 75]\n        --help                       Prints help information\n    -V, --version                    Prints version information\n\nARGS:\n    \u003cFILE\u003e    glTF file name\n```\nBoth .gltf and .glb files are supported.\nNavigate the scene with the mouse: Rotate with left click + drag, pan with right click + drag, zoom with mouse wheel.\n\n### Example\n```\n$ curl -O https://raw.githubusercontent.com/KhronosGroup/glTF-Sample-Models/master/2.0/Box/glTF-Binary/Box.glb\n$ gltf-viewer Box.glb\n```\n\n### Headless screenshot generation\nProper headless screenshot generation with the `--headless` flag currently only works on macOS.\nTo work around that, a Docker setup that uses `xvfb` is provided. Usage examples:\n```\n# Build docker image and run it with the gltf mounted in a volume.\n# The image will be saved next to the gltf file.\n./screenshot_docker.sh Box.glb\n./screenshot_docker.sh ../models/Box.gltf -w 1920 -h 1080 --count 3 -vv\n# Use pre-built docker image from Docker Hub\nDOCKER_IMAGE=bwasty/gltf-viewer ./screenshot_docker.sh Box.glb\n```\n\nAlternatively, you can also install `xvfb` and use `./run_xvfb.sh` directly (Linux only).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbwasty%2Fgltf-viewer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbwasty%2Fgltf-viewer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbwasty%2Fgltf-viewer/lists"}