remove tail end
parent
e334318125
commit
e4ec99cfcd
30
cmatrix.psm1
30
cmatrix.psm1
|
|
@ -216,21 +216,37 @@ function New-Column {
|
||||||
|
|
||||||
$script:head++
|
$script:head++
|
||||||
}
|
}
|
||||||
|
|
||||||
# time to start rendering the darker green "tail?"
|
# time to start rendering the darker green "tail?"
|
||||||
if ($head -gt $fadelen) {
|
if ($head -gt $fadelen) {
|
||||||
|
|
||||||
& $parentModule Set-BufferCell $xpos $fade (
|
& $parentModule Set-BufferCell $xpos $fade (
|
||||||
& $parentModule New-BufferCell -Character `
|
& $parentModule New-BufferCell -Character `
|
||||||
([char](get-random -min 65 -max 122)) -Fore darkgreen) > $null
|
([char](get-random -min 65 -max 122)) -Fore darkgreen) > $null
|
||||||
|
|
||||||
|
# tail end
|
||||||
|
$tail = $fade-1
|
||||||
|
if ($tail -lt $ylimit) {
|
||||||
|
& $parentModule Set-BufferCell $xpos ($fade-1) (
|
||||||
|
& $parentModule New-BufferCell -Character `
|
||||||
|
([char](get-random -min 65 -max 122)) -Fore black) > $null
|
||||||
|
}
|
||||||
|
|
||||||
$script:fade++
|
$script:fade++
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
# are we done animating?
|
# are we done animating?
|
||||||
if ($fade -lt $ylimit) {
|
if ($fade -lt $ylimit) {
|
||||||
return $true
|
return $true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# remove last row from tail end
|
||||||
|
if (($fade - 1) -lt $ylimit) {
|
||||||
|
& $parentModule Set-BufferCell $xpos ($fade - 1) (
|
||||||
|
& $parentModule New-BufferCell -Character `
|
||||||
|
([char]' ') -Fore black) > $null
|
||||||
|
}
|
||||||
|
|
||||||
$false
|
$false
|
||||||
}
|
}
|
||||||
|
|
@ -243,9 +259,9 @@ function New-Column {
|
||||||
function Start-ScreenSaver {
|
function Start-ScreenSaver {
|
||||||
|
|
||||||
# feel free to tweak maxcolumns and frame delay
|
# feel free to tweak maxcolumns and frame delay
|
||||||
# currently 8 columns with 50ms wait
|
# currently 20 columns with 30ms wait
|
||||||
|
|
||||||
Start-CMatrix -max 8 -frame 50
|
Start-CMatrix -max 20 -frame 30
|
||||||
}
|
}
|
||||||
|
|
||||||
function Register-Timer {
|
function Register-Timer {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue