Chuck Norris API: https://api.chucknorris.io/
Pokemon API: https://pokeapi.co/
Hacker News API: https://hn.algolia.com/api
List of public APIs: https://github.com/public-apis/public-apis
Chuck Norris API: https://api.chucknorris.io/
Pokemon API: https://pokeapi.co/
Hacker News API: https://hn.algolia.com/api
List of public APIs: https://github.com/public-apis/public-apis
#version 150 | |
uniform float time; | |
uniform vec2 mouse; | |
uniform vec2 resolution; | |
uniform vec3 spectrum; | |
uniform sampler2D texture0; | |
uniform sampler2D texture1; | |
uniform sampler2D texture2; | |
uniform sampler2D texture3; |
vec2 rotate(vec2 v, float a) { | |
float s = sin(a); | |
float c = cos(a); | |
mat2 m = mat2(c, s, -s, c); | |
return m * v; | |
} |
//Set up scene, camera, and renderer | |
var scene = new THREE.Scene; | |
var camera = new THREE.PerspectiveCamera( 45, window.innerWidth / window.innerHeight, 1, 10000 ); | |
var renderer = new THREE.CanvasRenderer(); | |
renderer.setClearColor( 0xf0f0f0 ); | |
renderer.setSize( window.innerWidth, window.innerHeight ); | |
document.body.appendChild( renderer.domElement ); | |
var video = document.createElement('video'); |
// NOTICE 2020-04-18 | |
// Please see the comments below about why this is not a great PRNG. | |
// Read summary by @bryc here: | |
// https://github.com/bryc/code/blob/master/jshash/PRNGs.md | |
// Have a look at js-arbit which uses Alea: | |
// https://github.com/blixt/js-arbit | |
/** |
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
float rand(float n){return fract(sin(n) * 43758.5453123);}
float noise(float p){
float fl = floor(p);
float fc = fract(p);