Skip to content

Instantly share code, notes, and snippets.

Avatar
🤘

Damien Mayance valryon

🤘
View GitHub Profile
@valryon
valryon / BulletMLPoolLink.cs
Created Jun 27, 2014
Integrate a pooling system with BulletML for Unity
View BulletMLPoolLink.cs
@valryon
valryon / fusemapping.txt
Last active Aug 29, 2015
Fuse mapping for FaceShift
View fusemapping.txt
bs = BrowsD_L = Facial_Blends.BrowsIn_Left = 100
bs = BrowsD_R = Facial_Blends.BrowsIn_Right = 100
bs = BrowsU_C = Facial_Blends.BrowsOuterLower_Left = 100
bs = BrowsU_C = Facial_Blends.BrowsOuterLower_Right = 100
bs = BrowsU_L = Facial_Blends.BrowsUp_Left = 100
bs = BrowsU_R = Facial_Blends.BrowsUp_Right = 100
bs = CheekSquint_L = Facial_Blends.Squint_Left = 100
bs = CheekSquint_R = Facial_Blends.Squint_Right = 100
bs = EyeBlink_L = Facial_Blends.Blink_Left = 100
bs = EyeBlink_R = Facial_Blends.Blink_Right = 100
@valryon
valryon / EncryptionHelper.cs
Last active Dec 14, 2015
I think I found an issue between Monotouch (iOS) and .NET 4. Using an encryption algorithm I have differents outputs due to a default value set in .NET and not in MonoTouch.
View EncryptionHelper.cs
// This file is shared both with a MonoTouch iOS and ASP.NET MVC 3 + .NET 4 project.
// The result of Encrypt differs because of the default selected mode.
// See line 94 for information.
public static class EncryptionHelper
{
/// <summary>
/// Default key
/// </summary>
@valryon
valryon / sitemap.xml
Created Apr 8, 2013
Simple sitemap.xml for Jekyll
View sitemap.xml
---
layout: nil
---
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:image="http://www.sitemaps.org/schemas/sitemap-image/1.1" xmlns:video="http://www.sitemaps.org/schemas/sitemap-video/1.1">
{% for post in site.posts %}
{% unless post.hide %}
<url>
<loc>{{ site.url }}{{ post.url }}</loc>
{% if post.lastmod %}
@valryon
valryon / CheatCode.cs
Created Apr 1, 2014
Unity cheat code handler
View CheatCode.cs
// Copyright © 2014 Pixelnest Studio
// This file is subject to the terms and conditions defined in
// file 'LICENSE.md', which is part of this source code package.
using UnityEngine;
namespace Pixelnest
{
/// <summary>
/// Trigger an event is a cheat code is recognized
/// </summary>
@valryon
valryon / Water2D.shader
Created Oct 10, 2016
Colored Water2D shader with a normal map for Unity
View Water2D.shader
Shader "Custom/Water2D Surface" {
Properties {
_Color("Color", Color) = (1,1,1,1)
_MainTex ("Normalmap", 2D) = "bump" {}
_Magnitude("Magnitude", Range(0,1)) = 0.05
}
Category {
// We must be transparent, so other objects are drawn before this one.
@valryon
valryon / .gitignore
Last active Jan 10, 2017
Unity .gitignore
View .gitignore
# =============== #
# Unity generated #
# =============== #
Temp/
Obj/
UnityGenerated/
/Library/
# ===================================== #
# Visual Studio / MonoDevelop generated #
@valryon
valryon / PainterScript.cs
Created Oct 7, 2013
A unity script that can splash a decal prefab (or anything else) in radom direction from a point using raycasting.
View PainterScript.cs
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
/// <summary>
/// Generate paint decals
/// </summary>
public class PainterScript : MonoBehaviour
{
public static PainterScript Instance;
@valryon
valryon / Interpolators.cs
Last active Oct 10, 2017
Interpolators coroutine for Unity!
View Interpolators.cs
// 2015 - Pixelnest STudio
// <summary>
/// Coroutine helpers for interpolateors
/// </summary>
public class Interpolators
{
public readonly static AnimationCurve LinearCurve;
public readonly static AnimationCurve EaseOutCurve;
public readonly static AnimationCurve EaseInCurve;
public readonly static AnimationCurve EaseInOutCurve;
@valryon
valryon / TouchTapControl.cs
Last active Oct 10, 2017
InControl Tap zone for touch controls
View TouchTapControl.cs
using UnityEngine;
namespace InControl
{
public class TouchTapControl : TouchControl
{
[Header("Dimensions")]
public Rect activeArea = new Rect(0.0f, 0.0f, 0.5f, 1.0f);
[Header("Options")]