Class MaskTransitionEffect
Swaps a region over to a new screen cell by cell, in the order a CellMask decides.
Inherited Members
Namespace: Scylla.TextMode
Assembly: ScyllaTextMode.dll
Syntax
public sealed class MaskTransitionEffect : TransitionEffectBase, ITextEffect, IDisposable
Remarks
This one class is every threshold-based transition there is. The mask supplies the order, so a linear mask gives a wipe, a radial one gives an iris, a banded one gives venetian blinds, and a random one gives a dissolve. Adding a pattern to CellMask adds a transition here for nothing.
Cells are written only when they change, so a full-screen wipe over several seconds writes a few dozen cells per frame rather than the whole region. That is what keeps the GPU upload proportional to the moving edge, since only a written cell marks its row dirty.
The cell walk itself is not bounded that way. Every cell of the region is visited each tick to work out its phase, and only the write is skipped, so the processor cost stays proportional to the region while the upload cost follows the edge.
Properties
EdgeColor
Gets or sets the color of the band of cells currently changing over.
Declaration
public Color32 EdgeColor { get; set; }
Property Value
| Type | Description |
|---|---|
| Color32 |
Remarks
Only visible when CellDuration is wide enough to give the edge some thickness. At a very small cell duration the transition is a hard line and there is nothing to tint.
Methods
OnEffectRelease()
Called when the effect is disposed. Return anything rented from the context here.
Declaration
protected override void OnEffectRelease()
Overrides
OnEffectTick(float, float)
Called once per tick to draw the effect at the given progress.
Declaration
protected override void OnEffectTick(float progress, float easedProgress)
Parameters
| Type | Name | Description |
|---|---|---|
| float | progress | Linear progress from 0 to 1. |
| float | easedProgress | Progress with the easing curve applied. |
Overrides
OnTransitionStart()
Called when the effect starts, after both the starting and target states are ready.
Declaration
protected override void OnTransitionStart()
Overrides
SetEdgeColor(Color32)
Lights the band of cells currently changing over in the given color.
Declaration
public MaskTransitionEffect SetEdgeColor(Color32 color)
Parameters
| Type | Name | Description |
|---|---|---|
| Color32 | color | Color for the leading edge. |
Returns
| Type | Description |
|---|---|
| MaskTransitionEffect | This effect, for chaining. |