Skip to content

Instantly share code, notes, and snippets.

View jkiss's full-sized avatar
🪐
universe of 1,000,000,000 universes

百里(Mr.B) jkiss

🪐
universe of 1,000,000,000 universes
View GitHub Profile
@jkiss
jkiss / R.gif
Last active December 1, 2021 02:39
R.gif
@jkiss
jkiss / L.gif
Last active December 1, 2021 02:37
L.gif
export default /* glsl */`
// For a discussion of what this is, please read this: http://lousodrome.net/blog/light/2013/05/26/gamma-correct-and-hdr-rendering-in-a-32-bits-buffer/
vec4 LinearToLinear( in vec4 value ) {
return value;
}
vec4 GammaToLinear( in vec4 value, in float gammaFactor ) {
return vec4( pow( value.rgb, vec3( gammaFactor ) ), value.a );
}
vec4 LinearToGamma( in vec4 value, in float gammaFactor ) {
return vec4( pow( value.rgb, vec3( 1.0 / gammaFactor ) ), value.a );

CURL Noise Algorithm 1

vec4 permute(vec4 x){return mod(x*x*34.+x,289.);}
float snoise(vec3 v){
  const vec2 C = 1./vec2(6,3);
  const vec4 D = vec4(0,.5,1,2);
  vec3 i  = floor(v + dot(v, C.yyy));
  vec3 x0 = v - i + dot(i, C.xxx);
  vec3 g = step(x0.yzx, x0.xyz);
@jkiss
jkiss / GLSL-Noise.md
Created July 7, 2020 09:46 — forked from patriciogonzalezvivo/GLSL-Noise.md
GLSL Noise Algorithms

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);
	return mix(rand(fl), rand(fl + 1.0), fc);
}
@jkiss
jkiss / index.html
Created May 18, 2020 06:01 — forked from alexhornbake/index.html
Generate Path for Curly Bracket
<html>
<title>Curly Bracket</title>
<script src="http://d3js.org/d3.v3.min.js" charset="utf-8"></script>
<style>
.curlyBrace {
stroke: #000000;
stroke-width: 10px;
@jkiss
jkiss / gist:c60420a39b4e58364c0f9729f7d43024
Created May 18, 2020 02:17 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@jkiss
jkiss / backboneView.js
Created July 23, 2019 07:45 — forked from benzkji/backboneView.js
cargo pixelate
define("text", ["module"], function(t) {
"use strict";
var e, a, i = ["Msxml2.XMLHTTP", "Microsoft.XMLHTTP", "Msxml2.XMLHTTP.4.0"], o = /^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im, s = /<body[^>]*>\s*([\s\S]+)\s*<\/body>/im, r = "undefined" != typeof location && location.href, n = r && location.protocol && location.protocol.replace(/\:/, ""), d = r && location.hostname, h = r && (location.port || void 0), m = [], l = t.config && t.config() || {};
return e = {
version: "2.0.1",
strip: function(t) {
if (t) {
t = t.replace(o, "");
var e = t.match(s);
e && (t = e[1])
@jkiss
jkiss / CubicBezierCurve.js
Last active March 26, 2019 04:59
Cubic Bezier Curve function from control points
/**
* Create cubic bezier curve function from 4 points
*
* @param {Plain Object} p0 : start point
* @param {Plain Object} p1 : first control point
* @param {Plain Object} p2 : second control point
* @param {Plain Object} p3 : end point
*/
function BezierCubicXY(p0, p1, p2, p3){
this.coords = ['x', 'y'];
@jkiss
jkiss / d3.sankey.js
Created March 23, 2018 08:34 — forked from emeeks/d3.sankey.js
Sankey Particles
d3.sankey = function() {
var sankey = {},
nodeWidth = 24,
nodePadding = 8,
size = [1, 1],
nodes = [],
links = [];
sankey.nodeWidth = function(_) {
if (!arguments.length) return nodeWidth;