geomotion は何をしますか?
gcomotionは、JSON スペック(各キーフレームが図形のリスト)を手描き風のアニメーションに変換します。
同じ id を持つ図形はキーフレーム間でモーフィングし、線は常に「沸騰」するように(約12回/秒で再描画)動くため、結果はまるで手でトレースしたような印象を与えます。
サイト&スタジオ:https://hacimertgokhan.github.io/geomotion · リポジトリ:https://github.com/hacimertgokhan/geomotion
ワークフロー
- ルートを選択(利用可能なものを優先):
- MCPツール(
geomotion_guide、geomotion_get_preset、geomotion_render、geomotion_share_link):最初にgeomotion_guideを呼び出し、その後レンダリングします。 - CLI(Node 18以上、ネットワーク接続必須):
npx -y github:hacimertgokhan/geomotion render spec.json --both --formats svg,lottie,html - ツールなし:スペックを作成し、
python scripts/link.py spec.json(このスキルフォルダ内)を実行すると、ユーザーが開いて編集・エクスポートできるプレイヤー/スタジオリンクが生成されます。
- MCPツール(
- 近いプリセットから開始(以下のカタログを参照)、id、位置、色を調整します。
- 以下のルールに従ってスペックを記述します。バリデーションを行います(MCPでは
geomotion_validate、CLIではgeomotion check spec.json)。 - 納品:ファイルパスまたはプレイヤーリンクを提示します。ユーザーが調整できるようにスタジオリンクも記載します。アニメーションがウェブサイト上に配置される場合は、透過バージョン(
transparent: trueまたは"both")を提案します。
スペックの基本
{
"name": "idea",
"size": [1200, 1200],
"fps": 24, "boil": 12, "loop": true,
"background": "ivory",
"hold": 0.7, "duration": 0.9, "ease": "inOutCubic",
"style": { "width": 24, "wobble": 1, "misregister": [-14, 10] },
"keyframes": [
{ "shapes": [ { "id": "bulb", "type": "circle", "cx": 600, "cy": 520, "r": 220, "fill": "oat" } ] },
{ "hold": 1.2, "shapes": [
{ "id": "bulb", "type": "circle", "cx": 600, "cy": 520, "r": 240, "fill": "sun" },
{ "id": "ray", "type": "line", "from": [600, 200], "to": [600, 110], "enter": "draw", "delay": 0.3 }
] }
]
}
- キーフレーム:
hold(表示秒数)、duration(次のキーフレームへのモーフ時間)、ease。 - 図形タイプ:
circle {cx,cy,r}、ellipse {cx,cy,rx,ry}、rect {x,y,w,h,radius?}または{cx,cy,w,h}、line {from,to}、polyline {points,closed?}、polygon {points}、regular {cx,cy,r,sides}、triangle {cx,cy,r}、star {cx,cy,r,inner?,points?}、heart {cx,cy,size}、blob {cx,cy,r,seed?}、crescent {cx,cy,r,thickness?,angle?}、wave {from,to,amplitude?,waves?,phase?}、spiral {cx,cy,r,turns?}、arc {cx,cy,r,start,end}(度単位、0=右、時計回り)、path {d}(任意のSVGパス)。 - 図形オプション:
id(キーフレーム間で一致させる — 常に設定)、fill、stroke(色またはfalse)、width、opacity、enter/exit(grow|pop|draw|fade|cut)、delay(0〜0.95、連続)、ease、transform {translate, rotate, scale, origin}、misregister: false(小さな塗りつぶしドット用)。 - パレット名:ink、slate、ivory、paper、oat、kraft、clay、coral、fig、sky、cactus、olive、heather、sun、white(または任意の16進数カラーコード)。
- イージング:linear、in/out/inOut Quad·Cubic·Sine、inOutQuart、outExpo、inOutExpo、outBack、inOutBack、outElastic、outBounce。
見栄えを良くするデザインルール
- 1200×1200のキャンバス、約120pxのマージン、ポーズごとに2〜5個の太い図形。細かいディテールは読みづらくなります。
- すべての輪郭にインク色、ポーズごとに1つまたは2つのアクセント塗りつぶし(oat、clay、sun、sky、cactus、coral)。
- idを使ってストーリーを語る:同じ要素が変形する(sun → moon、envelope → paper plane、dot → heart)。
delayを 0 / 0.15 / 0.3 でずらし、線には"enter": "draw"(書いているように感じさせる)、遊び心のある登場には"pop"を使用。- ホールドは0.5〜1.2秒、モーフは0.5〜1.2秒。
inOutCubicは落ち着いた印象、inOutBack/outBackは遊び心、outElasticはゼリーのような動き。 - 2つのキーフレーム間で30°を超える回転は線が角を落とす原因になります — 大きな回転は複数のキーフレームに分割します(
spinner、gears、orbitプリセットを参照)。 - 塗りつぶしドット(目、タイピングドット):
"stroke": false, "fill": "ink", "misregister": false。
プリセットカタログ(開始点)
- インターフェース:loader、spinner、success、error、toggle、bell、search
- 自然:sunrise、sprout、rain、night、sea
- コミュニケーション:chat、send、like、connect
- アイデア:idea、growth、target、gears、house
- キャラクター:smile、ghost、sparkle
- 抽象:drift、orbit、kaleido、pebbles
- モーション:bounce、pendulum、jelly
任意のプリセットは直接開けます:https://hacimertgokhan.github.io/geomotion/play/#preset=<name>
(透過背景の場合は &bg=0 を追加)またはスタジオ:/studio/#preset=<name>。
Webサイトへの埋め込み
<script type="module" src="https://hacimertgokhan.github.io/geomotion/src/embed.js"></script>
<geo-motion preset="success" transparent style="width:160px"></geo-motion>
<geo-motion code="z…"></geo-motion> <!-- 共有リンクの #s=… の部分 -->