Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View jeffcrouse's full-sized avatar

Jeff Crouse jeffcrouse

View GitHub Profile
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;
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")]
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;
@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;
@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.
#include "ofApp.h"
string input;
string valid = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ()";
//--------------------------------------------------------------
void ofApp::setup(){
ofBackground(0);
}
@jeffcrouse
jeffcrouse / App.cpp
Created October 13, 2017 19:34
End point code for Week 6
#include "ofApp.h"
#define NUM_PARTICLES 100
class Particle {
public:
void setup(ofPoint _pos, ofPoint _vel) {
pos = _pos;
vel = _vel;
}
@jeffcrouse
jeffcrouse / ofApp.cpp
Created October 13, 2017 19:26
mid-point code for Week 6
#include "ofApp.h"
#define NUM_PARTICLES 100
float radius = 5;
vector<ofPoint> pos;
vector<ofPoint> vel;
vector<float> alpha;
ofPoint lastMousePos;
@jeffcrouse
jeffcrouse / ofApp.cpp
Created October 13, 2017 19:25
Starting point code for Week 6
#include "ofApp.h"
#define NUM_PARTICLES 100
float radius = 10;
ofPoint pos[NUM_PARTICLES];
ofPoint vel[NUM_PARTICLES];
//--------------------------------------------------------------
@jeffcrouse
jeffcrouse / ofApp.cpp
Created October 6, 2017 14:22
Starting code for Week 5 lesson about particle systems
#include "ofApp.h"
ofPoint velocity;
ofPoint position;
ofColor color;
float radius = 20;
//--------------------------------------------------------------
void ofApp::setup(){