OrbittingVolley

Quick Start
from terminaltexteffects.effects.effect_orbittingvolley import OrbittingVolley
effect = OrbittingVolley("YourTextHere")
with effect.terminal_output() as terminal:
for frame in effect:
terminal.print(frame)
Launch Pattern
New in 0.16.0
The ring launch pattern and the launch_delay default of 1 are on development main. In the published 0.15.0
package, launch_delay defaults to 30.
Four launchers travel along the canvas edges, firing characters from the side nearest their final position. The text builds in expanding circular rings around its center, adjusted for terminal cell height. Every character in a ring launches before the next ring opens. Up to two rings can have characters still in flight; a third waits for one of them to finish arriving. Launchers with no characters assigned in the current ring keep moving while the other launchers fire. The effect finishes after all characters arrive.
The default launch_delay is 1, leaving one animation tick between volleys. Increase it for longer pauses.
Four launchers orbit the canvas, building the input text in expanding circular rings.
Each character fires from its nearest canvas side. Up to two rings can overlap while their characters arrive.
Classes:
| Name | Description |
|---|---|
OrbittingVolley |
Four launchers orbit the canvas firing volleys of characters inward to build the input text from the center out. |
OrbittingVolleyConfig |
Configuration for the OrbittingVolley effect. |
OrbittingVolleyIterator |
Effect iterator for OrbittingVolley. Does not normally need to be called directly. |
OrbittingVolley
Bases: BaseEffect[OrbittingVolleyConfig]
Four launchers orbit the canvas firing volleys of characters inward to build the input text from the center out.
Attributes:
| Name | Type | Description |
|---|---|---|
effect_config |
OrbittingVolleyConfig
|
Configuration for the effect. |
terminal_config |
TerminalConfig
|
Configuration for the terminal. |
Source code in terminaltexteffects/effects/effect_orbittingvolley.py
OrbittingVolleyConfig
dataclass
Bases: BaseConfig
Configuration for the OrbittingVolley effect.
Attributes:
| Name | Type | Description |
|---|---|---|
top_launcher_symbol |
str
|
Symbol for the top launcher. |
right_launcher_symbol |
str
|
Symbol for the right launcher. |
bottom_launcher_symbol |
str
|
Symbol for the bottom launcher. |
left_launcher_symbol |
str
|
Symbol for the left launcher. |
launcher_movement_speed |
float
|
Orbitting speed of the launchers. Valid values are n > 0. |
character_movement_speed |
float
|
Speed of the launched characters. Valid values are n > 0. |
volley_size |
float
|
Fraction of input characters used to set the volley limit, divided among four launchers. Valid values are 0 <= n <= 1. Each launcher fires at least one character when available. Launchers fire only their nearest-side share of the active circular ring. |
launch_delay |
int
|
Number of animation ticks to wait between volleys of characters. Valid values are n >= 0. Defaults to 1. |
character_easing |
EasingFunction
|
Easing function to use for launched character movement. |
final_gradient_stops |
tuple[Color, ...]
|
Tuple of colors for the final color gradient. If only one " "color is provided, the characters will be displayed in that color. |
final_gradient_steps |
tuple[int, ...] | int
|
Tuple of the number of gradient steps to use. More steps " "will create a smoother and longer gradient animation. Valid values are n > 0. |
final_gradient_direction |
Direction
|
Direction of the final gradient. |
Source code in terminaltexteffects/effects/effect_orbittingvolley.py
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 | |
bottom_launcher_symbol = argutils.ArgSpec(name='--bottom-launcher-symbol', type=argutils.Symbol.type_parser, default='â–ˆ', metavar=argutils.Symbol.METAVAR, help='Symbol for the bottom launcher.')
class-attribute
instance-attribute
str : Symbol for the bottom launcher.
character_easing = argutils.ArgSpec(name='--character-easing', default=easing.out_sine, type=argutils.Ease.type_parser, metavar=argutils.Ease.METAVAR, help='Easing function to use for launched character movement.')
class-attribute
instance-attribute
easing.EasingFunction : Easing function to use for launched character movement.
character_movement_speed = argutils.ArgSpec(name='--character-movement-speed', type=argutils.PositiveFloat.type_parser, default=1.5, metavar=argutils.PositiveFloat.METAVAR, help='Speed of the launched characters.')
class-attribute
instance-attribute
float : Speed of the launched characters.
final_gradient_direction = FinalGradientDirectionArg(default=Gradient.Direction.RADIAL)
class-attribute
instance-attribute
Gradient.Direction : Direction of the final gradient.
final_gradient_steps = FinalGradientStepsArg(default=12)
class-attribute
instance-attribute
tuple[int, ...] | int : Int or Tuple of ints for the number of gradient steps to use. More steps will create a smoother and longer gradient animation.
final_gradient_stops = FinalGradientStopsArg(default=(Color('#FFA15C'), Color('#44D492')))
class-attribute
instance-attribute
tuple[Color, ...] : Tuple of colors for the final color gradient. If only one color is provided, the characters will be displayed in that color.
launch_delay = argutils.ArgSpec(name='--launch-delay', type=argutils.NonNegativeInt.type_parser, default=1, metavar=argutils.NonNegativeInt.METAVAR, help='Number of animation ticks to wait between volleys of characters.')
class-attribute
instance-attribute
int : Number of animation ticks to wait between volleys of characters. Defaults to 1.
launcher_movement_speed = argutils.ArgSpec(name='--launcher-movement-speed', type=argutils.PositiveFloat.type_parser, default=0.8, metavar=argutils.PositiveFloat.METAVAR, help='Orbitting speed of the launchers.')
class-attribute
instance-attribute
float : Orbitting speed of the launchers.
left_launcher_symbol = argutils.ArgSpec(name='--left-launcher-symbol', type=argutils.Symbol.type_parser, default='â–ˆ', metavar=argutils.Symbol.METAVAR, help='Symbol for the left launcher.')
class-attribute
instance-attribute
str : Symbol for the left launcher.
right_launcher_symbol = argutils.ArgSpec(name='--right-launcher-symbol', type=argutils.Symbol.type_parser, default='â–ˆ', metavar=argutils.Symbol.METAVAR, help='Symbol for the right launcher.')
class-attribute
instance-attribute
str : Symbol for the right launcher.
top_launcher_symbol = argutils.ArgSpec(name='--top-launcher-symbol', type=argutils.Symbol.type_parser, default='â–ˆ', metavar=argutils.Symbol.METAVAR, help='Symbol for the top launcher.')
class-attribute
instance-attribute
str : Symbol for the top launcher.
volley_size = argutils.ArgSpec(name='--volley-size', type=argutils.NonNegativeRatio.type_parser, default=0.03, metavar=argutils.NonNegativeRatio.METAVAR, help='Fraction of input characters used to set the volley limit, divided among four launchers, from 0 to 1. Each launcher fires at least one character when available, limited to its share of the active circular ring.')
class-attribute
instance-attribute
float : Fraction of input characters used to set the volley limit, divided among four launchers.
OrbittingVolleyIterator
Bases: BaseEffectIterator[OrbittingVolleyConfig]
Effect iterator for OrbittingVolley.
Source code in terminaltexteffects/effects/effect_orbittingvolley.py
187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 | |
Launcher
A launcher that fires characters inward to build the input text from the center out.
Source code in terminaltexteffects/effects/effect_orbittingvolley.py
__init__(terminal, args, starting_edge_coord, symbol)
Initialize the launcher.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
terminal
|
Terminal
|
The effect Terminal. |
required |
args
|
OrbittingVolleyConfig
|
Configuration for the effect. |
required |
starting_edge_coord
|
Coord
|
The starting coordinate for the launcher. |
required |
symbol
|
str
|
The symbol to use for the launcher. |
required |
Source code in terminaltexteffects/effects/effect_orbittingvolley.py
build_paths()
Build the paths for the launcher.
Source code in terminaltexteffects/effects/effect_orbittingvolley.py
launch()
Launch a character from the magazine.
Source code in terminaltexteffects/effects/effect_orbittingvolley.py
__init__(effect)
Initialize the effect iterator.
Source code in terminaltexteffects/effects/effect_orbittingvolley.py
__next__()
Launch rings in order, allowing at most two rings with characters still in flight.
Source code in terminaltexteffects/effects/effect_orbittingvolley.py
build()
Build paths and circular rings, assigning each destination to its nearest canvas side.
Source code in terminaltexteffects/effects/effect_orbittingvolley.py
get_effect_resources()
Get the command, effect class, and configuration class for the effect.
Returns:
| Type | Description |
|---|---|
tuple[str, type[BaseEffect], type[BaseConfig]]
|
tuple[str, type[BaseEffect], type[BaseConfig]]: The command name, effect class, and configuration class. |