Skip to content

Instantly share code, notes, and snippets.

View keijiro's full-sized avatar

Keijiro Takahashi keijiro

View GitHub Profile
@keijiro
keijiro / Guidance.md
Last active May 6, 2026 14:15
Base documents for Unity AI projects

この文書は、このプロジェクトで守るべきガイドラインを記すものです。

  • スプライトアセットの生成には、特に指定が無い場合は gemini-3.1-flash を優先して使って下さい。
  • 入力の処理には New Input System を使いますが、Action Map などの複雑なシステムは用いずに、Keyboard.current や Mouse.current を経由した直接的なメソッド呼び出しによって入力を検出するようにして下さい。
  • UI 要素には UI Toolkit を使用して下さい。
@keijiro
keijiro / CHANGELOG.md
Created November 16, 2025 09:54
Initial changelog file

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog and this project adheres to Semantic Versioning.

[x.y.z] - YYYY-MM-DD

Fixed

<key>NSBonjourServices</key>
<array><string>_ndi._tcp</string></array>
<key>NSLocalNetworkUsageDescription</key>
<string>NDI requires device discovery capability on the networks you use.</string>
@keijiro
keijiro / FpsCapper.cs
Last active May 8, 2026 10:44
FpsCapper - Limits the frame rate of the Unity Editor in Edit Mode
using UnityEditor;
using UnityEngine;
using UnityEngine.LowLevel;
using System.Linq;
using System.Threading;
namespace EditorUtils {
//
// Serializable settings

$$x = (\sin t) \left\{ e^{\cos t} - 2\cos 4t - \sin^5 \Big({t \over 12}\Big) \right\} $$

$$y = (\cos t) \left\{ e^{\cos t} - 2\cos 4t - \sin^5 \Big({t \over 12}\Big) \right\} $$

$$0 \le t \le 12\pi$$

@keijiro
keijiro / kitty.conf
Created March 17, 2024 03:12
My Kitty configuration
# vim:fileencoding=utf-8:foldmethod=marker
#: Fonts {{{
#: kitty has very powerful font management. You can configure
#: individual font faces and even specify special fonts for particular
#: characters.
font_family Lilex Nerd Font Mono
# bold_font auto
@keijiro
keijiro / CFD.hlsl
Last active August 12, 2023 04:04
CFD.hlsl
#version 150
// Pseudo fluids, heavily inspired by flockaroo's single-pass CFD
// https://www.shadertoy.com/view/MdKXRy
in VertexData {
vec4 v_position;
vec3 v_normal;
vec2 v_texcoord;
} inData;
import sys
pcount = int(sys.stdin.readline().rstrip())
for i in range(0, pcount):
sys.stdin.readline()
for j in range(0, 16):
coord = sys.stdin.readline().rstrip().split()
coord = list(map(lambda x: float(x) * 0.2, coord))
coord[2] = max(0, coord[2] - 0.075 * 0.2)
using UnityEngine;
sealed class Test : MonoBehaviour
{
float life;
void Test1()
{
(float, int) attack = (3.5f, 8);
life -= attack.Item1 * attack.Item2;
@keijiro
keijiro / disco.hlsl
Last active May 18, 2023 10:46
Disco mode shader for Windows Terminal
Texture2D shaderTexture;
SamplerState samplerState;
cbuffer PixelShaderSettings
{
float Time;
float Scale;
float2 Resolution;
float4 Background;
};