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
| require "csv" | |
| # 各レコードは、改行を区切りとする | |
| csv_text = <<~CSV_TEXT | |
| aaa,bbb,ccc | |
| zzz,yyy,xxx | |
| CSV_TEXT | |
| CSV.parse(csv_text) do |row| | |
| p row |
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 static AnimationClip CreateAnimationClip(VMDFormat format, int interpolationQuality) | |
| { | |
| VMDVRoidConverter converter = new VMDVRoidConverter(); | |
| //アニメーションクリップを作成 | |
| AnimationClip clip = new AnimationClip(); | |
| clip.name = "output_test"; | |
| //キーフレーム作成 | |
| AnimationCurve retCurve = new AnimationCurve(new Keyframe(0, 0), new Keyframe(1, 1)); | |
| //カーブ作成 |
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
| #途中であきらめました | |
| def getbaisu(n,na) | |
| head = n.gsub("x","0").to_i | |
| st = 0 | |
| ed = fact(n.count("x")) #10のx乗を求めたい | |
| return 0 | |
| end | |
| def fact(n) | |
| return 1 if n == 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
| #あってるかわからない(- ^ -) | |
| def yakusu(n) | |
| n = n.to_i | |
| st = 1 | |
| g = 0 | |
| lst = [] | |
| loop { | |
| if (n % st == 0) then | |
| lst.push(st) |
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
| def fib(x) | |
| #ゼロ始まり | |
| a = 0 #ふたつ前の結果 | |
| b = 1 #ひとつ前の結果 | |
| c = 1 #現在の結果 | |
| for i in 0..x-1 | |
| c = a + b | |
| a = b | |
| b = c | |
| end |
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.Collections; | |
| using UnityEditor; | |
| using System.Collections.Generic; | |
| public class CreateCameraPos : EditorWindow | |
| { | |
| public class CameraPos | |
| { | |
| public string BoneNameJP; |
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.Collections; | |
| public class RayBlackOut : MonoBehaviour { | |
| /// <summary>暗転用黒テクスチャ</summary> | |
| private Texture2D blackTexture; | |
| /// <summary>フェード中の透明度</summary> | |
| private float fadeAlpha = 0; | |
| /// <summary>フェード中かどうか</summary> | |
| private bool isFading = false; |
NewerOlder