Scylla Framework
  • API Reference
Search Results for

    Show / Hide Table of Contents
    • Scylla.Console.TextMode
      • IConsoleScreen
      • TextModeDebugConsoleDisplay
      • TicTacToeCommand
      • TicTacToeScreen
    • Scylla.TextMode
      • ANSIAttributeParser
      • ANSIColor
      • ANSISGRAttributes
      • AmbientEffectBase
      • BackgroundBlendMode
      • BoxStyle
      • BoxStyleCharacters
      • BoxStyleCharacters.BoxChars
      • CRTSettings
      • Cell
      • CellAttributes
      • CellAttributesExtensions
      • CellBuffer
      • CellBufferRenderer
      • CellGrid
      • CellMask
      • CellPosition
      • CellRange
      • CellRect
      • ColorCycleEffect
      • ColorCycleEffectPreset
      • CrossFadeEffect
      • CursorStyle
      • DecodeEffect
      • DecodeEffectPreset
      • DigitalRainEffect
      • DigitalRainEffectPreset
      • EffectsSettings
      • FadeEffect
      • FadeEffectPreset
      • FlickerEffect
      • FlickerEffectPreset
      • GlitchEffect
      • GlitchEffectPreset
      • GlyphAtlasCache
      • GridSettings
      • IAutoCompleter
      • IInputHistory
      • ITextEffect
      • ITextEffectContext
      • ITextModeGridProvider
      • ITextModePointerMapper
      • ITextModeRenderSource
      • ITextModeViewHost
      • IVTParserHandler
      • InputHistory
      • MaskTransitionEffect
      • MouseEncodingMode
      • MouseTrackingMode
      • PackedGlyphData
      • PulseEffect
      • PulseEffectPreset
      • PushEffect
      • PushEffectPreset
      • SDFSettings
      • ScrollbackAttributeRun
      • ScrollbackLine
      • ScyllaTextMode
      • ScyllaTextMode.Meta
      • ScyllaTextModeConfiguration
      • SlideInEffect
      • SlideInEffectPreset
      • StaticTuneInEffect
      • StaticTuneInEffectPreset
      • TerminalCLI
      • TerminalEmulator
      • TerminalGridRenderer
      • TerminalInputEncoder
      • TerminalMouseButton
      • TerminalScrollbackBuffer
      • TerminalSettings
      • TextAlignment
      • TextEffectBase
      • TextEffectCompletedEvent
      • TextEffectDirection
      • TextEffectExtensions
      • TextEffectMaskPattern
      • TextEffectPreset
      • TextEffectPushMode
      • TextEffectSequencer
      • TextEffectStartedEvent
      • TextEffectState
      • TextEffectTimeMode
      • TextEffects
      • TextModeCellBorder
      • TextModeColorDefaults
      • TextModeColorScheme
      • TextModeColorSet
      • TextModeConfigurationChangedEvent
      • TextModeConsole
      • TextModeConstants
      • TextModeEffectPlayer
      • TextModeGridCapture
      • TextModeLayoutUtil
      • TextModeMaterials
      • TextModeMouseReporter
      • TextModeMouseReportingEvent
      • TextModeSelectionChangedEvent
      • TextModeSelectionEndedEvent
      • TextModeSelectionManager
      • TextModeSelectionStartedEvent
      • TextModeTerminal
      • TextModeTerminalColorTheme
      • TextModeTerminalHost
      • TextModeTerminalSettings
      • TextModeTerminalStartMode
      • TextModeThemeBackground
      • TextModeThemeChangedEvent
      • TextModeThemeRemapper
      • TextModeThemes
      • TextModeView
      • TextWrapMode
      • ThemeSettings
      • TransitionEffectBase
      • TransitionEffectPreset
      • TwinkleEffect
      • TwinkleEffectPreset
      • TypewriterCharacterRevealedEvent
      • TypewriterEffect
      • TypewriterEffectPreset
      • UITextModeView
      • VTParser
      • WaveEffect
      • WaveEffectPreset
    • Scylla.TextMode.CRT
      • CRTBeam
      • CRTBeamClock
      • CRTBeamScanDirection
      • CRTBeamStatus
      • CRTCalibrationPattern
      • CRTCurvatureShape
      • CRTGeometry
      • CRTHDR
      • CRTHDRDisplay
      • CRTHDRTarget
      • CRTHorizontalKernel
      • CRTImageRegion
      • CRTMaskType
      • CRTQualityTier
      • CRTScaleMode
      • CRTSignalStandard
      • CRTSignalType
      • ITextModeCRTCameraEffect
      • ITextModeCRTHDRDisplaySource
      • TextModeCRTBeam
      • TextModeCRTCalibration
      • TextModeCRTCameraEffects
      • TextModeCRTConstants
      • TextModeCRTDriver
      • TextModeCRTHDR
      • TextModeCRTImageRenderer
      • TextModeCRTMonitor
      • TextModeCRTPreset
      • TextModeCRTPresetRegistry
      • TextModeCRTScreen
      • TextModeCRTSettings
      • TextModeCRTTube
    • Scylla.TextMode.Editor
      • CellGridPreviewWidget
      • ColorPaletteWidget
      • ITextModeCRTCameraSetupProvider
      • ScyllaTextModeConfigurationEditor
      • ScyllaTextModeDependencyProvider
      • ScyllaTextModeEditor
      • ScyllaTextModeMenuItems
      • ScyllaTextModeShaderProvider
      • TextModeCRTCameraSetup
      • TextModeCRTCameraStatus
      • TextModeCRTDriverEditor
      • TextModeCRTMonitorEditor
      • TextModeCRTPresetEditor
      • TextModeCRTPresetGenerator
      • TextModeColorAssetGenerator
      • TextModeColorPaletteDefaults
      • TextModeTerminalHostEditor
      • TextModeThemeField
      • TextModeViewEditor
      • TextModeViewEditorBase
      • UITextModeViewEditor
    • Scylla.TextMode.URP
      • CRTQualityTierParameter
      • TextModeCRTInjectionPoint
      • TextModeCRTPresetParameter
      • TextModeCRTRendererFeature
      • TextModeCRTVolume

    Class CrossFadeEffect

    Dissolves a region from one screen into another by blending colors rather than by swapping cells in an order.

    Inheritance
    object
    TextEffectBase
    TransitionEffectBase
    CrossFadeEffect
    Implements
    ITextEffect
    IDisposable
    Inherited Members
    TransitionEffectBase.SetTarget(Action<TextModeConsole>)
    TransitionEffectBase.SetTarget(CellGrid)
    TransitionEffectBase.SetClearedTarget(Color32, Color32)
    TextEffectBase.Name
    TextEffectBase.State
    TextEffectBase.IsRunning
    TextEffectBase.IsComplete
    TextEffectBase.Progress
    TextEffectBase.Region
    TextEffectBase.RequestedRegion
    TextEffectBase.Duration
    TextEffectBase.Delay
    TextEffectBase.Speed
    TextEffectBase.Ease
    TextEffectBase.TimeMode
    TextEffectBase.Loops
    TextEffectBase.PingPong
    TextEffectBase.CompletedLoops
    TextEffectBase.Seed
    TextEffectBase.Mask
    TextEffectBase.CellDuration
    TextEffectBase.OnStarted
    TextEffectBase.OnCompleted
    TextEffectBase.OnStopped
    TextEffectBase.Start()
    TextEffectBase.Stop()
    TextEffectBase.Skip()
    TextEffectBase.Pause()
    TextEffectBase.Resume()
    TextEffectBase.Tick(float)
    TextEffectBase.Dispose()
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Scylla.TextMode
    Assembly: ScyllaTextMode.dll
    Syntax
    public sealed class CrossFadeEffect : TransitionEffectBase, ITextEffect, IDisposable
    Remarks

    A text grid cannot show two different characters at once, so a cell cannot be half of each. Instead every cell that changes dips toward a middle color, swaps at the bottom of the dip and comes back up, which is as close to a cross fade as a character grid gets. Cells the two screens agree on completely are left untouched.

    All those swaps landing on the same frame reads as a hard cut in the middle of a smooth fade, so cells are staggered by the effect's mask. The mask gives the stagger its shape: random by default, or sweeping across with a directional one, and CellDuration controls how spread out it is. A cell duration of 1 puts every cell on the same schedule and changes the whole region as one.

    Only the cells actually mid-dip are rewritten each frame. Cells whose turn has not come round, and cells that have finished, hold a constant appearance and are left alone.

    Properties

    MidColor

    Gets or sets the color cells dip through when their character has to change. Defaults to the grid's background, which reads as the old character fading out before the new one fades in.

    Declaration
    public Color32 MidColor { get; set; }
    Property Value
    Type Description
    Color32

    Methods

    OnEffectRelease()

    Called when the effect is disposed. Return anything rented from the context here.

    Declaration
    protected override void OnEffectRelease()
    Overrides
    TransitionEffectBase.OnEffectRelease()

    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
    TextEffectBase.OnEffectTick(float, float)

    OnTransitionStart()

    Called when the effect starts, after both the starting and target states are ready.

    Declaration
    protected override void OnTransitionStart()
    Overrides
    TransitionEffectBase.OnTransitionStart()

    SetMidColor(Color32)

    Sets the color cells dip through when their character has to change.

    Declaration
    public CrossFadeEffect SetMidColor(Color32 color)
    Parameters
    Type Name Description
    Color32 color

    The dip color.

    Returns
    Type Description
    CrossFadeEffect

    This effect, for chaining.

    Implements

    ITextEffect
    IDisposable

    Extension Methods

    TextEffectExtensions.OnComplete<T>(T, Action)
    TextEffectExtensions.OnStart<T>(T, Action)
    TextEffectExtensions.OnStop<T>(T, Action)
    TextEffectExtensions.SetCellDuration<T>(T, float)
    TextEffectExtensions.SetDelay<T>(T, float)
    TextEffectExtensions.SetDuration<T>(T, float)
    TextEffectExtensions.SetEase<T>(T, EaseType)
    TextEffectExtensions.SetFullGrid<T>(T)
    TextEffectExtensions.SetLoops<T>(T, int, bool)
    TextEffectExtensions.SetMask<T>(T, in CellMask)
    TextEffectExtensions.SetName<T>(T, string)
    TextEffectExtensions.SetRegion<T>(T, in CellRect)
    TextEffectExtensions.SetRegion<T>(T, int, int, int, int)
    TextEffectExtensions.SetSeed<T>(T, int)
    TextEffectExtensions.SetSpeed<T>(T, float)
    TextEffectExtensions.SetTimeMode<T>(T, TextEffectTimeMode)
    TextEffectExtensions.ToCleared<T>(T, Color32, Color32)
    TextEffectExtensions.To<T>(T, CellGrid)
    TextEffectExtensions.To<T>(T, Action<TextModeConsole>)
    In this article
    Back to top Scylla Framework - TextMode Module API Documentation