Skip to content

Instantly share code, notes, and snippets.

View raveneer's full-sized avatar
🏠
Working from home

jooho kim raveneer

🏠
Working from home
View GitHub Profile
@randyburden
randyburden / BooleanJsonConverter.cs
Created July 4, 2013 04:42
A Json.NET JsonConverter that can handle converting the following values into boolean values: true, false, yes, no, y, n, 1, 0.
using System;
using Newtonsoft.Json;
namespace JsonConverters
{
/// <summary>
/// Handles converting JSON string values into a C# boolean data type.
/// </summary>
public class BooleanJsonConverter : JsonConverter
{
@allanolivei
allanolivei / gist:8982445
Last active March 26, 2022 20:14
Unity 3d : Expose the rendering order of MeshRenderer in the Unity3D
using UnityEngine;
using UnityEditor;
using System.Reflection;
using System;
using UnityEditorInternal;
[CustomEditor(typeof(MeshRenderer)), CanEditMultipleObjects]
public class MeshRendererInspector : Editor
{
@Flafla2
Flafla2 / Perlin_Tiled.cs
Last active July 23, 2024 07:09
A slightly modified implementation of Ken Perlin's improved noise that allows for tiling the noise arbitrarily.
public class Perlin {
public int repeat;
public Perlin(int repeat = -1) {
this.repeat = repeat;
}
public double OctavePerlin(double x, double y, double z, int octaves, double persistence) {
double total = 0;