@kubohiroya/turbowarp-bubble 0.1.1 → 0.3.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 +355 -79
- package/dist/composition.js +972 -597
- package/dist/extension-manifest.json +240 -16
- package/dist/turbowarp-adapter.js +1728 -626
- package/dist/turbowarp-bubble.js +2811 -233
- package/dist/types/bubble-svg.d.ts +10 -0
- package/dist/types/composition.d.ts +96 -18
- package/dist/types/reveal.d.ts +26 -0
- package/dist/types/turbowarp-adapter.d.ts +12 -2
- package/docs/assets/animation-mode-guide.svg +5 -14
- package/docs/assets/block-quick-start.svg +8 -8
- package/docs/assets/bubble-lifecycle.gif +0 -0
- package/docs/block-manual.ja.md +88 -47
- package/docs/block-manual.md +95 -54
- package/docs/index.html +103 -39
- package/docs/ja/index.html +95 -31
- package/package.json +20 -7
package/docs/index.html
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<head>
|
|
4
4
|
<meta charset="utf-8">
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
6
|
-
<meta name="description" content="Block manual for TurboWarp Bubble, including shapes, placement, portraits, blinking, lip-sync, and the animated
|
|
6
|
+
<meta name="description" content="Block manual for TurboWarp Bubble, including shapes, placement, portraits, blinking, lip-sync, and the animated continue indicator.">
|
|
7
7
|
<title>TurboWarp Bubble Block Manual</title>
|
|
8
8
|
<style>
|
|
9
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; }
|
|
@@ -68,10 +68,10 @@
|
|
|
68
68
|
</header>
|
|
69
69
|
<main id="manual" class="manual">
|
|
70
70
|
<h1>TurboWarp Bubble Block Manual</h1>
|
|
71
|
-
<p>This manual explains how to use <code>turbowarp-bubble</code> as an unsandboxed TurboWarp custom extension. A Bubble combines an SVG body, text, a character portrait, blinking and lip-sync layers, and an animated
|
|
71
|
+
<p>This manual explains how to use <code>turbowarp-bubble</code> as an unsandboxed TurboWarp custom extension. A Bubble combines an SVG body, text, a character portrait, blinking and lip-sync layers, and an animated continue indicator.</p>
|
|
72
72
|
<p><img src="./assets/block-quick-start.svg" alt="A quick-start block sequence that registers Next1 and Next2 separately, prepares input listeners, then uses Bubble's integrated wait"></p>
|
|
73
73
|
<h2 id="requirements">1. Load the required extensions</h2>
|
|
74
|
-
<p>The complete input-wait example uses six extensions. Add Temporary Variables from TurboWarp's extension library, then load the
|
|
74
|
+
<p>The complete input-wait example uses six extensions. Add Temporary Variables from TurboWarp's extension library, then load the custom extensions needed by the selected features with <strong>Run without sandbox</strong> enabled. SVG Text and Bubble are required for text bubbles. Asset Manager is required for portrait, lip-sync, continue indicator, voice, and display-sound assets. Async Input and Runtime Expression are required only before using a Bubble wait.</p>
|
|
75
75
|
<table>
|
|
76
76
|
<thead>
|
|
77
77
|
<tr>
|
|
@@ -102,16 +102,16 @@
|
|
|
102
102
|
</tr>
|
|
103
103
|
<tr>
|
|
104
104
|
<td align="right">5</td>
|
|
105
|
-
<td>SVG Text 0.
|
|
106
|
-
<td><code>https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-svg-text@0.
|
|
105
|
+
<td>SVG Text 0.4.0</td>
|
|
106
|
+
<td><code>https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-svg-text@0.4.0/dist/svg-text.js</code></td>
|
|
107
107
|
</tr>
|
|
108
108
|
<tr>
|
|
109
109
|
<td align="right">6</td>
|
|
110
|
-
<td>Bubble 0.
|
|
111
|
-
<td>After npm publication: <code>https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-bubble@0.
|
|
110
|
+
<td>Bubble 0.3.0</td>
|
|
111
|
+
<td>After npm publication: <code>https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-bubble@0.3.0/dist/turbowarp-bubble.js</code></td>
|
|
112
112
|
</tr>
|
|
113
113
|
</tbody></table>
|
|
114
|
-
<p>To try a development build, load this repository's <code>dist/turbowarp-bubble.js</code> as a local custom extension. Bubble reports an explicit error if
|
|
114
|
+
<p>To try a development build, load this repository's <code>dist/turbowarp-bubble.js</code> as a local custom extension. Bubble reports an explicit error if SVG Text is missing when it displays a Bubble, if an image/media feature is used without Asset Manager, or if Async Input or Runtime Expression is missing when it starts a Bubble wait.</p>
|
|
115
115
|
<p>See also:</p>
|
|
116
116
|
<ul>
|
|
117
117
|
<li><a href="https://kubohiroya.github.io/turbowarp-asset-manager/">Asset Manager guide</a></li>
|
|
@@ -157,12 +157,12 @@
|
|
|
157
157
|
<tr>
|
|
158
158
|
<td><code>Next1</code></td>
|
|
159
159
|
<td><code>Next1</code></td>
|
|
160
|
-
<td>First frame of the
|
|
160
|
+
<td>First frame of the continue indicator</td>
|
|
161
161
|
</tr>
|
|
162
162
|
<tr>
|
|
163
163
|
<td><code>Next2</code></td>
|
|
164
164
|
<td><code>Next2</code></td>
|
|
165
|
-
<td>Second frame of the
|
|
165
|
+
<td>Second frame of the continue indicator</td>
|
|
166
166
|
</tr>
|
|
167
167
|
</tbody></table>
|
|
168
168
|
<p>Use the same canvas size and center point for the base, eye, and mouth images. Keep overlay backgrounds transparent; mismatched canvases or centers make the layers drift when composed.</p>
|
|
@@ -187,7 +187,7 @@ register resource [costume:Assets:Next2] as asset [Next2]
|
|
|
187
187
|
bubble direction [up]
|
|
188
188
|
</code></pre>
|
|
189
189
|
<p>Bubble refers to this style as <code>dialogue-text</code>. Text and Bubble styles are runtime state, so normally define them again whenever the green flag is clicked.</p>
|
|
190
|
-
<p>SVG Text 0.
|
|
190
|
+
<p>SVG Text 0.4.x is a text provider: it defines named text styles, creates SVG text skins, and measures text. Bubble placement is configured by <code>set bubble placement</code>; the SVG Text provider does not own Bubble direction, tail, or outer shape.</p>
|
|
191
191
|
<h2 id="bubble-style">4. Define a Bubble style</h2>
|
|
192
192
|
<p>First associate a Bubble style name with an SVG Text style name.</p>
|
|
193
193
|
<pre><code class="language-text">define bubble style [hero-dialogue] using text style [dialogue-text]
|
|
@@ -237,7 +237,7 @@ left / left-up-left / up-left / up-up-left
|
|
|
237
237
|
<li><code>tail length</code> (default <code>18</code>) is the nominal distance from the Bubble border to the tail tip at the normal position.</li>
|
|
238
238
|
<li><code>offset x/y/scale</code> (default <code>[0, 0, 100]</code>) uses positive x to the right, positive y upward, and scale as a percentage. <code>[10, -10, 120]</code> moves the body 10 right and 10 down, then scales it to 120%.</li>
|
|
239
239
|
</ul>
|
|
240
|
-
<p>Scale applies to the body, SVG Text, portrait base, blink/lip-sync layers,
|
|
240
|
+
<p>Scale applies to the body, SVG Text, portrait base, blink/lip-sync layers, continue indicator, and internal padding as one unit, so the displayed font size scales by the same factor. When scale alone changes, the body center moves away from the actor by the increase in radius, preserving the actor-side gap. The x/y offset is added afterward. The tail tip remains fixed and the union with the body border is regenerated, so an offset can change the effective tail length.</p>
|
|
241
241
|
<p>Near a Stage edge, keeping the scaled Bubble on-screen takes priority and can reduce the requested distance. Actor-relative distance, tail, offset, and scale settings do not apply to <code>HEADER_LIKE</code>, <code>CENTER</code>, or <code>FOOTER_LIKE</code>.</p>
|
|
242
242
|
<h3>Width, automatic wrapping, and Japanese line-breaking rules</h3>
|
|
243
243
|
<p><img src="./assets/width-linebreak-guide.svg" alt="Automatic wrapping at different maxWidth values and Japanese line-breaking examples"></p>
|
|
@@ -250,27 +250,37 @@ left / left-up-left / up-left / up-up-left
|
|
|
250
250
|
<p>The diagram and TurboWarp drawable both use Bubble's shared <code>renderBubbleSvg</code> function. Shapes with triangular tails use a <a href="https://github.com/platener/jsclipper">platener/jsclipper</a> union between the body and tail. <code>THINKING</code> and <code>DREAMING</code> use circular trails and are excluded from that union. Actor-relative placement points the tail toward the actor; stage-relative placement has no tail. <code>NO_BUBBLE</code> hides the body drawable and displays only text, portrait, and other layers.</p>
|
|
251
251
|
<p>The default visual style is <code>NORMAL</code>. The body drawable is created before text and portrait drawables so it remains behind them. <code>close this bubble</code>, target/clone disposal, and runtime disposal release the body drawable and its owned SVG skin.</p>
|
|
252
252
|
<p><code>NEGATIVE</code> is not a separate style because it can be expressed with fill and border colors. Orientation and segments are also not public inputs; dimensions are calculated from width, font, character count, and the number of lines after wrapping.</p>
|
|
253
|
-
<p>Now configure the portrait and
|
|
253
|
+
<p>Now configure the portrait and continue animation layers:</p>
|
|
254
254
|
<pre><code class="language-text">set portrait base [HeroFace] for bubble style [hero-dialogue]
|
|
255
255
|
|
|
256
256
|
set blink frames [HeroEyesOpen,HeroEyesClosed]
|
|
257
257
|
every [0.4] seconds for bubble style [hero-dialogue]
|
|
258
258
|
|
|
259
|
-
set
|
|
259
|
+
set lip-sync frames [HeroMouthClosed,HeroMouthOpen]
|
|
260
260
|
every [0.1] seconds for bubble style [hero-dialogue]
|
|
261
261
|
|
|
262
|
-
set
|
|
262
|
+
set continue frames [Next1,Next2]
|
|
263
263
|
every [0.2] seconds for bubble style [hero-dialogue]
|
|
264
264
|
</code></pre>
|
|
265
265
|
<p><code>ASSETS</code> is a comma-separated list of Asset Manager names. Surrounding whitespace is removed; commas cannot be part of an asset name.</p>
|
|
266
266
|
<ul>
|
|
267
|
-
<li>Blink and
|
|
268
|
-
<li>Use two or more
|
|
267
|
+
<li>Blink and lip-sync animations accept one or more frames. A single frame remains static.</li>
|
|
268
|
+
<li>Use two or more continue frames so the loop is visible.</li>
|
|
269
269
|
<li><code>SECONDS</code> must be a finite number greater than zero.</li>
|
|
270
270
|
<li>An empty <code>ASSETS</code> input removes that animation.</li>
|
|
271
271
|
<li>An empty portrait base removes the whole portrait.</li>
|
|
272
272
|
</ul>
|
|
273
|
-
<h2 id="lifecycle">5.
|
|
273
|
+
<h2 id="lifecycle">5. Sequential reveal, audio, and layout</h2>
|
|
274
|
+
<p>Bubble can reveal a message as <code>CHARACTER</code>, <code>WORD</code>, <code>LINE</code>, or <code>BLOCK</code> units. <code>WORD</code> does not perform morphological analysis; it uses whitespace or the configured delimiter character set. Delimiters can remain visible or be hidden.</p>
|
|
275
|
+
<pre><code class="language-text">set bubble reveal unit [CHARACTER] every [0.05] seconds layout [RESERVED] for bubble style [hero-dialogue]
|
|
276
|
+
set bubble word delimiters [ /] show [false] for bubble style [hero-dialogue]
|
|
277
|
+
set bubble reveal sound [Typewriter] for bubble style [hero-dialogue]
|
|
278
|
+
set bubble voice [HeroVoice] for bubble style [hero-dialogue]
|
|
279
|
+
say [Let's head for the sea!] with bubble style [hero-dialogue]
|
|
280
|
+
finish [CHARACTER] with condition [input == "pressed"] or timeout after [10] seconds
|
|
281
|
+
</code></pre>
|
|
282
|
+
<p><code>DYNAMIC</code> recalculates the Bubble size and placement after each unit. <code>RESERVED</code> measures the final text first and reserves that layout while units appear. <code>set bubble reveal sound</code> plays a named Asset Manager audio asset per unit, while <code>set bubble voice</code> plays full voice audio when the Bubble starts. Text display remains available without audio.</p>
|
|
283
|
+
<h2 id="animation-modes">6. Show dialogue and wait for input</h2>
|
|
274
284
|
<p><code>say</code> and <code>think</code> show a Bubble immediately, continue to the next block, and begin in <code>talking</code> animation mode.</p>
|
|
275
285
|
<pre><code class="language-text">set runtime variable [input] to []
|
|
276
286
|
listen for key [Space] set runtime var [input] to [pressed]
|
|
@@ -279,20 +289,20 @@ say [Let's head for the sea!] with bubble style [hero-dialogue]
|
|
|
279
289
|
wait with this bubble until condition [input == "pressed"] or timeout after [10] seconds
|
|
280
290
|
close this bubble
|
|
281
291
|
</code></pre>
|
|
282
|
-
<p>Initialize <code>input</code> with Temporary Variables before registering the Async Input listeners. The listeners update that runtime variable when Space is pressed or the sprite is tapped. The Bubble wait delegates <code>input == "pressed"</code> to Runtime Expression immediately and once per VM frame. While waiting it automatically enters <code>awaiting-
|
|
292
|
+
<p>Initialize <code>input</code> with Temporary Variables before registering the Async Input listeners. The listeners update that runtime variable when Space is pressed or the sprite is tapped. The Bubble wait delegates <code>input == "pressed"</code> to Runtime Expression immediately and once per VM frame. While waiting it automatically enters <code>awaiting-continue</code>, stops lip-sync, and loops the images configured by <code>set continue frames</code>. When the condition becomes true or the timeout expires, it enters <code>idle</code> and continues to <code>close this bubble</code>. Set the timeout to <code>0</code> to wait without a timeout.</p>
|
|
283
293
|
<p>Reset <code>input</code> to an empty string before each later wait; otherwise the previous <code>pressed</code> value makes the next condition succeed immediately. Starting another Bubble, closing it, stopping its target, restarting or stopping the project, and disposing the runtime all cancel the target-owned wait and release its listener and timer.</p>
|
|
284
|
-
<p>When combining Bubble with audio or a separate text-reveal system, switch to <code>awaiting-
|
|
285
|
-
<p><img src="./assets/bubble-lifecycle.gif" alt="A say Bubble lip-syncs, shows
|
|
294
|
+
<p>When combining Bubble with audio or a separate text-reveal system, switch to <code>awaiting-continue</code> when that process completes.</p>
|
|
295
|
+
<p><img src="./assets/bubble-lifecycle.gif" alt="A say Bubble lip-syncs, shows continue frames while awaiting continue, then closes after input"></p>
|
|
286
296
|
<p>If animated GIF playback is unavailable, use this static animation-mode comparison:</p>
|
|
287
|
-
<p><img src="./assets/animation-mode-guide.svg" alt="Blink, lip-sync, and
|
|
288
|
-
<h2 id="
|
|
297
|
+
<p><img src="./assets/animation-mode-guide.svg" alt="Blink, lip-sync, and continue-frame states in talking, awaiting-continue, and idle modes"></p>
|
|
298
|
+
<h2 id="say-think">7. Bubble animation modes</h2>
|
|
289
299
|
<table>
|
|
290
300
|
<thead>
|
|
291
301
|
<tr>
|
|
292
302
|
<th>Mode</th>
|
|
293
303
|
<th>Blink</th>
|
|
294
304
|
<th>Lip-sync</th>
|
|
295
|
-
<th>
|
|
305
|
+
<th>Continue frames</th>
|
|
296
306
|
<th>Typical use</th>
|
|
297
307
|
</tr>
|
|
298
308
|
</thead>
|
|
@@ -304,11 +314,11 @@ close this bubble
|
|
|
304
314
|
<td>Dialogue display or audio playback</td>
|
|
305
315
|
</tr>
|
|
306
316
|
<tr>
|
|
307
|
-
<td><code>awaiting-
|
|
317
|
+
<td><code>awaiting-continue</code></td>
|
|
308
318
|
<td>Runs</td>
|
|
309
319
|
<td>Stops/hidden</td>
|
|
310
320
|
<td>Loops</td>
|
|
311
|
-
<td>Await the user's request to
|
|
321
|
+
<td>Await the user's request to continue</td>
|
|
312
322
|
</tr>
|
|
313
323
|
<tr>
|
|
314
324
|
<td><code>idle</code></td>
|
|
@@ -319,13 +329,23 @@ close this bubble
|
|
|
319
329
|
</tr>
|
|
320
330
|
</tbody></table>
|
|
321
331
|
<p><code>set this bubble animation mode [MODE]</code> changes only the Bubble owned by the calling sprite, clone, or Stage. It reports an error if that target has not first run <code>say</code> or <code>think</code>.</p>
|
|
322
|
-
<h2 id="
|
|
332
|
+
<h2 id="clones">8. Show, in-display, and hide animations</h2>
|
|
333
|
+
<p>Use <code>fadeIn</code>, <code>floatIn</code>, <code>zoomIn</code>, or <code>riseUp</code> when a Bubble starts displaying, and <code>fadeOut</code>, <code>floatOut</code>, <code>zoomOut</code>, or <code>sink</code> when it finishes displaying. These animations work with both <code>DYNAMIC</code> and <code>RESERVED</code> layout.</p>
|
|
334
|
+
<pre><code class="language-text">set bubble show animation [fadeIn] for [0.2] seconds for bubble style [hero-dialogue]
|
|
335
|
+
set bubble hide animation [fadeOut] for [0.2] seconds for bubble style [hero-dialogue]
|
|
336
|
+
animate this bubble [shake]
|
|
337
|
+
shake this bubble direction [90] count [2] ease [easeInOut]
|
|
338
|
+
explode this bubble relative scale [1.15] count [2] ease [easeOut]
|
|
339
|
+
animate bubble shape to [WAVY] speed [1] for [0.5] seconds
|
|
340
|
+
</code></pre>
|
|
341
|
+
<p>The TurboWarp adapter advances these motions on scheduler frames and applies <code>ease</code> to each frame. <code>shake</code> applies direction and count to the complete Bubble surface, <code>explode</code> expands and returns the relative scale of text and portrait together, and <code>animate bubble shape</code> cross-fades the current outline into styles such as <code>THINKING</code>, <code>DREAMING</code>, <code>YELLING</code>, <code>WAVY</code>, or <code>WHISPERING</code> during the requested speed and duration.</p>
|
|
342
|
+
<h2 id="reference">9. <code>say</code> and <code>think</code></h2>
|
|
323
343
|
<pre><code class="language-text">say [MESSAGE] with bubble style [STYLE]
|
|
324
344
|
think [MESSAGE] with bubble style [STYLE]
|
|
325
345
|
</code></pre>
|
|
326
346
|
<p>Both blocks support the same visual styles, portrait layers, placement, and animation-mode control. The block name does not force a shape; explicitly choose <code>NORMAL</code>, <code>THINKING</code>, or another shape with <code>set bubble visual style</code>. The Composition API surface still receives a <code>say</code>/<code>think</code> kind, so a custom host can add its own kind-dependent behavior.</p>
|
|
327
347
|
<p>Running a new <code>say</code> or <code>think</code> on the same sprite, clone, or Stage disposes the previous Bubble and its timers/drawables before replacing it. The Stage supports stage-relative placement only.</p>
|
|
328
|
-
<h2 id="
|
|
348
|
+
<h2 id="troubleshooting">10. Using Bubble with clones</h2>
|
|
329
349
|
<p>Bubble style definitions are shared within the extension, but each sprite or clone owns its currently displayed Bubble.</p>
|
|
330
350
|
<ol>
|
|
331
351
|
<li>Define assets and styles once from the original sprite when the green flag is clicked.</li>
|
|
@@ -333,7 +353,7 @@ think [MESSAGE] with bubble style [STYLE]
|
|
|
333
353
|
<li>Change the animation mode and close the Bubble from the same clone that displayed it.</li>
|
|
334
354
|
</ol>
|
|
335
355
|
<p>When a clone stops or is deleted, timers, SVG Text skins, and renderer drawables owned by that target are released automatically.</p>
|
|
336
|
-
<h2 id="
|
|
356
|
+
<h2 id="cleanup">11. Block reference</h2>
|
|
337
357
|
<table>
|
|
338
358
|
<thead>
|
|
339
359
|
<tr>
|
|
@@ -374,12 +394,56 @@ think [MESSAGE] with bubble style [STYLE]
|
|
|
374
394
|
<td>Set blink overlays and interval</td>
|
|
375
395
|
</tr>
|
|
376
396
|
<tr>
|
|
377
|
-
<td><code>set
|
|
397
|
+
<td><code>set lip-sync frames [ASSETS] every [SECONDS] seconds for bubble style [STYLE]</code></td>
|
|
378
398
|
<td>Set lip-sync overlays and interval</td>
|
|
379
399
|
</tr>
|
|
380
400
|
<tr>
|
|
381
|
-
<td><code>set
|
|
382
|
-
<td>Set the animation shown during <code>awaiting-
|
|
401
|
+
<td><code>set continue frames [ASSETS] every [SECONDS] seconds for bubble style [STYLE]</code></td>
|
|
402
|
+
<td>Set the animation shown during <code>awaiting-continue</code></td>
|
|
403
|
+
</tr>
|
|
404
|
+
<tr>
|
|
405
|
+
<td><code>set bubble reveal unit [UNIT] every [SECONDS] seconds layout [LAYOUT] for bubble style [STYLE]</code></td>
|
|
406
|
+
<td>Configure CHARACTER/WORD/LINE/BLOCK sequential reveal</td>
|
|
407
|
+
</tr>
|
|
408
|
+
<tr>
|
|
409
|
+
<td><code>set bubble word delimiters [DELIMITERS] show [SHOW] for bubble style [STYLE]</code></td>
|
|
410
|
+
<td>Configure WORD delimiters and visibility</td>
|
|
411
|
+
</tr>
|
|
412
|
+
<tr>
|
|
413
|
+
<td><code>set bubble reveal sound [ASSET] for bubble style [STYLE]</code></td>
|
|
414
|
+
<td>Set the per-unit reveal sound</td>
|
|
415
|
+
</tr>
|
|
416
|
+
<tr>
|
|
417
|
+
<td><code>set bubble voice [ASSET] for bubble style [STYLE]</code></td>
|
|
418
|
+
<td>Set full voice played when display starts</td>
|
|
419
|
+
</tr>
|
|
420
|
+
<tr>
|
|
421
|
+
<td><code>finish [UNIT] with condition [CONDITION] or timeout after [TIMEOUT] seconds</code></td>
|
|
422
|
+
<td>Reveal remaining units and wait for condition or timeout</td>
|
|
423
|
+
</tr>
|
|
424
|
+
<tr>
|
|
425
|
+
<td><code>set bubble show animation [MOTION] for [SECONDS] seconds for bubble style [STYLE]</code></td>
|
|
426
|
+
<td>Configure show animation</td>
|
|
427
|
+
</tr>
|
|
428
|
+
<tr>
|
|
429
|
+
<td><code>set bubble hide animation [MOTION] for [SECONDS] seconds for bubble style [STYLE]</code></td>
|
|
430
|
+
<td>Configure hide animation</td>
|
|
431
|
+
</tr>
|
|
432
|
+
<tr>
|
|
433
|
+
<td><code>animate this bubble [MOTION]</code></td>
|
|
434
|
+
<td>Play a whole-Bubble animation</td>
|
|
435
|
+
</tr>
|
|
436
|
+
<tr>
|
|
437
|
+
<td><code>shake this bubble direction [DIRECTION] count [COUNT] ease [EASE]</code></td>
|
|
438
|
+
<td>Shake the complete Bubble surface</td>
|
|
439
|
+
</tr>
|
|
440
|
+
<tr>
|
|
441
|
+
<td><code>explode this bubble relative scale [SCALE] count [COUNT] ease [EASE]</code></td>
|
|
442
|
+
<td>Apply relative scale cycles to the Bubble</td>
|
|
443
|
+
</tr>
|
|
444
|
+
<tr>
|
|
445
|
+
<td><code>animate bubble shape to [VISUAL_STYLE] speed [SPEED] for [SECONDS] seconds</code></td>
|
|
446
|
+
<td>Transition the Bubble outline</td>
|
|
383
447
|
</tr>
|
|
384
448
|
<tr>
|
|
385
449
|
<td><code>say [MESSAGE] with bubble style [STYLE]</code></td>
|
|
@@ -391,7 +455,7 @@ think [MESSAGE] with bubble style [STYLE]
|
|
|
391
455
|
</tr>
|
|
392
456
|
<tr>
|
|
393
457
|
<td><code>set this bubble animation mode [MODE]</code></td>
|
|
394
|
-
<td>Select <code>talking</code>, <code>awaiting-
|
|
458
|
+
<td>Select <code>talking</code>, <code>awaiting-continue</code>, or <code>idle</code> for this Bubble</td>
|
|
395
459
|
</tr>
|
|
396
460
|
<tr>
|
|
397
461
|
<td><code>wait with this bubble until condition [CONDITION] or timeout after [TIMEOUT] seconds</code></td>
|
|
@@ -406,7 +470,7 @@ think [MESSAGE] with bubble style [STYLE]
|
|
|
406
470
|
<td>Report the Bubble implementation version</td>
|
|
407
471
|
</tr>
|
|
408
472
|
</tbody></table>
|
|
409
|
-
<h2 id="
|
|
473
|
+
<h2 id="regeneration">12. Troubleshooting</h2>
|
|
410
474
|
<table>
|
|
411
475
|
<thead>
|
|
412
476
|
<tr>
|
|
@@ -416,11 +480,11 @@ think [MESSAGE] with bubble style [STYLE]
|
|
|
416
480
|
</thead>
|
|
417
481
|
<tbody><tr>
|
|
418
482
|
<td>Asset Manager required error</td>
|
|
419
|
-
<td>Load Asset Manager 0.7.x without sandbox</td>
|
|
483
|
+
<td>Load Asset Manager 0.7.x without sandbox before using image/media assets</td>
|
|
420
484
|
</tr>
|
|
421
485
|
<tr>
|
|
422
486
|
<td>SVG Text required error</td>
|
|
423
|
-
<td>Load SVG Text 0.
|
|
487
|
+
<td>Load SVG Text 0.4.x without sandbox</td>
|
|
424
488
|
</tr>
|
|
425
489
|
<tr>
|
|
426
490
|
<td>Async Input required error</td>
|
|
@@ -443,7 +507,7 @@ think [MESSAGE] with bubble style [STYLE]
|
|
|
443
507
|
<td>Confirm <code>MIME type of asset [NAME]</code> is <code>image/*</code></td>
|
|
444
508
|
</tr>
|
|
445
509
|
<tr>
|
|
446
|
-
<td>Only one
|
|
510
|
+
<td>Only one continue frame</td>
|
|
447
511
|
<td>Supply at least two frames, or clear the setting</td>
|
|
448
512
|
</tr>
|
|
449
513
|
<tr>
|
|
@@ -463,7 +527,7 @@ think [MESSAGE] with bubble style [STYLE]
|
|
|
463
527
|
<td>Match canvas size, center, and transparent area across all portrait layers</td>
|
|
464
528
|
</tr>
|
|
465
529
|
</tbody></table>
|
|
466
|
-
<h2
|
|
530
|
+
<h2>13. Automatic cleanup</h2>
|
|
467
531
|
<p>Bubble automatically releases its owned timers, SVG Text skins, and renderer drawables when:</p>
|
|
468
532
|
<ul>
|
|
469
533
|
<li><code>close this bubble</code> runs;</li>
|
|
@@ -474,7 +538,7 @@ think [MESSAGE] with bubble style [STYLE]
|
|
|
474
538
|
<li>the TurboWarp runtime is disposed.</li>
|
|
475
539
|
</ul>
|
|
476
540
|
<p>Assets registered with Asset Manager are not owned by Bubble. To remove an unused registered image from memory, close the Bubble first and then use Asset Manager's <code>delete asset [NAME] from memory</code> block.</p>
|
|
477
|
-
<h2
|
|
541
|
+
<h2>14. Regenerating the manual assets</h2>
|
|
478
542
|
<p>The diagrams and GIF are generated from scripts in this repository. GIF generation requires the ImageMagick <code>magick</code> command.</p>
|
|
479
543
|
<pre><code class="language-sh">pnpm docs:render
|
|
480
544
|
pnpm docs:check
|
package/docs/ja/index.html
CHANGED
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
<p>このマニュアルでは、<code>turbowarp-bubble</code>をTurboWarpのカスタム拡張機能として使い、SVG本体、文字、キャラクター表情、目パチ、口パク、「次へ」アイコンを組み合わせたBubbleを表示します。</p>
|
|
72
72
|
<p><img src="../assets/block-quick-start.svg" alt="Next1とNext2を個別登録し、入力listenerを準備してBubble内蔵待機を使うブロック例"></p>
|
|
73
73
|
<h2 id="requirements">1. 必要な拡張機能</h2>
|
|
74
|
-
<p>入力待ちを含む完全な例では6つの拡張機能を使います。TurboWarpの拡張機能ライブラリからTemporary Variables
|
|
74
|
+
<p>入力待ちを含む完全な例では6つの拡張機能を使います。TurboWarpの拡張機能ライブラリからTemporary Variablesを追加し、選択した機能に必要なカスタム拡張機能を「サンドボックスなしで実行」を許可して読み込みます。文字BubbleにはSVG TextとBubbleが必要です。portrait、lip-sync、continue indicator、フルボイス、表示効果音などのメディアアセットにはAsset Managerが必要です。Async InputとRuntime ExpressionはBubble待機を使う場合だけ必要です。</p>
|
|
75
75
|
<table>
|
|
76
76
|
<thead>
|
|
77
77
|
<tr>
|
|
@@ -102,16 +102,16 @@
|
|
|
102
102
|
</tr>
|
|
103
103
|
<tr>
|
|
104
104
|
<td align="right">5</td>
|
|
105
|
-
<td>SVG Text 0.
|
|
106
|
-
<td><code>https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-svg-text@0.
|
|
105
|
+
<td>SVG Text 0.4.0</td>
|
|
106
|
+
<td><code>https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-svg-text@0.4.0/dist/svg-text.js</code></td>
|
|
107
107
|
</tr>
|
|
108
108
|
<tr>
|
|
109
109
|
<td align="right">6</td>
|
|
110
|
-
<td>Bubble 0.
|
|
111
|
-
<td>npm公開後は<code>https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-bubble@0.
|
|
110
|
+
<td>Bubble 0.3.0</td>
|
|
111
|
+
<td>npm公開後は<code>https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-bubble@0.3.0/dist/turbowarp-bubble.js</code></td>
|
|
112
112
|
</tr>
|
|
113
113
|
</tbody></table>
|
|
114
|
-
<p>開発中のBubbleを試す場合は、このリポジトリの<code>dist/turbowarp-bubble.js</code>をローカルカスタム拡張機能として読み込みます。表示時にAsset Manager
|
|
114
|
+
<p>開発中のBubbleを試す場合は、このリポジトリの<code>dist/turbowarp-bubble.js</code>をローカルカスタム拡張機能として読み込みます。表示時にSVG Textが、画像・メディア機能の使用時にAsset Managerが、待機開始時にAsync InputかRuntime Expressionが見つからなければ、Bubbleは明示的なエラーを返します。</p>
|
|
115
115
|
<p>参考:</p>
|
|
116
116
|
<ul>
|
|
117
117
|
<li><a href="https://kubohiroya.github.io/turbowarp-asset-manager/ja/">Asset Manager 日本語ガイド</a></li>
|
|
@@ -187,7 +187,7 @@ register resource [costume:Assets:Next2] as asset [Next2]
|
|
|
187
187
|
bubble direction [up]
|
|
188
188
|
</code></pre>
|
|
189
189
|
<p>Bubbleは<code>dialogue-text</code>という名前を参照します。文字styleとBubble styleはruntime状態なので、通常は緑の旗が押されたときに毎回定義します。</p>
|
|
190
|
-
<p>SVG Text 0.
|
|
190
|
+
<p>SVG Text 0.4.xは文字providerです。名前付き文字styleの定義、SVG文字skinの生成、文字幅の測定を担当します。Bubbleの配置は<code>set bubble placement</code>で設定し、tailや吹き出し外形はSVG Text providerの責務ではありません。</p>
|
|
191
191
|
<h2 id="bubble-style">4. Bubble styleを定義する</h2>
|
|
192
192
|
<p>まず、Bubble style名とSVG Textのstyle名を関連付けます。</p>
|
|
193
193
|
<pre><code class="language-text">define bubble style [hero-dialogue] using text style [dialogue-text]
|
|
@@ -256,10 +256,10 @@ left / left-up-left / up-left / up-up-left
|
|
|
256
256
|
set blink frames [HeroEyesOpen,HeroEyesClosed]
|
|
257
257
|
every [0.4] seconds for bubble style [hero-dialogue]
|
|
258
258
|
|
|
259
|
-
set
|
|
259
|
+
set lip-sync frames [HeroMouthClosed,HeroMouthOpen]
|
|
260
260
|
every [0.1] seconds for bubble style [hero-dialogue]
|
|
261
261
|
|
|
262
|
-
set
|
|
262
|
+
set continue frames [Next1,Next2]
|
|
263
263
|
every [0.2] seconds for bubble style [hero-dialogue]
|
|
264
264
|
</code></pre>
|
|
265
265
|
<p><code>ASSETS</code>はカンマ区切りのAsset Managerアセット名です。名前の前後の空白は除去されます。アセット名自体にカンマは使用できません。</p>
|
|
@@ -270,7 +270,17 @@ set advance frames [Next1,Next2]
|
|
|
270
270
|
<li><code>ASSETS</code>を空にすると、そのアニメーション設定を解除します。</li>
|
|
271
271
|
<li>表情ベースを空にするとportrait全体を解除します。</li>
|
|
272
272
|
</ul>
|
|
273
|
-
<h2 id="lifecycle">5.
|
|
273
|
+
<h2 id="lifecycle">5. 逐次表示、音声、表示サイズ</h2>
|
|
274
|
+
<p>Bubbleはセリフ全体を一度に描画するだけでなく、<code>CHARACTER</code>、<code>WORD</code>、<code>LINE</code>、<code>BLOCK</code>の単位で順次表示できます。<code>WORD</code>は形態素解析を行わず、空白または指定した区切り文字集合で分割します。区切り文字を表示するかどうかも選べます。</p>
|
|
275
|
+
<pre><code class="language-text">set bubble reveal unit [CHARACTER] every [0.05] seconds layout [RESERVED] for bubble style [hero-dialogue]
|
|
276
|
+
set bubble word delimiters [ /] show [false] for bubble style [hero-dialogue]
|
|
277
|
+
set bubble reveal sound [Typewriter] for bubble style [hero-dialogue]
|
|
278
|
+
set bubble voice [HeroVoice] for bubble style [hero-dialogue]
|
|
279
|
+
say [海へ出発!] with bubble style [hero-dialogue]
|
|
280
|
+
finish [CHARACTER] with condition [input == "pressed"] or timeout after [10] seconds
|
|
281
|
+
</code></pre>
|
|
282
|
+
<p><code>DYNAMIC</code>は表示単位ごとに吹き出しの大きさと配置を再計算し、<code>RESERVED</code>は最終的な文字量を先に計測して表示中の外形を予約します。<code>set bubble reveal sound</code>は単位ごと、<code>set bubble voice</code>は表示開始時にAsset Managerの名前付き音声を再生します。音声がなくても文字表示は利用できます。</p>
|
|
283
|
+
<h2 id="animation-modes">6. セリフを表示して入力を待つ</h2>
|
|
274
284
|
<p><code>say</code>または<code>think</code>はBubbleを表示するとすぐ次のブロックへ進み、初期animation modeは<code>talking</code>になります。</p>
|
|
275
285
|
<pre><code class="language-text">set runtime variable [input] to []
|
|
276
286
|
listen for key [Space] set runtime var [input] to [pressed]
|
|
@@ -279,20 +289,20 @@ say [海へ出発!] with bubble style [hero-dialogue]
|
|
|
279
289
|
wait with this bubble until condition [input == "pressed"] or timeout after [10] seconds
|
|
280
290
|
close this bubble
|
|
281
291
|
</code></pre>
|
|
282
|
-
<p>まずTemporary Variablesで<code>input</code>を初期化してから、Async Inputのキー入力とタップのlistenerを登録します。Bubbleの待機ブロックは、<code>input == "pressed"</code>をRuntime Expressionへ委譲し、開始直後とVMの各フレームで評価します。待機中は自動的に<code>awaiting-
|
|
292
|
+
<p>まずTemporary Variablesで<code>input</code>を初期化してから、Async Inputのキー入力とタップのlistenerを登録します。Bubbleの待機ブロックは、<code>input == "pressed"</code>をRuntime Expressionへ委譲し、開始直後とVMの各フレームで評価します。待機中は自動的に<code>awaiting-continue</code>となり、口パクを停止して<code>set continue frames</code>の画像をループします。条件成立またはtimeout後は<code>idle</code>へ移り、次の<code>close this bubble</code>へ進みます。timeoutを<code>0</code>にすると時間制限なしです。</p>
|
|
283
293
|
<p>次の待機に入る前に<code>input</code>を空文字へ戻してください。前回の<code>pressed</code>が残っていると、次の条件が直ちに成立します。別のBubble表示、close、対象targetの停止、projectの開始・停止、runtime破棄では、targetが所有する待機とlistener、timerをキャンセルして解放します。</p>
|
|
284
|
-
<p>音声再生や別の文字送り処理と組み合わせる場合は、それらが完了した時点で<code>awaiting-
|
|
285
|
-
<p><img src="../assets/bubble-lifecycle.gif" alt="sayで口パクし、awaiting-
|
|
294
|
+
<p>音声再生や別の文字送り処理と組み合わせる場合は、それらが完了した時点で<code>awaiting-continue</code>へ切り替えます。</p>
|
|
295
|
+
<p><img src="../assets/bubble-lifecycle.gif" alt="sayで口パクし、awaiting-continueでcontinue framesを動かし、入力成立後にBubbleを閉じるアニメーション"></p>
|
|
286
296
|
<p>アニメーションGIFを再生できない環境では、次の比較図で各animation modeを確認できます。</p>
|
|
287
|
-
<p><img src="../assets/animation-mode-guide.svg" alt="talking、awaiting-
|
|
288
|
-
<h2 id="
|
|
297
|
+
<p><img src="../assets/animation-mode-guide.svg" alt="talking、awaiting-continue、idleの目パチ、口パク、continue framesの状態比較"></p>
|
|
298
|
+
<h2 id="say-think">7. Animation modeの使い分け</h2>
|
|
289
299
|
<table>
|
|
290
300
|
<thead>
|
|
291
301
|
<tr>
|
|
292
302
|
<th>mode</th>
|
|
293
303
|
<th>目パチ</th>
|
|
294
304
|
<th>口パク</th>
|
|
295
|
-
<th>
|
|
305
|
+
<th>continue frames</th>
|
|
296
306
|
<th>主な用途</th>
|
|
297
307
|
</tr>
|
|
298
308
|
</thead>
|
|
@@ -304,7 +314,7 @@ close this bubble
|
|
|
304
314
|
<td>セリフ表示中、音声再生中</td>
|
|
305
315
|
</tr>
|
|
306
316
|
<tr>
|
|
307
|
-
<td><code>awaiting-
|
|
317
|
+
<td><code>awaiting-continue</code></td>
|
|
308
318
|
<td>実行</td>
|
|
309
319
|
<td>停止・非表示</td>
|
|
310
320
|
<td>ループ</td>
|
|
@@ -319,13 +329,23 @@ close this bubble
|
|
|
319
329
|
</tr>
|
|
320
330
|
</tbody></table>
|
|
321
331
|
<p><code>set this bubble animation mode [MODE]</code>は、呼び出したsprite、clone、またはStageが所有するBubbleだけを変更します。先に<code>say</code>または<code>think</code>を実行していない場合はエラーになります。</p>
|
|
322
|
-
<h2 id="
|
|
332
|
+
<h2 id="clones">8. 表示開始・表示中・表示終了animation</h2>
|
|
333
|
+
<p>表示開始は<code>fadeIn</code>、<code>floatIn</code>、<code>zoomIn</code>、<code>riseUp</code>、表示終了は<code>fadeOut</code>、<code>floatOut</code>、<code>zoomOut</code>、<code>sink</code>から選べます。これらは<code>DYNAMIC</code>と<code>RESERVED</code>のどちらにも適用できます。</p>
|
|
334
|
+
<pre><code class="language-text">set bubble show animation [fadeIn] for [0.2] seconds for bubble style [hero-dialogue]
|
|
335
|
+
set bubble hide animation [fadeOut] for [0.2] seconds for bubble style [hero-dialogue]
|
|
336
|
+
animate this bubble [shake]
|
|
337
|
+
shake this bubble direction [90] count [2] ease [easeInOut]
|
|
338
|
+
explode this bubble relative scale [1.15] count [2] ease [easeOut]
|
|
339
|
+
animate bubble shape to [WAVY] speed [1] for [0.5] seconds
|
|
340
|
+
</code></pre>
|
|
341
|
+
<p>TurboWarp adapterはこれらをschedulerのフレームごとに進め、各フレームの進行率へ<code>ease</code>を適用します。<code>shake</code>は吹き出し全体を方向・回数付きで揺らし、<code>explode</code>はportraitと文字を含むsurface全体を拡大して元へ戻し、<code>animate bubble shape</code>は指定時間中に現在の外形から<code>THINKING</code>、<code>DREAMING</code>、<code>YELLING</code>、<code>WAVY</code>、<code>WHISPERING</code>などへcross-fadeします。仕様では、吹き出しが表示される時点を「表示開始」、隠れる時点を「表示終了」と呼びます。</p>
|
|
342
|
+
<h2 id="reference">9. sayとthink</h2>
|
|
323
343
|
<pre><code class="language-text">say [MESSAGE] with bubble style [STYLE]
|
|
324
344
|
think [MESSAGE] with bubble style [STYLE]
|
|
325
345
|
</code></pre>
|
|
326
346
|
<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
347
|
<p>同じsprite、clone、またはStageで新しい<code>say</code>/<code>think</code>を実行すると、以前のBubbleをtimerやdrawableごと破棄してから置き換えます。Stageでは背景相対placementだけを使用できます。</p>
|
|
328
|
-
<h2 id="
|
|
348
|
+
<h2 id="troubleshooting">10. cloneで使う</h2>
|
|
329
349
|
<p>Bubble styleの定義は拡張機能内で共有されますが、表示中のBubbleはsprite/cloneごとに所有されます。</p>
|
|
330
350
|
<ol>
|
|
331
351
|
<li>元spriteで、緑の旗が押されたときにアセットとstyleを1回定義します。</li>
|
|
@@ -333,7 +353,7 @@ think [MESSAGE] with bubble style [STYLE]
|
|
|
333
353
|
<li>animation mode変更とcloseも、表示したのと同じcloneから実行します。</li>
|
|
334
354
|
</ol>
|
|
335
355
|
<p>cloneが停止・削除された場合は、そのtargetに属するtimer、SVG Text skin、drawableが自動解放されます。</p>
|
|
336
|
-
<h2 id="
|
|
356
|
+
<h2 id="cleanup">11. ブロック一覧</h2>
|
|
337
357
|
<table>
|
|
338
358
|
<thead>
|
|
339
359
|
<tr>
|
|
@@ -374,12 +394,56 @@ think [MESSAGE] with bubble style [STYLE]
|
|
|
374
394
|
<td>目パチ差分と間隔を設定する</td>
|
|
375
395
|
</tr>
|
|
376
396
|
<tr>
|
|
377
|
-
<td><code>set
|
|
397
|
+
<td><code>set lip-sync frames [ASSETS] every [SECONDS] seconds for bubble style [STYLE]</code></td>
|
|
378
398
|
<td>口パク差分と間隔を設定する</td>
|
|
379
399
|
</tr>
|
|
380
400
|
<tr>
|
|
381
|
-
<td><code>set
|
|
382
|
-
<td><code>awaiting-
|
|
401
|
+
<td><code>set continue frames [ASSETS] every [SECONDS] seconds for bubble style [STYLE]</code></td>
|
|
402
|
+
<td><code>awaiting-continue</code>中の「次へ」アニメーションを設定する</td>
|
|
403
|
+
</tr>
|
|
404
|
+
<tr>
|
|
405
|
+
<td><code>set bubble reveal unit [UNIT] every [SECONDS] seconds layout [LAYOUT] for bubble style [STYLE]</code></td>
|
|
406
|
+
<td>CHARACTER/WORD/LINE/BLOCKの逐次表示を設定する</td>
|
|
407
|
+
</tr>
|
|
408
|
+
<tr>
|
|
409
|
+
<td><code>set bubble word delimiters [DELIMITERS] show [SHOW] for bubble style [STYLE]</code></td>
|
|
410
|
+
<td>WORDの区切り文字集合と表示可否を設定する</td>
|
|
411
|
+
</tr>
|
|
412
|
+
<tr>
|
|
413
|
+
<td><code>set bubble reveal sound [ASSET] for bubble style [STYLE]</code></td>
|
|
414
|
+
<td>表示単位ごとの効果音を設定する</td>
|
|
415
|
+
</tr>
|
|
416
|
+
<tr>
|
|
417
|
+
<td><code>set bubble voice [ASSET] for bubble style [STYLE]</code></td>
|
|
418
|
+
<td>表示開始時のフルボイスを設定する</td>
|
|
419
|
+
</tr>
|
|
420
|
+
<tr>
|
|
421
|
+
<td><code>finish [UNIT] with condition [CONDITION] or timeout after [TIMEOUT] seconds</code></td>
|
|
422
|
+
<td>未表示単位を最後まで進め、条件またはtimeoutを待つ</td>
|
|
423
|
+
</tr>
|
|
424
|
+
<tr>
|
|
425
|
+
<td><code>set bubble show animation [MOTION] for [SECONDS] seconds for bubble style [STYLE]</code></td>
|
|
426
|
+
<td>表示開始animationを設定する</td>
|
|
427
|
+
</tr>
|
|
428
|
+
<tr>
|
|
429
|
+
<td><code>set bubble hide animation [MOTION] for [SECONDS] seconds for bubble style [STYLE]</code></td>
|
|
430
|
+
<td>表示終了animationを設定する</td>
|
|
431
|
+
</tr>
|
|
432
|
+
<tr>
|
|
433
|
+
<td><code>animate this bubble [MOTION]</code></td>
|
|
434
|
+
<td>Bubble全体のanimationを再生する</td>
|
|
435
|
+
</tr>
|
|
436
|
+
<tr>
|
|
437
|
+
<td><code>shake this bubble direction [DIRECTION] count [COUNT] ease [EASE]</code></td>
|
|
438
|
+
<td>吹き出し全体を指定方向へ揺らす</td>
|
|
439
|
+
</tr>
|
|
440
|
+
<tr>
|
|
441
|
+
<td><code>explode this bubble relative scale [SCALE] count [COUNT] ease [EASE]</code></td>
|
|
442
|
+
<td>吹き出し全体を相対倍率で変化させる</td>
|
|
443
|
+
</tr>
|
|
444
|
+
<tr>
|
|
445
|
+
<td><code>animate bubble shape to [VISUAL_STYLE] speed [SPEED] for [SECONDS] seconds</code></td>
|
|
446
|
+
<td>Bubble外形を時間経過で切り替える</td>
|
|
383
447
|
</tr>
|
|
384
448
|
<tr>
|
|
385
449
|
<td><code>say [MESSAGE] with bubble style [STYLE]</code></td>
|
|
@@ -391,7 +455,7 @@ think [MESSAGE] with bubble style [STYLE]
|
|
|
391
455
|
</tr>
|
|
392
456
|
<tr>
|
|
393
457
|
<td><code>set this bubble animation mode [MODE]</code></td>
|
|
394
|
-
<td><code>talking</code>、<code>awaiting-
|
|
458
|
+
<td><code>talking</code>、<code>awaiting-continue</code>、<code>idle</code>からmodeを選ぶ</td>
|
|
395
459
|
</tr>
|
|
396
460
|
<tr>
|
|
397
461
|
<td><code>wait with this bubble until condition [CONDITION] or timeout after [TIMEOUT] seconds</code></td>
|
|
@@ -406,7 +470,7 @@ think [MESSAGE] with bubble style [STYLE]
|
|
|
406
470
|
<td>Bubble実装versionを返す</td>
|
|
407
471
|
</tr>
|
|
408
472
|
</tbody></table>
|
|
409
|
-
<h2 id="
|
|
473
|
+
<h2 id="regeneration">12. よくあるエラー</h2>
|
|
410
474
|
<table>
|
|
411
475
|
<thead>
|
|
412
476
|
<tr>
|
|
@@ -416,11 +480,11 @@ think [MESSAGE] with bubble style [STYLE]
|
|
|
416
480
|
</thead>
|
|
417
481
|
<tbody><tr>
|
|
418
482
|
<td>Asset Managerを要求するエラー</td>
|
|
419
|
-
<td
|
|
483
|
+
<td>画像・メディアアセットを使う前にAsset Manager 0.7.xを読み込む</td>
|
|
420
484
|
</tr>
|
|
421
485
|
<tr>
|
|
422
486
|
<td>SVG Textを要求するエラー</td>
|
|
423
|
-
<td>SVG Text 0.
|
|
487
|
+
<td>SVG Text 0.4.xをサンドボックスなしで読み込む</td>
|
|
424
488
|
</tr>
|
|
425
489
|
<tr>
|
|
426
490
|
<td>Async Inputを要求するエラー</td>
|
|
@@ -443,8 +507,8 @@ think [MESSAGE] with bubble style [STYLE]
|
|
|
443
507
|
<td><code>MIME type of asset [NAME]</code>で<code>image/*</code>か確認する</td>
|
|
444
508
|
</tr>
|
|
445
509
|
<tr>
|
|
446
|
-
<td>
|
|
447
|
-
<td>2枚以上にするか、空にして
|
|
510
|
+
<td>continue framesが1枚</td>
|
|
511
|
+
<td>2枚以上にするか、空にしてcontinue表示を解除する</td>
|
|
448
512
|
</tr>
|
|
449
513
|
<tr>
|
|
450
514
|
<td>frame intervalエラー</td>
|
|
@@ -463,7 +527,7 @@ think [MESSAGE] with bubble style [STYLE]
|
|
|
463
527
|
<td>ベースと全差分のcanvasサイズ、中心、透明領域を揃える</td>
|
|
464
528
|
</tr>
|
|
465
529
|
</tbody></table>
|
|
466
|
-
<h2
|
|
530
|
+
<h2>13. 自動解放されるタイミング</h2>
|
|
467
531
|
<p>次の場合、Bubbleが所有するtimer、SVG Text skin、renderer drawableは自動的に解放されます。</p>
|
|
468
532
|
<ul>
|
|
469
533
|
<li><code>close this bubble</code></li>
|
|
@@ -474,7 +538,7 @@ think [MESSAGE] with bubble style [STYLE]
|
|
|
474
538
|
<li>TurboWarp runtimeの破棄</li>
|
|
475
539
|
</ul>
|
|
476
540
|
<p>Asset Managerへ登録したアセット自体はBubbleの所有物ではありません。不要になった登録画像をメモリから削除する場合は、Bubbleを閉じた後にAsset Managerの<code>delete asset [NAME] from memory</code>を使います。</p>
|
|
477
|
-
<h2
|
|
541
|
+
<h2>14. マニュアル画像の再生成</h2>
|
|
478
542
|
<p>図とGIFはリポジトリ内のスクリプトから再生成できます。GIF生成にはImageMagickの<code>magick</code>コマンドが必要です。</p>
|
|
479
543
|
<pre><code class="language-sh">pnpm docs:render
|
|
480
544
|
pnpm docs:check
|