Skip to content

Instantly share code, notes, and snippets.

View ThorstenBux's full-sized avatar
😃

Thorsten Bux ThorstenBux

😃
View GitHub Profile
I, the contributor hereby agree to always be awesome
@ThorstenBux
ThorstenBux / threePipelineModule.js
Last active October 4, 2019 02:09
8thWall video background with post-processing
const threePipelineModule = () => {
let scene3
let _videoWidth
let _videoHeight
let fxaaPass = {}
return {
name : 'customthreemodule',
onStart : ({ canvas, canvasWidth, canvasHeight, videoWidth, videoHeight, GLctx }) => {
const scene = new window.THREE.Scene()
const camera = new window.THREE.PerspectiveCamera(
@ThorstenBux
ThorstenBux / one-euro-filter.ts
Created April 19, 2020 01:27
one euro filter Typescript version
/* eslint-disable max-classes-per-file */
class LowPassFilter {
y: number | null;
s: number | null;
alpha = 0;
constructor(alpha: number) {
this.setAlpha(alpha);
@ThorstenBux
ThorstenBux / videoRecorder.ts
Last active April 7, 2021 16:02
HTML5 canvas video recording. Taken from BabylonJS and modified to be independent of BabylonJS
/* eslint-disable no-underscore-dangle */
/**
This code has been taken from BabylonJS
https://github.com/BabylonJS/Babylon.js/blob/master/src/Misc/videoRecorder.ts
and modified by Thorsten Bux (thorsten@tripod-digital.co.nz)
* */
type Nullable<T> = T | null;
/**
* Downloads a blob in the browser