matrix

package
v0.0.0-...-28575ab Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2024 License: MIT Imports: 16 Imported by: 0

README

Arche Demo – Matrix

A matrix-style code rain visualization.

See the live demo for this example.

Documentation

Overview

Package matrix provides a matrix-style code rain visualization.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run()

Types

type Fader

type Fader struct {
	Intensity  float64
	NextChange int64
}

Fader component for the fading stationary letters.

type ForcedLetter

type ForcedLetter struct {
	Letter    rune
	Active    bool
	Traversed bool
}

ForcedLetter component.

type Letter

type Letter struct {
	Letter rune
}

Position component.

type LetterForcer

type LetterForcer struct {
	Message  int
	TickDone int64
}

type LetterGrid

type LetterGrid struct {
	Faders      common.Grid[ecs.Entity]
	ColumnWidth int
	LineHeight  int
}

LetterGrid is a resource that holds references to fader entities.

func NewLetterGrid

func NewLetterGrid(width, height, colWidth, lineHeight int) LetterGrid

NewLetterGrid creates a new LetterGrid.

type Letters

type Letters struct {
	Letters []rune
}

Letters is a resource that contains all available characters.

func NewLetters

func NewLetters() Letters

NewLetters creates a new Letters resource.

type Message

type Message struct {
	Message int
	Index   int
}

Message component.

type Messages

type Messages struct {
	// contains filtered or unexported fields
}

Messages resource.

func NewMessages

func NewMessages(messages ...string) Messages

type Mover

type Mover struct {
	Interval   uint16
	LastMove   int64
	PathLength int
}

Mover component for the bright letters that move downwards.

type Position

type Position struct {
	X int
	Y int
}

Position component.

type SysFadeLetters

type SysFadeLetters struct {
	FadeDuration        int
	MessageFadeDuration int
	// contains filtered or unexported fields
}

SysMoveLetters is a system to fade out letters over time.

func (*SysFadeLetters) Finalize

func (s *SysFadeLetters) Finalize(world *ecs.World)

Finalize the system

func (*SysFadeLetters) Initialize

func (s *SysFadeLetters) Initialize(world *ecs.World)

Initialize the system

func (*SysFadeLetters) Update

func (s *SysFadeLetters) Update(world *ecs.World)

Update the system

type SysInitLetters

type SysInitLetters struct {
	SpawnProb       float64
	MinMoveInterval int
	MaxMoveInterval int
	MinGap          int
	// contains filtered or unexported fields
}

SysInitLetters is a system to initialize entities.

func (*SysInitLetters) Finalize

func (s *SysInitLetters) Finalize(world *ecs.World)

Finalize the system

func (*SysInitLetters) Initialize

func (s *SysInitLetters) Initialize(world *ecs.World)

Initialize the system

func (*SysInitLetters) Update

func (s *SysInitLetters) Update(world *ecs.World)

Update the system

type SysMessages

type SysMessages struct {
	Count    int
	Duration int
	// contains filtered or unexported fields
}

SysMessages is a system that places suplimal messages.

func (*SysMessages) Finalize

func (s *SysMessages) Finalize(world *ecs.World)

Finalize the system

func (*SysMessages) Initialize

func (s *SysMessages) Initialize(world *ecs.World)

Initialize the system

func (*SysMessages) Update

func (s *SysMessages) Update(world *ecs.World)

Update the system

type SysMoveLetters

type SysMoveLetters struct {
	MessageProb float64
	// contains filtered or unexported fields
}

SysMoveLetters is a system to move letter and activate/de-activate faders.

func (*SysMoveLetters) Finalize

func (s *SysMoveLetters) Finalize(world *ecs.World)

Finalize the system

func (*SysMoveLetters) Initialize

func (s *SysMoveLetters) Initialize(world *ecs.World)

Initialize the system

func (*SysMoveLetters) Update

func (s *SysMoveLetters) Update(world *ecs.World)

Update the system

type SysSwitchFaders

type SysSwitchFaders struct {
	MinChangeInterval int
	MaxChangeInterval int
	// contains filtered or unexported fields
}

SysSwitchFaders is a system that occasionally changes the character of faders.

func (*SysSwitchFaders) Finalize

func (s *SysSwitchFaders) Finalize(world *ecs.World)

Finalize the system

func (*SysSwitchFaders) Initialize

func (s *SysSwitchFaders) Initialize(world *ecs.World)

Initialize the system

func (*SysSwitchFaders) Update

func (s *SysSwitchFaders) Update(world *ecs.World)

Update the system

type UISysDrawLetters

type UISysDrawLetters struct {
	// contains filtered or unexported fields
}

UISysDrawLetters is a system that draws letters.

func (*UISysDrawLetters) FinalizeUI

func (s *UISysDrawLetters) FinalizeUI(world *ecs.World)

FinalizeUI the system

func (*UISysDrawLetters) InitializeUI

func (s *UISysDrawLetters) InitializeUI(world *ecs.World)

InitializeUI the system

func (*UISysDrawLetters) PostUpdateUI

func (s *UISysDrawLetters) PostUpdateUI(world *ecs.World)

PostUpdateUI the system

func (*UISysDrawLetters) UpdateUI

func (s *UISysDrawLetters) UpdateUI(world *ecs.World)

UpdateUI the system

type UISysDrawMessages

type UISysDrawMessages struct {
	SecretKey ebiten.Key
	// contains filtered or unexported fields
}

UISysDrawLetters is a system that highlights messages.

func (*UISysDrawMessages) FinalizeUI

func (s *UISysDrawMessages) FinalizeUI(world *ecs.World)

FinalizeUI the system

func (*UISysDrawMessages) InitializeUI

func (s *UISysDrawMessages) InitializeUI(world *ecs.World)

InitializeUI the system

func (*UISysDrawMessages) PostUpdateUI

func (s *UISysDrawMessages) PostUpdateUI(world *ecs.World)

PostUpdateUI the system

func (*UISysDrawMessages) UpdateUI

func (s *UISysDrawMessages) UpdateUI(world *ecs.World)

UpdateUI the system

type UISysManagePause

type UISysManagePause struct {
	// contains filtered or unexported fields
}

UISysManagePause is a simple system that transfers the pause state from the common.PauseMouseListener resource to the model's model.Systems.

func (*UISysManagePause) FinalizeUI

func (s *UISysManagePause) FinalizeUI(world *ecs.World)

FinalizeUI the system

func (*UISysManagePause) InitializeUI

func (s *UISysManagePause) InitializeUI(world *ecs.World)

InitializeUI the system

func (*UISysManagePause) PostUpdateUI

func (s *UISysManagePause) PostUpdateUI(world *ecs.World)

PostUpdateUI the system

func (*UISysManagePause) UpdateUI

func (s *UISysManagePause) UpdateUI(world *ecs.World)

UpdateUI the system

Jump to

Keyboard shortcuts

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