Skip to content

Instantly share code, notes, and snippets.

View eAi's full-sized avatar

Edwin Lyons eAi

View GitHub Profile
@eAi
eAi / HorizontalFlowLayoutGroup.cs
Created March 9, 2022 14:54
A layout group, based on https://github.com/StompyRobot/SRF/blob/master/Scripts/UI/Layout/FlowLayoutGroup.cs that lays items out in columns rather than rows
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
/// <summary>
/// Layout Group controller that arranges children in columns, fitting as many on a line until total height exceeds parent bounds
/// </summary>
public class HorizontalFlowLayoutGroup : LayoutGroup
{
public float Spacing = 0f;
@eAi
eAi / Perlin_Tiled.cs
Created April 1, 2016 14:52 — forked from Flafla2/Perlin_Tiled.cs
A slightly modified implementation of Ken Perlin's improved noise that allows for tiling the noise arbitrarily.
public class Perlin {
public int repeat;
public Perlin(int repeat = -1) {
this.repeat = repeat;
}
public double OctavePerlin(double x, double y, double z, int octaves, double persistence) {
double total = 0;