This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # pip install moderngl pygame numpy pyglm | |
| from typing import Optional, Tuple | |
| import glm | |
| import moderngl | |
| import numpy as np | |
| import pygame as pg | |
| # ---------------- TYPES ---------------- # |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # pip install moderngl pygame numpy pyglm | |
| from typing import Optional, Tuple | |
| import glm | |
| import moderngl | |
| import numpy as np | |
| import pygame as pg | |
| # ---------------- TYPES ---------------- # |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| dist | |
| public/js |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # pip install PyOpenGL Pygame | |
| import pygame | |
| from OpenGL.GL import * | |
| from pygame.locals import * | |
| def main(): | |
| pygame.init() | |
| pygame.display.set_mode((350, 350), DOUBLEBUF | OPENGL) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # pip install PyOpenGL PySDL3 | |
| import os | |
| from OpenGL.GL import * | |
| os.environ["SDL_MAIN_USE_CALLBACKS"] = "1" | |
| os.environ["SDL_RENDER_DRIVER"] = "opengl" | |
| import sdl3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| import argparse | |
| import glob | |
| from io import BytesIO | |
| import itertools | |
| import json | |
| import os | |
| from pathlib import Path | |
| import shlex |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| Language: C | |
| # BasedOnStyle: WebKit | |
| AccessModifierOffset: -4 | |
| AlignAfterOpenBracket: DontAlign | |
| AlignArrayOfStructures: None | |
| AlignConsecutiveMacros: None | |
| AlignConsecutiveAssignments: None | |
| AlignConsecutiveBitFields: None | |
| AlignConsecutiveDeclarations: None |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| Language: Cpp | |
| # BasedOnStyle: WebKit | |
| AccessModifierOffset: -4 | |
| AlignAfterOpenBracket: DontAlign | |
| AlignArrayOfStructures: None | |
| AlignConsecutiveMacros: None | |
| AlignConsecutiveAssignments: None | |
| AlignConsecutiveBitFields: None | |
| AlignConsecutiveDeclarations: None |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <box2d/box2d.h> | |
| #include <iostream> | |
| int main() | |
| { | |
| b2Vec2 gravity(0.f, -9.8f); | |
| b2World* world = new b2World(gravity); | |
| float gx = world->GetGravity().x; | |
| float gy = world->GetGravity().y; | |
| std::cout << "gravity = (" << gx << ", " << gy << ")" << std::endl; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import math | |
| import pygame | |
| from Box2D import b2Draw | |
| class DebugDrawer(b2Draw): | |
| def __init__(self, window, pixelsPerMeter, thickness=3): | |
| super().__init__() |
NewerOlder