Skip to content

Instantly share code, notes, and snippets.

/*
{
"id": "cylinder-spray",
"label": "Cylinder Spray",
"icon": "❍",
"author": "Hiroyuki Sato"
}
*/
// @baku89: Added metadata so that the app can load.
/*
パスを延長 Copyright (c) koji sakai
https://gist.github.com/S4K4K0/62896e92287b40fded0d7f1614082d22
プレビュー部分やUIは以下のサンプルを元にしています
https://qiita.com/shspage/items/441ccf61394d9c504beb
* HOW TO USE
選択して実行するとスライダーが表示され、始端か終端のセグメントに対して指定した比率でBezier曲線のパラメータが延長されます
(サイズや長さがそのままk倍になるわけではありません)
@moluapple
moluapple / find visual center.jsx
Last active September 17, 2023 06:16
[Illustrator] 寻找不规则形状中心点(find visual center of an irregularly shaped polygon with Illustrator)
(function() {
var doc = app.activeDocument,
lays = doc.layers,
WORK_LAY = lays.add(),
NUM_LAY = lays.add(),
i = lays.length - 1,
lay;
// main working loop
for (; i > 1; i--) {
@banksean
banksean / perlin-noise-classical.js
Created February 15, 2010 10:00
two Perlin noise generators in javascript. The simplex version is about 10% faster (in Chrome at least, haven't tried other browsers)
// Ported from Stefan Gustavson's java implementation
// http://staffwww.itn.liu.se/~stegu/simplexnoise/simplexnoise.pdf
// Read Stefan's excellent paper for details on how this code works.
//
// Sean McCullough banksean@gmail.com
/**
* You can pass in a random number generator object if you like.
* It is assumed to have a random() method.
*/