Skip to content

Instantly share code, notes, and snippets.

Avatar
🤘

Guillaume Martigny GMartigny

🤘
View GitHub Profile
@GMartigny
GMartigny / walk-cycle.html
Created May 26, 2020
Walk cycle looping gif
View walk-cycle.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Walk cycle</title>
</head>
<body>
<script type="module">
import gif from "https://unpkg.com/@pencil.js/gif/dist/gif.esm.js";
import { OffScreenCanvas, Container, Spline, Particles, Triangle, Color,
@GMartigny
GMartigny / infinity.html
Created May 7, 2020
Infinity loader gif
View infinity.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Infinity</title>
</head>
<body>
<script type="module">
import gif from "https://unpkg.com/@pencil.js/gif/dist/gif.esm.js";
import { OffScreenCanvas, Square, Color } from "https://unpkg.com/pencil.js/dist/pencil.esm.js";
@GMartigny
GMartigny / chaos.html
Created Dec 8, 2019
Looping exploding dots
View chaos.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Chaos</title>
</head>
<body>
<script src="https://unpkg.com/pencil.js"></script>
<script src="https://unpkg.com/@pencil.js/gif"></script>
<script>
View equalizer.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Looping gifs</title>
</head>
<body>
<script src="https://unpkg.com/pencil.js"></script>
<script src="https://unpkg.com/@pencil.js/gif"></script>
<script src="https://unpkg.com/tumult/dist/tumult.min.js"></script>
@GMartigny
GMartigny / perfect-numbers.js
Last active Nov 21, 2018
Find perfect numbers
View perfect-numbers.js
/**
* Do the work
* @param {Object} parameters - Selected value on inputs
*/
function work (parameters) {
const limit = +parameters.limit;
/**
* Compute that weird jacobi thing
* from: http://2000clicks.com/mathhelp/NumberTh27JacobiSymbolAlgorithm.aspx
View better-offline.user.js
// ==UserScript==
// @name Upgrade dev.to offline drawing app
// @namespace http://tampermonkey.net/
// @version 1.2
// @description Slightly improuve the dev.to offline page.
// @author GMartigny
// @match https://dev.to/*
// @grant none
// ==/UserScript==
@GMartigny
GMartigny / animated-logo.js
Last active Mar 19, 2019
Pencil.js animated logo
View animated-logo.js
const P = Pencil;
const scene = new P.Scene();
const size = 200;
const mini = false;
const text = new P.Text([size * 0.4, size * 0.2], mini ? "P" : "Pencil.js", {
font: "//fonts.gstatic.com/s/courgette/v5/wEO_EBrAnc9BLjLQAUk1VvoK.woff2",
fontSize: size,
});