Skip to content

LayerSelection

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

public readonly struct LayerSelection : IEquatable<LayerSelection>

What one layer contributed to an asset, in the form the DNA hashes.

Constructors

LayerSelection(string, string, double?, double?, int, int)

public LayerSelection(string IngredientId, string VariantId, double? Hue, double? Sat, int HueQuantize, int SatQuantize);

Parameters

  • IngredientId (string) - The layer.
  • VariantId (string) - The variant rolled.
  • Hue (double?) - The rolled hue, or null for a Custom layer.
  • Sat (double?) - The rolled saturation as a 0..1 fraction, or null for a Custom layer.
  • HueQuantize (int) - Hue bucket width used when hashing.
  • SatQuantize (int) - Saturation bucket width used when hashing.

Properties

Hue

public double? Hue { get; init; }

The rolled hue, or null for a Custom layer.

HueQuantize

public int HueQuantize { get; init; }

Hue bucket width used when hashing.

IngredientId

public string IngredientId { get; init; }

The layer.

Sat

public double? Sat { get; init; }

The rolled saturation as a 0..1 fraction, or null for a Custom layer.

SatQuantize

public int SatQuantize { get; init; }

Saturation bucket width used when hashing.

VariantId

public string VariantId { get; init; }

The variant rolled.