Skip to content

Instantly share code, notes, and snippets.

View Sphinxxxx's full-sized avatar

Andreas Borgen Sphinxxxx

View GitHub Profile
@Sphinxxxx
Sphinxxxx / index.html
Created April 27, 2020 23:18
The world. Simplified.
<script>console.clear();</script>
<script src="https://unpkg.com/vue@2"></script>
<script src="https://unpkg.com/simplify-js@1"></script>
<script src="https://unpkg.com/@sphinxxxx/[email protected]"></script>
<header>
<h1>The world. Simplified.</h1>
</header>
<main id="app">
<label>
@Sphinxxxx
Sphinxxxx / index.html
Created April 27, 2020 19:20
The world. Simplified.
<script>console.clear();</script>
<script src="https://unpkg.com/vue@2"></script>
<script src="https://unpkg.com/simplify-js@1"></script>
<script src="https://unpkg.com/@sphinxxxx/[email protected]"></script>
<header>
<h1>The world. Simplified.</h1>
</header>
<main id="app">
<label>
@Sphinxxxx
Sphinxxxx / index.html
Created April 19, 2020 20:35
Render Shapefile to SVG
<script>console.clear();</script>
<script src="https://d3js.org/d3.v4.min.js"></script>
<script src="https://d3js.org/d3-array.v1.min.js"></script>
<script src="https://d3js.org/d3-geo.v1.min.js"></script>
<script src="https://d3js.org/d3-geo-projection.v1.min.js"></script>
<script src="https://unpkg.com/shapefile"></script>
<!-- ABOUtils.dropFile()
<script src="https://codepen.io/Sphinxxxx/pen/VejGLv.js"></script>
-->
@Sphinxxxx
Sphinxxxx / index.html
Last active March 14, 2024 16:02
Vue bar chart race
<script>
console.clear();
//Super-duper-lightweight tweening "library":
//https://gist.github.com/Sphinxxxx/fc9bcc601a2f903ff167112855d0437c
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>
<script src="//unpkg.com/vue@2"></script>
<div id="app">
@Sphinxxxx
Sphinxxxx / index.html
Created January 31, 2020 17:31
Multi-texture sphere
<script>console.clear();</script>
<h2>Click the sphere to change/reset textures</h2>
@Sphinxxxx
Sphinxxxx / tween.js
Last active March 22, 2020 23:24
Super-duper-lightweight tweening "library"
//Super-duper-lightweight tweening "library".
//An actual library like https://github.com/tweenjs/tween.js would probably be better..
function TWEEN(from, to, duration, callback, easing) {
//ease-out quad: https://github.com/tweenjs/tween.js/blob/master/src/Tween.js#L544
easing = easing || function(t) { return t * (2 - t); };
var diff = to - from,
startTime;
function anim(time) {
@Sphinxxxx
Sphinxxxx / index.html
Created June 12, 2019 16:47
Stolpejakten 2018
<main>
<div id="map-canvas"></div>
<!--div id="summary" class="info-pane" ></div-->
</main>
@Sphinxxxx
Sphinxxxx / extract-pdf-images.markdown
Last active April 25, 2019 22:29
Extract PDF images
@Sphinxxxx
Sphinxxxx / index.html
Created January 13, 2019 02:21
Rubik's cube loader
<div class="loader"></div>
@Sphinxxxx
Sphinxxxx / canvas-rain.markdown
Last active December 1, 2018 00:40
Canvas rain