This post has been moved to my blog, under Color Management in three.js.
Everyone who interacts with computers has in important ways always already been programming them.
Every time you make a folder or rename a file on your computer, the actions you take through moving your mouse and clicking on buttons, translate into text-based commands or scripts which eventually translate into binary.
Why are the common conceptions of programmer and user so divorced from each other? The distinction between programmer and user is reinforced and maintained by a tech industry that benefits from a population rendered computationally passive. If we accept and adopt the role of less agency, we then make it harder for ourselves to come into more agency.
We've unpacked the "user" a little, now let's look at the "programmer." When a programmer is writing javascript, they are using prewritten, packaged functions and variables in order to carry out the actions they want their code to do. In this way, the programmer is also the user. Why is using pre-made scripts seen
This is a fork of and builds upon the work of Eddie Webb's search and Matthew Daly's search explorations.
It's built for the Hugo static site generator, but could be adopted to function with any json index.
To see it in action, go to craigmod.com and press CMD-/
and start typing.
Simple: We can't.
Not right now anyway, fetch() does not support that, but good old XMLHttpRequest does though.
The function below behaves much like fetch()
, it will return a Promise that will resolve into a Response object.
Just pass a progress
function in the options
parameter.
#define PI 3.1415926538 | |
uniform float time; | |
varying vec2 vUv; | |
float map(float value, float inMin, float inMax, float outMin, float outMax) { | |
return outMin + (outMax - outMin) * (value - inMin) / (inMax - inMin); | |
} | |
// https://iquilezles.org/www/articles/distgradfunctions2d/distgradfunctions2d.htm |
const matcapTexture = new THREE.TextureLoader().load(matcap); | |
const material = new THREE.MeshMatcapMaterial({ | |
color: 0xFFFFFF, | |
matcap: matcapTexture | |
}); | |
const uniforms = { | |
uTime: { value: 0 } | |
}; |