Skip to content

Commit

Permalink
update readme (usage string, sample gallery)
Browse files Browse the repository at this point in the history
  • Loading branch information
bwasty committed Feb 23, 2018
1 parent 2c4cf1c commit 996b9ca
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 14 deletions.
35 changes: 22 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ Rust [glTF 2.0](https://github.com/KhronosGroup/glTF) viewer, written using the

**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: <br>
<img width="412" alt="SciFiHelmet" title="SciFiHelmet" src="https://user-images.githubusercontent.com/1647415/30771307-d70dbd26-a044-11e7-9ed1-b0e2ba80198c.png"><br>
Gallery with all sample models: https://bwasty.github.io/gltf-viewer/0.3.0/

Some glTF features are not yet implemented, most notably **animations**. See [#3](https://github.com/bwasty/gltf-viewer/issues/3) for details.

## Installation
Expand All @@ -25,25 +27,32 @@ git clone https://github.com/bwasty/gltf-viewer.git
cd gltf-viewer
cargo install gltf-viewer
```
<!--
#### Additional dependencies (Ubuntu)
`sudo apt-get install libssl-dev`
-->
## Usage
```
USAGE:
gltf-viewer [OPTIONS] <FILE>
OPTIONS:
-s, --screenshot <FILE> Create screenshot (PNG)
-v, --verbose Enable verbose logging (log level INFO). Can be repeated multiple times to increase log
level to DEBUG/TRACE)
-w, --width <WIDTH> Width in pixels [default: 800]
-h, --height <HEIGHT> Height in pixels [default: 600]
-c, --count <COUNT> Saves N screenshots of size WxH, rotating evenly spaced around the object [default: 1]
--headless Use real headless rendering for screenshots (Default is a hidden window) [EXPERIMENTAL]
--help Prints help information
-V, --version Prints version information
-v, --verbose Enable verbose logging (log level INFO). Can be repeated up to 3 times to increase
log level to DEBUG/TRACE)
-s, --screenshot <FILE> Create screenshot (PNG)
-w, --width <WIDTH> Width in pixels [default: 800]
-h, --height <HEIGHT> Height in pixels [default: 600]
-c, --count <COUNT> Saves N screenshots of size WxH, rotating evenly spaced around the object [default:
1]
--headless Use real headless rendering for screenshots (default is a hidden window)
[EXPERIMENTAL - see README for details]
--scene <scene> Index of the scene to load [default: 0]
--cam-index <CAM-INDEX> Use the glTF camera with the given index (starting at 0).
Fallback if there is none: determine 'nice' camera position based on the scene's
bounding box. Can be forced by passing -1.
Note: All other camera options are ignored if this one is given. [default: 0]
--cam-pos <CAM-POS> Camera (aka eye) position override as comma-separated Vector3. Example: 1.2,3.4,5.6
--cam-target <CAM-TARGET> Camera target (aka center) override as comma-separated Vector3. Example:
1.2,3.4,5.6
--cam-fovy <CAM-FOVY> Vertical field of view ('zoom') in degrees. [default: 75]
--help Prints help information
-V, --version Prints version information
ARGS:
<FILE> glTF file name
Expand Down
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ pub fn main() {
.validator(|value| value.parse::<u32>().map(|_| ()).map_err(|err| err.to_string())))
.arg(Arg::with_name("headless")
.long("headless")
.help("Use real headless rendering for screenshots (Default is a hidden window) [EXPERIMENTAL]"))
.help("Use real headless rendering for screenshots (default is a hidden window) [EXPERIMENTAL - see README for details]"))
.arg(Arg::with_name("scene")
.long("scene")
.default_value("0")
Expand Down

0 comments on commit 996b9ca

Please sign in to comment.