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 pygame as pg | |
import sys | |
from random import randrange | |
vec2 = pg.math.Vector2 | |
class Snake: | |
def __init__(self, game): | |
self.game = game |
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
#version 430 | |
out vec4 fragColor; | |
uniform vec2 resolution; | |
uniform float time; | |
vec2 rotate2D(vec2 uv, float a) { | |
float s = sin(a); | |
float c = cos(a); |
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 pygame as pg | |
import random | |
import math | |
vec2, vec3 = pg.math.Vector2, pg.math.Vector3 | |
RES = WIDTH, HEIGHT = 1600, 900 | |
NUM_STARS = 1500 | |
CENTER = vec2(WIDTH // 2, HEIGHT // 2) | |
COLORS = 'red green blue orange purple cyan'.split() |
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 pygame as pg | |
import math | |
class Cardioid: | |
def __init__(self, app): | |
self.app = app | |
self.radius = 400 | |
self.num_lines = 200 | |
self.translate = self.app.screen.get_width() // 2, self.app.screen.get_height() // 2 |