@idosgames/characters
v0.1.4
Published
Characters of the iDosGames platform in one standard for games and videos: voxel characters (CharacterSpec recipes on three.js), layered 2D characters on a skeleton with a full wardrobe (clothes, hair, weapons, shields) in vector art, and GLB characters o
Maintainers
Readme
@idosgames/characters
Characters of the iDosGames platform in one standard for games and videos.
| Subpath | What | Peers |
| ------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------- |
| @idosgames/characters | the actor contract (emotions, mouth visemes, poses, sockets, style families), lip-sync from text, language, seeded random | — |
| @idosgames/characters/voxel | voxel characters: CharacterSpec recipes (skeleton template, boxes on bones, palette, pixel faces), the model, animator, emotions, emotes, VoxelActor | three |
| @idosgames/characters/rig2d | layered 2D characters on a skeleton with the full wardrobe (clothes, hair, weapons, shields, helmets…) in vector art, the canvas renderer, AI recipes (parseRig2dRecipe) | — |
| @idosgames/characters/rig2d/three | the 2D character in a three.js scene (Rig2dView) | three |
| @idosgames/characters/rig2d/phaser | the 2D character on Phaser | phaser |
| @idosgames/characters/rig2d/editor | the 2D character editor | react, phaser |
| @idosgames/characters/gltf | GLB characters on the humanoid-v1 skeleton: loading, the contract check, the shared clip library, face shape keys | three |
Every actor takes the same commands — setEmotion, setViseme, a pose, a prop on a socket — and
moves only by update(dt), so a video stepped by its own clock renders the same frame every time.
import { layoutSpeech, visemeAt } from "@idosgames/characters";
import {
createCatalog,
heroRig,
HERO_ANIMATIONS,
} from "@idosgames/characters/rig2d";
import { Rig2dView } from "@idosgames/characters/rig2d/three";
const hero = new Rig2dView({ rig: heroRig, catalog: createCatalog(), seed: 7 });
scene.add(hero.root);
await hero.ready();
hero.play(HERO_ANIMATIONS.talk);
hero.setEmotion("happy");
const speech = layoutSpeech("Ты опять съел мой обед?", 2.1);
// each frame: hero.setViseme(visemeAt(speech.visemes, t)); hero.update(1 / 30);Why a package and not a module: it is a data format with its runtime that several catalog modules share (voxelcraft, idle-rpg, video-studio). A project extends it with data — its own recipes and part packs — never by copying its source. See the "Package or module" rule in the repository's CLAUDE.md.
