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
var express = require('express'); | |
var app = express(); | |
app.use(express.static('/')); | |
app.use(express.directory('/')); | |
app.listen(8080); |
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
/* | |
RICOH THETA remote shutter for node.js | |
coded by @kioku_systemk | |
code license is public domain. | |
this code is referenced from @MobileHackerz and @GOROman | |
https://gist.github.com/GOROman/7596186 | |
*/ | |
var net = require('net'); |
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
<p><script>(function(){ | |
/* | |
GLSL standalone viewer | |
sample from -> http://glsl.heroku.com/e#15472.1 | |
*/ | |
var shader="precision highp float;" | |
+"uniform float time;uniform vec2 resolution;float M(vec3 p){float r=cos(sin(p.x)" | |
+")+cos(p.y)+cos(sin(p.z));p*=25.;return r-=cos(cos(p.x)+cos(p.y)+cos(p.z))*.12;}" | |
+"void main(){float k=time,q=k,f=exp(1.-fract(k+sin(k))),t=0.,dt=5.;vec3 p=vec3(0" | |
+",-k*2.-f*f,0),d=normalize(vec3(-1.+2.*(gl_FragCoord.xy/resolution),1.));d/=64.;" |
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
<p><script>(function(){ | |
/* | |
Generate Wave sample | |
*/ | |
var time = 1.0, // 1[sec] | |
sampling = 44100, // Samples per second | |
chan = 2, | |
waveLen = time * sampling * chan; | |
function genWave(buf) |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no"> | |
<title>WebGL aobench</title> | |
<!-- | |
aobench project : https://code.google.com/p/aobench/ | |
original GLSL version http://kioku.sys-k.net/4kgfxmon/ | |
based on ported WebGL version by h013 : http://glsl.heroku.com/e#3159.0 |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no"> | |
<title></title> | |
</head> | |
<body> | |
</body> | |
</html> |
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
<html><body></body><script> | |
(function(){ | |
var c = document.createElement("canvas"); | |
document.body.appendChild(c); | |
c.setAttribute("style", "position:absolute;left:0px;top:0px"); | |
var g = c.getContext("webgl")||c.getContext("experimental-webgl"); | |
if (!g) { | |
alert("This demo requires WebGL"); | |
return; | |
} |
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
// UMD (Universal Module Definition) | |
(function(global, factory, name) { | |
if (typeof define === 'function' && define.amd) { define([], factory); /* AMD*/ } | |
else if (typeof exports === 'object') { module.exports = factory(); /* CommonJS */ } | |
else { global[name] = factory(); /* Global*/ } | |
})(this, function() { | |
'use strict'; | |
var MyClass = { | |
hoge: function () { |