Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am ianmcgregor on github.
  • I am ianmcgregor (https://keybase.io/ianmcgregor) on keybase.
  • I have a public key ASAt8ZE8_a7OUAxwrWi8uWxsIgVUSXXLjCK__FjlS7FvfAo

To claim this, I am signing this object:

@ianmcgregor
ianmcgregor / interaction.js
Created July 24, 2018 20:41
three.js click
import {
Raycaster,
Vector2
} from 'three';
class Interaction {
constructor({camera, objects = []}) {
const raycaster = new Raycaster();
const mouse = new Vector2();
sudo npm cache clean -f
sudo npm install -g n
sudo n stable
node -v
@ianmcgregor
ianmcgregor / JS object patterns
Last active August 29, 2015 14:21
JS object patterns
/* Revealing module */
function Module() {
var privateVar = '';
var publicFn = function() {
return privateVar;
};