This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System.Collections.Generic; | |
| using System.IO; | |
| using UnityEditor; | |
| using UnityEditor.Overlays; | |
| using UnityEditor.SceneManagement; | |
| using UnityEditor.Toolbars; | |
| using UnityEngine; | |
| using UnityEngine.SceneManagement; | |
| using UnityEngine.UIElements; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System.Collections.Generic; | |
| using UnityEngine; | |
| using UnityEditor; | |
| using UnityEditorInternal; | |
| using System.IO; | |
| public class Tex2DArrayCreator : EditorWindow { | |
| private string fileName; | |
| private List<Texture2D> textures = new List<Texture2D>(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using UnityEditor; | |
| using UnityEngine; | |
| using Object = UnityEngine.Object; | |
| public class MaterialGradientDrawer : MaterialPropertyDrawer { | |
| private int resolution; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| float hash (float2 n) | |
| { | |
| return frac(sin(dot(n, float2(123.456789, 987.654321))) * 54321.9876 ); | |
| } | |
| float noise(float2 p) | |
| { | |
| float2 i = floor(p); | |
| float2 u = smoothstep(0.0, 1.0, frac(p)); | |
| float a = hash(i + float2(0,0)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System.Collections.Generic; | |
| using UnityEngine; | |
| namespace Gists | |
| { | |
| // The algorithm is from the "Fast Poisson Disk Sampling in Arbitrary Dimensions" paper by Robert Bridson. | |
| // https://www.cs.ubc.ca/~rbridson/docs/bridson-siggraph07-poissondisk.pdf | |
| public static class FastPoissonDiskSampling | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using UnityEngine; | |
| using System; | |
| public class MathParabola | |
| { | |
| public static Vector3 Parabola(Vector3 start, Vector3 end, float height, float t) | |
| { | |
| Func<float, float> f = x => -4 * height * x * x + 4 * height * x; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using UnityEngine; | |
| /* | |
| * Most functions taken from Tween.js - Licensed under the MIT license | |
| * at https://github.com/sole/tween.js | |
| * Quadratic.Bezier by @fonserbc - Licensed under WTFPL license | |
| */ | |
| public delegate float EasingFunction(float k); | |
| public class Easing |