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
/* | |
let myData = { woot:0 }; | |
let state = StateProxy.new( myData ); | |
state.$.dynamicProperties = false; | |
state.$ | |
.converter( "woot", "int" ) | |
.on( "wootChange", (e)=>{ console.log( "wootChange", e.detail ) } ); | |
state.woot = "500.5"; // Converter will change data to int( 500 ) |
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
#version 300 es | |
precision mediump float; | |
out vec4 out_color; | |
//------------------------- | |
in vec3 frag_wpos; | |
in vec3 frag_norm; | |
in vec3 frag_cam; |
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
// DEFAULT CLASS ITERATOR | |
[Symbol.iterator](){ | |
let n = this.head; | |
let result = { value:null, done:false }; | |
return { next:()=>{ | |
if( !n ) result.done = true; | |
else{ | |
result.value = n.value; | |
n = n.next; |
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
class VRot90{ | |
// #region SINGLE AXIS ROTATION | |
static xp( v, o ){ let x = v[0], y = v[1], z = v[2]; o[0] = x; o[1] = -z; o[2] = y; return o; } // x-zy rot x+90 | |
static xn( v, o ){ let x = v[0], y = v[1], z = v[2]; o[0] = x; o[1] = z; o[2] = -y; return o; } // xz-y rot x-90 | |
static yp( v, o ){ let x = v[0], y = v[1], z = v[2]; o[0] = -z; o[1] = y; o[2] = x; return o; } // -zyx rot y+90 | |
static yn( v, o ){ let x = v[0], y = v[1], z = v[2]; o[0] = z; o[1] = y; o[2] = -x; return o; } // zy-x rot y-90 | |
static zp( v, o ){ let x = v[0], y = v[1], z = v[2]; o[0] = y; o[1] = -x; o[2] = z; return o; } // y-xz rot z+90 | |
static zn( v, o ){ let x = v[0], y = v[1], z = v[2]; o[0] = -y; o[1] = x; o[2] = z; return o; } // -yxz rot z-90 |
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
window.onload = function(){ | |
let mesh = new TriMesh(); | |
mesh.add( | |
[-0.1, 0.0, 0.1], | |
[0.1, 0.0, 0.1], | |
[0.1, 0.0, 0.-1], | |
).add( | |
[0.1, 0.0, 0.-1], | |
[-0.1, 0.0, 0.-1], |
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
<html> | |
<script> | |
window.onload = function(){ | |
let qID = 0; | |
qID = QuadTreeID.set( qID, 2, QuadTreeID.A ); | |
qID = QuadTreeID.set( qID, 0, QuadTreeID.C ); | |
qID = QuadTreeID.set( qID, 3, QuadTreeID.D ); | |
qID = QuadTreeID.set( qID, 1, QuadTreeID.B ); |
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
package dao; | |
import java.sql.ResultSetMetaData; | |
import java.sql.SQLException; | |
import java.sql.Types; | |
import java.text.SimpleDateFormat; | |
import javax.json.Json; | |
import javax.sql.rowset.CachedRowSet; | |
public class RowSets { |
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
GLSL Code |
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
function uuid(){ | |
let dt = new Date().getTime(); | |
if( window.performance && typeof window.performance.now === "function" ) dt += performance.now(); //use high-precision timer if available | |
let uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) { | |
var r = (dt + Math.random()*16)%16 | 0; | |
dt = Math.floor(dt/16); | |
return (c=='x' ? r : (r&0x3|0x8)).toString(16); | |
}); | |
return uuid; |
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> | |
<head> | |
<title></title> | |
<style> | |
html, body{ margin:0px; padding:0px; width:100%; height:100%; | |
background-color:#2E2D2E; | |
} | |
*{ color:white; font-size:14px; font-family: monospace; } |