视觉画布设计
canvas-design
基于设计原则创作静态视觉作品,用于海报与品牌图形。
animate【文档与办公】Give a game's characters rigs and clips that move well on a phone — the skeleton standard (one humanoid vocabulary, a mini and a quadruped family), free CC0 animated characters from Homie's starter library made phone-sized (one draw call, helper bones gone) with their clips in one shared clip library per skeleton, the library's CC0 humanoid clips ret…
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Read the style skill first (decisions) and the models skill (where models come from). Characters follow the same
routes: the starter library (free, CC0), the person's own files, or generated on their own fal account under a
budget (models skill: character, about US$1.44, priced and asked first). Clips are free: they come from the
character itself or from the library's CC0 humanoid set, retargeted at build time.
Commands run in the studio: npx --no-install homie-studio cast|anim|assets … (in an app with Homie's tools:
cast_plan, anim_plan, anim_add, anim_preview, character_make, asset_add).
| Family | Bones (standard names) | Who | Clips from |
|---|---|---|---|
| humanoid | VRM 1.0 names: hips, spine, chest, upperChest, neck, head, leftUpperArm, leftLowerArm, leftHand, leftUpperLeg, leftLowerLeg, leftFoot, leftToes (and right) | KayKit adventurers and skeletons, Mixamo-named rigs, Meshy and Tripo auto-rigs, Blender and Unreal rigs | its own, else KayKit's CC0 set retargeted |
| mini | hips, spine, head, leftUpperArm, rightUpperArm, leftUpperLeg, rightUpperLeg (a limb in one piece) | Kenney mini, blocky and graveyard characters | its own, else humanoid clips retargeted (each limb aims where the source's whole limb points) |
| quadruped | body, neck, head, tail, frontLeftLeg, frontRightLeg, backLeftLeg, backRightLeg | Kenney cube pets | its own species only |
| parts | anything else that moves by its nodes | — | its own only |
Names are matched however a rig spells them (mixamorig:LeftArm, upperarm.l, thigh_l, LeftUpLeg), the spine
chain by the tree (Mixamo counts up, Meshy counts down). references/SKELETONS.md has every table.
npx --no-install homie-studio assets find "knight" --kind character # free, CC0, rigged or node-animated
npx --no-install homie-studio assets add <id> kaykit-adventurers/knight --as knight --height 1.45 \
--keep "1H_Sword,Round_Shield,Knight_Helmet,Knight_Cape" --verbs idle,run,jump,attack,hit,die
npx --no-install homie-studio assets add <id> --file rigged.glb --kind character --rigged --license own --as hero
What happens, all free, on this computer (lib/characters.mjs):
--keep: a sword, a shield, a hat: part swaps) merged into ONE
skinned mesh: one draw call; pictures resized (512 px), meshopt; the pivot at the feet, its height in metres;public/anims/<skeleton>.glb (the verbs the game needs, from its
anim.clips decision and --verbs), its own where it has them, else retargeted (--clips-from another source);assets/manifest.json with every clip's source and licence; the model names its clip library.Every character with the same skeleton shares one clip library (the adventurers share one, about 85 KB for twelve clips): shared clips are the biggest saving in a room of 32.
npx --no-install homie-studio anim plan <id> # each character's clips against the game's verbs
npx --no-install homie-studio anim add <id> knight --verbs block,dodge,cast # more verbs, retargeted, free
npx --no-install homie-studio anim preview <id> --asset knight # looping previews and a sheet; LOOK at the sheet
Verbs: idle, walk, run, jump, fall, land, attack, attack2, hit, die, emote, win, interact, pickup, cast, shoot, block, dodge, crouch, sit, drive, spawn. Clips are baked in place (the rules move bodies; the view draws their predicted or interpolated pose) at 30 fps; a loop's drift is removed. Look at the preview sheet after retargeting onto a new rig: a shoulder that flips or a foot through the floor shows there first.
import { createModels } from '@homie-rocks/studio/assets';
import { crowd, loadCharacter } from '@homie-rocks/studio/animate';
import { lab } from '@homie-rocks/studio/lab';
import tuning from '../tunables.json';
const T = lab.tunables(tuning); // the Motion group: sliders in the Game Lab
const hero = await loadCharacter(models, './models/knight.glb', { tune: T }); // finds ../anims/<skeleton>.glb itself
scene.add(hero.root);
// every frame, after the game moved the body:
hero.root.position.set(x, jumpHeight, z); hero.face(yaw, dt);
hero.move(groundSpeed); hero.air(onGround, verticalSpeed); hero.update(dt);
// events: hero.jump(); hero.act('attack', { from: 0.15 }); hero.hit(dx, dz); hero.die(); hero.hold('win');
crowd(allCharacters, camera); // far and off-screen ones pose less often
walkSpeed, runSpeed: tune them until the feet stop sliding). The defaults (1.5 and 4.2 m/s) are not measured
on your rig: anim plan and anim preview print the ground speed each character's walk and run cover on its own
rig (a guide from its foot bones); start tune: { runSpeed: <that> } from it, then look at the feet.hitStopMs).jumpStretch, landSquash, squashHz).lean), look-at (lookAt, head and neck within limits), springs on bones named tail, ear,
cape, hair (spring), and two-bone foot planting on slopes (ground: (x, z) => height).ANIM_TUNING (exported) into the game's tunables.json under the "Motion" group; every number is a slider.hero-rush-3d starter shows all of it (homie-studio game new <id> --from hero-rush-3d).In a rules game, use the pose from room.me or room.each, including heading,
grounded and vel.z. Rules use z up; three.js uses y up: map (x, y, z) to
(x, z, y). Feed hero.air(body.grounded, body.vel.z) and the planar speed to
hero.move. The runtime predicts jumps and eases corrections, and interpolates other
players' poses and facing. Do not integrate a second jump or gravity in animation.
Play hit and attack actions from room effects; keep animation time, particles and
camera shake in the view. Physics tuning belongs in the rules' public tunables.
A move feels right when its timing does. Give the move a take in lab.json (a stage that sets it up, the press that
starts it), report its phases (lab.phase('RISE')) and a number (lab.track('height', h)), then change its
tunables and run homie-studio lab check <id> --take <take>: New (the working tree) beside Today (the last commit),
frame by frame. In the app: the animation card's Feel opens game_lab on the take that plays that verb. The
person keeps a slider in the lab and it is written into tunables.json: a kept change is code. Read the lab skill.
The models skill's character command (or character_make): one A-pose concept in the locked style (a library
character as the style reference with --like), then Meshy 7.1 image-to-3D with its humanoid auto-rig on the
person's own fal account (about US$1.40; the concept about US$0.035), then everything above for free: the library's
clips retargeted onto its rig. Humanoids with clear limbs only; a creature comes from the library or is rigged by
hand. Look at the concept before paying for the mesh, and at the preview sheet after.
homie-studio assets check <id> holds characters to: a hero 8,000 triangles (5,000 in rooms over 8), 48 bones,
one draw call, 1,024 px pictures; an NPC or creature 3,000 and 32 bones; four influences a vertex (three.js reads no
more); a clip library 1 MB a skeleton (3 MB hard), 30 samples a second; and skinning a frame: the room's players
times the heaviest character, 60,000 skinned vertices and 1,200 bones on a phone, beyond which crowd() and lighter
characters are needed. The perf skill's measured run on a phone is the real gate.
references/RIGHTS.md)