ray-marching
v1.1.1
Published
Embedding ray marching in html files only
Downloads
21
Maintainers
Readme
ray-marching
Embedding ray marching in html files only
Install
From NPM
npm i ray-marching
or CDN
<script src="https://unpkg.com/ray-marching@latest/lib/ray-marching.js"></script>
Usage
<ray-marching>
<script type="x-shader/x-fragment">
precision mediump float;
uniform float time;
uniform vec2 mouse;
uniform vec2 resolution;
void main( void ) {
vec2 p = gl_FragCoord.xy / max(resolution.x, resolution.y);
gl_FragColor = vec4(p, mouse.x, 1.0);
}
</script>
</ray-marching>