@docyrus/animaguru 0.26.0 → 0.28.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +41 -3
- package/dist/animaguru.js +756 -467
- package/package.json +1 -1
- package/skills/animaguru/SKILL.md +13 -1
- package/skills/animaguru-3d-models/SKILL.md +86 -0
- package/skills/animaguru-character-stage-3d/SKILL.md +35 -0
- package/skills/animaguru-character-stage-3d/references/recipe.md +26 -0
- package/skills/animaguru-exploded-teardown-3d/SKILL.md +38 -0
- package/skills/animaguru-exploded-teardown-3d/references/recipe.md +20 -0
- package/skills/animaguru-product-turntable-3d/SKILL.md +38 -0
- package/skills/animaguru-product-turntable-3d/references/recipe.md +27 -0
- package/skills/animaguru-quiz/SKILL.md +1 -1
- package/skills/animaguru-toy-diorama-3d/SKILL.md +33 -0
- package/skills/animaguru-toy-diorama-3d/references/recipe.md +26 -0
- package/skills/animaguru-video/SKILL.md +5 -1
- package/templates/video/AGENTS.md +1 -1
- package/templates/video/README.md +5 -1
- package/templates/video/package.json +3 -1
- package/templates/video/scripts/install-example.mjs +10 -6
- package/templates/video/shared/locales/en/style-studies.json +35 -0
- package/templates/video/shared/locales/en/timeline.json +1 -0
- package/templates/video/src/kit/index.ts +1 -0
- package/templates/video/src/kit/three-stage.ts +262 -0
- package/templates/video/src/resource-timeline.ts +1 -0
- package/templates/video/src/studies/three/character-stage-3d.ts +172 -0
- package/templates/video/src/studies/three/exploded-teardown-3d.ts +214 -0
- package/templates/video/src/studies/three/index.ts +16 -0
- package/templates/video/src/studies/three/product-turntable-3d.ts +160 -0
- package/templates/video/src/studies/three/toy-diorama-3d.ts +245 -0
- package/templates/video/src/studies/three-film.ts +42 -0
- package/templates/video/src/style.css +2 -1
- package/templates/video/src/timeline-model.ts +1 -1
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { Container, type Application } from "pixi.js";
|
|
2
|
+
import copy from "../../shared/locales/en/style-studies.json";
|
|
3
|
+
import { collectTexts } from "../kit/film-base";
|
|
4
|
+
import type { ResourceTrack } from "../timeline-model";
|
|
5
|
+
import { STUDY_DURATION } from "./model";
|
|
6
|
+
import { THREE_STUDIES, type ThreeStudyId } from "./three";
|
|
7
|
+
|
|
8
|
+
/** 3D studies are designed at 1920×1080 and scaled to the film's size. */
|
|
9
|
+
export const THREE_STUDY_WIDTH = 1920;
|
|
10
|
+
export const THREE_STUDY_HEIGHT = 1080;
|
|
11
|
+
|
|
12
|
+
export function threeStudyChapters(id: ThreeStudyId) {
|
|
13
|
+
return [{ start: 0, end: STUDY_DURATION, label: copy.threeStyles[id].name, caption: copy.threeStyles[id].lines[0] }];
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/** A 3D style study: a three.js stage (kit/three-stage.ts) with Pixi text and leaders on top. Every frame is a function of seconds. */
|
|
17
|
+
export class ThreeStudyFilm {
|
|
18
|
+
captions = true;
|
|
19
|
+
readonly resources: ResourceTrack[];
|
|
20
|
+
private readonly root = new Container();
|
|
21
|
+
private readonly ready: Promise<(seconds: number) => void>;
|
|
22
|
+
|
|
23
|
+
constructor(private readonly app: Application, id: ThreeStudyId) {
|
|
24
|
+
app.stage.addChild(this.root);
|
|
25
|
+
this.root.scale.set(app.screen.width / THREE_STUDY_WIDTH, app.screen.height / THREE_STUDY_HEIGHT);
|
|
26
|
+
const study = copy.threeStyles[id];
|
|
27
|
+
this.resources = [
|
|
28
|
+
{ id: "scene", label: copy.resourceScene, kind: "model", clips: [{ id: "scene", label: study.name, start: 0, end: STUDY_DURATION }] },
|
|
29
|
+
{ id: "typography", label: copy.resourceText, kind: "text", clips: study.lines.map((label, i) => ({ id: `text-${i}`, label, start: 0, end: STUDY_DURATION })) },
|
|
30
|
+
];
|
|
31
|
+
this.ready = THREE_STUDIES[id]().then((build) => build(this.root, study.lines));
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
get texts() { return collectTexts(this.root); }
|
|
35
|
+
get cues() { return []; }
|
|
36
|
+
|
|
37
|
+
async render(seconds: number) {
|
|
38
|
+
const update = await this.ready;
|
|
39
|
+
update(Math.min(Math.max(seconds, 0), STUDY_DURATION - 1e-5));
|
|
40
|
+
this.app.render();
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -74,7 +74,7 @@ main { max-width: 1380px; margin: auto; padding: 45px 48px 15px; }
|
|
|
74
74
|
.resource-row { height: 39px; border-bottom: 1px solid #e6e8dc; }
|
|
75
75
|
.resource-label { position: sticky; left: 0; z-index: 4; display: flex; align-items: center; gap: 8px; min-width: 0; padding: 0 11px; background: #fbf9f3; border-right: 1px solid #d9dfcf; }
|
|
76
76
|
.resource-icon { color: #819372; display: flex; flex: none; }.resource-icon svg { width: 14px; height: 14px; }
|
|
77
|
-
.kind-text .resource-icon { color: #9a83b7; }.kind-captions .resource-icon { color: #ab914b; }.kind-audio .resource-icon { color: #438d7a; }.kind-video .resource-icon, .kind-image .resource-icon { color: #6388bd; }
|
|
77
|
+
.kind-text .resource-icon { color: #9a83b7; }.kind-captions .resource-icon { color: #ab914b; }.kind-audio .resource-icon { color: #438d7a; }.kind-video .resource-icon, .kind-image .resource-icon { color: #6388bd; }.kind-model .resource-icon { color: #b0703f; }
|
|
78
78
|
.resource-name { font-size: 10px; color: #596d52; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
|
79
79
|
.resource-state { margin-left: auto; font-size: 8px; color: #8b927e; }
|
|
80
80
|
.resource-lane { position: relative; background-image: linear-gradient(to right, #dfe4d480 1px, transparent 1px); background-size: var(--resource-grid-step, 100px) 100%; }
|
|
@@ -84,6 +84,7 @@ main { max-width: 1380px; margin: auto; padding: 45px 48px 15px; }
|
|
|
84
84
|
.kind-captions .resource-clip { background: #f4edcd; border-color: #e5d99f; color: #91792f; }
|
|
85
85
|
.kind-audio .resource-clip { background: #d5e9df; border-color: #aed2c0; color: #3d7b62; }
|
|
86
86
|
.kind-video .resource-clip, .kind-image .resource-clip { background: #dee8f4; border-color: #becfe8; color: #5b7fae; }
|
|
87
|
+
.kind-model .resource-clip { background: #f4e5d8; border-color: #e6cbb3; color: #9a6136; }
|
|
87
88
|
.resource-clip.active, .resource-clip:hover { opacity: 1; filter: saturate(1.12); }
|
|
88
89
|
.resource-clip.selected { border-color: #2c6bd0; box-shadow: inset 0 0 0 1px #2c6bd0; opacity: 1; }
|
|
89
90
|
.resource-clip:focus-visible { outline-offset: -2px; }
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type ResourceKind = "graphics" | "image" | "video" | "text" | "captions" | "audio";
|
|
1
|
+
export type ResourceKind = "graphics" | "image" | "video" | "text" | "captions" | "audio" | "model";
|
|
2
2
|
export type ResourceClip = { id: string; label: string; start: number; end: number; source?: string };
|
|
3
3
|
export type ResourceTrack = { id: string; label: string; kind: ResourceKind; clips: ResourceClip[] };
|
|
4
4
|
|