Skip to content

Instantly share code, notes, and snippets.

View donmccurdy's full-sized avatar

Don McCurdy donmccurdy

View GitHub Profile
@donmccurdy
donmccurdy / .block
Last active January 31, 2023 21:02
perlin noise, animated lines, and SVG filters
license: mit
@donmccurdy
donmccurdy / .block
Last active October 16, 2016 20:40
unconf badge
license: mit
@donmccurdy
donmccurdy / .block
Last active October 10, 2016 18:27
ngAutocomplete + fixed header
license: mit
@donmccurdy
donmccurdy / .block
Last active August 8, 2019 21:37
Google Maps + D3 Overlay
license: mit
@donmccurdy
donmccurdy / .block
Last active October 16, 2016 23:28
aframe + d3 + bl.ocks
license: mit
@donmccurdy
donmccurdy / custom-controls.md
Last active November 29, 2016 00:38
custom aframe controls

HTML:

<a-entity camera
          universal-controls="movementControls: custom, gamepad, keyboard">
</a-entity>

JS:

<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no,user-scalable=no,maximum-scale=1">
<title>Examples • Slow Mouse</title>
<script src="https://aframe.io/releases/0.5.0/aframe.min.js"></script>
<script src="https://cdn.rawgit.com/donmccurdy/aframe-extras/v3.3.0/dist/aframe-extras.min.js"></script>
<script>
AFRAME.registerComponent('slowmouse-controls', {
@donmccurdy
donmccurdy / README.md
Last active June 19, 2023 20:06
Applying THREE.EffectComposer Post-Processing in A-Frame

This effect system requires several of THREE.js's non-default post-processing and shader scripts.

UPDATE(10/9/2017): Check out aframe-effects; it's easier than what I've done here, and works in VR (which this Gist does not).

@donmccurdy
donmccurdy / wildcard-to-regexp.js
Last active February 21, 2024 06:49
Wildcard and glob matching in JavaScript.
/**
* Creates a RegExp from the given string, converting asterisks to .* expressions,
* and escaping all other characters.
*/
function wildcardToRegExp (s) {
return new RegExp('^' + s.split(/\*+/).map(regExpEscape).join('.*') + '$');
}
/**
* RegExp-escapes all characters in the given string.
@donmccurdy
donmccurdy / .block
Last active July 8, 2024 20:30
Custom tiles in Google Maps
license: apache-2.0