Scripting API

Scripting API

BlendSpace

Class in Abyss.Core, from Abyss.Core.

The clips a state mixes by where one field or two fall among the places they are given.

public sealed class BlendSpace

Remarks

On a line, a value between two points is shared between them, more of the nearer; before the first, all the first's, and past the last, all the last's. On a plane, the points are joined into triangles and a value is shared between the corners of the one it is in, or between the ends of the nearest edge where it is in none. Of points at one place, the first plays.

The engine mixes it, and says how (BlendSpace.Shares, BlendSpace.Triangles), so what the editor draws is what a game plays.

Properties

Along

public List<string> Along { get; }

The fields it is placed along, Component.Field: one for a line, two for a plane; empty text for one not given yet.

Points

public List<BlendPoint> Points { get; }

Its clips and their places.

OnPlane

public bool OnPlane { get; }

Whether it is placed along two fields.

Methods

Copy

public BlendSpace Copy()

A copy, its points copied too.

Shares

public float[] Shares(Vector2 at)

Each point's share of the mix where its fields are at, as the engine mixes it: together 1, where it has a point.

Parameters

  • at

Triangles

public IReadOnlyList<(int A, int B, int C)> Triangles()

The triangles its points are joined into on a plane, by their places, as the engine joins them; none on a line.

Constants

MostPoints

public const int MostPoints = 64

The most points a blend space may have.