MCPcopy Index your code
hub / github.com/expenses/goth-gltf

github.com/expenses/goth-gltf @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
89 symbols 97 edges 4 files 1 documented · 1%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

goth-gltf

Goth-gltf aims to be a low-level, unopinionated reader for gltf files.

Basic example:

let filename = std::env::args().nth(1).unwrap();
let bytes = std::fs::read(&filename).unwrap();
let (gltf, _): (
    goth_gltf::Gltf<goth_gltf::default_extensions::Extensions>,
    _,
) = goth_gltf::Gltf::from_bytes(&bytes).unwrap();
println!("{:#?}", gltf);

In comparison with gltf-rs, it:

  • Represents the gltf JSON structure transparently
  • Uses nanoserde instead of serde
  • Supports a wider range of extensions
  • Has no code specific for loading images or reading attributes out of buffers

Extensions Implemented

  • KHR_lights_punctual
  • KHR_materials_emissive_strength
  • KHR_materials_ior
  • KHR_materials_sheen
  • KHR_materials_unlit
  • KHR_texture_basisu
  • KHR_texture_transform
  • KHR_materials_transmission
  • EXT_mesh_gpu_instancing
  • EXT_meshopt_compression
  • MSFT_lod
  • MSFT_screencoverage

License: MIT

Extension points exported contracts — how you extend this code

Extensions (Interface)
(no doc) [2 implementers]
src/lib.rs

Core symbols most depended-on inside this repo

byte_size
called by 1
src/lib.rs
num_components
called by 1
src/lib.rs
from_bytes
called by 0
src/lib.rs
write_to_glb
called by 0
src/lib.rs
from_json_bytes
called by 0
src/lib.rs
from_json_string
called by 0
src/lib.rs
transform
called by 0
src/lib.rs
de_json
called by 0
src/lib.rs

Shape

Class 56
Enum 13
Method 11
Function 8
Interface 1

Languages

Rust100%

Modules by API surface

src/lib.rs67 symbols
src/extensions.rs20 symbols
examples/print.rs1 symbols
examples/model-converter.rs1 symbols

For agents

$ claude mcp add goth-gltf \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact