Skip to content

Instantly share code, notes, and snippets.

View JT5D's full-sized avatar
💭
Multiversing...

JT5D JT5D

💭
Multiversing...
View GitHub Profile
@bpesquet
bpesquet / .gitattributes-lfs-unity
Last active December 7, 2022 22:37
.gitattributes file for LFS with Unity
* text=auto
# Unity files
*.meta -text -merge=unityamlmerge
*.unity -text -merge=unityamlmerge
*.asset -text -merge=unityamlmerge
*.prefab -text -merge=unityamlmerge
# Image formats
*.psd filter=lfs diff=lfs merge=lfs -text
@johnhw
johnhw / umap_sparse.py
Last active May 11, 2025 07:18
1 million prime UMAP layout
### JHW 2018
import numpy as np
import umap
# This code from the excellent module at:
# https://stackoverflow.com/questions/4643647/fast-prime-factorization-module
import random
@dxball
dxball / Gradient.cs
Created August 10, 2018 06:37
Unity UI Text Gradient effect
using System.Collections.Generic;
/// <summary>
/// Modified Gradient effect script from http://answers.unity3d.com/questions/1086415/gradient-text-in-unity-522-basevertexeffect-is-obs.html
/// -Uses Unity's Gradient class to define the color
/// -Offset is now limited to -1,1
/// -Multiple color blend modes
///
/// Remember that the colors are applied per-vertex so if you have multiple points on your gradient where the color changes and there aren't enough vertices, you won't see all of the colors.
/// </summary>
@CloudyWater
CloudyWater / Starfield.shader
Created February 23, 2018 03:31
Conversion of ShaderToy to Unity Shader
Shader "Starfield"
{
Properties
{
_iMouse ("iMouse", Vector) = (0,0,0,0)
_Iterations ("Iterations", int) = 17
_Formuparam ("Formuparam", float) = .53
_Steps ("Steps", int) = 20
_StepSize ("StepSize", float) = .1
_Zoom ("Zoom", float) = .8
#!/usr/bin/env bash
[ ! -d .git ] && "This is not a git directory." && exit 1
# Setup the gource info for the repo.
~/gource/setup
# Create the video.
gource --load-config ./.git/gource/config.ini | ffmpeg -y -r 60 -f image2pipe -vcodec ppm -i - -vcodec libx264 -preset ultrafast -pix_fmt yuv420p -crf 1 -threads 8 -bf 0 ./gource.mp4
@DanMillerDev
DanMillerDev / BlendShapeObjectSwitcher.cs
Last active April 15, 2020 20:10
Unity ARKit Blend shape object activator
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.XR.iOS;
public class BlendShapeObjectSwitcher : MonoBehaviour {
private static float THRESHOLD = 0.4f;
bool enabled = false;
@michaelybecker
michaelybecker / StackDoFAutoFocus.cs
Last active October 16, 2021 22:01
DoF AutoFocus for Unity's new postprocessing stack
// An adaptaion of Frank Otto's AutoFocus script for Unity's new PostProcessing Stack
// Original at: http://wiki.unity3d.com/index.php?title=DoFAutoFocus
// Adapted by Michael Hazani
// For more info see: http://www.michaelhazani.com/autofocus-on-whats-important
using UnityEngine;
using System.Collections;
using System;
using UnityEngine.PostProcessing;
@t04glovern
t04glovern / GPSController.cs
Created April 30, 2017 12:55
Unity3D GPS Connector script
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class GPSController : MonoBehaviour {
public LocationInfo currentGPSInfo;
public float updateRate = 3f;
public bool debugging = true;
using UnityEngine;
public class AsteroidSpawner : MonoBehaviour
{
public int count = 10;
public GameObject prefab;
private void Start()
{
for (int i = 0; i < count; i++)
@runewake2
runewake2 / DeformableMesh.cs
Created December 21, 2016 04:42
Physically simulated mesh deformation. This file handles the mesh updates.
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
[RequireComponent(typeof(GeneratePlaneMesh))]
public class DeformableMesh : MonoBehaviour {
public float maximumDepression;
public List<Vector3> originalVertices;