Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- trans_time = 300000
- term.clear()
- col_prev_time = os.epoch()
- function mix(mix_end, mix_start)
- if (((os.epoch() - (col_prev_time - trans_time)) / trans_time) - 1) > 1 then
- return mix_end
- end
- --local temp_start = mix_start * (((os.epoch() - (col_prev_time - trans_time)) / trans_time) - 1)
- --local temp_end = mix_end * (1 - (((os.epoch() - (col_prev_time - trans_time)) / trans_time) - 1))
- local temp_start = mix_start * (1 - (((os.epoch() - (col_prev_time - trans_time)) / trans_time) - 1))
- local temp_end = mix_end * (((os.epoch() - (col_prev_time - trans_time)) / trans_time) - 1)
- term.setCursorPos(1,2)
- term.clearLine()
- print(1 - (((os.epoch() - (col_prev_time - trans_time)) / trans_time) - 1))
- term.setCursorPos(1,3)
- term.clearLine()
- print(temp_end)
- term.setCursorPos(1,5)
- term.clearLine()
- print(((os.epoch() - (col_prev_time - trans_time)) / trans_time) - 1)
- return temp_start + temp_end
- end
- while stop_prog ~= 1 do
- test = mix(255,1)
- term.setCursorPos(1,1)
- term.clearLine()
- print(test)
- if test >= 255 then
- col_prev_time = os.epoch()
- end
- --test = -1
- if test < 0 then
- stop_prog = 1
- term.setCursorPos(1,9)
- print("exit")
- end
- sleep(0)
- end
Advertisement
Add Comment
Please, Sign In to add comment