Skip to content

Instantly share code, notes, and snippets.

Yuri Artiukh akella

Block or report user

Report or block akella

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View perlin.glsl
// Classic Perlin 3D Noise
// by Stefan Gustavson
//
vec4 permute(vec4 x){return mod(((x*34.0)+1.0)*x, 289.0);}
vec4 taylorInvSqrt(vec4 r){return 1.79284291400159 - 0.85373472095314 * r;}
vec3 fade(vec3 t) {return t*t*t*(t*(t*6.0-15.0)+10.0);}
float cnoise(vec3 P){
vec3 Pi0 = floor(P); // Integer part for indexing
vec3 Pi1 = Pi0 + vec3(1.0); // Integer part + 1
View canvas.js
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<body>
<canvas id="my" width="640" height="640"></canvas>
View sw.js
// 0)
if ('serviceWorker' in navigator) {
console.log('IT IS!');
window.addEventListener('load', () => {
navigator.serviceWorker.register('/sw.js').then(registration => {
console.log('SW registered: ', registration);
}).catch(registrationError => {
console.log('SW registration failed: ', registrationError);
});
View rotate.glsl
mat4 rotationMatrix(vec3 axis, float angle) {
axis = normalize(axis);
float s = sin(angle);
float c = cos(angle);
float oc = 1.0 - c;
return mat4(oc * axis.x * axis.x + c, oc * axis.x * axis.y - axis.z * s, oc * axis.z * axis.x + axis.y * s, 0.0,
oc * axis.x * axis.y + axis.z * s, oc * axis.y * axis.y + c, oc * axis.y * axis.z - axis.x * s, 0.0,
oc * axis.z * axis.x - axis.y * s, oc * axis.y * axis.z + axis.x * s, oc * axis.z * axis.z + c, 0.0,
View sketch.js
const canvasSketch = require('canvas-sketch');
const { lerp } = require('canvas-sketch-util/math');
const settings = {
dimensions: [ 2048, 2048 ]
};
let count = 10;
const createGrid = () => {
const points = [];
View flake.ks
let maxLevel = 2;
let branches = 2;
can.width = 500;
can.height = 500;
let angle = 0.3;
ctx.translate(can.width / 2, can.height / 2);
View warp.glsl
vec2 warp(vec2 pos, vec2 amplitude)
{
pos = pos * 2.0-1.0;
pos.x *= 1.0 - (pos.y*pos.y)*amplitude.x * 0.2;
pos.y *= 1.0 + (pos.x*pos.x)*amplitude.y;
return pos*0.5 + 0.5;
}
@akella
akella / urls.txt
Last active Oct 20, 2018
generative art lecture urls
View urls.txt
https://fex.net/378647528484
https://www.instagram.com/mattdesl_art/
https://www.instagram.com/zach.lieberman/
https://www.instagram.com/davebeesbombs/
https://www.instagram.com/quasimondo/
https://openprocessing.org
https://jaywrkr.mybluemix.net/
@akella
akella / start.html
Created Sep 23, 2018
Starting 2d canvas template
View start.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Canvas</title>
<style>*{margin:0;padding:0}</style>
</head>
<body>
<script>
let canv = document.createElement('canvas');
View gist:05fc2012b43761c5d7420a2ec167bea9
uniform float time;
uniform float progress;
uniform sampler2D texture1;
uniform sampler2D texture2;
uniform vec2 pixels;
uniform vec2 uvRate1;
uniform vec2 accel;
uniform vec2 mouse;
varying vec2 vUv;
You can’t perform that action at this time.