Skip to content

[Feature] glTF model loader #140

Open

Description

@vmarcella

Overview

Add an asset loader for glTF 2.0 format to load 3D models with meshes,
materials, and textures.

Current State

No response

Scope

Goals:

  • Load glTF and GLB files
  • Extract mesh geometry (positions, normals, UVs)
  • Extract material properties
  • Load embedded and external textures
  • Support multiple meshes per file

Non-Goals:

  • Animations
  • Skinning
  • Extensions beyond core spec

Proposed API

pub struct GltfLoader;

impl AssetLoader for GltfLoader {
  type Asset = GltfAsset;
  type Error = GltfError;
  
  fn extensions(&self) -> &[&str] {
    &["gltf", "glb"]
  }
  
  fn load(&self, path: &Path, bytes: &[u8]) -> Result<GltfAsset, GltfError>;
}

pub struct GltfAsset {
  pub meshes: Vec<GltfMesh>,
  pub materials: Vec<GltfMaterial>,
  pub textures: Vec<ImageAsset>,
}

### Acceptance Criteria

- [ ] Load glTF JSON format
- [ ] Load GLB binary format
- [ ] Extract vertex positions and indices
- [ ] Extract normals and UVs when present
- [ ] Load referenced textures
- [ ] Example loading and rendering a glTF model

### Affected Crates

lambda-rs

### Notes

- Consider using `gltf` crate for parsing
- Consider lazy texture loading

Activity

  1. added
    enhancement
    lambda-rs
    assets
    on Jan 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    assetsenhancementlambda-rs

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions