Skip to content

Instantly share code, notes, and snippets.

View haehn's full-sized avatar
🤠

Daniel Haehn haehn

🤠
View GitHub Profile
@haehn
haehn / videotexture.html
Created November 1, 2019 21:24
Three.JS Video Texture Experiment
<html>
<head>
<meta charset="UTF-8" />
<style>
html, body {
background-color:#fff;
margin: 0;
padding: 0;
@haehn
haehn / index.html
Last active November 11, 2019 12:31
CS460 Assignment 6 Solution
<html>
<head>
<meta charset="UTF-8" />
<style>
html, body {
background-color:#000;
margin: 0;
padding: 0;
height: 100%;
overflow: hidden !important;
@haehn
haehn / index.html
Created November 13, 2019 01:15
CS460 Assignment 7 Solution
<html>
<head>
<meta charset="UTF-8" />
<style>
html, body {
background-color:#000;
margin: 0;
padding: 0;
height: 100%;
overflow: hidden !important;
@haehn
haehn / gltf.py
Created December 2, 2019 20:13
glTF converter
import numpy as np
import base64
with open("beethoven.ply", 'r') as f:
lines = f.readlines()
counter = 0
vertices_coming = False
faces_coming = False
<html>
<head>
<style>
html, body {
background-color:#000;
margin: 0;
padding: 0;
height: 100%;
overflow: hidden !important;
}
@haehn
haehn / index.html
Created October 5, 2020 02:05
WebGL uniform code
<html>
<head>
<meta content="text/html;charset=utf-8" http-equiv="Content-Type">
<meta content="utf-8" http-equiv="encoding">
<title>Default WebGL!</title>
<style>
html, body {
background-color:#000;
margin: 0;
padding: 0;
@haehn
haehn / index.html
Created October 16, 2020 01:31
XTK + Three.js renderer
<html>
<head>
<meta content="text/html;charset=utf-8" http-equiv="Content-Type">
<meta content="utf-8" http-equiv="encoding">
<style>
html, body {
background-color: #000;
margin: 0;
padding: 0;
@haehn
haehn / robot.js
Created October 29, 2020 10:31
Lecture 21 Robot OO Code
Robot = function(x, y, z) {
this.head = new THREE.Bone();
this.head.position.x = x; // world coordinates
this.head.position.y = y;
this.head.position.z = z;
this.neck = new THREE.Bone();
this.neck.position.y = -10;
@haehn
haehn / index.html
Last active November 4, 2022 15:35
Assignment 6 Solution 2022
<html>
<head>
<meta charset="UTF-8" />
<style>
html, body {
background-color:#000;
margin: 0;
padding: 0;
height: 100%;
overflow: hidden !important;
Robot = function(x, y, z) {
// create head, neck, and torso
var fromhelper = HELPER.cylinderSkeletonMesh(3, 5, 'blue')
var geometry = fromhelper[0];
var material = fromhelper[1];
var bones = fromhelper[2];
var mesh = new THREE.SkinnedMesh( geometry, material );
var skeleton = new THREE.Skeleton( bones );