Skip to content

Instantly share code, notes, and snippets.

View shohan4556's full-sized avatar
💻
Making things that does not Exists !!

Shohanur Rahaman shohan4556

💻
Making things that does not Exists !!
View GitHub Profile
@shohan4556
shohan4556 / MyScene.ts
Created June 12, 2022 05:51 — forked from Antriel/MyScene.ts
Phaser 3 SpriteFX Outline Shader
import OutlineSpriteFX from './OutlineSpriteFx';
export default class MyScene extends Phaser.Scene {
create() {
const pipeline:OutlineSpriteFX = this.renderer.pipelines.add('OutlineSpriteFX', new OutlineSpriteFX(this.game));
pipeline.thickness = 3;
pipeline.color.setFromRGB(Phaser.Display.Color.IntegerToRGB(0xff3333));
const sprite = this.add.sprite(100, 100, 'someSprite');
@shohan4556
shohan4556 / object-outline-and-dimensions-opencv.py
Created January 16, 2020 10:42 — forked from benmarwick/object-outline-and-dimensions-opencv.py
Python 3 script to take live video, detect the largest object, trace an outline (contour) and measure linear dimensions, using OpenCV
# in a terminal
# python -m pip install --user opencv-contrib-python numpy scipy matplotlib ipython jupyter pandas sympy nose
import cv2
import pandas as pd
import numpy as np
import imutils
from scipy.spatial import distance as dist
from imutils import perspective
// Shader created with Shader Forge v1.38
// Shader Forge (c) Neat Corporation / Joachim Holmer - http://www.acegikmo.com/shaderforge/
// Note: Manually altering this data may prevent you from opening it in Shader Forge
/*SF_DATA;ver:1.38;sub:START;pass:START;ps:flbk:,iptp:0,cusa:False,bamd:0,cgin:,lico:1,lgpr:1,limd:1,spmd:1,trmd:0,grmd:0,uamb:True,mssp:True,bkdf:False,hqlp:False,rprd:False,enco:False,rmgx:True,imps:True,rpth:0,vtps:0,hqsc:True,nrmq:1,nrsp:0,vomd:0,spxs:False,tesm:0,olmd:1,culm:0,bsrc:0,bdst:1,dpts:2,wrdp:True,dith:0,atcv:False,rfrpo:True,rfrpn:Refraction,coma:15,ufog:True,aust:True,igpj:False,qofs:0,qpre:2,rntp:3,fgom:False,fgoc:False,fgod:False,fgor:False,fgmd:0,fgcr:1,fgcg:1,fgcb:1,fgca:1,fgde:0.01,fgrn:5,fgrf:15,stcl:False,atwp:False,stva:128,stmr:255,stmw:255,stcp:6,stps:0,stfa:0,stfz:0,ofsf:0,ofsu:0,f2p0:False,fnsp:False,fnfb:False,fsmp:False;n:type:ShaderForge.SFN_Final,id:4904,x:33076,y:32617,varname:node_4904,prsc:2|diff-5996-OUT,clip-8651-A;n:type:ShaderForge.SFN_Color,id:848,x:32
@shohan4556
shohan4556 / GravityItem.cs
Created August 1, 2017 16:28 — forked from phosphoer/GravityItem.cs
Mario Galaxy Gravity for Unity
// The MIT License (MIT)
// Copyright (c) 2016 David Evans @phosphoer
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
@shohan4556
shohan4556 / !Refractive Surface Shader.md
Created July 13, 2018 15:16 — forked from cortvi/!Refractive Surface Shader.md
Custom refractive liquid surface shader
We couldn’t find that file to show.
@shohan4556
shohan4556 / MiningController.cs
Created February 22, 2018 14:25 — forked from Westerveld/MiningController.cs
This script can destroy tilemap blocks via raycasting
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Tilemaps;
public class MiningController : MonoBehaviour {
public float castDistance = 1.0f; //How far we will cast
public Transform raycastPoint; //The origin point of our cast
using UnityEngine;
using UnityEditor;
using UnityEditor.SceneManagement;
using System.Collections.Generic;
using System.IO;
// Scene selection
@shohan4556
shohan4556 / TextScrambler.cs
Created October 31, 2017 13:20 — forked from korbul/TextScrambler.cs
Unity extension to visually transform a text into another over time.
using System;
using System.Collections;
using System.Collections.Generic;
using System.Text;
using UnityEngine;
public static class TextScrambler {
/// <summary>
/// Transition from one text to another over time
using UnityEditor;
using System.Reflection;
using System;
public static class ConsoleUtilitiesEditor
{
[MenuItem("Tools/Clear Console %#c")] // Cmd/Ctrl + Shift + C
private static void ClearConsoleMenuItem()
{
ClearConsole();
@shohan4556
shohan4556 / Colors
Created August 13, 2017 13:58 — forked from louisvalet/Colors
I heard you needed colors
using UnityEngine;
public static class Colors
{
public static readonly Color AbsoluteZero = new Color32( 0, 72, 186, 255 );
public static readonly Color Acajou = new Color32( 76, 47, 39, 255 );
public static readonly Color AcidGreen = new Color32( 176, 191, 26, 255 );
public static readonly Color Aero = new Color32( 124, 185, 232, 255 );
public static readonly Color AeroBlue = new Color32( 201, 255, 229, 255 );
public static readonly Color AfricanViolet = new Color32( 178, 132, 190, 255 );