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 DecodeEffect

    Resolves a region out of scrambled characters, the way decryption is shown in films: each cell cycles through random glyphs before settling on the character it is meant to hold.

    Inheritance
    object
    TextEffectBase
    DecodeEffect
    Implements
    ITextEffect
    IDisposable
    Inherited Members
    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 DecodeEffect : TextEffectBase, ITextEffect, IDisposable
    Remarks

    The region is captured when the effect starts, and that capture is what the cells settle onto. Draw the content first and then play the effect over it, or set Text and let the effect write it before capturing.

    Every cell holding text is scrambled from the moment the effect starts, and stays scrambled until its own turn to resolve arrives, so the text is never legible before it decodes. Whitespace is never scrambled: filling the gaps between words with noise would read as a block of static rather than as encrypted writing.

    Whitespace is still hidden, though, because a blank cell is not necessarily an invisible one. A space carrying Inverse, which is how a title bar is drawn, renders as a solid block. Blanks therefore lose their attributes for as long as the region is encrypted and get them back as they settle, in step with the characters around them.

    Scrambling glyphs are re-rolled a fixed number of times per second rather than every frame. Every frame looks frantic rather than fast, and it costs a cell write per cell per frame for no visual gain.

    Properties

    ScrambleRate

    Gets or sets how many times a second the scrambling glyphs are re-rolled at the start of the effect. ScrambleRateFalloff decides what becomes of that rate later.

    Declaration
    public float ScrambleRate { get; set; }
    Property Value
    Type Description
    float

    ScrambleRateFalloff

    Gets or sets the fraction of ScrambleRate the glyphs are still re-rolled at by the end of the effect. One, the default, keeps the rate constant throughout.

    Declaration
    public float ScrambleRateFalloff { get; set; }
    Property Value
    Type Description
    float
    Remarks

    Below one the churn slows as the effect runs, so characters still unresolved late on change more slowly than the ones that resolved early. It reads as the decryption closing in on an answer rather than thrashing at the same pace until it stops. A value of 0.15 against the default rate takes the churn from twenty re-rolls a second down to three.

    The rate falls against linear progress rather than against the eased progress that orders the cells. Those are different clocks on purpose: an ease-out like the one the Decode(in CellRect) preset uses is most of the way to one early in the run, so driving the churn from it would drop the rate to its floor almost immediately instead of winding down across the whole effect.

    ScrambleSet

    Gets or sets the characters cells cycle through before settling.

    Declaration
    public string ScrambleSet { get; set; }
    Property Value
    Type Description
    string
    Remarks

    Characters the font cannot draw are dropped when the effect starts, with one warning naming the first of them. Only the primary atlas page is bound at render time, so a set reaching outside it would otherwise show the wrong glyphs. The check is skipped entirely when no font has been loaded, since then every character would be reported.

    Text

    Gets or sets text the effect writes into the region before capturing it. Leave this null to decode whatever the region already holds.

    Declaration
    public string Text { get; set; }
    Property Value
    Type Description
    string

    Methods

    OnEffectFinish(bool)

    Called when the effect finishes, whether it completed, was skipped or was stopped.

    Declaration
    protected override void OnEffectFinish(bool completed)
    Parameters
    Type Name Description
    bool completed

    True when the effect reached its final state.

    Overrides
    TextEffectBase.OnEffectFinish(bool)
    Remarks

    The default implementation does nothing. Override it to restore state an effect borrowed, which is what a corrupting effect needs so the grid is not left damaged.

    OnEffectRelease()

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

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

    OnEffectStart()

    Called when the effect starts, after the region is resolved and before any tick. Capture whatever the effect needs from the grid here.

    Declaration
    protected override void OnEffectStart()
    Overrides
    TextEffectBase.OnEffectStart()

    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)

    SetScrambleColor(Color32)

    Draws scrambling characters in their own color, so the noise reads differently from the text that has settled.

    Declaration
    public DecodeEffect SetScrambleColor(Color32 color)
    Parameters
    Type Name Description
    Color32 color

    Color for scrambling characters.

    Returns
    Type Description
    DecodeEffect

    This effect, for chaining.

    SetScrambleRate(float)

    Sets how many times a second the scrambling glyphs are re-rolled.

    Declaration
    public DecodeEffect SetScrambleRate(float scrambleRate)
    Parameters
    Type Name Description
    float scrambleRate

    Re-rolls per second.

    Returns
    Type Description
    DecodeEffect

    This effect, for chaining.

    SetScrambleRateFalloff(float)

    Sets how far the re-roll rate winds down by the end of the effect.

    Declaration
    public DecodeEffect SetScrambleRateFalloff(float falloff)
    Parameters
    Type Name Description
    float falloff

    Fraction of the starting rate still in use at the end, or 1 to keep it constant.

    Returns
    Type Description
    DecodeEffect

    This effect, for chaining.

    Remarks

    See ScrambleRateFalloff for what the fraction means and why it runs on linear progress.

    SetScrambleSet(string)

    Sets the characters cells cycle through before settling.

    Declaration
    public DecodeEffect SetScrambleSet(string scrambleSet)
    Parameters
    Type Name Description
    string scrambleSet

    The characters to cycle through.

    Returns
    Type Description
    DecodeEffect

    This effect, for chaining.

    SetText(string, Color32, Color32)

    Sets text the effect writes into the region before capturing it.

    Declaration
    public DecodeEffect SetText(string text, Color32 foreground, Color32 background)
    Parameters
    Type Name Description
    string text

    The text to decode onto.

    Color32 foreground

    Foreground color for the text.

    Color32 background

    Background color for the text.

    Returns
    Type Description
    DecodeEffect

    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)
    In this article
    Back to top Scylla Framework - TextMode Module API Documentation