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 { mat4, quat, vec3 } from "gl-matrix"; | |
import { gl } from "./webgl-context.js"; | |
import { getEuler } from "./math-helpers.js" | |
// This class implements debug drawing callbacks that | |
// are invoked inside b2World::Step | |
export default class DebugDrawer { | |
constructor(program, pixelsPerMeter) { | |
this.program = program; |
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/python | |
# coding=utf-8 | |
import os, pygame, time, random, uuid, sys | |
class myRect(pygame.Rect): | |
""" Add type property """ | |
def __init__(self, left, top, width, height, type): | |
pygame.Rect.__init__(self, left, top, width, height) | |
self.type = type |
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 sys | |
from OpenGL.GL import * | |
from PyQt6.QtCore import QSize, Qt | |
from PyQt6.QtOpenGLWidgets import QOpenGLWidget | |
from PyQt6.QtWidgets import QApplication, QPushButton, QVBoxLayout | |
class OpenGLWidget(QOpenGLWidget): |
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
precision mediump float; | |
uniform vec3 uColor; | |
void main() | |
{ | |
gl_FragColor = vec4(uColor, 1.0); | |
} |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Load Ammo.js and a texture using Promise. Rollup, WebGL, JavaScript</title> | |
</head> |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Example</title> | |
</head> | |
<body> |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Dog. WebGL, JavaScript</title> | |
</head> | |
<body> |
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
#define FREEGLUT_STATIC | |
#include <GL/freeglut.h> | |
#include <GL/glu.h> | |
#include <algorithm> | |
#include <btBulletDynamicsCommon.h> | |
#include <iostream> | |
#include <set> | |
#define EXPLOSION_STRENGTH 50.f |
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
#define FREEGLUT_STATIC | |
#include <GL/freeglut.h> | |
#include <GL/glu.h> | |
#include <algorithm> | |
#include <btBulletDynamicsCommon.h> | |
#include <iostream> | |
#include <set> | |
int winW = 350, winH = 350; |