MCPcopy Create free account
hub / github.com/electronstudio/raylib-python-cffi / camera_test

Function camera_test

examples/extra/extra_camera.py:109–135  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

107
108
109def camera_test():
110 rl.SetTraceLogLevel(rl.LOG_ERROR)
111 rl.SetConfigFlags(rl.FLAG_WINDOW_RESIZABLE)
112 rl.InitWindow(512, 256, b'Test')
113 rl.SetTargetFPS(60)
114 rl.DisableCursor()
115
116 flycam = CameraFly()
117
118
119 while not rl.WindowShouldClose():
120 flycam.update()
121 cam = flycam.get_camera()
122
123 rl.BeginDrawing()
124 rl.ClearBackground((0, 200, 255, 255))
125 rl.BeginMode3D(cam[0])
126
127 # NOTE(pebaz): For whatever reason, this can solve a percentage of artifacts
128 #rl.DrawGizmo([100000000, 100000000, 100000000])
129
130 rl.DrawGrid(32, 1)
131
132 rl.EndMode3D()
133 rl.EndDrawing()
134
135 rl.CloseWindow()
136
137if __name__ == '__main__':
138 camera_test()

Callers 1

extra_camera.pyFile · 0.85

Calls 3

updateMethod · 0.95
get_cameraMethod · 0.95
CameraFlyClass · 0.85

Tested by

no test coverage detected