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; |
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 <iostream> | |
| #include <btBulletDynamicsCommon.h> | |
| GLfloat floorMaterialDiffuse[] = { 0.55f, 0.64f, 0.36f, 1.f }; | |
| GLfloat sphereMaterialDiffuse[] = { 0.06f, 0.29f, 0.65f, 1.f }; | |
| GLfloat platformMaterialDiffuse[] = { 0.74f, 0.53f, 0.19f, 1.f }; | |
| GLfloat light0Diffuse[] = { 1.f, 1.f, 1.0f }; |
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 Ammo from 'ammojs-typed'; | |
| export class AmmoProvider { | |
| private static api: typeof Ammo; | |
| public static async getApi() { | |
| if (!AmmoProvider.api) { | |
| AmmoProvider.api = await Ammo();; | |
| } |