API Reference · Model and texture loading

GltfAvaloniaResolver

Namespace: Ava3D

public sealed class GltfAvaloniaResolver

Resolves a .gltf's URIs against an avares:// location — the model shipped as an AvaloniaResource in the application, next to its textures.

Reads through Avalonia's AssetLoader, which exists once the application has been built. A tool with no AppBuilder behind it has no asset loader to ask and should read its files from disk.

Constructors

MemberDescription
GltfAvaloniaResolver(Uri baseUri)

Builds a resolver whose relative URIs are taken against baseUri, which is the .gltf's own avares:// address or the directory it is in.

Properties

MemberDescription
Uri BaseUri { get; }

The location relative URIs are resolved against.

Methods

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

See also