This file contains 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
# | |
# Skeleton for SDL2/OpenGL application in Python | |
# with fixed logic time step, rendering is going still at full speed. | |
# | |
# To turn debug logging messages on, run with -v parameter: | |
# python <script_name.py> -v | |
# | |
import argparse | |
import logging |
This file contains 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
Chapter 02. Your First Step with WebGL<br> | |
ch02/HelloCanvas: https://jsfiddle.net/8Observer8/2gky294r/<br> | |
ch02/HelloPoint1: https://jsfiddle.net/8Observer8/cc72u1u5/<br> | |
ch02/HelloPoint2: https://jsfiddle.net/8Observer8/uxw657ud/<br> | |
ch02/ClickedPoints: https://jsfiddle.net/8Observer8/xf4fnc0o/<br> | |
ch02/ColoredPoints: https://jsfiddle.net/8Observer8/gkkmnpga/<br> | |
Chapter 03. Drawing and Transforming Triangles<br> | |
ch03/MultiPoint: https://jsfiddle.net/8Observer8/cty1120m/<br> | |
ch03/HelloTriangle: https://jsfiddle.net/8Observer8/wk4sksnw/<br> |
This file contains 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
// $ em++ -lwebsocket.js -o index.html main.cpp | |
#include <emscripten/emscripten.h> | |
#include <emscripten/websocket.h> | |
#include <stdio.h> | |
EM_BOOL onopen(int eventType, const EmscriptenWebSocketOpenEvent *websocketEvent, void *userData) { | |
puts("onopen"); | |
EMSCRIPTEN_RESULT result; |
This file contains 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();; | |
} |