Skip to content

Instantly share code, notes, and snippets.

@wolftype
wolftype / index.html
Last active October 14, 2016 01:54
Hello Box: Using GFX.js
<html>
<!--
author: wolftype
license: MIT
Example use of GFX.js (https://rawgit.com/wolftype/200c/gh-pages/js/gfx.js)
An ASAP (As-Simple-As-Possible) WebGL Framework For Graphics Experiments
@wolftype
wolftype / index.html
Created September 28, 2016 04:16
A Fragment Shader (Using Patricio Gonzalez Vivo's glslCanvas)
<html>
<script type="text/javascript" src="https://rawgit.com/patriciogonzalezvivo/glslCanvas/master/build/GlslCanvas.js"></script>
<body>
<canvas class="glslCanvas" data-fragment="
#ifdef GL_ES
precision mediump float;
#endif
#define PI 3.14
@wolftype
wolftype / index.html
Last active September 26, 2016 00:26
Create a WebGL Shader Program
<html>
<script type="text/javascript">
var GL;
var shaderId;
var vertexBuffer;
var indexBuffer;
var timer = 0;
function initWebGL(){
@wolftype
wolftype / index.html
Created September 24, 2016 21:03
Create a WebGL Animation Loop
<html>
<script type="text/javascript">
var GL;
var timer = 0;
function initWebGL(){
// Get Canvas Element
var canvas = document.getElementById("glcanvas");
// Get A WebGL Context
@wolftype
wolftype / index.html
Last active September 24, 2016 20:48
Create a WebGL Context
<html>
<script type="text/javascript">
var GL;
function initWebGL(){
// Get Canvas Element
var canvas = document.getElementById("glcanvas");
// Get A WebGL Context
GL = canvas.getContext("webgl") || canvas.getContext("experimental-webgl");