Skip to content

Instantly share code, notes, and snippets.

@flexelektro
flexelektro / raymarching.html
Created March 14, 2023 08:07 — forked from bojidar-bg/raymarching.html
WebGL Raymarcher
<!DOCTYPE html>
<!-- Thanks to Inigo Quillez (http://iquilezles.org) for many of the functions in the shader code. -->
<!-- Thanks to MDN for being awesome. -->
<!-- Thanks to WebGLFundamentals (https://webglfundamentals.org) for their framebuffer tutorial. -->
<!-- Thanks to gl-matrix.js for the matrix library, and Stats.js for the FPS counter. -->
<html>
<head>
<meta charset="utf-8">
<title>Raymarcher</title>
<style media="screen">
@flexelektro
flexelektro / index.html
Created March 14, 2023 08:06 — forked from CaterpyOwO/index.html
WebGL Ray Marching
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>RayMarching</title>
<script src="./twgl.min.js"></script>
<script src="./shaders.js"></script>
@flexelektro
flexelektro / esnextbin.md
Created May 14, 2020 14:29
esnextbin sketch
@flexelektro
flexelektro / example.js
Created January 19, 2016 17:36 — forked from millermedeiros/example.js
execute multiple shell commands in series on node.js
// USAGE ------
// ============
var shell = require('./shellHelper');
// execute a single shell command
shell.exec('npm test --coverage', function(err){
console.log('executed test');
}});
/*! Js Pub/Sub
* http://anasnakawa.com/
* Copyright (c) Anas Nakawa
* inspired by Ben Alman's one <https://gist.github.com/cowboy/661855>
* MIT License
*/
(function( p ) {
var e = p.e = {};
/*
* object.watch polyfill
*
* 2012-04-03
*
* By Eli Grey, http://eligrey.com
* Public Domain.
* NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.
*/
@flexelektro
flexelektro / gist:5583730
Last active December 17, 2015 08:59
This is an Class Constructor without inheritance, but with modular private class and instance properties.
var ClassMaker = function(conf,parent){
/* conf = {
* privprops : {},
* classprops : {},
* iprops : {}
* }
*/
var klass = function(){
@flexelektro
flexelektro / Vector2D.lua
Created September 14, 2011 08:33 — forked from brandontreb/Vector2D.lua
A simple Vector2D class used in Corona SDK games.
Vector2D = {}
function Vector2D:new(x, y)
local object = { x = x, y = y }
setmetatable(object, { __index = Vector2D })
return object
end
function Vector2D:copy()
return Vector2D:new(self.x, self.y)