Skip to content

GeneratedAsset

Namespace Nfty.Core.Generation in assembly Nfty.Core.

public class GeneratedAsset : IDisposable

One finished asset. Owns its composited GeneratedAsset.Image: dispose the asset (or the GeneratedSet holding it) once the pixels have been written or drawn.

Constructors

GeneratedAsset()

public GeneratedAsset();

Properties

AbsentLayers

public IReadOnlyList<AbsentLayer> AbsentLayers { get; init; }

The layers this roll left out entirely. Empty for every asset of a recipe with no optional layers, which is every asset generated before they existed.

ColorRolls

public required IReadOnlyList<ColorRoll> ColorRolls { get; init; }

The per-layer color record for the rich metadata.

Dna

public required string Dna { get; init; }

Its identity hash.

Image

public required Image<Rgba32> Image { get; init; }

The composited artwork. Owned by this asset.

RecipeId

public required string RecipeId { get; init; }

The recipe it was rolled from.

RecipeName

public required string RecipeName { get; init; }

That recipe's display name, published as the "Type" trait.

SetNumber

public required int SetNumber { get; init; }

The asset's number within the Set.

Traits

public required IReadOnlyList<TraitSelection> Traits { get; init; }

What each layer contributed.

Methods

Dispose()

public void Dispose();

Frees the composited artwork.