Skip to content

Instantly share code, notes, and snippets.

Andreas Borgen Sphinxxxx

Block or report user

Report or block Sphinxxxx

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
Sphinxxxx / index.html
Last active Mar 22, 2020
Vue bar chart race
View index.html
//Super-duper-lightweight tweening "library":
function TWEEN(b,f,h,k,c){function g(a){if(d){var e=(a-d)/h;a=1>e?b+l*c(e):f;if(1<=e)return}else d=a,a=b;k(a);requestAnimationFrame(g)}c=c||function(a){return a*(2-a)};var l=f-b,d;requestAnimationFrame(g)};
<script src="//"></script>
<div id="app">
Sphinxxxx / index.html
Created Jan 31, 2020
Multi-texture sphere
View index.html
<h2>Click the sphere to change/reset textures</h2>
Sphinxxxx / tween.js
Last active Mar 22, 2020
Super-duper-lightweight tweening "library"
View tween.js
//Super-duper-lightweight tweening "library".
//An actual library like would probably be better..
function TWEEN(from, to, duration, callback, easing) {
//ease-out quad:
easing = easing || function(t) { return t * (2 - t); };
var diff = to - from,
function anim(time) {
Sphinxxxx / index.html
Created Jun 12, 2019
Stolpejakten 2018
View index.html
<div id="map-canvas"></div>
<!--div id="summary" class="info-pane" ></div-->
View extract-pdf-images.markdown
Sphinxxxx / index.html
Created Jan 13, 2019
Rubik's cube loader
View index.html
<div class="loader"></div>
Sphinxxxx / index.html
Last active Nov 19, 2018
Web Audio Spectrogram
View index.html
if (!window.AudioContext) {
if (!window.webkitAudioContext) {
alert('AudioContext not supported!');
window.AudioContext = window.webkitAudioContext;
Sphinxxxx /
Last active Jan 3, 2020
DOM node tree walker

A general-purpose DOM tree walker based on (Phrogz' answer and its comments).

The textNodesUnder() function would then look like this:

function textNodesUnder(el) {
    return walkNodeTree(el, {
        inspect: n => !['STYLE', 'SCRIPT'].includes(n.nodeName),
        collect: n => (n.nodeType === 3),
        //callback: n => console.log(n.nodeName, n),
You can’t perform that action at this time.