VRChat にスパチャが過去1秒間に発生したかをOSCメッセージで毎秒送信するブックマークレット (VRChat OSC Bridge 専用ツール)
VRChat OSC Bridge が起動している状態で、 YouTube Live のコメント欄をポップアウトし、そのウィンドウに対して spc_to_osc.min.js
の javascript:
以降のコードを入力します。
実行すると、 所定のOSCメッセージが毎秒 /VRC_OSC/SPC
に送信されます。
VRChat にスパチャが過去1秒間に発生したかをOSCメッセージで毎秒送信するブックマークレット (VRChat OSC Bridge 専用ツール)
VRChat OSC Bridge が起動している状態で、 YouTube Live のコメント欄をポップアウトし、そのウィンドウに対して spc_to_osc.min.js
の javascript:
以降のコードを入力します。
実行すると、 所定のOSCメッセージが毎秒 /VRC_OSC/SPC
に送信されます。
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEngine.Video; | |
public class SmoothVideoPlaylist : MonoBehaviour { | |
// to smoothly cut between two videos, we need two VideoPlayers | |
// make sure you create two VideoPlayers and assign them in the Inspector | |
public VideoPlayer activeCam, otherCam; | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Runtime.InteropServices; | |
using System.Text; | |
using System.Threading.Tasks; | |
public class KeyboardEventArgs : EventArgs | |
{ | |
public int KeyCode { get; } |
void OnPhotoCaptured(PhotoCapture.PhotoCaptureResult result, PhotoCaptureFrame photoCaptureFrame) | |
{ | |
Matrix4x4 cameraToWorldMatrix; | |
photoCaptureFrame.TryGetCameraToWorldMatrix(out cameraToWorldMatrix); | |
Matrix4x4 projectionMatrix; | |
photoCaptureFrame.TryGetProjectionMatrix(out projectionMatrix); | |
var imagePosZeroToOne = new Vector2(pixelPos.x / imageWidth, 1 - (pixelPos.y / imageHeight)); | |
var imagePosProjected = (imagePosZeroToOne * 2) - new Vector2(1, 1); // -1 to 1 space |
更新: | 2018-08-20 |
---|---|
作者: | @voluntas |
バージョン: | 18.8.3 |
URL: | https://voluntas.github.io/ |
using UnityEngine; | |
using UnityEngine.XR; | |
using UnityEngine.XR.Management; | |
public class XRSubSystemTest : MonoBehaviour | |
{ | |
public void Start() | |
{ | |
var xrSettings = XRGeneralSettings.Instance; | |
if (xrSettings == null) |
const std = @import("std"); | |
const Builder = std.build.Builder; | |
const Step = std.build.Step; | |
pub fn build(b: *Builder) void { | |
const target = b.standardTargetOptions(.{}); | |
const mode = b.standardReleaseOptions(); | |
const exe = b.addExecutable("hw", "hw.zig"); | |
exe.setTarget(target); |
using UnityEngine; | |
using UnityEditor; | |
/// <summary> | |
/// This editor utility can lock/unlock unity script compile from menu item. | |
/// See more https://raspberly.hateblo.jp/entry/InvalidateUnityCompile | |
/// </summary> | |
public static class CompileLocker | |
{ | |
[MenuItem("Compile/Lock", false, 1)] |
using System; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEngine.Rendering; | |
using UnityEngine.Rendering.Universal; | |
public class GrabScreenFeature : ScriptableRendererFeature | |
{ | |
[System.Serializable] | |
public class Settings |