This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!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, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!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"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!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> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!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> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==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== |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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, | |
}); |