Skip to content

Instantly share code, notes, and snippets.

View UXVirtual's full-sized avatar

Michael UXVirtual

View GitHub Profile
@bryanknox
bryanknox / .editorconfig
Last active January 4, 2023 13:00
.editorconfig for C# Visual Studio projects
# EditorConfig is awesome: https://EditorConfig.org
#
# More info about editorconfig for C# and .NET in Visual Studio see:
# https://docs.microsoft.com/en-us/visualstudio/ide/create-portable-custom-editor-options?view=vs-2019
#
# Most of the .NET and C# rules below were taken from the
# Microsoft Roslyn team's editorconfig at:
# https://github.com/dotnet/roslyn/blob/master/.editorconfig
# Top-most EditorConfig file.
@willbroderick
willbroderick / modelviewer-extra.js
Last active June 21, 2022 16:16
Shopify Model Viewer UI inside slideshow
/*
A Gist to keep track of what was needed to make the Shopify Model Viewer UI
propagate events in a way that allows us to use it in a slideshow/carousel.
Works in Slick and Swiper. Other JS was obviously required outside here.
This is just for reference. This was called on a loop for each 3D model.
Add this SCSS:
.shopify-model-viewer-ui {
@ditzel
ditzel / MeshDestroy.cs
Created August 19, 2019 19:02
MeshDestroy => Put it on a game object with a mesh filter and renderer. Make sure to have read/write enabled on fbx import
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class MeshDestroy : MonoBehaviour
{
private bool edgeSet = false;
private Vector3 edgeVertex = Vector3.zero;
private Vector2 edgeUV = Vector2.zero;
@fishtopher
fishtopher / OVRAvatarHandPoseOverrider.cs
Last active November 24, 2020 12:28
Tween the Oculus Avatar hands to any custom pose you want
using System.Collections;
using System.Collections.Generic;
using System;
using UnityEngine;
using Oculus.Avatar;
// Smoothly tween between the "real" hand pose that comes out of the
// Oculus Avatar SDK and a custom grip pose.
//
// ## Why?
@cortvi
cortvi / !Two-Sided Shader.md
Last active June 20, 2023 14:18
A PBR two-sided cloth shader that works correctly with Unity's lighting.

Extended from this article

two-sided custom shader cover image

@mokargas
mokargas / area-light.js
Last active September 5, 2017 02:25
A-Frame + Three.JS RectAreaLight
//This is now outdated. Please see: https://github.com/mokargas/aframe-area-light-component
/**
* A-Frame Wrapper for THREE.JS RectAreaLight
* @author Mo Kargas (DEVLAD) mo@devlad.com
*/
/* global AFRAME */
@miketucker
miketucker / FXWaterPro.cs
Created February 19, 2017 22:21
Unity Water with VR support
// Upgrade NOTE: replaced '_Object2World' with 'unity_ObjectToWorld'
Shader "FX/Water" {
Properties {
_WaveScale ("Wave scale", Range (0.02,3.0)) = 0.063
_ReflDistort ("Reflection distort", Range (0,1.5)) = 0.44
_RefrDistort ("Refraction distort", Range (0,1.5)) = 0.40
_Brightness("Brightness", Range(0,1.0)) = 0.40
_RefrColor ("Refraction color", COLOR) = ( .34, .85, .92, 1)
[NoScaleOffset] _Fresnel ("Fresnel (A) ", 2D) = "gray" {}
@DashW
DashW / ScreenRecorder.cs
Last active July 21, 2024 13:29
ScreenRecorder - High Performance Unity Video Capture Script
using UnityEngine;
using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Threading;
class BitmapEncoder
{
public static void WriteBitmap(Stream stream, int width, int height, byte[] imageData)
/**
* ================== angular-ios9-uiwebview.patch.js v1.1.1 ==================
*
* This patch works around iOS9 UIWebView regression that causes infinite digest
* errors in Angular.
*
* The patch can be applied to Angular 1.2.0 1.4.5. Newer versions of Angular
* have the workaround baked in.
*
* To apply this patch load/bundle this file with your application and add a
@sr75
sr75 / osx-homebrew-setup.md
Last active June 18, 2020 06:35
Mac Yosemite OSX - Homebrew (RVM/MySQL/Redis) setup

Mac Homebrew (RVM/MySQL/Redis) setup

Follow the steps below to setup a local development environment:

XQuartz

Recommended to download latest XQuartz

iTerm2