@kubohiroya/turbowarp-bubble 0.1.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/LICENSE +8 -0
- package/README.md +293 -0
- package/THIRD_PARTY_NOTICES.md +123 -0
- package/dist/composition.js +4317 -0
- package/dist/extension-manifest.json +245 -0
- package/dist/turbowarp-adapter.js +3977 -0
- package/dist/turbowarp-bubble.js +7887 -0
- package/dist/types/actor-transform.d.ts +36 -0
- package/dist/types/bubble-svg.d.ts +36 -0
- package/dist/types/composition.d.ts +121 -0
- package/dist/types/placement.d.ts +24 -0
- package/dist/types/text-layout.d.ts +42 -0
- package/dist/types/turbowarp-adapter.d.ts +69 -0
- package/docs/.nojekyll +1 -0
- package/docs/assets/actor-transform-guide.svg +68 -0
- package/docs/assets/animation-mode-guide.svg +126 -0
- package/docs/assets/block-quick-start.svg +230 -0
- package/docs/assets/bubble-lifecycle.gif +0 -0
- package/docs/assets/bubble-style-gallery.svg +138 -0
- package/docs/assets/placement-guide.svg +292 -0
- package/docs/assets/width-linebreak-guide.svg +99 -0
- package/docs/block-manual.ja.md +292 -0
- package/docs/block-manual.md +292 -0
- package/docs/index.html +486 -0
- package/docs/ja/index.html +486 -0
- package/package.json +104 -0
|
@@ -0,0 +1,486 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="ja">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
6
|
+
<meta name="description" content="TurboWarp Bubble機能拡張のブロック利用マニュアル。吹き出し形状、配置、表情、目パチ、口パク、入力待ちアイコンを図解します。">
|
|
7
|
+
<title>TurboWarp Bubble ブロック利用マニュアル</title>
|
|
8
|
+
<style>
|
|
9
|
+
:root { color-scheme: light dark; --ink: #25283a; --muted: #667085; --accent: #d94b68; --accent-strong: #b83255; --accent-soft: #fff0f4; --line: #d9deea; --panel: #fff; --page: #f2f4f8; --code: #25283a; }
|
|
10
|
+
@media (prefers-color-scheme: dark) { :root { --ink: #f7edf1; --muted: #c8bcc2; --accent: #ff8ca3; --accent-strong: #ffb2c1; --accent-soft: #48252f; --line: #50434a; --panel: #211c20; --page: #151215; --code: #100d10; } }
|
|
11
|
+
* { box-sizing: border-box; }
|
|
12
|
+
html { scroll-behavior: smooth; scroll-padding-top: 6rem; }
|
|
13
|
+
body { margin: 0; color: var(--ink); background: radial-gradient(circle at 12% 0%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 28rem), var(--page); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans", "Noto Sans JP", sans-serif; line-height: 1.75; }
|
|
14
|
+
a { color: var(--accent-strong); text-underline-offset: .18em; }
|
|
15
|
+
a:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: .2rem; }
|
|
16
|
+
.skip-link { position: absolute; top: -5rem; left: 1rem; z-index: 20; padding: .65rem .9rem; color: var(--ink); background: var(--panel); border-radius: .5rem; }
|
|
17
|
+
.skip-link:focus { top: 1rem; }
|
|
18
|
+
.site-header { position: sticky; top: 0; z-index: 10; border-bottom: 1px solid color-mix(in srgb, var(--line) 80%, transparent); background: color-mix(in srgb, var(--page) 86%, transparent); backdrop-filter: blur(16px); box-shadow: 0 2px 10px #25283a14; }
|
|
19
|
+
.header-inner { display: flex; width: min(70rem, calc(100% - 2rem)); min-height: 4.25rem; margin-inline: auto; align-items: center; gap: 1rem; }
|
|
20
|
+
.brand { display: inline-flex; align-items: center; gap: .65rem; color: var(--ink); font-weight: 800; text-decoration: none; white-space: nowrap; }
|
|
21
|
+
.brand-mark { display: grid; width: 2rem; height: 2rem; place-items: center; color: #fff; background: linear-gradient(145deg, #ff6680, #b83255); border-radius: .7rem .7rem .7rem .25rem; box-shadow: 0 7px 18px #b8325559; }
|
|
22
|
+
.primary-nav { display: flex; align-items: center; gap: 1rem; margin-left: auto; font-size: .9rem; }
|
|
23
|
+
.primary-nav a, .github-link { color: var(--muted); text-decoration: none; }
|
|
24
|
+
.primary-nav a:hover, .github-link:hover { color: var(--ink); }
|
|
25
|
+
.github-link { padding: .38rem .55rem; border-radius: .6rem; font-size: .84rem; font-weight: 750; }
|
|
26
|
+
.language-switch { display: inline-flex; flex: 0 0 auto; padding: .2rem; border: 1px solid var(--line); border-radius: 99rem; background: var(--panel); white-space: nowrap; }
|
|
27
|
+
.language-switch a { padding: .26rem .58rem; border-radius: 99rem; color: var(--muted); font-size: .82rem; font-weight: 750; text-decoration: none; }
|
|
28
|
+
.language-switch a[aria-current="page"] { color: var(--ink); background: var(--accent-soft); }
|
|
29
|
+
.manual { width: min(1080px, calc(100% - 2rem)); margin: 2rem auto 4rem; padding: clamp(1rem, 4vw, 3.5rem); background: var(--panel); border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 12px 36px #25283a12; }
|
|
30
|
+
h1, h2, h3 { line-height: 1.35; scroll-margin-top: 5rem; }
|
|
31
|
+
h1 { margin-top: 0; font-size: clamp(1.9rem, 4vw, 2.8rem); }
|
|
32
|
+
h2 { margin-top: 2.8rem; padding-bottom: .4rem; border-bottom: 2px solid var(--accent); font-size: clamp(1.45rem, 3vw, 2rem); }
|
|
33
|
+
h3 { margin-top: 2rem; font-size: 1.25rem; }
|
|
34
|
+
img { display: block; max-width: 100%; height: auto; margin: 1.5rem auto; border-radius: 12px; }
|
|
35
|
+
table { display: block; width: 100%; overflow-x: auto; border-collapse: collapse; margin: 1.2rem 0; }
|
|
36
|
+
th, td { padding: .65rem .8rem; border: 1px solid var(--line); text-align: left; vertical-align: top; }
|
|
37
|
+
th { background: var(--accent-soft); }
|
|
38
|
+
pre { overflow-x: auto; padding: 1rem 1.1rem; color: #f8fafc; background: var(--code); border-radius: 12px; line-height: 1.55; }
|
|
39
|
+
code { padding: .12em .35em; background: var(--accent-soft); border-radius: 5px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .92em; }
|
|
40
|
+
pre code { padding: 0; color: inherit; background: transparent; }
|
|
41
|
+
blockquote { margin-left: 0; padding: .25rem 1rem; color: var(--muted); border-left: 4px solid var(--accent); }
|
|
42
|
+
.site-footer { padding: 0 1rem 3rem; color: var(--muted); text-align: center; font-size: .9rem; }
|
|
43
|
+
@media (max-width: 850px) { .primary-nav { display: none; } .github-link { margin-left: auto; } }
|
|
44
|
+
@media (max-width: 620px) { .brand-text { display: none; } .header-inner { gap: .4rem; } .github-link { padding-inline: .3rem; } .language-switch a { padding-inline: .45rem; } .manual { width: 100%; margin-top: 0; border-width: 0; border-radius: 0; box-shadow: none; } }
|
|
45
|
+
@media print { .site-header, .skip-link { display: none; } body { background: #fff; } }
|
|
46
|
+
</style>
|
|
47
|
+
</head>
|
|
48
|
+
<body>
|
|
49
|
+
<a class="skip-link" href="#manual">マニュアル本文へ移動</a>
|
|
50
|
+
<header class="site-header">
|
|
51
|
+
<div class="header-inner">
|
|
52
|
+
<a class="brand" href="./" aria-label="Bubble日本語マニュアルの先頭">
|
|
53
|
+
<span class="brand-mark" aria-hidden="true">B</span>
|
|
54
|
+
<span class="brand-text">TurboWarp Bubble</span>
|
|
55
|
+
</a>
|
|
56
|
+
<nav class="primary-nav" aria-label="マニュアルの章">
|
|
57
|
+
<a href="#requirements">使い始める</a>
|
|
58
|
+
<a href="#bubble-style">スタイル</a>
|
|
59
|
+
<a href="#lifecycle">表示と待機</a>
|
|
60
|
+
<a href="#reference">ブロック一覧</a>
|
|
61
|
+
</nav>
|
|
62
|
+
<a class="github-link" href="https://github.com/kubohiroya/turbowarp-bubble">GitHub</a>
|
|
63
|
+
<nav class="language-switch" aria-label="言語">
|
|
64
|
+
<a href="../" lang="en" hreflang="en">English</a>
|
|
65
|
+
<a href="./" lang="ja" hreflang="ja" aria-current="page">日本語</a>
|
|
66
|
+
</nav>
|
|
67
|
+
</div>
|
|
68
|
+
</header>
|
|
69
|
+
<main id="manual" class="manual">
|
|
70
|
+
<h1>TurboWarp Bubble ブロック利用マニュアル</h1>
|
|
71
|
+
<p>このマニュアルでは、<code>turbowarp-bubble</code>をTurboWarpのカスタム拡張機能として使い、SVG本体、文字、キャラクター表情、目パチ、口パク、「次へ」アイコンを組み合わせたBubbleを表示します。</p>
|
|
72
|
+
<p><img src="../assets/block-quick-start.svg" alt="Next1とNext2を個別登録し、入力listenerを準備してBubble内蔵待機を使うブロック例"></p>
|
|
73
|
+
<h2 id="requirements">1. 必要な拡張機能</h2>
|
|
74
|
+
<p>入力待ちを含む完全な例では6つの拡張機能を使います。TurboWarpの拡張機能ライブラリからTemporary Variablesを追加し、残る5つのカスタム拡張機能は「サンドボックスなしで実行」を許可して読み込みます。Async InputとRuntime ExpressionはBubbleの待機ブロックより前に、Asset ManagerとSVG Textは最初のBubble表示より前に読み込みます。</p>
|
|
75
|
+
<table>
|
|
76
|
+
<thead>
|
|
77
|
+
<tr>
|
|
78
|
+
<th align="right">順番</th>
|
|
79
|
+
<th>拡張機能</th>
|
|
80
|
+
<th>読み込み先</th>
|
|
81
|
+
</tr>
|
|
82
|
+
</thead>
|
|
83
|
+
<tbody><tr>
|
|
84
|
+
<td align="right">1</td>
|
|
85
|
+
<td>Temporary Variables</td>
|
|
86
|
+
<td>TurboWarpの拡張機能ライブラリから追加</td>
|
|
87
|
+
</tr>
|
|
88
|
+
<tr>
|
|
89
|
+
<td align="right">2</td>
|
|
90
|
+
<td>Async Input 0.3.0</td>
|
|
91
|
+
<td><code>https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-async-input@0.3.0/dist/async-input.js</code></td>
|
|
92
|
+
</tr>
|
|
93
|
+
<tr>
|
|
94
|
+
<td align="right">3</td>
|
|
95
|
+
<td>Runtime Expression 0.3.0</td>
|
|
96
|
+
<td><code>https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-runtime-expression@0.3.0/dist/runtime-expression.js</code></td>
|
|
97
|
+
</tr>
|
|
98
|
+
<tr>
|
|
99
|
+
<td align="right">4</td>
|
|
100
|
+
<td>Asset Manager 0.7.0</td>
|
|
101
|
+
<td><code>https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-asset-manager@0.7.0/dist/asset-manager.js</code></td>
|
|
102
|
+
</tr>
|
|
103
|
+
<tr>
|
|
104
|
+
<td align="right">5</td>
|
|
105
|
+
<td>SVG Text 0.3.0</td>
|
|
106
|
+
<td><code>https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-svg-text@0.3.0/dist/svg-text.js</code></td>
|
|
107
|
+
</tr>
|
|
108
|
+
<tr>
|
|
109
|
+
<td align="right">6</td>
|
|
110
|
+
<td>Bubble 0.1.0</td>
|
|
111
|
+
<td>npm公開後は<code>https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-bubble@0.1.0/dist/turbowarp-bubble.js</code></td>
|
|
112
|
+
</tr>
|
|
113
|
+
</tbody></table>
|
|
114
|
+
<p>開発中のBubbleを試す場合は、このリポジトリの<code>dist/turbowarp-bubble.js</code>をローカルカスタム拡張機能として読み込みます。表示時にAsset ManagerかSVG Textが、待機開始時にAsync InputかRuntime Expressionが見つからなければ、Bubbleは明示的なエラーを返します。</p>
|
|
115
|
+
<p>参考:</p>
|
|
116
|
+
<ul>
|
|
117
|
+
<li><a href="https://kubohiroya.github.io/turbowarp-asset-manager/ja/">Asset Manager 日本語ガイド</a></li>
|
|
118
|
+
<li><a href="https://kubohiroya.github.io/turbowarp-async-input/ja/">Async Input 日本語ガイド</a></li>
|
|
119
|
+
<li><a href="https://kubohiroya.github.io/turbowarp-runtime-expression/ja/">Runtime Expression 日本語ガイド</a></li>
|
|
120
|
+
<li><a href="https://kubohiroya.github.io/turbowarp-svg-text/ja/">SVG Text 日本語ガイド</a></li>
|
|
121
|
+
</ul>
|
|
122
|
+
<h2 id="portrait">2. 表情画像を準備する</h2>
|
|
123
|
+
<p>例では<code>Assets</code>という素材用spriteに、次のcostumeを入れます。素材用spriteは画面上で非表示でも構いません。</p>
|
|
124
|
+
<table>
|
|
125
|
+
<thead>
|
|
126
|
+
<tr>
|
|
127
|
+
<th>costume</th>
|
|
128
|
+
<th>Asset Managerへ登録する名前</th>
|
|
129
|
+
<th>内容</th>
|
|
130
|
+
</tr>
|
|
131
|
+
</thead>
|
|
132
|
+
<tbody><tr>
|
|
133
|
+
<td><code>HeroFace</code></td>
|
|
134
|
+
<td><code>HeroFace</code></td>
|
|
135
|
+
<td>顔、髪、輪郭などのベース。動かす目と口は含めない</td>
|
|
136
|
+
</tr>
|
|
137
|
+
<tr>
|
|
138
|
+
<td><code>HeroEyesOpen</code></td>
|
|
139
|
+
<td><code>HeroEyesOpen</code></td>
|
|
140
|
+
<td>開いた目だけを描いた透明差分</td>
|
|
141
|
+
</tr>
|
|
142
|
+
<tr>
|
|
143
|
+
<td><code>HeroEyesClosed</code></td>
|
|
144
|
+
<td><code>HeroEyesClosed</code></td>
|
|
145
|
+
<td>閉じた目だけを描いた透明差分</td>
|
|
146
|
+
</tr>
|
|
147
|
+
<tr>
|
|
148
|
+
<td><code>HeroMouthClosed</code></td>
|
|
149
|
+
<td><code>HeroMouthClosed</code></td>
|
|
150
|
+
<td>閉じた口だけを描いた透明差分</td>
|
|
151
|
+
</tr>
|
|
152
|
+
<tr>
|
|
153
|
+
<td><code>HeroMouthOpen</code></td>
|
|
154
|
+
<td><code>HeroMouthOpen</code></td>
|
|
155
|
+
<td>開いた口だけを描いた透明差分</td>
|
|
156
|
+
</tr>
|
|
157
|
+
<tr>
|
|
158
|
+
<td><code>Next1</code></td>
|
|
159
|
+
<td><code>Next1</code></td>
|
|
160
|
+
<td>「次へ」アイコンの1枚目</td>
|
|
161
|
+
</tr>
|
|
162
|
+
<tr>
|
|
163
|
+
<td><code>Next2</code></td>
|
|
164
|
+
<td><code>Next2</code></td>
|
|
165
|
+
<td>「次へ」アイコンの2枚目</td>
|
|
166
|
+
</tr>
|
|
167
|
+
</tbody></table>
|
|
168
|
+
<p>ベース、目、口の画像は同じcanvasサイズと同じ中心位置で作ります。差分画像の背景は透明にしてください。位置やcanvasサイズが異なると、レイヤーを重ねたときに目や口がずれます。</p>
|
|
169
|
+
<p>Asset Managerのブロックで各costumeを登録します。</p>
|
|
170
|
+
<pre><code class="language-text">register resource [costume:Assets:HeroFace] as asset [HeroFace]
|
|
171
|
+
register resource [costume:Assets:HeroEyesOpen] as asset [HeroEyesOpen]
|
|
172
|
+
register resource [costume:Assets:HeroEyesClosed] as asset [HeroEyesClosed]
|
|
173
|
+
register resource [costume:Assets:HeroMouthClosed] as asset [HeroMouthClosed]
|
|
174
|
+
register resource [costume:Assets:HeroMouthOpen] as asset [HeroMouthOpen]
|
|
175
|
+
register resource [costume:Assets:Next1] as asset [Next1]
|
|
176
|
+
register resource [costume:Assets:Next2] as asset [Next2]
|
|
177
|
+
</code></pre>
|
|
178
|
+
<p>URL画像を使う場合は、<code>RESOURCE_ID</code>へHTTPS URLを指定します。Bubbleに設定できるのは、Asset Managerへ登録済みでMIME typeが<code>image/*</code>のアセットだけです。</p>
|
|
179
|
+
<h2 id="text-style">3. 文字styleを定義する</h2>
|
|
180
|
+
<p>SVG Textで、Bubbleの文字部分に使う名前付きstyleを定義します。</p>
|
|
181
|
+
<pre><code class="language-text">define text style [dialogue-text]
|
|
182
|
+
background [#fff4cc]
|
|
183
|
+
text [#332200]
|
|
184
|
+
font [Noto Sans JP]
|
|
185
|
+
size [100]
|
|
186
|
+
align [left]
|
|
187
|
+
bubble direction [up]
|
|
188
|
+
</code></pre>
|
|
189
|
+
<p>Bubbleは<code>dialogue-text</code>という名前を参照します。文字styleとBubble styleはruntime状態なので、通常は緑の旗が押されたときに毎回定義します。</p>
|
|
190
|
+
<p>SVG Text 0.3.xではblock contract上<code>bubble direction</code>入力が残っていますが、Bubbleが<code>setText</code>で生成する文字drawableの配置には使われません。Bubbleの配置は次節の<code>set bubble placement</code>で設定します。SVG Textからのdirection削除は、破壊的変更が可能な次版で行います。</p>
|
|
191
|
+
<h2 id="bubble-style">4. Bubble styleを定義する</h2>
|
|
192
|
+
<p>まず、Bubble style名とSVG Textのstyle名を関連付けます。</p>
|
|
193
|
+
<pre><code class="language-text">define bubble style [hero-dialogue] using text style [dialogue-text]
|
|
194
|
+
set bubble placement [up-right] for bubble style [hero-dialogue]
|
|
195
|
+
set bubble distance [12] for bubble style [hero-dialogue]
|
|
196
|
+
set bubble visual style [NORMAL] for bubble style [hero-dialogue]
|
|
197
|
+
set bubble tail length [18] for bubble style [hero-dialogue]
|
|
198
|
+
set bubble offset x [0] y [0] scale [100] % for bubble style [hero-dialogue]
|
|
199
|
+
</code></pre>
|
|
200
|
+
<h3>Actor相対と背景相対のplacement</h3>
|
|
201
|
+
<p><img src="../assets/placement-guide.svg" alt="Actor相対の16方向・角度指定と、背景相対の3配置を比較する図"></p>
|
|
202
|
+
<p>Actor相対の16方向は、各方向をActor、Bubble外形、tail、文字を含む独立したミニシーンで示しています。三角形tailの基部2点は実際の本体border上にあり、本体polygonとのJSClipper union後の単一pathを描くため、接合部に内部border線は残りません。</p>
|
|
203
|
+
<p>背景相対3図はStage外枠、安全領域、Bubble外形寸法、水平中央線、基準辺/中心を示します。外形はBubble側の共有<code>renderBubbleSvg</code>で生成しており、TurboWarp Editorで本体drawableを生成するrendererと同じです。</p>
|
|
204
|
+
<p>Actor相対では、Actor中心からBubble全体の中心へ向かう方向を指定します。menuには次の16正規方向があります。</p>
|
|
205
|
+
<pre><code class="language-text">up / up-up-right / up-right / right-up-right
|
|
206
|
+
right / right-down-right / down-right / down-down-right
|
|
207
|
+
down / down-down-left / down-left / left-down-left
|
|
208
|
+
left / left-up-left / up-left / up-up-left
|
|
209
|
+
</code></pre>
|
|
210
|
+
<p><code>north</code>、<code>north-northeast</code>、<code>northeast</code>などのcompass aliasも直接入力またはreporterから指定できます。数値はScratch方向と同じ0〜360度で、<code>0</code>は上、<code>90</code>は右、<code>180</code>は下、<code>270</code>は左、<code>360</code>は<code>0</code>へ正規化されます。任意角度は16方向へ丸めません。placementを設定しないstyleは<code>up-right</code>になります。</p>
|
|
211
|
+
<p>背景相対はActorから生える方向を持たず、Stage安全領域へ配置します。</p>
|
|
212
|
+
<table>
|
|
213
|
+
<thead>
|
|
214
|
+
<tr>
|
|
215
|
+
<th>placement</th>
|
|
216
|
+
<th>配置</th>
|
|
217
|
+
</tr>
|
|
218
|
+
</thead>
|
|
219
|
+
<tbody><tr>
|
|
220
|
+
<td><code>HEADER_LIKE</code></td>
|
|
221
|
+
<td>Stage安全領域上部、水平中央</td>
|
|
222
|
+
</tr>
|
|
223
|
+
<tr>
|
|
224
|
+
<td><code>CENTER</code></td>
|
|
225
|
+
<td>Stage安全領域の水平・垂直中央</td>
|
|
226
|
+
</tr>
|
|
227
|
+
<tr>
|
|
228
|
+
<td><code>FOOTER_LIKE</code></td>
|
|
229
|
+
<td>Stage安全領域下部、水平中央</td>
|
|
230
|
+
</tr>
|
|
231
|
+
</tbody></table>
|
|
232
|
+
<p>背景相対placementはActorの座標、bounds、可視性に依存しません。Stageから<code>say</code>/<code>think</code>を実行する場合も、この3値のいずれかを設定します。背景相対のBubble bodyにはActorを指すtailを描画しません。</p>
|
|
233
|
+
<h3>Actorとの距離、tail、本体の位置・拡大率</h3>
|
|
234
|
+
<p><img src="../assets/actor-transform-guide.svg" alt="Actor相対のdistance、tail length、offset、scaleを実際のBubble SVGで比較する図"></p>
|
|
235
|
+
<ul>
|
|
236
|
+
<li><code>distance</code>(既定<code>12</code>)はActor boundsからtail先端までの距離です。Actor boundsとは、描画済みActorをStage座標で囲むAABB(上下左右のbounding box)です。</li>
|
|
237
|
+
<li><code>tail length</code>(既定<code>18</code>)は通常位置におけるBubble borderからtail先端までの基準長です。</li>
|
|
238
|
+
<li><code>offset x/y/scale</code>(既定<code>[0, 0, 100]</code>)は、xが右正、yが上正、scaleが百分率です。<code>[10, -10, 120]</code>なら、本体を右10・下10へ補正し、120%にします。</li>
|
|
239
|
+
</ul>
|
|
240
|
+
<p>scaleは外形だけでなく、SVG Textの文字、表情ベース・目パチ・口パク、次へアイコン、内部余白へ一体で適用されるため、表示上のフォントサイズも同じ比率で変わります。scaleだけを変更すると、本体中心を拡大半径分だけActorから離してActor側の間隔を維持します。x/y offsetはその後に加算し、tail先端を固定したまま本体borderとのunionを再生成するため、offset後のtail実長は基準値から変化します。</p>
|
|
241
|
+
<p>Stage端では、拡大後のBubble全体を画面内へ収めるクランプが優先されるため、指定距離を保てない場合があります。背景相対の<code>HEADER_LIKE</code>/<code>CENTER</code>/<code>FOOTER_LIKE</code>では、これらのActor相対設定を使用しません。</p>
|
|
242
|
+
<h3>幅・自動改行・禁則処理</h3>
|
|
243
|
+
<p><img src="../assets/width-linebreak-guide.svg" alt="maxWidthの違いによる自動改行と、日本語禁則処理の例"></p>
|
|
244
|
+
<p>図の改行結果はproductionの<code>wrapText</code>を直接実行して生成しています。<code>@cto.af/linebreak</code>がUnicode UAX #14の改行候補を返し、<code>Intl.Segmenter</code>の書記素境界で絞り込んだ後、実測幅の上限に収まる最後の候補を選びます。句読点、閉じ括弧、小書き仮名、長音、結合emojiの途中で不自然に分割しません。</p>
|
|
245
|
+
<h3>Bubble visual styleの形状例</h3>
|
|
246
|
+
<p><img src="../assets/bubble-style-gallery.svg" alt="10種類のBubble visual styleを同じSVG rendererで比較する図"></p>
|
|
247
|
+
<p>形状候補は<code>NORMAL</code>、<code>THINKING</code>、<code>DREAMING</code>、<code>YELLING</code>、<code>OFF_PANEL</code>、<code>WAVY</code>、<code>WHISPERING</code>、<code>ANNOUNCEMENT</code>、<code>NARRATION</code>、<code>NO_BUBBLE</code>です。次のblockでBubble styleごとに選択します。</p>
|
|
248
|
+
<pre><code class="language-text">set bubble visual style [YELLING] for bubble style [hero-dialogue]
|
|
249
|
+
</code></pre>
|
|
250
|
+
<p>図とTurboWarp Editorの本体drawableはBubble側の共有<code>renderBubbleSvg</code>から生成しています。三角形tailを持つ形状は<a href="https://github.com/platener/jsclipper">platener/jsclipper</a>による本体との和集合です。<code>THINKING</code>/<code>DREAMING</code>は丸trailのためunion対象外です。Actor相対ではActorを向くtailを生成し、背景相対ではtailを付けません。<code>NO_BUBBLE</code>では本体drawableを非表示にして文字・表情などだけを表示します。</p>
|
|
251
|
+
<p>visual styleを省略した場合は<code>NORMAL</code>です。本体drawableは文字・portraitより先に生成して背面へ置きます。<code>close this bubble</code>、対象sprite/cloneの停止、runtime破棄時には、本体drawableとBubbleが所有するSVG skinも解放します。</p>
|
|
252
|
+
<p><code>NEGATIVE</code>はfill colorとborder colorで表現できるため独立styleにはしません。orientationとsegmentsも公開入力にせず、幅、フォント、文字数、禁則処理後の行数から外形寸法を自動計算する方針です。</p>
|
|
253
|
+
<p>続けて、表情レイヤーと入力待ちアイコンを設定します。</p>
|
|
254
|
+
<pre><code class="language-text">set portrait base [HeroFace] for bubble style [hero-dialogue]
|
|
255
|
+
|
|
256
|
+
set blink frames [HeroEyesOpen,HeroEyesClosed]
|
|
257
|
+
every [0.4] seconds for bubble style [hero-dialogue]
|
|
258
|
+
|
|
259
|
+
set talk frames [HeroMouthClosed,HeroMouthOpen]
|
|
260
|
+
every [0.1] seconds for bubble style [hero-dialogue]
|
|
261
|
+
|
|
262
|
+
set advance frames [Next1,Next2]
|
|
263
|
+
every [0.2] seconds for bubble style [hero-dialogue]
|
|
264
|
+
</code></pre>
|
|
265
|
+
<p><code>ASSETS</code>はカンマ区切りのAsset Managerアセット名です。名前の前後の空白は除去されます。アセット名自体にカンマは使用できません。</p>
|
|
266
|
+
<ul>
|
|
267
|
+
<li>目パチと口パクは1枚以上指定できます。1枚だけなら表示は固定されます。</li>
|
|
268
|
+
<li>「次へ」はループが分かるよう2枚以上必要です。</li>
|
|
269
|
+
<li><code>SECONDS</code>は0より大きい秒数です。</li>
|
|
270
|
+
<li><code>ASSETS</code>を空にすると、そのアニメーション設定を解除します。</li>
|
|
271
|
+
<li>表情ベースを空にするとportrait全体を解除します。</li>
|
|
272
|
+
</ul>
|
|
273
|
+
<h2 id="lifecycle">5. セリフを表示して入力を待つ</h2>
|
|
274
|
+
<p><code>say</code>または<code>think</code>はBubbleを表示するとすぐ次のブロックへ進み、初期animation modeは<code>talking</code>になります。</p>
|
|
275
|
+
<pre><code class="language-text">set runtime variable [input] to []
|
|
276
|
+
listen for key [Space] set runtime var [input] to [pressed]
|
|
277
|
+
listen for touch on this sprite set runtime var [input] to [pressed]
|
|
278
|
+
say [海へ出発!] with bubble style [hero-dialogue]
|
|
279
|
+
wait with this bubble until condition [input == "pressed"] or timeout after [10] seconds
|
|
280
|
+
close this bubble
|
|
281
|
+
</code></pre>
|
|
282
|
+
<p>まずTemporary Variablesで<code>input</code>を初期化してから、Async Inputのキー入力とタップのlistenerを登録します。Bubbleの待機ブロックは、<code>input == "pressed"</code>をRuntime Expressionへ委譲し、開始直後とVMの各フレームで評価します。待機中は自動的に<code>awaiting-advance</code>となり、口パクを停止して<code>set advance frames</code>の画像をループします。条件成立またはtimeout後は<code>idle</code>へ移り、次の<code>close this bubble</code>へ進みます。timeoutを<code>0</code>にすると時間制限なしです。</p>
|
|
283
|
+
<p>次の待機に入る前に<code>input</code>を空文字へ戻してください。前回の<code>pressed</code>が残っていると、次の条件が直ちに成立します。別のBubble表示、close、対象targetの停止、projectの開始・停止、runtime破棄では、targetが所有する待機とlistener、timerをキャンセルして解放します。</p>
|
|
284
|
+
<p>音声再生や別の文字送り処理と組み合わせる場合は、それらが完了した時点で<code>awaiting-advance</code>へ切り替えます。</p>
|
|
285
|
+
<p><img src="../assets/bubble-lifecycle.gif" alt="sayで口パクし、awaiting-advanceでadvance framesを動かし、入力成立後にBubbleを閉じるアニメーション"></p>
|
|
286
|
+
<p>アニメーションGIFを再生できない環境では、次の比較図で各animation modeを確認できます。</p>
|
|
287
|
+
<p><img src="../assets/animation-mode-guide.svg" alt="talking、awaiting-advance、idleの目パチ、口パク、advance framesの状態比較"></p>
|
|
288
|
+
<h2 id="animation-modes">6. Animation modeの使い分け</h2>
|
|
289
|
+
<table>
|
|
290
|
+
<thead>
|
|
291
|
+
<tr>
|
|
292
|
+
<th>mode</th>
|
|
293
|
+
<th>目パチ</th>
|
|
294
|
+
<th>口パク</th>
|
|
295
|
+
<th>advance frames</th>
|
|
296
|
+
<th>主な用途</th>
|
|
297
|
+
</tr>
|
|
298
|
+
</thead>
|
|
299
|
+
<tbody><tr>
|
|
300
|
+
<td><code>talking</code></td>
|
|
301
|
+
<td>実行</td>
|
|
302
|
+
<td>実行</td>
|
|
303
|
+
<td>非表示</td>
|
|
304
|
+
<td>セリフ表示中、音声再生中</td>
|
|
305
|
+
</tr>
|
|
306
|
+
<tr>
|
|
307
|
+
<td><code>awaiting-advance</code></td>
|
|
308
|
+
<td>実行</td>
|
|
309
|
+
<td>停止・非表示</td>
|
|
310
|
+
<td>ループ</td>
|
|
311
|
+
<td>ユーザによる「次へ」操作待ち</td>
|
|
312
|
+
</tr>
|
|
313
|
+
<tr>
|
|
314
|
+
<td><code>idle</code></td>
|
|
315
|
+
<td>実行</td>
|
|
316
|
+
<td>停止・非表示</td>
|
|
317
|
+
<td>停止・非表示</td>
|
|
318
|
+
<td>Bubbleを表示したまま静止</td>
|
|
319
|
+
</tr>
|
|
320
|
+
</tbody></table>
|
|
321
|
+
<p><code>set this bubble animation mode [MODE]</code>は、呼び出したsprite、clone、またはStageが所有するBubbleだけを変更します。先に<code>say</code>または<code>think</code>を実行していない場合はエラーになります。</p>
|
|
322
|
+
<h2 id="say-think">7. sayとthink</h2>
|
|
323
|
+
<pre><code class="language-text">say [MESSAGE] with bubble style [STYLE]
|
|
324
|
+
think [MESSAGE] with bubble style [STYLE]
|
|
325
|
+
</code></pre>
|
|
326
|
+
<p>どちらも同じvisual style、表情レイヤー、placement、animation mode制御を使えます。<code>say</code>/<code>think</code>だけで形状を固定せず、<code>set bubble visual style</code>で<code>NORMAL</code>、<code>THINKING</code>などを明示的に選びます。Composition APIのsurfaceには<code>say</code>/<code>think</code>のkindも渡されるため、独自hostではkindに応じた追加表現も可能です。</p>
|
|
327
|
+
<p>同じsprite、clone、またはStageで新しい<code>say</code>/<code>think</code>を実行すると、以前のBubbleをtimerやdrawableごと破棄してから置き換えます。Stageでは背景相対placementだけを使用できます。</p>
|
|
328
|
+
<h2 id="clones">8. cloneで使う</h2>
|
|
329
|
+
<p>Bubble styleの定義は拡張機能内で共有されますが、表示中のBubbleはsprite/cloneごとに所有されます。</p>
|
|
330
|
+
<ol>
|
|
331
|
+
<li>元spriteで、緑の旗が押されたときにアセットとstyleを1回定義します。</li>
|
|
332
|
+
<li>各clone自身から<code>say</code>または<code>think</code>を実行します。</li>
|
|
333
|
+
<li>animation mode変更とcloseも、表示したのと同じcloneから実行します。</li>
|
|
334
|
+
</ol>
|
|
335
|
+
<p>cloneが停止・削除された場合は、そのtargetに属するtimer、SVG Text skin、drawableが自動解放されます。</p>
|
|
336
|
+
<h2 id="reference">9. ブロック一覧</h2>
|
|
337
|
+
<table>
|
|
338
|
+
<thead>
|
|
339
|
+
<tr>
|
|
340
|
+
<th>ブロック</th>
|
|
341
|
+
<th>説明</th>
|
|
342
|
+
</tr>
|
|
343
|
+
</thead>
|
|
344
|
+
<tbody><tr>
|
|
345
|
+
<td><code>define bubble style [STYLE] using text style [TEXT_STYLE]</code></td>
|
|
346
|
+
<td>Bubble styleを定義または再定義する</td>
|
|
347
|
+
</tr>
|
|
348
|
+
<tr>
|
|
349
|
+
<td><code>set bubble placement [PLACEMENT] for bubble style [STYLE]</code></td>
|
|
350
|
+
<td>Actor相対方向・角度、または背景相対領域を設定する</td>
|
|
351
|
+
</tr>
|
|
352
|
+
<tr>
|
|
353
|
+
<td><code>set bubble distance [DISTANCE] for bubble style [STYLE]</code></td>
|
|
354
|
+
<td>Actor boundsからtail先端までの距離を設定する</td>
|
|
355
|
+
</tr>
|
|
356
|
+
<tr>
|
|
357
|
+
<td><code>set bubble visual style [VISUAL_STYLE] for bubble style [STYLE]</code></td>
|
|
358
|
+
<td>Bubble本体のSVG形状を10種類から設定する</td>
|
|
359
|
+
</tr>
|
|
360
|
+
<tr>
|
|
361
|
+
<td><code>set bubble tail length [LENGTH] for bubble style [STYLE]</code></td>
|
|
362
|
+
<td>Bubble borderからtail先端までの基準長を設定する</td>
|
|
363
|
+
</tr>
|
|
364
|
+
<tr>
|
|
365
|
+
<td><code>set bubble offset x [X] y [Y] scale [SCALE] % for bubble style [STYLE]</code></td>
|
|
366
|
+
<td>本体位置と、文字を含む全体のscaleを設定する</td>
|
|
367
|
+
</tr>
|
|
368
|
+
<tr>
|
|
369
|
+
<td><code>set portrait base [ASSET] for bubble style [STYLE]</code></td>
|
|
370
|
+
<td>portraitのベース画像を設定する</td>
|
|
371
|
+
</tr>
|
|
372
|
+
<tr>
|
|
373
|
+
<td><code>set blink frames [ASSETS] every [SECONDS] seconds for bubble style [STYLE]</code></td>
|
|
374
|
+
<td>目パチ差分と間隔を設定する</td>
|
|
375
|
+
</tr>
|
|
376
|
+
<tr>
|
|
377
|
+
<td><code>set talk frames [ASSETS] every [SECONDS] seconds for bubble style [STYLE]</code></td>
|
|
378
|
+
<td>口パク差分と間隔を設定する</td>
|
|
379
|
+
</tr>
|
|
380
|
+
<tr>
|
|
381
|
+
<td><code>set advance frames [ASSETS] every [SECONDS] seconds for bubble style [STYLE]</code></td>
|
|
382
|
+
<td><code>awaiting-advance</code>中の「次へ」アニメーションを設定する</td>
|
|
383
|
+
</tr>
|
|
384
|
+
<tr>
|
|
385
|
+
<td><code>say [MESSAGE] with bubble style [STYLE]</code></td>
|
|
386
|
+
<td><code>talking</code> modeでsay表示を開始・置換する</td>
|
|
387
|
+
</tr>
|
|
388
|
+
<tr>
|
|
389
|
+
<td><code>think [MESSAGE] with bubble style [STYLE]</code></td>
|
|
390
|
+
<td><code>talking</code> modeでthink表示を開始・置換する</td>
|
|
391
|
+
</tr>
|
|
392
|
+
<tr>
|
|
393
|
+
<td><code>set this bubble animation mode [MODE]</code></td>
|
|
394
|
+
<td><code>talking</code>、<code>awaiting-advance</code>、<code>idle</code>からmodeを選ぶ</td>
|
|
395
|
+
</tr>
|
|
396
|
+
<tr>
|
|
397
|
+
<td><code>wait with this bubble until condition [CONDITION] or timeout after [TIMEOUT] seconds</code></td>
|
|
398
|
+
<td>Runtime Expressionの条件成立またはtimeoutまで待つ</td>
|
|
399
|
+
</tr>
|
|
400
|
+
<tr>
|
|
401
|
+
<td><code>close this bubble</code></td>
|
|
402
|
+
<td>自分のBubbleと所有resourceを解放する</td>
|
|
403
|
+
</tr>
|
|
404
|
+
<tr>
|
|
405
|
+
<td><code>Bubble version</code></td>
|
|
406
|
+
<td>Bubble実装versionを返す</td>
|
|
407
|
+
</tr>
|
|
408
|
+
</tbody></table>
|
|
409
|
+
<h2 id="troubleshooting">10. よくあるエラー</h2>
|
|
410
|
+
<table>
|
|
411
|
+
<thead>
|
|
412
|
+
<tr>
|
|
413
|
+
<th>状況</th>
|
|
414
|
+
<th>原因と対処</th>
|
|
415
|
+
</tr>
|
|
416
|
+
</thead>
|
|
417
|
+
<tbody><tr>
|
|
418
|
+
<td>Asset Managerを要求するエラー</td>
|
|
419
|
+
<td>Asset Manager 0.7.xをサンドボックスなしで読み込む</td>
|
|
420
|
+
</tr>
|
|
421
|
+
<tr>
|
|
422
|
+
<td>SVG Textを要求するエラー</td>
|
|
423
|
+
<td>SVG Text 0.3.xをサンドボックスなしで読み込む</td>
|
|
424
|
+
</tr>
|
|
425
|
+
<tr>
|
|
426
|
+
<td>Async Inputを要求するエラー</td>
|
|
427
|
+
<td>Bubble待機より前にAsync Input 0.3.xをサンドボックスなしで読み込む</td>
|
|
428
|
+
</tr>
|
|
429
|
+
<tr>
|
|
430
|
+
<td>Runtime Expressionを要求するエラー</td>
|
|
431
|
+
<td>Bubble待機より前にRuntime Expression 0.3.xをサンドボックスなしで読み込む</td>
|
|
432
|
+
</tr>
|
|
433
|
+
<tr>
|
|
434
|
+
<td><code>bubble style is not defined</code></td>
|
|
435
|
+
<td><code>define bubble style</code>を先に実行する。緑の旗の再実行時も再定義する</td>
|
|
436
|
+
</tr>
|
|
437
|
+
<tr>
|
|
438
|
+
<td>image assetが未登録</td>
|
|
439
|
+
<td><code>register resource ... as asset ...</code>の完了後にBubbleを表示する</td>
|
|
440
|
+
</tr>
|
|
441
|
+
<tr>
|
|
442
|
+
<td>assetが画像ではない</td>
|
|
443
|
+
<td><code>MIME type of asset [NAME]</code>で<code>image/*</code>か確認する</td>
|
|
444
|
+
</tr>
|
|
445
|
+
<tr>
|
|
446
|
+
<td>advance framesが1枚</td>
|
|
447
|
+
<td>2枚以上にするか、空にしてadvance表示を解除する</td>
|
|
448
|
+
</tr>
|
|
449
|
+
<tr>
|
|
450
|
+
<td>frame intervalエラー</td>
|
|
451
|
+
<td><code>SECONDS</code>を0より大きい有限値にする</td>
|
|
452
|
+
</tr>
|
|
453
|
+
<tr>
|
|
454
|
+
<td>StageからActor相対表示した</td>
|
|
455
|
+
<td>placementを<code>HEADER_LIKE</code>、<code>CENTER</code>、<code>FOOTER_LIKE</code>にする</td>
|
|
456
|
+
</tr>
|
|
457
|
+
<tr>
|
|
458
|
+
<td>placementが不正</td>
|
|
459
|
+
<td>16方向、alias、0〜360度、背景相対3値のいずれかを指定する</td>
|
|
460
|
+
</tr>
|
|
461
|
+
<tr>
|
|
462
|
+
<td>目や口がずれる</td>
|
|
463
|
+
<td>ベースと全差分のcanvasサイズ、中心、透明領域を揃える</td>
|
|
464
|
+
</tr>
|
|
465
|
+
</tbody></table>
|
|
466
|
+
<h2 id="cleanup">11. 自動解放されるタイミング</h2>
|
|
467
|
+
<p>次の場合、Bubbleが所有するtimer、SVG Text skin、renderer drawableは自動的に解放されます。</p>
|
|
468
|
+
<ul>
|
|
469
|
+
<li><code>close this bubble</code></li>
|
|
470
|
+
<li>同じsprite/cloneで次の<code>say</code>または<code>think</code>を実行したとき</li>
|
|
471
|
+
<li>対象sprite/cloneが停止したとき</li>
|
|
472
|
+
<li>緑の旗によるproject開始</li>
|
|
473
|
+
<li>projectの全停止</li>
|
|
474
|
+
<li>TurboWarp runtimeの破棄</li>
|
|
475
|
+
</ul>
|
|
476
|
+
<p>Asset Managerへ登録したアセット自体はBubbleの所有物ではありません。不要になった登録画像をメモリから削除する場合は、Bubbleを閉じた後にAsset Managerの<code>delete asset [NAME] from memory</code>を使います。</p>
|
|
477
|
+
<h2 id="regeneration">12. マニュアル画像の再生成</h2>
|
|
478
|
+
<p>図とGIFはリポジトリ内のスクリプトから再生成できます。GIF生成にはImageMagickの<code>magick</code>コマンドが必要です。</p>
|
|
479
|
+
<pre><code class="language-sh">pnpm docs:render
|
|
480
|
+
pnpm docs:check
|
|
481
|
+
</code></pre>
|
|
482
|
+
<p><code>docs:check</code>は、SVGのviewBox、production renderer/wrapText由来marker、全visual style、GIFの寸法・16フレーム・ループ設定、マニュアルから画像と全16ブロックへの参照、およびPages用HTMLが最新であることを検証します。</p>
|
|
483
|
+
</main>
|
|
484
|
+
<footer class="site-footer">ソースコードはMPL-2.0で公開されています。</footer>
|
|
485
|
+
</body>
|
|
486
|
+
</html>
|
package/package.json
ADDED
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@kubohiroya/turbowarp-bubble",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Composable say and think bubbles with portrait layers and animated advance indicators for TurboWarp.",
|
|
5
|
+
"author": "Hiroya Kubo <hiroya@cuc.ac.jp>",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"license": "MPL-2.0",
|
|
8
|
+
"homepage": "https://github.com/kubohiroya/turbowarp-bubble#readme",
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "git+https://github.com/kubohiroya/turbowarp-bubble.git"
|
|
12
|
+
},
|
|
13
|
+
"bugs": {
|
|
14
|
+
"url": "https://github.com/kubohiroya/turbowarp-bubble/issues"
|
|
15
|
+
},
|
|
16
|
+
"exports": {
|
|
17
|
+
".": {
|
|
18
|
+
"types": "./dist/types/composition.d.ts",
|
|
19
|
+
"import": "./dist/composition.js"
|
|
20
|
+
},
|
|
21
|
+
"./composition": {
|
|
22
|
+
"types": "./dist/types/composition.d.ts",
|
|
23
|
+
"import": "./dist/composition.js"
|
|
24
|
+
},
|
|
25
|
+
"./turbowarp-adapter": {
|
|
26
|
+
"types": "./dist/types/turbowarp-adapter.d.ts",
|
|
27
|
+
"import": "./dist/turbowarp-adapter.js"
|
|
28
|
+
},
|
|
29
|
+
"./dist/turbowarp-bubble.js": "./dist/turbowarp-bubble.js",
|
|
30
|
+
"./package.json": "./package.json"
|
|
31
|
+
},
|
|
32
|
+
"files": [
|
|
33
|
+
"dist/",
|
|
34
|
+
"docs/",
|
|
35
|
+
"README.md",
|
|
36
|
+
"LICENSE",
|
|
37
|
+
"THIRD_PARTY_NOTICES.md"
|
|
38
|
+
],
|
|
39
|
+
"main": "./dist/composition.js",
|
|
40
|
+
"unpkg": "./dist/turbowarp-bubble.js",
|
|
41
|
+
"jsdelivr": "./dist/turbowarp-bubble.js",
|
|
42
|
+
"publishConfig": {
|
|
43
|
+
"access": "public",
|
|
44
|
+
"registry": "https://registry.npmjs.org/"
|
|
45
|
+
},
|
|
46
|
+
"packageManager": "pnpm@11.18.0",
|
|
47
|
+
"scripts": {
|
|
48
|
+
"typecheck": "tsc --noEmit",
|
|
49
|
+
"build": "pnpm build:extension && pnpm build:composition && pnpm build:turbowarp-adapter && pnpm build:types",
|
|
50
|
+
"build:extension": "vite build",
|
|
51
|
+
"build:composition": "vite build --config vite.composition.config.ts",
|
|
52
|
+
"build:turbowarp-adapter": "vite build --config vite.turbowarp-adapter.config.ts",
|
|
53
|
+
"build:types": "tsc --project tsconfig.build.json",
|
|
54
|
+
"types:composition:check": "tsc --project tsconfig.composition-consumer.json",
|
|
55
|
+
"lint": "eslint src tests scripts vite.config.ts vite.composition.config.ts vite.turbowarp-adapter.config.ts eslint.config.mjs",
|
|
56
|
+
"format": "prettier --check .",
|
|
57
|
+
"format:write": "prettier --write .",
|
|
58
|
+
"docs:render": "node scripts/render-block-manual-assets.mjs && pnpm docs:pages",
|
|
59
|
+
"docs:pages": "node scripts/render-pages.mjs",
|
|
60
|
+
"docs:pages:check": "node scripts/render-pages.mjs --check",
|
|
61
|
+
"docs:check": "node scripts/check-block-manual.mjs && pnpm docs:pages:check",
|
|
62
|
+
"test": "vitest run",
|
|
63
|
+
"check:dist": "pnpm build && node scripts/check-dist.mjs",
|
|
64
|
+
"pack:check": "npm pack --dry-run --ignore-scripts",
|
|
65
|
+
"release:check": "pnpm publish --dry-run --access public",
|
|
66
|
+
"check": "pnpm typecheck && pnpm lint && pnpm format && pnpm test && pnpm docs:check && pnpm check:dist && pnpm types:composition:check && pnpm pack:check",
|
|
67
|
+
"prepack": "pnpm check"
|
|
68
|
+
},
|
|
69
|
+
"peerDependencies": {
|
|
70
|
+
"@kubohiroya/turbowarp-async-input": ">=0.3.0 <1",
|
|
71
|
+
"@kubohiroya/turbowarp-asset-manager": ">=0.7.0 <1",
|
|
72
|
+
"@kubohiroya/turbowarp-runtime-expression": ">=0.3.0 <1",
|
|
73
|
+
"@kubohiroya/turbowarp-svg-text": ">=0.3.0 <1"
|
|
74
|
+
},
|
|
75
|
+
"devDependencies": {
|
|
76
|
+
"@eslint/js": "^10.0.1",
|
|
77
|
+
"@kubohiroya/turbowarp-async-input": "0.3.0",
|
|
78
|
+
"@kubohiroya/turbowarp-asset-manager": "0.7.0",
|
|
79
|
+
"@kubohiroya/turbowarp-runtime-expression": "0.3.0",
|
|
80
|
+
"@kubohiroya/turbowarp-svg-text": "0.3.0",
|
|
81
|
+
"@kubohiroya/vite-plugin-turbowarp-extension": "0.1.1",
|
|
82
|
+
"@types/node": "^26.1.2",
|
|
83
|
+
"eslint": "^10.8.0",
|
|
84
|
+
"marked": "18.0.9",
|
|
85
|
+
"prettier": "^3.9.6",
|
|
86
|
+
"typescript": "^6.0.3",
|
|
87
|
+
"typescript-eslint": "^8.66.0",
|
|
88
|
+
"vite": "^8.2.0",
|
|
89
|
+
"vitest": "^4.1.10"
|
|
90
|
+
},
|
|
91
|
+
"keywords": [
|
|
92
|
+
"turbowarp",
|
|
93
|
+
"scratch",
|
|
94
|
+
"extension",
|
|
95
|
+
"speech-bubble",
|
|
96
|
+
"portrait",
|
|
97
|
+
"lip-sync",
|
|
98
|
+
"advance-indicator"
|
|
99
|
+
],
|
|
100
|
+
"dependencies": {
|
|
101
|
+
"@cto.af/linebreak": "4.0.3",
|
|
102
|
+
"jsclipper": "github:platener/jsclipper#56aed19845113e1939d8971c47233054659436b1"
|
|
103
|
+
}
|
|
104
|
+
}
|