Animation system mostly done
This commit is contained in:
@@ -174,7 +174,7 @@ export interface ClientRender {
|
||||
): void;
|
||||
// every entity of this type gets an animator from create while the client has it, which poses its model's bones
|
||||
// each frame instead of the engine's head look and humanoid swing, like a model's setupAnim. only during setup,
|
||||
// and one per type. see ANIMATION.md
|
||||
// and one per type. see docs/modding/entities/index.md#animations
|
||||
register_entity_animator(type: Id, create: (entity: AnimatedEntity) => EntityAnimator): void;
|
||||
// a clip, from a bedrock animation file in animations/: animation.walker.walk in animations/walker.animation.json
|
||||
// is my_mod:walker/walk. throws when there isn't one, so a typo shows up at setup
|
||||
|
||||
+1
-1
@@ -68,7 +68,7 @@ export interface LoadedMod {
|
||||
spawns: { file: string; json: SpawnJson }[];
|
||||
entities: { file: string; json: EntityJson }[];
|
||||
entity_models: { file: string; json: EntityModelJson }[];
|
||||
// clips, see ANIMATION.md
|
||||
// clips, see ClipJson
|
||||
animations: { file: string; json: ClipJson }[];
|
||||
// its sounds.json, see docs/modding/resources/sounds.md
|
||||
sounds: { file: string; json: SoundJson }[];
|
||||
|
||||
+1
-1
@@ -595,7 +595,7 @@ const clip_channel = z.array(clip_keyframe).min(1).refine(
|
||||
);
|
||||
|
||||
// an entity model animation (one of those in animations/<name>.animation.json) with only what the engine uses, see
|
||||
// ANIMATION.md. values are as bedrock has them, mirrored on x from the engine's like models: rotation in degrees,
|
||||
// docs/modding/entities/index.md#clips. values are as bedrock has them, mirrored on x from the engine's like models: rotation in degrees,
|
||||
// added to a bone's own, position in pixels, and scale multiplying
|
||||
const clip_schema = z.object({
|
||||
id: z.string('must be a clip id like "my_mod:thing/walk"').regex(TAG_ID_PATTERN),
|
||||
|
||||
@@ -61,7 +61,7 @@ export interface ModData {
|
||||
spawns: SpawnJson[];
|
||||
entities: EntityJson[];
|
||||
entity_models: EntityModelJson[];
|
||||
// clips, see ANIMATION.md. missing from mods packed before there were any
|
||||
// clips, see ClipJson. missing from mods packed before there were any
|
||||
animations?: ClipJson[];
|
||||
// its sounds.json, see docs/modding/resources/sounds.md. the files are in the .cubi's sounds/
|
||||
sounds?: SoundJson[];
|
||||
|
||||
Reference in New Issue
Block a user