Skip to content

Instantly share code, notes, and snippets.

View jeffcrouse's full-sized avatar

Jeff Crouse jeffcrouse

View GitHub Profile
#include "ofApp.h"
string input;
string valid = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ()";
//--------------------------------------------------------------
void ofApp::setup(){
ofBackground(0);
}
@jeffcrouse
jeffcrouse / Hover.cs
Created January 29, 2018 23:34
A handy script for making a Unity GameObject rotate and "wobble" with exposed parameters for speed and amount.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
/**
* Lessons:
* 1. Scripts are mini-programs that operate on a GameObject in your scene.
* 2. How to get a component of the GameObject this script is attached to?
* 3. How to modify that component over time.
* 4. FIX IN CLASS: There is actually a shortcut to get the transform of the GameObject.
@jeffcrouse
jeffcrouse / SteamVR_TrackedObject_Plus.cs
Last active July 1, 2022 07:46
SteamVR_TrackedObject_Plus
//======= Copyright (c) Valve Corporation, All rights reserved. ===============
//
// Purpose: For controlling in-game objects with tracked devices.
// Update jeff at seethrouhlab
// - Added ability to specify a serial number to assign to the TrackedObject
// - Added a configurable lag value.
// - use with GameManager https://gist.github.com/jeffcrouse/6419e84d7060c08c17cf97b9c41ddd14
//=============================================================================
using System.Collections;
using System.Collections;
using System.Collections.Generic;
using System.Text;
using UnityEngine;
using Valve.VR;
public class GameManager : MonoBehaviour
{
[Range(10, 1000)]
public long LagMillis = 100;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;
using UnityEngine.XR.ARSubsystems;
using UnityEditor.XR.ARSubsystems;
public class MakeImageLibrary
{
[MenuItem("Assets/Create/AR Image Library")]
const path = require('path');
const { exec } = require('child_process');
// https://www.nirsoft.net/utils/dump_edid.html
const exe = path.resolve(__dirname, "bin", "DumpEDID.exe");
const regex = /\*{65}([^\*]+)\*{65}/gm;
var _displays = [];
var _first = true;