Skip to content

Instantly share code, notes, and snippets.

View mutoo's full-sized avatar

Lingjia Liu mutoo

View GitHub Profile
/**
* Why we need the soucemap path fixer?
*
* 1) postcss-loader + css-loader suck!
* https://github.com/postcss/postcss-loader/issues/390#issuecomment-417584816
*
* 2) Don't insert absolute paths into the module code as they break hashing when the root for the project is moved.
* https://webpack.js.org/contribute/writing-a-loader/#absolute-paths
*/
@mutoo
mutoo / webpack-dev-server-debug.json
Created September 3, 2018 23:52
scripts for debugging webpack-dev-server
{
"dev": "cross-env NODE_ENV=development webpack-dev-server --config build/webpack.config.babel.js --env development --hot --inline",
"dev-debug-win": "node %NODE_DEBUG_OPTION% ./node_modules/webpack-dev-server/bin/webpack-dev-server --config build/webpack.config.babel.js --env development --hot --inline",
"dev-debug-osx": "node $NODE_DEBUG_OPTION ./node_modules/webpack-dev-server/bin/webpack-dev-server --config build/webpack.config.babel.js --env development --hot --inline"
}
@mutoo
mutoo / ascii-cube-webgl.markdown
Created August 24, 2018 01:11
Ascii Cube (webgl)
@mutoo
mutoo / index.html
Created August 24, 2018 01:10
Visualizations of distribution in circles
<canvas width="200" height="200" id="case1">
rejection sample
</canvas>
<canvas width="200" height="200" id="case2">
random theta with random radius sample
</canvas>
<canvas width="200" height="200" id="case3">
random theta with sqrted random radius sample
@mutoo
mutoo / index.html
Created August 24, 2018 01:10
Matrix Code Rain
<div id='container'></div>
<!-- read the blog post for more: https://blog.mutoo.im/2017/09/15/matrix-code-rain-on-web/ -->
@mutoo
mutoo / fluid-dynamic-solver.markdown
Created August 24, 2018 01:10
Fluid Dynamic Solver

Fluid Dynamic Solver

A javascript implementation of Real-Time Fluid Dynamics for Games [Jos Stam, 2003]

A Pen by Lingjia Liu on CodePen.

License.

@mutoo
mutoo / 2d-particle-based-fluid.markdown
Created August 24, 2018 01:09
2D Particle-based Fluid

2D Particle-based Fluid

A javascript implementation of 2D interactive particle-based fluid [Daniel Månsson, 2013].

A Pen by Lingjia Liu on CodePen.

License.

@mutoo
mutoo / index.html
Created August 24, 2018 01:09
Mobius Silk Strip
<canvas id="stage"></canvas>
@mutoo
mutoo / index.html
Created August 24, 2018 01:08
Svg Path Inspector
<div id="app">
<div ref="canvas">
</div>
<div class="caption">
{{pathString}}
</div>
</div>
@mutoo
mutoo / a-closed-uniform-bspline-curve.markdown
Last active July 16, 2019 23:47
A closed uniform BSpline curve