Skip to content

Instantly share code, notes, and snippets.

Avatar

Yuri Artiukh akella

View GitHub Profile
@akella
akella / fwdays._final.js
Last active Sep 23, 2020
fwdays_final.js
View fwdays._final.js
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>canvas{border: 1px solid red}</style>
</head>
<body>
<h1>Hello fwdayds!!!! ;-)</h1>
View fwdays1.js
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>canvas{border: 1px solid red}</style>
</head>
<body>
<h1>Hello fwdayds!!!! ;-)</h1>
View color.js
let colors = ["#fe4a48","#2ab7ca","#fed766","#e6e6ea","#f4f4f8"]
View perlin.js
/*
* A speed-improved perlin and simplex noise algorithms for 2D.
*
* Based on example code by Stefan Gustavson (stegu@itn.liu.se).
* Optimisations by Peter Eastman (peastman@drizzle.stanford.edu).
* Better rank ordering method by Stefan Gustavson in 2012.
* Converted to Javascript by Joseph Gentle.
*
* Version 2012-03-09
*
View gist:8323102f3c9963b01bb6d7b41c17eb82
did:3:bafyreibmpz77bkvq7qavacrivzrq36glz57fd5g3rs4qb2acj3k3qwznnq
View sprite.glsl
void main() {
vec2 uv1 = vUv;
float uTime = vColor*time*10.;
vec2 offset = vec2(
floor(mod(uTime, 5.)),
4. - mod(floor(uTime / 5.), 5.)
);
uv1 = uv1 / 5.;
uv1 += offset/5.;
View fps.sh
#!/bin/bash
# Script to start the Chrome Canary with V8 profiler flags
# Configuration
LOCATION="${1:-http://localhost:8080}"
LOG_DIRECTORY="${2:-logs}"
LOG_OUTPUT="${3:-logs/chrome_canary_output.log}"
LOG_ERROR="${4:-logs/chrome_canary_error.log}"
BASE_TEMP_PROFILE_DIR="${5:-/tmp}"
@akella
akella / setup.md
Last active Nov 30, 2020
My Setup
View setup.md
View 2020.js
class Line{
constructor(){
this.angle = Math.random()*2*Math.PI;
this.offset = Math.random();
this.start1 = 1200;
this.start2 = this.start1 + 500*Math.random();
}
draw(progress,context){
let pr = (1 - progress + this.offset)%1;
View basic.js
const canvasSketch = require("canvas-sketch");
const { fract, lerp, clamp, mapRange,clamp01,sign } = require('canvas-sketch-util/math');
const settings = {
// Enable an animation loop
animate: true,
// Set loop duration to 3 seconds
duration: 10,
// Use a small size for our GIF output
dimensions: [1080, 1920],
You can’t perform that action at this time.