GithubHelp home page GithubHelp logo

gltf's Introduction

gltf

crates.io docs.rs


This crate is intended to load glTF 2.0, a file format designed for the efficient transmission of 3D assets.

rustc version 1.61 or above is required.

Reference infographic

infographic

From javagl/gltfOverview

PDF version

Usage

See the crate documentation for example usage.

Features

Extras and names

By default, gltf ignores all extras and names included with glTF assets. You can negate this by enabling the extras and names features, respectively.

[dependencies.gltf]
version = "1.2"
features = ["extras", "names"]

glTF extensions

The following glTF extensions are supported by the crate:

  • KHR_lights_punctual
  • KHR_materials_pbrSpecularGlossiness
  • KHR_materials_unlit
  • KHR_texture_transform
  • KHR_materials_variants
  • KHR_materials_volume
  • KHR_materials_specular
  • KHR_materials_transmission
  • KHR_materials_ior
  • KHR_materials_emissive_strength

To use an extension, list its name in the features section.

[dependencies.gltf]
features = ["KHR_materials_unlit"]

Examples

gltf-display

Demonstrates how the glTF JSON is deserialized.

cargo run --example gltf-display path/to/asset.gltf

gltf-export

Demonstrates how glTF JSON can be built and exported using the gltf-json crate.

cargo run --example gltf-export

gltf-roundtrip

Deserializes and serializes the JSON part of a glTF asset.

cargo run --example gltf-roundtrip path/to/asset.gltf

gltf-tree

Visualises the scene heirarchy of a glTF asset, which is a strict tree of nodes.

cargo run --example gltf-tree path/to/asset.gltf

Tests

Running tests locally requires to clone the glTF-Sample-Models repository first.

git clone https://github.com/KhronosGroup/glTF-Sample-Models.git

gltf's People

Contributors

alteous avatar icandivideby0 avatar bwasty avatar warmwaffles avatar aloucks avatar anderejd avatar ralith avatar repi avatar elzair avatar forsakenharmony avatar stefnotch avatar wlinna avatar kirdaybov avatar oceanusxiv avatar elrnv avatar expenses avatar veykril avatar nuew avatar rukai avatar kpreid avatar frankenapps avatar azriel91 avatar alexapps99 avatar aleksijuvani avatar dariost avatar elabajaba avatar emilk avatar digama0 avatar rhuagh avatar dakom avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.