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 DG.Tweening; | |
using UnityEditor; | |
using UnityEngine; | |
public class DOTweenMoveWindow : EditorWindow | |
{ | |
#region Class | |
/// <summary> | |
/// Tweenの状態 | |
/// </summary> |
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
#define TAU (2.*3.14159265) | |
float DB(float db) { return pow(10.0, db/10.0); } | |
float sawWave(float phase) | |
{ | |
return fract(TAU*phase); | |
} | |
float chordWave(float phase, int chord, int key) | |
{ |
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
#define PI acos(-1.0) | |
#define VOLUME pow(10.0, -5.0/10.0) | |
float DB(float db) { return pow(10.0, db/10.0); } | |
float random(float co) { return fract(sin(co*(91.3458)) * 47453.5453); } | |
struct Note | |
{ | |
float freq; | |
}; |
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
#define PI acos(-1.0) | |
struct Note | |
{ | |
float freq; | |
}; | |
Note GetNote(int index) | |
{ | |
Note n; |
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 Tone(int i) | |
{ | |
return 420.0 * exp2(float(i + 2) / 12.0); | |
} | |
int g_key = 0; | |
#define PI acos(-1.0) | |
float SinWave(float time, float freq) | |
{ |
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
void TriangleTile_float( | |
float2 UV, | |
float Scale, | |
out float Triangle, | |
out float2 TrianglePosition | |
) | |
{ | |
#define N Scale | |
float2 p = UV; | |
p.x *= 0.86602; // sqrt(3)/2倍 |
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
// tの分割数 | |
int tDiv = 200; | |
// r | |
float rMin = -1; // rの最小値 | |
float rMax = 1; // rの最大値 | |
int rDiv = 2; // rの分割数 | |
// t | |
float tMin = 0; // 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
void HexagonTile_float( | |
float2 UV, | |
float Scale, | |
out float Hexagon, // 六角形 | |
out float2 HexPos, // 六角形の位置 | |
out float2 HexUV, // 六角形内のUVを出力 | |
out float2 HexIndex // 六角形の番号 | |
) | |
{ | |
/////////////////////////////////////////////////////////////////// |
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 UnityEditor; | |
namespace Tools | |
{ | |
public class TimeFrameConverter : EditorWindow | |
{ | |
static private Color darkColor = new Color(216f , 222f , 226f, 255f) / 255f; | |
static private GUIStyle rowStyle = null; | |
static private GUIStyle valueBoxStyle = null; |
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 "Custom/Particles/Alpha Blended - Clamp(TEXCOORD0.z)" { | |
Properties{ | |
_MainTex("Grayscale Texture", 2D) = "white" {} | |
} | |
Category{ | |
Tags { "Queue" = "Transparent" "IgnoreProjector" = "True" "RenderType" = "Transparent" "PreviewType" = "Plane" } | |
Blend SrcAlpha OneMinusSrcAlpha // Alpha Blended | |
ColorMask RGB | |
Cull Off Lighting Off ZWrite Off |