This file contains 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
// Taken from GradientNoiseNode.cs from the Shader Graph package. | |
float2 GradientNoise_Dir_float(float2 p) { | |
// Permutation and hashing used in webgl-nosie goo.gl/pX7HtC | |
p = p % 289; | |
// need full precision, otherwise half overflows when p > 1 | |
float x = float(34 * p.x + 1) * p.x % 289 + p.y; | |
x = (34 * x + 1) * x % 289; | |
x = frac(x / 41) * 2 - 1; | |
return normalize(float2(x - floor(x + 0.5), abs(x) - 0.5)); | |
} |
This file contains 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 UnityEditor; | |
using UnityEngine; | |
using Spine.Unity; | |
namespace Avrahamy.Animation { | |
public class SkeletonAnimationPreviewWindow : EditorWindow { | |
private const string WINDOW_TITLE = "Skeleton Animation Preview"; | |
private string animationName; | |
private float time; |
This file contains 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; | |
using Spine; | |
using Spine.Unity; | |
namespace GentleGiant.Animation { | |
public class SpineRandomAnimationsSequence : MonoBehaviour { | |
[Serializable] | |
public class AnimationChance { | |
[SpineAnimation(dataField = "skeletonAnimation")] |