Skip to content

Instantly share code, notes, and snippets.

@ereidland
ereidland / VRSkybox.cs
Created October 2, 2013 16:23
VR Skybox by Nora (stereoarts.jp) with minor change to add color tint.
// coded by Nora
// http://stereoarts.jp
using UnityEngine;
using System.Collections.Generic;
public class VRSkybox : MonoBehaviour
{
public enum Shape
{
Sphere,
@ereidland
ereidland / StaticCoroutine.cs
Created December 11, 2013 20:08
Static Coroutine in Unity
using UnityEngine;
using System.Collections;
public class StaticCoroutine : MonoBehaviour
{
private static StaticCoroutine _instance;
public static void Do(IEnumerator enumerator)
{
if (_instance == null)
@ereidland
ereidland / stat_test.js
Created June 23, 2015 01:20
Rough testing of average stat roll for DnD
function Roll(sides)
{
return 1 + Math.round(Math.random()*(sides - 1));
}
function RollForStat()
{
var totals = [Roll(6), Roll(6), Roll(6), Roll(6)];
var lowestIndex = 0;
var lowestNumber = totals[0];
@ereidland
ereidland / RandomNameGenerator.html
Created June 13, 2021 20:37
Completely random name generator with simple rules: At least 1 vowel for each consonant. Consonants must be separated by a vowel. Y can be a consonant or vowel.
<html>
<title>RANDOM name generator</title>
<body onLoad="OnLoad()">
<button id="generate" onClick="GenerateClicked()">Generate</button>
<table id="names">
</table>
<script>
var table = {};
var vowels = "aeiouy";