viewport-lib-io
Source-format loaders and neutral decoded data for applications built on viewport-lib.
Goal
viewport-lib-io owns file-format decoding and reusable CPU-side data structures. By design it does not depend on viewport-lib runtime or upload structs directly.
This crate should:
- load source files through
loaders/* - return neutral decoded data that can be reused in several downstream paths
- preserve format-specific fields, layers, geometry, and attributes
- let applications or adapter code decide whether loaded data becomes a surface mesh, structured volume, sparse grid, point set, or gaussian splat set
This crate should not:
- create
viewport-libscene items - upload to GPU
- own renderer policy
Public Layout
loaders/contains source-format entrypointstypes.rscontains neutral decoded data models
Supported loader modules are listed in loaders/ with their extension, e.g., loaders/png.rs
Usage
Surface mesh:
let mesh = mesh_from_path?;
Image:
let image = texture_from_path?;
Scene (glTF, OBJ, FBX, PLY):
let scene = scene_from_path?;
// Geometry
for mesh in &scene.meshes
// Animations
for clip in &scene.animations
Scientific dataset:
let datasets = datasets_from_path?;
if let Some = datasets.as_structured_volume
Point set to gaussian splats:
let points = point_cloud_from_path?;
let splats = points.to_gaussian_splats;