Skip to content

Instantly share code, notes, and snippets.

View bigalex95's full-sized avatar
🐢
slowly but surely to my dream be PRO

bigalex95

🐢
slowly but surely to my dream be PRO
View GitHub Profile
@bigalex95
bigalex95 / index.css
Created December 8, 2021 10:54 — forked from greggman/index.css
Slime Simulation - WebGL1
body {
margin: 0;
font-family: monospace;
background: #444;
}
canvas {
display: block;
width: 100vw;
height: 100vh;
}
width = 256;
height = 256;
let dst = new Uint8Array(Module.HEAPU8.buffer, dst_ptr, width * height);
canvasResultsLenna.width = width;
canvasResultsLenna.height = height;
var imgData = ctxResultsLenna.createImageData(width, height);
for (var i = 0; i < dst.length; i++) {
imgData.data[i * 4] = dst[i];
#include <emscripten.h>
#include <iostream>
#include <string>
#include <GLES2/gl2.h>
#include <EGL/egl.h>
extern "C"
{
#include "emscripten/html5.h"
}
This file has been truncated, but you can view the full file.