Skip to content

Instantly share code, notes, and snippets.

View EliCDavis's full-sized avatar
👹
In another reality

Eli Davis EliCDavis

👹
In another reality
View GitHub Profile
@EliCDavis
EliCDavis / imageconv.go
Created September 5, 2025 23:27
Flip Cr Cb in image
package main
import (
"image"
"image/color"
"image/jpeg"
"image/png"
"log"
"os"
"path/filepath"
@EliCDavis
EliCDavis / WorldSpaceUIDocument.cs
Created July 14, 2025 19:05 — forked from Anthelmed/WorldSpaceUIDocument.cs
Until Unity decide to make it official, this is a custom WorldSpaceUIDocument component. Code is under the MIT license: https://github.com/git/git-scm.com/blob/main/MIT-LICENSE.txt
using UnityEngine;
using UnityEngine.EventSystems;
using UnityEngine.Rendering;
using UnityEngine.UIElements;
#if ENABLE_INPUT_SYSTEM
using UnityEngine.InputSystem.UI;
#endif
#if UNITY_EDITOR
using UnityEditor;
@EliCDavis
EliCDavis / Fibonacci.cs
Created June 8, 2023 01:19
FibonacciSphere in Unity3D
using System.Collections.Generic;
using UnityEngine;
public static class Fibonacci
{
private static Dictionary<int, Vector3[]> fibonacciSphereCache = new Dictionary<int, Vector3[]>();
public static Vector3[] FibonacciSphere(int samples)
{
if (fibonacciSphereCache.ContainsKey(samples))
@EliCDavis
EliCDavis / DrawMeshInstancedDemo.cs
Created May 7, 2022 17:11
Random Instancing Garbage
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class DrawMeshInstancedDemo : MonoBehaviour {
[SerializeField]
private Color color1;
[SerializeField]
private Color color2;
var ui = document.querySelector("[title=Members]")
// requires the presence menu to be open (because React) but could be hidden via CSS
if ( !ui.className.match("selected") ) {
ui.dispatchEvent(new MouseEvent("click",{bubbles: true, cancellable: true}))
}
//ui.nextSibling.style.display = "none" // hides UI if you are streaming
previousMeasures = JSON.parse( localStorage.getItem('hubs-measurements') );
if (!previousMeasures) previousMeasures = []
@EliCDavis
EliCDavis / rotations.go
Created May 12, 2021 16:42
Just my working notes with rotation for later reference
package euler
import (
"math"
"github.com/EliCDavis/vector"
)
// https://stackoverflow.com/questions/1568568/how-to-convert-euler-angles-to-directional-vector
@EliCDavis
EliCDavis / RecurseAdd.cs
Created April 29, 2021 13:36
How to recursively add recorders to a root obj with Recolude
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using RecordAndPlay.Record;
public static class RecurseExample
{
public static void RecurseAdd(Recorder recorder, GameObject obj)
{
if (recorder == null)
using UnityEngine;
using RecordAndPlay;
using RecordAndPlay.Record;
using RecordAndPlay.Playback;
using System.Collections;
using System.Collections.Generic;
using Recolude;
namespace Example
{
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using Recolude;
namespace Example
{
public class ScoreboardBehavior : MonoBehaviour
@EliCDavis
EliCDavis / UploadExample.cs
Last active October 24, 2020 01:04
Example of how to upload a recording to recolude
using UnityEngine;
using Recolude;
using RecordAndPlay;
using RecordAndPlay.Record;
using System.Collections;
namespace Example
{
public class UploadExample : MonoBehaviour
{