Skip to content

Instantly share code, notes, and snippets.

View luan007's full-sized avatar
🧹
part-time house cleaner

Mike Luan luan007

🧹
part-time house cleaner
View GitHub Profile
@luan007
luan007 / Easer.cs
Created November 26, 2018 07:54
[Unity.Easer] Easing & Easing Manager for several projs #Unity #Ease
using System.Collections.Generic;
using System.Collections;
using UnityEngine;
using System;
public static class EaserManager
{
public static void Update(params Easer[] p)
{
for (var i = 0; i < p.Length; i++)
@luan007
luan007 / Bubble.cs
Created November 26, 2018 07:53
[Unity.BubbleThingy] Bubbles! typical bubble like UI with pooling #Unity #Bubble
//Child - actual bubble
using UnityEngine;
public class Bubble : MonoBehaviour
{
public BubbleThingy parentThingy;
public object Data;
@luan007
luan007 / DataBag.cs
Created November 26, 2018 07:44
[Unity.JSONData] Data related stuff (dealing with json esp) #Unity #U3D #Json
//why? because of databinding & sometimes this becomes handy
using UnityEngine;
public class DataBag : MonoBehaviour {
public dynamic Data;
}
@luan007
luan007 / WebImgLoader.cs
Last active December 11, 2018 11:14
[Unity.WebImgLoader] works like img #Unity #U3D #Sprite
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class WebImgLoader : MonoBehaviour
{
public string url;
private string _prev;
@luan007
luan007 / BLEtoOSC.js
Last active November 26, 2018 07:46
[Node.HW.MultiBLEReceiver (to OSC)] Multi BLE to OSC #Nodejs #Noble #BLE #Bluetooth #OSC
var noble = require('noble');
var osc = require('osc-min');
var id = process.env["NOBLE_HCI_DEVICE_ID"] || 0;
var udp = require('dgram').createSocket('udp4');
var serviceUUIDs = ["000049520000bbbb0123456789abcdef"]; // default: [] => all
var host = 'localhost';
noble.on('stateChange', function (state) {
if (state === 'poweredOn') {
activity = Date.now();
@luan007
luan007 / three_bootstrap.js
Last active June 30, 2022 06:01
[THREE.Snippets] threejs_shaders & stuff #Snippets #Three
import * as THREE from "three";
import * as updator from "../../src/updatable.js";
const WIDTH = 960;
const HEIGHT = 720;
function init() {
const renderer = new THREE.WebGLRenderer({
antialias: true