Skip to content

Instantly share code, notes, and snippets.

@halby24
halby24 / DBController.cs
Last active November 13, 2020 11:39
ダイナミックボーン 一括制御するやつ
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
public class DBController : MonoBehaviour
{
public Transform[] Bones;
[Range(0f, 1f)] public float Damping, Elasticity, Stiffness, Inert;
public float Radius;
public AnimationCurve DanpingDistrib, ElasticityDistrib, StiffnessDistrib, InertDistrib, RadiusDistrib;
@myaumyau
myaumyau / NumRefToString.js
Created February 18, 2013 03:55
[js]数値文字参照(16進数, 10進数)を文字列に変換
function hexNumRefToString(hexNumRef) {
return hexNumRef.replace(/&#x([0-9a-f]+);/ig, function(match, $1, idx, all) {
return String.fromCharCode('0x' + $1);
});
}
function decNumRefToString(decNumRef) {
return decNumRef.replace(/&#(\d+);/ig, function(match, $1, idx, all) {
return String.fromCharCode($1);
});
}