Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- pastebin get fVWPp88e wipe
- local doWipe = function()
- local scr_x, scr_y = term.getSize()
- local cols = "f7"
- local length = scr_x/2
- local render = function(col1,col2,prog,forwards)
- term.setCursorPos(1,1)
- local screen = (col1:rep(prog)..col2:rep(length-prog)):rep(scr_x*scr_y):sub(1,(scr_x*scr_y))
- local line
- for a = forwards and 1 or scr_y, forwards and scr_y or 1, forwards and 1 or -1 do
- line = screen:sub((a-1)*scr_x+1,a*scr_x)
- term.setCursorPos(1,a)
- term.blit(("L"):rep(#line),line,line)
- end
- end
- local pos1 = 2
- local pos2 = pos1 - 1
- local forwards = true
- local reverse = false
- while true do
- for a = reverse and length or 1, reverse and 1 or length, reverse and -1 or 1 do
- render(cols:sub(pos1,pos1),cols:sub(pos2,pos2),a,forwards)
- sleep(0.0)
- end
- forwards = not forwards
- reverse = not reverse
- pos1 = (pos1 + 1)
- pos2 = (pos2 + 1)
- if pos1 > #cols then pos1 = 1 end
- if pos2 > #cols then pos2 = 1 end
- end
- end
- local mon = peripheral.find("monitor")
- if mon then
- term.redirect(mon)
- mon.setTextScale(0.5)
- end
- doWipe()
Add Comment
Please, Sign In to add comment