Skip to content

Instantly share code, notes, and snippets.

Michele Mantovan plafone

Block or report user

Report or block plafone

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@plafone
plafone / movie_barcode.py
Created Feb 15, 2017
Python script for creating a bar code from any a video source
View movie_barcode.py
#sudo pip install pafy
import pafy
#sudo apt-get install python-numpy
import numpy as np
#sudo apt-get install python-opencv
import cv2
#sudo pip install -U scikit-learn
View Texture2DExtensions.cs
using UnityEngine;
using System.Collections;
/// <summary>
/// Texture2D extensions.
/// Set of utilities for manipulating Texture2D.
/// </summary>
public class Texture2DExtensions
{
@plafone
plafone / EventNotification.cs
Created Dec 4, 2015
Custom event system between GameObjects
View EventNotification.cs
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using System;
/// <summary>
/// Event notification.
/// This class implements an event notification system between MonoBehaviours.
/// The MonoBehaviour that wants to receive a specific Event needs to add himself to
/// the listeners poll of this class like this:
@plafone
plafone / ComponentCollector.cs
Created Dec 2, 2015
Unity - Component child collector
View ComponentCollector.cs
using UnityEngine;
using UnityEngine.UI;
using System.Collections;
using System.Collections.Generic;
/// <summary>
/// Component collector. Useful generic class that stores in a Dictionary a pair of
/// string and a Component taken from a child GameObject, where the string is the name of the GameObject that has the component.
/// Is a quick way to collect all the Component of the same type in a hierarchy branch.
/// The child Gameobjects has to have different names.
@plafone
plafone / CameraMan.cs
Created Dec 1, 2015
Unity - Simple third-person camera
View CameraMan.cs
using UnityEngine;
using System.Collections;
public class CameraMan : MonoBehaviour
{
//Camera positioning parameters
private float m_distanceAway = 3.0f;
private float m_distanceUp = 1.5f;
@plafone
plafone / blur.py
Created Dec 1, 2015
GLSL - Blur shader + Panda3D
View blur.py
from panda3d.core import Shader
from direct.interval.LerpInterval import LerpFunc
vertex_shader = """
// Uniform inputs
uniform mat4 p3d_ModelViewProjectionMatrix;
// Vertex inputs
attribute vec4 p3d_Vertex;
attribute vec2 p3d_MultiTexCoord0;
You can’t perform that action at this time.