Advertisement
Grexxity

Camera

Dec 31st, 2022
21
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. local camera = peripheral.wrap("right")
  2. local array = " .,-=+xX#"
  3. local monitor = peripheral.wrap("left")
  4. local yp = 1
  5. monitor.clear()
  6. monitor.setTextScale(0.5)
  7. monitor.setCursorPos(1,1)
  8. for j = -0.35,0.25,0.025 do
  9. for i = -1,1,0.036 do
  10. local d = camera.distance(i, 0-j)
  11. local a = 1
  12. if d > 0 then a = 2 + (8 - math.min(8, (d/1.2))) end
  13. monitor.write(string.sub(array, a, a))
  14. end
  15. yp=yp+1
  16. monitor.setCursorPos(1,yp)
  17. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement