add mixbox for javascript

This commit is contained in:
Ondrej Jamriska
2022-09-21 05:05:21 +02:00
parent ee38da6176
commit 4bfc462204
18 changed files with 3057 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
<!DOCTYPE html>
<html>
<head>
<script src="https://cdn.jsdelivr.net/npm/p5@1.4.1/lib/p5.js"></script>
<script src="https://scrtwpns.com/mixbox.js"></script>
<script>
function setup() {
createCanvas(400, 400);
}
function draw() {
var color1 = color(0, 33, 133); // blue
var color2 = color(252, 211, 0); // yellow
var colorMix = mixbox.lerp(color1, color2, 0.5);
background(colorMix);
}
</script>
</head>
<body>
</body>
</html>