Skip to content

bwasty/gltf-viewer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gltf-viewer

crates.io GitHub release Build Status Build status

glTF 2.0 Viewer written in Rust.

Current state : All sample models can be loaded:

gltf-viewer-0.1

Some glTF features are not implemented yet, most notably animations. See #3 for details.

Installation

Binaries (Win/Linux/macOS)

See Latest Release

From crate (requires Rust)

cargo install gltf-viewer

or

git clone https://github.com/bwasty/gltf-viewer.git
cd gltf-viewer
cargo install gltf-viewer

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]
        --help                 Prints help information
    -V, --version              Prints version information

ARGS:
    <FILE>    glTF file name

Both .gltf and .glb files are supported. Navigate the scene with WASD + Mouse.

Example

$ curl -O https://raw.githubusercontent.com/KhronosGroup/glTF-Sample-Models/master/2.0/Box/glTF-Binary/Box.glb
$ gltf-viewer Box.glb

For more models, see KhronosGroup/glTF-Sample-Models.

Goals

  • Complete gltF 2.0 support
  • Reusable & extensible renderer
    • may be extracted later for a gltf-engine that can be used for 3D apps
  • Platforms: Windows, Linux, macOS, Browser (via WebAssembly)
  • Graphics backends:
    • OpenGL ES 3.0 (-> WebGL 2.0 via WebAssembly)
      • currently OpenGL 3.3 is used
    • Vulkan?
  • VR support
    • Focus: OpenVR (HTC Vive)
    • WebVR?