next.js, nginx, reverse-proxy, ssl
$ sudo apt-get update
$ sudo apt-get install nginx letsencrypt
<html> | |
<head> | |
<title>Stripe Gradient</title> | |
</head> | |
<body> | |
<canvas id="gradient-canvas" data-js-darken-top data-transition-in> | |
<!-- | |
Remove data-js-darken-top to keep the same brightness in the upper part of the canvas | |
--> | |
</canvas> |
This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.
Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).
/* | |
* Copyright 2017 Google Inc. | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
// by davey whyte aka @beesandbombs | |
void setup(){ | |
size(600,520,P3D); | |
colorMode(HSB,1); | |
noStroke(); | |
} | |
float R = 160, r = 55; | |
int N = 720; |
<!doctype html> | |
<html><head><script src="app.js"></script></head><body></body></html> |
// by d whyte | |
int[][] result; | |
float t; | |
float ease(float p) { | |
return 3*p*p - 2*p*p*p; | |
} | |
float ease(float p, float g) { |
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);
var QcValueConverter = { | |
tensionFromQcValue: function(qcValue) { | |
return (qcValue - 30.0) * 3.62 + 194.0; | |
}, | |
qcValueFromTension: function(tension) { | |
return (tension - 194.0) / 3.62 + 30.0; | |
}, | |
frictionFromQcValue: function(qcValue) { |
exports.init = function (generator, config) { | |
var io = require('socket.io').listen(1234); // put your unique port here | |
io.sockets.on('connection', function (socket) { | |
socket.emit('message', 'i am ready'); | |
socket.on('doStuff', function (data) { | |
generator.getDocumentInfo().then(function (document) { | |
socket.emit('message', 'working with document…'); | |
}, function (err) { | |
console.log(err); |