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 System.IO; | |
public class WebCam : MonoBehaviour { | |
public int Width = 1280; | |
public int Height = 720; | |
public int FPS = 15; | |
public Material material; |
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 EyeJitter : MonoBehaviour { | |
float timer = 0.0f; | |
Quaternion rot; | |
public float changeTime = 0.4f; // 変更する時間最小値 |
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
#! ruby -Ks | |
# -*- mode:ruby; coding:shift_jis -*- | |
# 2400ボーのデータレコーダっぽいWAVをつくる | |
# 出力ファイル | |
FILENAME = "test.wav" | |
BAUD = 2400 | |
CHANNELS = 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
-----BEGIN PUBLIC KEY----- | |
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAv+5cPJxLUxpxsr/zey2N | |
19OqJJ44G1IpJ07K7odu9gjrDuXlr35vlOGl7DUIdVLCuwKmJ+5aeJHcIx8W5UMo | |
zNWAk1uGCt+UeF8yf2Vjm7zsYgp70cztnPB7F/CkSm+bHYDT8oBs+lhs/E06EnEX | |
00pLLWkmeUUaLtFDKlljzdgv5963iF4JoWhq0Y47TwHEBZ/+COKIZDMWKEb4FzPX | |
J7BHiIYocLalaDqth5X43RUHu5fZU1qmWGKjG9193A0aPrr+7jIPEm4TZukMJcvd | |
DvH5Vw1SiNa/2zo2zCTcxuAw4d8SNoTCM4g/HCTUTDiSi9BE9x58K92YYed1w2+T | |
bQIDAQAB | |
-----END PUBLIC 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
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class GOROmanLookAt : MonoBehaviour { | |
public Transform target; // ターゲット位置 | |
public Transform upVectorTarget; // アップベクター用のターゲット位置 | |
public float swivelAngle = 0.0f; // あとからクルクルする用の回転角 | |
public bool buildInLookAt = true; // 内蔵のLookAtを使うか? |
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
#RICOH THETA V を制御したいけどコケる | |
require 'net/http' | |
require 'json' | |
require 'pp' | |
HOST = '192.168.1.1' # THETA VのWIFI接続時のアドレス | |
PORT = 80 # THETA Vの制御ポート | |
http = Net::HTTP.new(HOST, PORT) |
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 UnityEngine.SceneManagement; | |
public class SceneReloader : MonoBehaviour { | |
public KeyCode reloadKey = KeyCode.Tab; // このキーを押すとシーンリロードする | |
public int reloadScene = 0; // リロード時のシーン番号 | |
void Update () { |
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; | |
public class RenderScaleController : MonoBehaviour { | |
public float renderScale = 2.0f; // デフォルトは1.0 上げれば上げるほどVR内の解像度が高くなる(その分描画は重くなる) | |
// 起動時に一回だけ設定(動的に変えると描画が壊れる時がある) | |
void Start () { | |
UnityEngine.XR.XRSettings.eyeTextureResolutionScale = renderScale; | |
} | |
} |
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; | |
public class VRRecenter : MonoBehaviour { | |
public KeyCode reloadKey = KeyCode.R; // このキーを押すとVR内のカメラ位置をリセンターする | |
// Update is called once per frame | |
void Update () { | |
if (Input.GetKeyDown(reloadKey)) |
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
// | |
// OVO LED Live control sample code for Windows | |
// | |
// 要OVO Firmwareバージョン7以降 | |
// https://www.jdsound.co.jp/products/ovo/manual/ovo_user_manual.pdf | |
#include <Windows.h> | |
#include <stdio.h> | |
#include <string.h> |