API Reference · Model and texture loading

IGltfResourceResolver

Namespace: Ava3D

public interface IGltfResourceResolver

Where a .gltf's external files come from.

A .gltf names its buffers and images by URI, relative to wherever the file itself came from — a directory, an application's resources, a web server. The reader does not know which, so it asks this for each one. A .glb never needs one.

Methods

MemberDescription
abstract Threading.Tasks.ValueTask<ReadOnlyMemory<byte>> ReadAsync(string uri, Threading.CancellationToken cancellationToken)

The bytes behind uri, which is exactly the string in the file — usually relative, occasionally absolute, and percent-encoded where the file was written correctly.

See also