intro

package
v0.4.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 7, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
	" ██████╗ ██╗███████╗███████╗",
	" ██╔══██╗██║██╔════╝██╔════╝",
	" ██║  ██║██║█████╗  █████╗  ",
	" ██║  ██║██║██╔══╝  ██╔══╝  ",
	" ██████╔╝██║██║     ██║     ",
	" ╚═════╝ ╚═╝╚═╝     ╚═╝     ",
}

GitDiffLogo contains a stylized "DIFF" ASCII art

View Source
var OctocatASCII = []string{
	"        .--.        ",
	"       /    \\       ",
	"      | o  o |      ",
	"      |  __  |      ",
	"      | |  | |      ",
	"       \\____/       ",
	"     /|      |\\     ",
	"    (_|      |_)    ",
	"      |______|      ",
	"     /  |  |  \\     ",
	"    /   |  |   \\    ",
	"   (_   |  |   _)   ",
	"       (__)         ",
}

OctocatASCII contains the Octocat ASCII art used in animations

View Source
var OctocatLookingUp = []string{
	"        .--.        ",
	"       /    \\       ",
	"      | ^  ^ |      ",
	"      |  __  |      ",
	"      |  \\/  |      ",
	"       \\____/       ",
	"     /|      |\\     ",
	"    (_|      |_)    ",
	"      |______|      ",
	"     /  |  |  \\     ",
	"    /   |  |   \\    ",
	"   (_   |  |   _)   ",
	"       (__)         ",
}

OctocatLookingUp contains Octocat looking upward for the Stream animation

Functions

func GetMaxFrames

func GetMaxFrames(animType AnimationType) int

GetMaxFrames returns the total number of frames for a given animation type

func RenderAnimation

func RenderAnimation(animType AnimationType, frame, width, height int) string

RenderAnimation renders the appropriate animation based on type and frame

Types

type AnimationType

type AnimationType int

AnimationType represents the type of intro animation to display

const (
	// Glitch represents the "Merge Conflict" chromatic aberration animation
	Glitch AnimationType = iota
	// Scan represents the "Diff Scan" animation (red to green transition)
	Scan
	// Stream represents the "Commit Stream" Matrix-style rain animation
	Stream
)

type SymbolStream

type SymbolStream struct {
	X      int    // Column position
	Y      int    // Current Y position
	Speed  int    // How many frames per move
	Symbol string // The symbol to display
	Color  string // Color hex code
}

SymbolStream represents a falling symbol stream for the Stream animation

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL