MCPcopy Create free account
hub / github.com/ICE27182/Python-3D-renderer / display

Method display

pyrender.py:951–962  ·  view source on GitHub ↗
(frame)

Source from the content-addressed store, hash-verified

949
950
951 def display(frame) -> None:
952 frame_in_str = []
953 for row in frame:
954 for pixel in row:
955 if pixel == (0, 0, 0):
956 frame_in_str.append(" ")
957 else:
958 frame_in_str.append(
959 f"\033[38;2{pixel[0]};{pixel[1]};{pixel[2]}m██"
960 )
961 frame_in_str.append("\n")
962 print("".join(frame_in_str), end="\033[0m")
963
964
965 def mainloop(self):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected