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
| public class UnityWebRequestAwaiter : INotifyCompletion | |
| { | |
| private UnityWebRequestAsyncOperation asyncOp; | |
| private Action continuation; | |
| public UnityWebRequestAwaiter(UnityWebRequestAsyncOperation asyncOp) | |
| { | |
| this.asyncOp = asyncOp; | |
| asyncOp.completed += OnRequestCompleted; | |
| } |
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
| /** | |
| * Gradually changes a value towards a desired goal over time - implemented from Unity C# | |
| */ | |
| public func smoothDamp(current c: CGFloat, target t: CGFloat, currentVelocity: inout CGFloat, smoothTime time: CGFloat, maxSpeed: CGFloat = CGFloat.infinity, deltaTime: CGFloat) -> CGFloat { | |
| let smoothTime = max(0.0001, time) | |
| let num = 2 / smoothTime | |
| let num2 = num * deltaTime | |
| let num3 = 1 / (1 + num2 + 0.48 * num2 * num2 + 0.235 * num2 * num2 * num2) | |
| var num4 = c - t | |
| let num5 = t |
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
| Shader "Mattatz/UVTransform" { | |
| Properties { | |
| _MainTex ("Base (RGB)", 2D) = "white" {} | |
| _TexScale ("Scale of Tex", Float) = 1.0 | |
| _TexRatio ("Ratio of Tex", Float) = 1.0 | |
| _Theta ("Rotation of Tex", Float) = 0.0 | |
| _PlaneScale ("Scale of Plane Mesh", Vector) = (1, 1, 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
| tell application "Finder" to set theFile to POSIX path of (selection as alias) | |
| tell application "Finder" to set fileExtension to name extension of (selection as alias) |
NewerOlder