feat(vfx): bind effects to live animated poses

This commit is contained in:
Erik 2026-07-14 10:56:01 +02:00
parent 96ddfdf175
commit 542dcfc384
41 changed files with 3246 additions and 741 deletions

View file

@ -30,6 +30,30 @@ public sealed class WorldEntity
/// </summary>
public required IReadOnlyList<MeshRef> MeshRefs { get; set; }
/// <summary>
/// Stable Setup-part-indexed poses used by attachment and effect hooks.
/// Unlike <see cref="MeshRefs"/>, this array never compacts around a DAT
/// part whose GfxObj could not be loaded. <see cref="IndexedPartAvailable"/>
/// distinguishes a real indexed part from a retained placeholder pose.
/// </summary>
public IReadOnlyList<Matrix4x4> IndexedPartTransforms { get; private set; } =
Array.Empty<Matrix4x4>();
public IReadOnlyList<bool> IndexedPartAvailable { get; private set; } =
Array.Empty<bool>();
public void SetIndexedPartPoses(
IReadOnlyList<Matrix4x4> transforms,
IReadOnlyList<bool> available)
{
ArgumentNullException.ThrowIfNull(transforms);
ArgumentNullException.ThrowIfNull(available);
if (transforms.Count != available.Count)
throw new ArgumentException("Indexed part pose and availability counts must match.");
IndexedPartTransforms = transforms;
IndexedPartAvailable = available;
}
/// <summary>
/// Optional per-entity palette override (server-specified base +
/// subpalette overlays). When non-null, applies to every palette-