mulmocast 2.4.8 → 2.5.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/assets/html/js/animation_runtime.js +371 -0
- package/assets/html/js/auto_render.js +64 -0
- package/assets/html/js/data_attribute_registration.js +178 -0
- package/assets/html/tailwind_animated.html +37 -256
- package/lib/actions/image_references.js +1 -1
- package/lib/methods/mulmo_beat.d.ts +2 -0
- package/lib/methods/mulmo_beat.js +5 -0
- package/lib/types/schema.d.ts +42 -0
- package/lib/types/schema.js +2 -0
- package/lib/utils/browser_pool.d.ts +5 -0
- package/lib/utils/browser_pool.js +39 -0
- package/lib/utils/context.d.ts +14 -0
- package/lib/utils/file.d.ts +1 -0
- package/lib/utils/file.js +4 -0
- package/lib/utils/html_render.d.ts +6 -0
- package/lib/utils/html_render.js +33 -0
- package/lib/utils/image_plugins/html_tailwind.js +22 -13
- package/package.json +10 -9
- package/scripts/test/images/qa_landscape.jpg +0 -0
- package/scripts/test/images/qa_portrait.png +0 -0
- package/scripts/test/test_animated.json +592 -0
- package/scripts/test/test_data_animation.json +149 -0
- package/scripts/test/test_html_cover_pan_zoom_landscape_canvas.json +245 -0
- package/scripts/test/test_html_cover_pan_zoom_portrait_canvas.json +207 -0
- package/scripts/test/test_reference_canvas_size.json +83 -0
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$mulmocast": { "version": "1.1" },
|
|
3
|
+
"lang": "ja",
|
|
4
|
+
"canvasSize": { "width": 1080, "height": 1920 },
|
|
5
|
+
"title": "imagePrompt per-image canvasSize test",
|
|
6
|
+
"speechParams": {
|
|
7
|
+
"provider": "kotodama",
|
|
8
|
+
"speakers": {
|
|
9
|
+
"Presenter": { "provider": "kotodama", "voiceId": "jikkyo_baby" }
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
"audioParams": {
|
|
13
|
+
"padding": 0,
|
|
14
|
+
"introPadding": 0,
|
|
15
|
+
"closingPadding": 0,
|
|
16
|
+
"outroPadding": 0
|
|
17
|
+
},
|
|
18
|
+
"imageParams": {
|
|
19
|
+
"provider": "google",
|
|
20
|
+
"model": "gemini-3.1-flash-image-preview",
|
|
21
|
+
"images": {
|
|
22
|
+
"bg_portrait": {
|
|
23
|
+
"type": "imagePrompt",
|
|
24
|
+
"prompt": "Beautiful Japanese garden with cherry blossoms and a stone lantern, photorealistic, bright daylight, high key lighting"
|
|
25
|
+
},
|
|
26
|
+
"bg_landscape": {
|
|
27
|
+
"type": "imagePrompt",
|
|
28
|
+
"prompt": "Beautiful Japanese garden with cherry blossoms and a stone lantern, photorealistic, bright daylight, high key lighting",
|
|
29
|
+
"canvasSize": { "width": 1920, "height": 1080 }
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
"beats": [
|
|
34
|
+
{
|
|
35
|
+
"id": "portrait_default",
|
|
36
|
+
"duration": 5,
|
|
37
|
+
"text": "デフォルトのcanvasSizeで生成した画像です。9:16のポートレート画像が生成されます。",
|
|
38
|
+
"speaker": "Presenter",
|
|
39
|
+
"image": {
|
|
40
|
+
"type": "html_tailwind",
|
|
41
|
+
"html": [
|
|
42
|
+
"<div class='h-full w-full overflow-hidden relative bg-black'>",
|
|
43
|
+
" <img id='photo_img' src='image:bg_portrait' style='position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);max-width:none;max-height:none' />",
|
|
44
|
+
" <div style='position:absolute;bottom:80px;left:40px;right:40px;text-align:center'>",
|
|
45
|
+
" <div style='display:inline-block;background:rgba(239,68,68,0.85);padding:12px 32px;border-radius:12px'>",
|
|
46
|
+
" <span style='color:white;font-size:48px;font-weight:900'>Default (9:16)</span>",
|
|
47
|
+
" </div>",
|
|
48
|
+
" </div>",
|
|
49
|
+
"</div>"
|
|
50
|
+
],
|
|
51
|
+
"script": [
|
|
52
|
+
"const animation = new MulmoAnimation();",
|
|
53
|
+
"animation.coverZoom('#photo_img', { zoomFrom: 1.0, zoomTo: 1.3, start: 0, end: 'auto', easing: 'linear' });"
|
|
54
|
+
],
|
|
55
|
+
"animation": true
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"id": "landscape_override",
|
|
60
|
+
"duration": 5,
|
|
61
|
+
"text": "canvasSizeをオーバーライドした画像です。16:9のランドスケープ画像が生成されます。パンアニメーションで横長がわかります。",
|
|
62
|
+
"speaker": "Presenter",
|
|
63
|
+
"image": {
|
|
64
|
+
"type": "html_tailwind",
|
|
65
|
+
"html": [
|
|
66
|
+
"<div class='h-full w-full overflow-hidden relative bg-black'>",
|
|
67
|
+
" <img id='photo_img' src='image:bg_landscape' style='position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);max-width:none;max-height:none' />",
|
|
68
|
+
" <div style='position:absolute;bottom:80px;left:40px;right:40px;text-align:center'>",
|
|
69
|
+
" <div style='display:inline-block;background:rgba(59,130,246,0.85);padding:12px 32px;border-radius:12px'>",
|
|
70
|
+
" <span style='color:white;font-size:48px;font-weight:900'>Override (16:9)</span>",
|
|
71
|
+
" </div>",
|
|
72
|
+
" </div>",
|
|
73
|
+
"</div>"
|
|
74
|
+
],
|
|
75
|
+
"script": [
|
|
76
|
+
"const animation = new MulmoAnimation();",
|
|
77
|
+
"animation.coverPan('#photo_img', { axis: 'x', direction: -1, distance: 100, zoom: 1.2, start: 0, end: 'auto', easing: 'linear' });"
|
|
78
|
+
],
|
|
79
|
+
"animation": true
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
]
|
|
83
|
+
}
|