Published
Edited
Nov 28, 2020
1 fork
Importers
7 stars
Also listed in…
tools
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
fragment(`
precision mediump float;

uniform vec2 u_resolution;
uniform float u_time;

void main() {
vec2 st = gl_FragCoord.xy / u_resolution;
gl_FragColor = vec4(st, sin(u_time) / 2. + 0.5, 1.0);
}
`)
Insert cell
Insert cell
fragment(`
precision mediump float;

uniform float u_time;
uniform vec2 u_resolution;
uniform vec2 u_mouse;
uniform sampler2D u_texture;

void main() {
vec2 st = gl_FragCoord.xy / u_resolution;
gl_FragColor = texture2D(u_texture, vec2(st.x + pow(1.0 - st.y, 4.) * sin((u_time + 2.) * st.y * 5.), st.y));
}
`, { w: 400, h: 400, play: false, u_texture: 'https://i.imgur.com/I6oaru5.jpg' })
Insert cell
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more