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
ffmpeg -i 4-6003.mp4 -vf trim=start_frame=600:end_frame=1200,setpts=PTS-STARTPTS -an out.mp4 |
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
public enum TransformMode { | |
Off, XAxis, YAxis, ZAxis, Arbitrary, Random | |
}; | |
switch (mode) | |
{ | |
case TransformMode.XAxis: return Vector3.right; | |
case TransformMode.YAxis: return Vector3.up; | |
case TransformMode.ZAxis: return Vector3.forward; | |
case TransformMode.Arbitrary: return arbitraryVector; |
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
public float Delta { | |
get { | |
var scale = (1.0f - randomness * randomScalar); | |
return velocity * scale * Time.deltaTime; | |
} | |
} | |
... | |
if (useLocalCoordinate) |
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
// Object pool. | |
Queue<GameObject> objectPool; | |
objectPool = new Queue<GameObject>(); | |
.. | |
// Reuse the oldest object in the pool. | |
var go = objectPool.Dequeue(); | |
go.SetActive(false); |
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
// Interpolate the position and the rotation. | |
var p = (t - intervalCounter) / delta; | |
var position = Vector3.Lerp(previousPosition, transform.position, p); | |
var rotation = Quaternion.Slerp(previousRotation, transform.rotation, p); |
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
//ギズモ表示 | |
void OnDrawGizmos(){ | |
Gizmos.color = Color.white; | |
Gizmos.DrawWireCube(this.transform.position + myBounds.center , myBounds.size); | |
} | |
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
var prefab = prefabs[Random.Range(0, prefabs.Length)]; |
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
git --version | |
古かったので2.6へ | |
設定 | |
486 git config --global user.name "peroon" | |
487 git config --global user.email "[email protected]" | |
クローン | |
488 git clone https://github.com/peroon/peroon.github.com.git |
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.Collections; | |
// BGMとアニメーションを指定時間にシーク | |
public class MainSkipAnimation3D : MonoBehaviour { | |
// 参照 | |
public Animator animator; |
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.Collections; | |
public class SystemWrapper{ | |
// AndroidでSystemInfo.deviceUniqueIdentifierを使うとアクセス権限が増えるので回避 | |
public static string GetDeviceUniqueIdentifier(){ | |
#if UNITY_ANDROID || UNITY_EDITOR | |
string key = PlayerPrefsKey.userId; | |
if(PlayerPrefs.HasKey(key)){ |