Skip to content

Instantly share code, notes, and snippets.

View seungha-kim's full-sized avatar

seungha-kim

View GitHub Profile
@seungha-kim
seungha-kim / GLSL-Noise.md
Created March 15, 2023 04:34 — forked from patriciogonzalezvivo/GLSL-Noise.md
GLSL Noise Algorithms

Please consider using http://lygia.xyz instead of copy/pasting this functions. It expand suport for voronoi, voronoise, fbm, noise, worley, noise, derivatives and much more, through simple file dependencies. Take a look to https://github.com/patriciogonzalezvivo/lygia/tree/main/generative

Generic 1,2,3 Noise

float rand(float n){return fract(sin(n) * 43758.5453123);}

float noise(float p){
	float fl = floor(p);
  float fc = fract(p);
@seungha-kim
seungha-kim / App.test.js
Created January 18, 2019 03:18 — forked from 505aaron/App.test.js
createPortal Mock for react-test-renderer
jest.mock('react-dom');
import React from 'react';
import { createPortal } from 'react-dom';
import renderer from 'react-test-renderer';
import ShallowRenderer from 'react-test-renderer/shallow';
import ReactDOM from 'react-dom';
class Drop extends React.Component {
constructor(props) {
@seungha-kim
seungha-kim / .eslintrc
Last active February 1, 2018 02:38 — forked from rakannimer/add-react-jest-airbnb-linting.sh
Adding react-airbnb styleguide linting to create-react-app
{
"parser": "babel-eslint",
"env": {
"browser": true,
"node": true,
"jest": true
},
"extends": "airbnb",
"rules": {
"react/jsx-filename-extension": [1, { "extensions": [".js", ".jsx"] }],
@seungha-kim
seungha-kim / easing.js
Created March 18, 2017 18:18 — forked from gre/easing.js
Simple Easing Functions in Javascript - see https://github.com/gre/bezier-easing
/*
* Easing Functions - inspired from http://gizma.com/easing/
* only considering the t value for the range [0, 1] => [0, 1]
*/
EasingFunctions = {
// no easing, no acceleration
linear: function (t) { return t },
// accelerating from zero velocity
easeInQuad: function (t) { return t*t },
// decelerating to zero velocity
@seungha-kim
seungha-kim / chart_colors.txt
Created January 24, 2017 22:58 — forked from there4/chart_colors.txt
[CSS] Chart Color Collection
#3366CC
#DC3912
#FF9900
#109618
#990099
#3B3EAC
#0099C6
#DD4477
#66AA00
#B82E2E
@seungha-kim
seungha-kim / .psci
Created December 15, 2016 13:08 — forked from paf31/.psci
Minimal .psci file for 0.7
:f bower_components/purescript-prelude/src/Prelude.js
:m bower_components/purescript-prelude/src/Prelude.purs
:f bower_components/purescript-eff/src/Control/Monad/Eff.js
:m bower_components/purescript-eff/src/Control/Monad/Eff.purs
:f bower_components/purescript-console/src/Control/Monad/Eff/Console.js
:m bower_components/purescript-console/src/Control/Monad/Eff/Console.purs
:f bower_components/purescript-eff/src/Control/Monad/Eff/Unsafe.js
:m bower_components/purescript-eff/src/Control/Monad/Eff/Unsafe.purs
import Prelude
import Control.Monad.Eff.Console
@seungha-kim
seungha-kim / uri.js
Created October 16, 2015 01:36 — forked from jlong/uri.js
URI Parsing with Javascript
var parser = document.createElement('a');
parser.href = "http://example.com:3000/pathname/?search=test#hash";
parser.protocol; // => "http:"
parser.hostname; // => "example.com"
parser.port; // => "3000"
parser.pathname; // => "/pathname/"
parser.search; // => "?search=test"
parser.hash; // => "#hash"
parser.host; // => "example.com:3000"