precision highp float;
varying highp vec2 vTextureCoord;
uniform sampler2D uSampler;
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
#include <iostream> | |
char utf8[4] = {'\xe2', '\x80', '\xa6', '\x00'}; // first three bytes are the "..." UTF-8 character, fourth byte is string termination | |
int main () | |
{ | |
std::cout << utf8 << std::endl; | |
return 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
<html> | |
<body> | |
<button id="first">First Demo</button> | |
<button id="second">Second Demo</button> | |
<iframe width="500" height="500" src="03-vr-presentation.html" allowvr></iframe> | |
<script> | |
var iframe = document.querySelector('iframe') | |
document.getElementById('first').addEventListener('click', function() { | |
iframe.contentWindow.location.href = '03-vr-presentation.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
<!doctype html> | |
<html> | |
<head> | |
</head> | |
<body> | |
<canvas width="1920" height="1080"></canvas> | |
<script> | |
var frameCount = 0, fps = 0, tStart = 0 | |
var ctx = document.querySelector('canvas').getContext('2d') |
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
function convert(msg) { | |
var result = document.getElementById('message'); | |
result.innerText = '$' + msg.formatMoney(2); | |
} |
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> | |
<title>Isomorphic Three.js</title> | |
<style> | |
html, body { | |
height: 100%; | |
height: 100vh; | |
padding: 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
var fs = require('fs'), | |
omggif = require('omggif'), | |
THREE = require('three'), | |
SoftwareRenderer = require('three-software-renderer'); | |
// How many frames and how large shall the GIF be? | |
var NUM_FRAMES = 200, WIDTH = 500, HEIGHT = 500; | |
// Our scene, camera and renderer and a box to render | |
var scene = new THREE.Scene(), |
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
[2015-09-08 14:56:17,530][WARN ][transport.netty ] [Captain Wings] exception caught on transport layer [[id: 0x93369774, /127.0.0.1:37573 :> /127.0.0.1:9300]], closing connection | |
java.io.StreamCorruptedException: invalid internal transport message format |
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
DEFAULT="[37;40m" | |
RED="[31;40m" | |
GREEN="[32;40m" | |
hg_changes() { | |
echo -e "\e${RED}`hg log -pr $1 | grep '^+' | wc -l` Additions\e${DEFAULT}"; echo -e "\e${GREEN}`hg log -pr $1 | grep '^-' | wc -l` Deletions\e${DEFAULT}"; | |
} |
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
import sys | |
import os | |
sys.path.append('../lib/') | |
from device_listener import DeviceListener | |
from pose_type import PoseType | |
class WavePoseListener(DeviceListener): | |
def on_pose(self, pose): | |
pose_type = PoseType(pose) |