@kubohiroya/turbowarp-bubble 0.6.0 → 0.8.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 +80 -28
- package/THIRD_PARTY_NOTICES.md +10 -0
- package/dist/composition.js +297 -245
- package/dist/extension-manifest.json +35 -0
- package/dist/turbowarp-adapter.js +2199 -942
- package/dist/turbowarp-bubble.js +1868 -173
- package/dist/types/asset-manager-image-adapter.d.ts +18 -0
- package/dist/types/composition.d.ts +10 -0
- package/dist/types/portrait-layout.d.ts +14 -0
- package/dist/types/surface-motion.d.ts +8 -0
- package/dist/types/svg-overlay-surface.d.ts +97 -0
- package/dist/types/text-capability.d.ts +2 -2
- package/dist/types/turbowarp-adapter.d.ts +19 -2
- package/dist/types/turbowarp-svg-text-adapter.d.ts +35 -0
- package/docs/assets/block-quick-start.svg +27 -52
- package/docs/block-manual.ja.md +52 -54
- package/docs/block-manual.md +65 -67
- package/docs/index.html +32 -33
- package/docs/ja/index.html +32 -33
- package/docs/release-notes-0.8.0.md +45 -0
- package/package.json +6 -9
package/docs/block-manual.md
CHANGED
|
@@ -2,22 +2,23 @@
|
|
|
2
2
|
|
|
3
3
|
This manual explains how to use `turbowarp-bubble` 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.
|
|
4
4
|
|
|
5
|
+
> **Kamishibai DSL 4.0 bundle:** In the combined runtime palette, click the documentation button directly below the **Bubble** member heading to open this manual. The bundled blocks keep the styles, placement, portrait, reveal, audio, wait, animation, clone, and cleanup behavior documented here; their member namespace and Bubble icon identify their origin.
|
|
6
|
+
|
|
5
7
|

|
|
6
8
|
|
|
7
9
|
## 1. Load the required extensions
|
|
8
10
|
|
|
9
|
-
The complete input-wait example uses
|
|
11
|
+
The complete input-wait example uses five extensions. Add Temporary Variables from TurboWarp's extension library, then load the custom extensions needed by the selected features with **Run without sandbox** enabled. Bubble bundles the host-neutral SVG Text 0.8.0 layout provider and creates no text skin on its default SVG overlay. 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.
|
|
10
12
|
|
|
11
13
|
| Order | Extension | URL |
|
|
12
14
|
| ----: | ------------------------ | -------------------------------------------------------------------------------------------------------- |
|
|
13
15
|
| 1 | Temporary Variables | Add from the TurboWarp extension library |
|
|
14
|
-
| 2 | Async Input 0.
|
|
15
|
-
| 3 | Runtime Expression 0.
|
|
16
|
-
| 4 | Asset Manager 0.
|
|
17
|
-
| 5 |
|
|
18
|
-
| 6 | Bubble 0.6.0 | `https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-bubble@0.6.0/dist/turbowarp-bubble.js` |
|
|
16
|
+
| 2 | Async Input 0.4.0 | `https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-async-input@0.4.0/dist/async-input.js` |
|
|
17
|
+
| 3 | Runtime Expression 0.4.0 | `https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-runtime-expression@0.4.0/dist/runtime-expression.js` |
|
|
18
|
+
| 4 | Asset Manager 0.11.0 | `https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-asset-manager@0.11.0/dist/asset-manager.js` |
|
|
19
|
+
| 5 | Bubble 0.8.0 | `https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-bubble@0.8.0/dist/turbowarp-bubble.js` |
|
|
19
20
|
|
|
20
|
-
To try a development build, load this repository's `dist/turbowarp-bubble.js` as a local custom extension. Bubble reports an explicit error if the
|
|
21
|
+
To try a development build, load this repository's `dist/turbowarp-bubble.js` as a local custom extension. Bubble reports an explicit error if the renderer lacks the default SVG overlay APIs, 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. The lower-level Composition API can inject another text capability.
|
|
21
22
|
|
|
22
23
|
See also:
|
|
23
24
|
|
|
@@ -56,30 +57,22 @@ register resource [costume:Assets:Next2] as asset [Next2]
|
|
|
56
57
|
|
|
57
58
|
For a remote image, pass its HTTPS URL as `RESOURCE_ID`. Bubble accepts only assets already registered with Asset Manager whose MIME type is `image/*`.
|
|
58
59
|
|
|
59
|
-
## 3.
|
|
60
|
+
## 3. Select a text layout style
|
|
60
61
|
|
|
61
|
-
|
|
62
|
+
Standalone Bubble bundles the SVG Text 0.8.0 layout composition. `default`, or any other name, is initialized on first use with SVG Text defaults and a transparent background.
|
|
62
63
|
|
|
63
64
|
```text
|
|
64
|
-
define
|
|
65
|
-
background [#fff4cc]
|
|
66
|
-
text [#332200]
|
|
67
|
-
font [Noto Sans JP]
|
|
68
|
-
size [100]
|
|
69
|
-
align [left]
|
|
70
|
-
bubble direction [up]
|
|
65
|
+
define bubble style [hero-dialogue] using text style [default]
|
|
71
66
|
```
|
|
72
67
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
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 `set bubble placement`; the SVG Text provider does not own Bubble direction, tail, or outer shape.
|
|
68
|
+
Application hosts that need custom fonts, colors, or alignment can define styles on `createSvgTextLayoutComposition()` and inject them through `createSvgTextOverlayTextCapability()`. The default uses the same `layoutText()` API and does not create an SVG text skin. Bubble owns placement, tail, and outer shape.
|
|
76
69
|
|
|
77
70
|
## 4. Define a Bubble style
|
|
78
71
|
|
|
79
|
-
First associate a Bubble style name with
|
|
72
|
+
First associate a Bubble style name with a text layout style name.
|
|
80
73
|
|
|
81
74
|
```text
|
|
82
|
-
define bubble style [hero-dialogue] using text style [
|
|
75
|
+
define bubble style [hero-dialogue] using text style [default]
|
|
83
76
|
set bubble placement [up-right] for bubble style [hero-dialogue]
|
|
84
77
|
set bubble distance [12] for bubble style [hero-dialogue]
|
|
85
78
|
set bubble visual style [NORMAL] for bubble style [hero-dialogue]
|
|
@@ -154,6 +147,7 @@ Now configure the portrait and continue animation layers:
|
|
|
154
147
|
|
|
155
148
|
```text
|
|
156
149
|
set portrait base [HeroFace] for bubble style [hero-dialogue]
|
|
150
|
+
set portrait [top-left] offset x [-4] y [6] zoom [120] % corner radius [12] px for bubble style [hero-dialogue]
|
|
157
151
|
|
|
158
152
|
set blink frames [HeroEyesOpen,HeroEyesClosed]
|
|
159
153
|
every [0.4] seconds for bubble style [hero-dialogue]
|
|
@@ -171,7 +165,10 @@ set continue frames [Next1,Next2]
|
|
|
171
165
|
- Use two or more continue frames so the loop is visible.
|
|
172
166
|
- `SECONDS` must be a finite number greater than zero.
|
|
173
167
|
- An empty `ASSETS` input removes that animation.
|
|
174
|
-
-
|
|
168
|
+
- Portrait placement defaults to `left`. `left` and `right` center the image vertically at the corresponding edge; `top-left`, `top-right`, `bottom-left`, and `bottom-right` align it to that corner. The portrait keeps its own column, so it does not overlap the text unless a large offset moves it there.
|
|
169
|
+
- Portrait x is positive to the right and y is positive upward. Zoom is a positive percentage of the 96 px portrait box and is applied before the whole-Bubble scale. Corner radius is zero or greater in pixels and is capped at half of the displayed portrait width or height.
|
|
170
|
+
- Selecting `none`, or using an empty portrait base, removes the whole portrait including blink and lip-sync settings. Set the base again before choosing another layout.
|
|
171
|
+
- Rounded corners use the Bubble fill as a mask over the base, blink, and lip-sync layers. `NO_BUBBLE` has no fill to supply that mask, so its portrait remains rectangular.
|
|
175
172
|
|
|
176
173
|
## 5. Sequential reveal, audio, and layout
|
|
177
174
|
|
|
@@ -257,60 +254,61 @@ Bubble style definitions are shared within the extension, but each sprite or clo
|
|
|
257
254
|
2. Run `say` or `think` from each clone itself.
|
|
258
255
|
3. Change the animation mode and close the Bubble from the same clone that displayed it.
|
|
259
256
|
|
|
260
|
-
When a clone stops or is deleted, timers,
|
|
257
|
+
When a clone stops or is deleted, its timers, overlay DOM, and image leases are released automatically. Explicit `scratch-render` mode also releases skins and drawables.
|
|
261
258
|
|
|
262
259
|
## 11. Block reference
|
|
263
260
|
|
|
264
|
-
| Block
|
|
265
|
-
|
|
|
266
|
-
| `define bubble style [STYLE] using text style [TEXT_STYLE]`
|
|
267
|
-
| `set bubble placement [PLACEMENT] for bubble style [STYLE]`
|
|
268
|
-
| `set bubble distance [DISTANCE] for bubble style [STYLE]`
|
|
269
|
-
| `set bubble visual style [VISUAL_STYLE] for bubble style [STYLE]`
|
|
270
|
-
| `set bubble tail length [LENGTH] for bubble style [STYLE]`
|
|
271
|
-
| `set bubble offset x [X] y [Y] scale [SCALE] % for bubble style [STYLE]`
|
|
272
|
-
| `set portrait base [ASSET] for bubble style [STYLE]`
|
|
273
|
-
| `set
|
|
274
|
-
| `set
|
|
275
|
-
| `set
|
|
276
|
-
| `set
|
|
277
|
-
| `set bubble
|
|
278
|
-
| `set bubble
|
|
279
|
-
| `set bubble
|
|
280
|
-
| `
|
|
281
|
-
| `
|
|
282
|
-
| `set bubble
|
|
283
|
-
| `
|
|
284
|
-
| `
|
|
285
|
-
| `
|
|
286
|
-
| `
|
|
287
|
-
| `
|
|
288
|
-
| `
|
|
289
|
-
| `
|
|
290
|
-
| `
|
|
291
|
-
| `
|
|
292
|
-
| `
|
|
261
|
+
| Block | Description |
|
|
262
|
+
| -------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------- |
|
|
263
|
+
| `define bubble style [STYLE] using text style [TEXT_STYLE]` | Define or redefine a Bubble style |
|
|
264
|
+
| `set bubble placement [PLACEMENT] for bubble style [STYLE]` | Set an actor direction/angle or a stage-relative region |
|
|
265
|
+
| `set bubble distance [DISTANCE] for bubble style [STYLE]` | Set the distance from actor bounds to the tail tip |
|
|
266
|
+
| `set bubble visual style [VISUAL_STYLE] for bubble style [STYLE]` | Select one of ten SVG body shapes |
|
|
267
|
+
| `set bubble tail length [LENGTH] for bubble style [STYLE]` | Set the nominal border-to-tip tail length |
|
|
268
|
+
| `set bubble offset x [X] y [Y] scale [SCALE] % for bubble style [STYLE]` | Set body position and whole-Bubble scale, including text |
|
|
269
|
+
| `set portrait base [ASSET] for bubble style [STYLE]` | Set the portrait base image |
|
|
270
|
+
| `set portrait [PLACEMENT] offset x [X] y [Y] zoom [ZOOM] % corner radius [RADIUS] px for bubble style [STYLE]` | Set portrait visibility, edge/corner placement, transform, and rounding |
|
|
271
|
+
| `set blink frames [ASSETS] every [SECONDS] seconds for bubble style [STYLE]` | Set blink overlays and interval |
|
|
272
|
+
| `set lip-sync frames [ASSETS] every [SECONDS] seconds for bubble style [STYLE]` | Set lip-sync overlays and interval |
|
|
273
|
+
| `set continue frames [ASSETS] every [SECONDS] seconds for bubble style [STYLE]` | Set the animation shown during `awaiting-continue` |
|
|
274
|
+
| `set bubble reveal unit [UNIT] every [SECONDS] seconds layout [LAYOUT] for bubble style [STYLE]` | Configure CHARACTER/WORD/LINE/BLOCK sequential reveal |
|
|
275
|
+
| `set bubble word delimiters [DELIMITERS] show [SHOW] for bubble style [STYLE]` | Configure WORD delimiters and visibility |
|
|
276
|
+
| `set bubble reveal sound [ASSET] for bubble style [STYLE]` | Set the per-unit reveal sound |
|
|
277
|
+
| `set bubble voice [ASSET] for bubble style [STYLE]` | Set full voice played when display starts |
|
|
278
|
+
| `finish [UNIT] with condition [CONDITION] or timeout after [TIMEOUT] seconds` | Reveal remaining units and wait for condition or timeout |
|
|
279
|
+
| `set bubble show animation [MOTION] for [SECONDS] seconds for bubble style [STYLE]` | Configure show animation |
|
|
280
|
+
| `set bubble hide animation [MOTION] for [SECONDS] seconds for bubble style [STYLE]` | Configure hide animation |
|
|
281
|
+
| `animate this bubble [MOTION]` | Play a whole-Bubble animation |
|
|
282
|
+
| `shake this bubble direction [DIRECTION] count [COUNT] ease [EASE]` | Shake the complete Bubble surface |
|
|
283
|
+
| `explode this bubble relative scale [SCALE] count [COUNT] ease [EASE]` | Apply relative scale cycles to the Bubble |
|
|
284
|
+
| `animate bubble shape to [VISUAL_STYLE] speed [SPEED] for [SECONDS] seconds` | Transition the Bubble outline |
|
|
285
|
+
| `say [MESSAGE] with bubble style [STYLE]` | Start or replace a `say` Bubble in `talking` mode |
|
|
286
|
+
| `think [MESSAGE] with bubble style [STYLE]` | Start or replace a `think` Bubble in `talking` mode |
|
|
287
|
+
| `set this bubble animation mode [MODE]` | Select `talking`, `awaiting-continue`, or `idle` for this Bubble |
|
|
288
|
+
| `wait with this bubble until condition [CONDITION] or timeout after [TIMEOUT] seconds` | Await a Runtime Expression condition or optional timeout |
|
|
289
|
+
| `close this bubble` | Release this target's Bubble and owned resources |
|
|
290
|
+
| `Bubble version` | Report the Bubble implementation version |
|
|
293
291
|
|
|
294
292
|
## 12. Troubleshooting
|
|
295
293
|
|
|
296
|
-
| Symptom | Cause and solution
|
|
297
|
-
| ------------------------------------ |
|
|
298
|
-
| Asset Manager required error | Load Asset Manager 0.7.x without sandbox before using image/media assets
|
|
299
|
-
|
|
|
300
|
-
| Async Input required error | Load Async Input 0.3.x without sandbox before using the Bubble wait
|
|
301
|
-
| Runtime Expression required error | Load Runtime Expression 0.3.x without sandbox before using the Bubble wait
|
|
302
|
-
| `bubble style is not defined` | Run `define bubble style` first, including after restarting with green flag
|
|
303
|
-
| Image asset is not registered | Wait for `register resource ... as asset ...` before showing the Bubble
|
|
304
|
-
| Asset is not an image | Confirm `MIME type of asset [NAME]` is `image/*`
|
|
305
|
-
| Only one continue frame | Supply at least two frames, or clear the setting
|
|
306
|
-
| Frame interval error | Use a finite `SECONDS` value greater than zero
|
|
307
|
-
| Actor-relative Bubble from the Stage | Use `HEADER_LIKE`, `CENTER`, or `FOOTER_LIKE`
|
|
308
|
-
| Invalid placement | Use a 16-way direction, alias, 0–360 degree angle, or stage-relative value
|
|
309
|
-
| Eyes or mouth are misaligned | Match canvas size, center, and transparent area across all portrait layers
|
|
294
|
+
| Symptom | Cause and solution |
|
|
295
|
+
| ------------------------------------ | ----------------------------------------------------------------------------- |
|
|
296
|
+
| Asset Manager required error | Load Asset Manager 0.7.x without sandbox before using image/media assets |
|
|
297
|
+
| SVG overlay backend error | Use a host with `renderer.addOverlay()` or explicitly select `scratch-render` |
|
|
298
|
+
| Async Input required error | Load Async Input 0.3.x without sandbox before using the Bubble wait |
|
|
299
|
+
| Runtime Expression required error | Load Runtime Expression 0.3.x without sandbox before using the Bubble wait |
|
|
300
|
+
| `bubble style is not defined` | Run `define bubble style` first, including after restarting with green flag |
|
|
301
|
+
| Image asset is not registered | Wait for `register resource ... as asset ...` before showing the Bubble |
|
|
302
|
+
| Asset is not an image | Confirm `MIME type of asset [NAME]` is `image/*` |
|
|
303
|
+
| Only one continue frame | Supply at least two frames, or clear the setting |
|
|
304
|
+
| Frame interval error | Use a finite `SECONDS` value greater than zero |
|
|
305
|
+
| Actor-relative Bubble from the Stage | Use `HEADER_LIKE`, `CENTER`, or `FOOTER_LIKE` |
|
|
306
|
+
| Invalid placement | Use a 16-way direction, alias, 0–360 degree angle, or stage-relative value |
|
|
307
|
+
| Eyes or mouth are misaligned | Match canvas size, center, and transparent area across all portrait layers |
|
|
310
308
|
|
|
311
309
|
## 13. Automatic cleanup
|
|
312
310
|
|
|
313
|
-
Bubble automatically releases its owned timers, text skins
|
|
311
|
+
Bubble automatically releases its owned timers, overlay DOM, and image leases in the following cases. Explicit `scratch-render` mode also releases its text skins and renderer drawables.
|
|
314
312
|
|
|
315
313
|
- `close this bubble` runs;
|
|
316
314
|
- the same sprite or clone runs another `say` or `think`;
|
package/docs/index.html
CHANGED
|
@@ -69,9 +69,12 @@
|
|
|
69
69
|
<main id="manual" class="manual">
|
|
70
70
|
<h1>TurboWarp Bubble Block Manual</h1>
|
|
71
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
|
+
<blockquote>
|
|
73
|
+
<p><strong>Kamishibai DSL 4.0 bundle:</strong> In the combined runtime palette, click the documentation button directly below the <strong>Bubble</strong> member heading to open this manual. The bundled blocks keep the styles, placement, portrait, reveal, audio, wait, animation, clone, and cleanup behavior documented here; their member namespace and Bubble icon identify their origin.</p>
|
|
74
|
+
</blockquote>
|
|
72
75
|
<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
76
|
<h2 id="requirements">1. Load the required extensions</h2>
|
|
74
|
-
<p>The complete input-wait example uses
|
|
77
|
+
<p>The complete input-wait example uses five 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. Bubble bundles the host-neutral SVG Text 0.8.0 layout provider and creates no text skin on its default SVG overlay. 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
78
|
<table>
|
|
76
79
|
<thead>
|
|
77
80
|
<tr>
|
|
@@ -87,31 +90,26 @@
|
|
|
87
90
|
</tr>
|
|
88
91
|
<tr>
|
|
89
92
|
<td align="right">2</td>
|
|
90
|
-
<td>Async Input 0.
|
|
91
|
-
<td><code>https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-async-input@0.
|
|
93
|
+
<td>Async Input 0.4.0</td>
|
|
94
|
+
<td><code>https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-async-input@0.4.0/dist/async-input.js</code></td>
|
|
92
95
|
</tr>
|
|
93
96
|
<tr>
|
|
94
97
|
<td align="right">3</td>
|
|
95
|
-
<td>Runtime Expression 0.
|
|
96
|
-
<td><code>https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-runtime-expression@0.
|
|
98
|
+
<td>Runtime Expression 0.4.0</td>
|
|
99
|
+
<td><code>https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-runtime-expression@0.4.0/dist/runtime-expression.js</code></td>
|
|
97
100
|
</tr>
|
|
98
101
|
<tr>
|
|
99
102
|
<td align="right">4</td>
|
|
100
|
-
<td>Asset Manager 0.
|
|
101
|
-
<td><code>https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-asset-manager@0.
|
|
103
|
+
<td>Asset Manager 0.11.0</td>
|
|
104
|
+
<td><code>https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-asset-manager@0.11.0/dist/asset-manager.js</code></td>
|
|
102
105
|
</tr>
|
|
103
106
|
<tr>
|
|
104
107
|
<td align="right">5</td>
|
|
105
|
-
<td>
|
|
106
|
-
<td><code>https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-
|
|
107
|
-
</tr>
|
|
108
|
-
<tr>
|
|
109
|
-
<td align="right">6</td>
|
|
110
|
-
<td>Bubble 0.6.0</td>
|
|
111
|
-
<td><code>https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-bubble@0.6.0/dist/turbowarp-bubble.js</code></td>
|
|
108
|
+
<td>Bubble 0.8.0</td>
|
|
109
|
+
<td><code>https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-bubble@0.8.0/dist/turbowarp-bubble.js</code></td>
|
|
112
110
|
</tr>
|
|
113
111
|
</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 the
|
|
112
|
+
<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 the renderer lacks the default SVG overlay APIs, 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. The lower-level Composition API can inject another text capability.</p>
|
|
115
113
|
<p>See also:</p>
|
|
116
114
|
<ul>
|
|
117
115
|
<li><a href="https://kubohiroya.github.io/turbowarp-asset-manager/">Asset Manager guide</a></li>
|
|
@@ -176,21 +174,14 @@ register resource [costume:Assets:Next1] as asset [Next1]
|
|
|
176
174
|
register resource [costume:Assets:Next2] as asset [Next2]
|
|
177
175
|
</code></pre>
|
|
178
176
|
<p>For a remote image, pass its HTTPS URL as <code>RESOURCE_ID</code>. Bubble accepts only assets already registered with Asset Manager whose MIME type is <code>image/*</code>.</p>
|
|
179
|
-
<h2 id="text-style">3.
|
|
180
|
-
<p>
|
|
181
|
-
<pre><code class="language-text">define
|
|
182
|
-
background [#fff4cc]
|
|
183
|
-
text [#332200]
|
|
184
|
-
font [Noto Sans JP]
|
|
185
|
-
size [100]
|
|
186
|
-
align [left]
|
|
187
|
-
bubble direction [up]
|
|
177
|
+
<h2 id="text-style">3. Select a text layout style</h2>
|
|
178
|
+
<p>Standalone Bubble bundles the SVG Text 0.8.0 layout composition. <code>default</code>, or any other name, is initialized on first use with SVG Text defaults and a transparent background.</p>
|
|
179
|
+
<pre><code class="language-text">define bubble style [hero-dialogue] using text style [default]
|
|
188
180
|
</code></pre>
|
|
189
|
-
<p>
|
|
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>
|
|
181
|
+
<p>Application hosts that need custom fonts, colors, or alignment can define styles on <code>createSvgTextLayoutComposition()</code> and inject them through <code>createSvgTextOverlayTextCapability()</code>. The default uses the same <code>layoutText()</code> API and does not create an SVG text skin. Bubble owns placement, tail, and outer shape.</p>
|
|
191
182
|
<h2 id="bubble-style">4. Define a Bubble style</h2>
|
|
192
|
-
<p>First associate a Bubble style name with
|
|
193
|
-
<pre><code class="language-text">define bubble style [hero-dialogue] using text style [
|
|
183
|
+
<p>First associate a Bubble style name with a text layout style name.</p>
|
|
184
|
+
<pre><code class="language-text">define bubble style [hero-dialogue] using text style [default]
|
|
194
185
|
set bubble placement [up-right] for bubble style [hero-dialogue]
|
|
195
186
|
set bubble distance [12] for bubble style [hero-dialogue]
|
|
196
187
|
set bubble visual style [NORMAL] for bubble style [hero-dialogue]
|
|
@@ -252,6 +243,7 @@ left / left-up-left / up-left / up-up-left
|
|
|
252
243
|
<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
244
|
<p>Now configure the portrait and continue animation layers:</p>
|
|
254
245
|
<pre><code class="language-text">set portrait base [HeroFace] for bubble style [hero-dialogue]
|
|
246
|
+
set portrait [top-left] offset x [-4] y [6] zoom [120] % corner radius [12] px for bubble style [hero-dialogue]
|
|
255
247
|
|
|
256
248
|
set blink frames [HeroEyesOpen,HeroEyesClosed]
|
|
257
249
|
every [0.4] seconds for bubble style [hero-dialogue]
|
|
@@ -268,7 +260,10 @@ set continue frames [Next1,Next2]
|
|
|
268
260
|
<li>Use two or more continue frames so the loop is visible.</li>
|
|
269
261
|
<li><code>SECONDS</code> must be a finite number greater than zero.</li>
|
|
270
262
|
<li>An empty <code>ASSETS</code> input removes that animation.</li>
|
|
271
|
-
<li>
|
|
263
|
+
<li>Portrait placement defaults to <code>left</code>. <code>left</code> and <code>right</code> center the image vertically at the corresponding edge; <code>top-left</code>, <code>top-right</code>, <code>bottom-left</code>, and <code>bottom-right</code> align it to that corner. The portrait keeps its own column, so it does not overlap the text unless a large offset moves it there.</li>
|
|
264
|
+
<li>Portrait x is positive to the right and y is positive upward. Zoom is a positive percentage of the 96 px portrait box and is applied before the whole-Bubble scale. Corner radius is zero or greater in pixels and is capped at half of the displayed portrait width or height.</li>
|
|
265
|
+
<li>Selecting <code>none</code>, or using an empty portrait base, removes the whole portrait including blink and lip-sync settings. Set the base again before choosing another layout.</li>
|
|
266
|
+
<li>Rounded corners use the Bubble fill as a mask over the base, blink, and lip-sync layers. <code>NO_BUBBLE</code> has no fill to supply that mask, so its portrait remains rectangular.</li>
|
|
272
267
|
</ul>
|
|
273
268
|
<h2 id="lifecycle">5. Sequential reveal, audio, and layout</h2>
|
|
274
269
|
<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>
|
|
@@ -352,7 +347,7 @@ think [MESSAGE] with bubble style [STYLE]
|
|
|
352
347
|
<li>Run <code>say</code> or <code>think</code> from each clone itself.</li>
|
|
353
348
|
<li>Change the animation mode and close the Bubble from the same clone that displayed it.</li>
|
|
354
349
|
</ol>
|
|
355
|
-
<p>When a clone stops or is deleted, timers,
|
|
350
|
+
<p>When a clone stops or is deleted, its timers, overlay DOM, and image leases are released automatically. Explicit <code>scratch-render</code> mode also releases skins and drawables.</p>
|
|
356
351
|
<h2 id="cleanup">11. Block reference</h2>
|
|
357
352
|
<table>
|
|
358
353
|
<thead>
|
|
@@ -390,6 +385,10 @@ think [MESSAGE] with bubble style [STYLE]
|
|
|
390
385
|
<td>Set the portrait base image</td>
|
|
391
386
|
</tr>
|
|
392
387
|
<tr>
|
|
388
|
+
<td><code>set portrait [PLACEMENT] offset x [X] y [Y] zoom [ZOOM] % corner radius [RADIUS] px for bubble style [STYLE]</code></td>
|
|
389
|
+
<td>Set portrait visibility, edge/corner placement, transform, and rounding</td>
|
|
390
|
+
</tr>
|
|
391
|
+
<tr>
|
|
393
392
|
<td><code>set blink frames [ASSETS] every [SECONDS] seconds for bubble style [STYLE]</code></td>
|
|
394
393
|
<td>Set blink overlays and interval</td>
|
|
395
394
|
</tr>
|
|
@@ -483,8 +482,8 @@ think [MESSAGE] with bubble style [STYLE]
|
|
|
483
482
|
<td>Load Asset Manager 0.7.x without sandbox before using image/media assets</td>
|
|
484
483
|
</tr>
|
|
485
484
|
<tr>
|
|
486
|
-
<td>
|
|
487
|
-
<td>
|
|
485
|
+
<td>SVG overlay backend error</td>
|
|
486
|
+
<td>Use a host with <code>renderer.addOverlay()</code> or explicitly select <code>scratch-render</code></td>
|
|
488
487
|
</tr>
|
|
489
488
|
<tr>
|
|
490
489
|
<td>Async Input required error</td>
|
|
@@ -528,7 +527,7 @@ think [MESSAGE] with bubble style [STYLE]
|
|
|
528
527
|
</tr>
|
|
529
528
|
</tbody></table>
|
|
530
529
|
<h2>13. Automatic cleanup</h2>
|
|
531
|
-
<p>Bubble automatically releases its owned timers, text skins
|
|
530
|
+
<p>Bubble automatically releases its owned timers, overlay DOM, and image leases in the following cases. Explicit <code>scratch-render</code> mode also releases its text skins and renderer drawables.</p>
|
|
532
531
|
<ul>
|
|
533
532
|
<li><code>close this bubble</code> runs;</li>
|
|
534
533
|
<li>the same sprite or clone runs another <code>say</code> or <code>think</code>;</li>
|
package/docs/ja/index.html
CHANGED
|
@@ -69,9 +69,12 @@
|
|
|
69
69
|
<main id="manual" class="manual">
|
|
70
70
|
<h1>TurboWarp Bubble ブロック利用マニュアル</h1>
|
|
71
71
|
<p>このマニュアルでは、<code>turbowarp-bubble</code>をTurboWarpのカスタム拡張機能として使い、SVG本体、文字、キャラクター表情、目パチ、口パク、「次へ」アイコンを組み合わせたBubbleを表示します。</p>
|
|
72
|
+
<blockquote>
|
|
73
|
+
<p><strong>紙芝居DSL 4.0集約ランタイム:</strong> 集約ランタイムのパレットで<strong>Bubble</strong>見出し直下のドキュメントボタンを押すと、このマニュアルを開けます。集約されたブロックも、ここで説明するstyle、配置、portrait、逐次表示、音声、待機、animation、clone、自動解放の動作を保ち、拡張機能別の名前空間とBubbleアイコンで由来を識別できます。</p>
|
|
74
|
+
</blockquote>
|
|
72
75
|
<p><img src="../assets/block-quick-start.svg" alt="Next1とNext2を個別登録し、入力listenerを準備してBubble内蔵待機を使うブロック例"></p>
|
|
73
76
|
<h2 id="requirements">1. 必要な拡張機能</h2>
|
|
74
|
-
<p>入力待ちを含む完全な例では
|
|
77
|
+
<p>入力待ちを含む完全な例では5つの拡張機能を使います。TurboWarpの拡張機能ライブラリからTemporary Variablesを追加し、選択した機能に必要なカスタム拡張機能を「サンドボックスなしで実行」を許可して読み込みます。BubbleはSVG Text 0.8.0のhost-neutral layout providerをbundle内に持ち、既定のSVG overlayではskinを作りません。portrait、lip-sync、continue indicator、フルボイス、表示効果音などのメディアアセットにはAsset Managerが必要です。Async InputとRuntime ExpressionはBubble待機を使う場合だけ必要です。</p>
|
|
75
78
|
<table>
|
|
76
79
|
<thead>
|
|
77
80
|
<tr>
|
|
@@ -87,31 +90,26 @@
|
|
|
87
90
|
</tr>
|
|
88
91
|
<tr>
|
|
89
92
|
<td align="right">2</td>
|
|
90
|
-
<td>Async Input 0.
|
|
91
|
-
<td><code>https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-async-input@0.
|
|
93
|
+
<td>Async Input 0.4.0</td>
|
|
94
|
+
<td><code>https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-async-input@0.4.0/dist/async-input.js</code></td>
|
|
92
95
|
</tr>
|
|
93
96
|
<tr>
|
|
94
97
|
<td align="right">3</td>
|
|
95
|
-
<td>Runtime Expression 0.
|
|
96
|
-
<td><code>https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-runtime-expression@0.
|
|
98
|
+
<td>Runtime Expression 0.4.0</td>
|
|
99
|
+
<td><code>https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-runtime-expression@0.4.0/dist/runtime-expression.js</code></td>
|
|
97
100
|
</tr>
|
|
98
101
|
<tr>
|
|
99
102
|
<td align="right">4</td>
|
|
100
|
-
<td>Asset Manager 0.
|
|
101
|
-
<td><code>https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-asset-manager@0.
|
|
103
|
+
<td>Asset Manager 0.11.0</td>
|
|
104
|
+
<td><code>https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-asset-manager@0.11.0/dist/asset-manager.js</code></td>
|
|
102
105
|
</tr>
|
|
103
106
|
<tr>
|
|
104
107
|
<td align="right">5</td>
|
|
105
|
-
<td>
|
|
106
|
-
<td><code>https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-
|
|
107
|
-
</tr>
|
|
108
|
-
<tr>
|
|
109
|
-
<td align="right">6</td>
|
|
110
|
-
<td>Bubble 0.6.0</td>
|
|
111
|
-
<td><code>https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-bubble@0.6.0/dist/turbowarp-bubble.js</code></td>
|
|
108
|
+
<td>Bubble 0.8.0</td>
|
|
109
|
+
<td><code>https://cdn.jsdelivr.net/npm/@kubohiroya/turbowarp-bubble@0.8.0/dist/turbowarp-bubble.js</code></td>
|
|
112
110
|
</tr>
|
|
113
111
|
</tbody></table>
|
|
114
|
-
<p>開発中のBubbleを試す場合は、このリポジトリの<code>dist/turbowarp-bubble.js</code
|
|
112
|
+
<p>開発中のBubbleを試す場合は、このリポジトリの<code>dist/turbowarp-bubble.js</code>をローカルカスタム拡張機能として読み込みます。既定SVG overlayに必要なrenderer APIがない場合、画像・メディア機能の使用時にAsset Managerがない場合、待機開始時にAsync InputかRuntime Expressionがない場合は、Bubbleが明示的なエラーを返します。低レベルComposition APIでは別のtext capabilityを注入できます。</p>
|
|
115
113
|
<p>参考:</p>
|
|
116
114
|
<ul>
|
|
117
115
|
<li><a href="https://kubohiroya.github.io/turbowarp-asset-manager/ja/">Asset Manager 日本語ガイド</a></li>
|
|
@@ -176,21 +174,14 @@ register resource [costume:Assets:Next1] as asset [Next1]
|
|
|
176
174
|
register resource [costume:Assets:Next2] as asset [Next2]
|
|
177
175
|
</code></pre>
|
|
178
176
|
<p>URL画像を使う場合は、<code>RESOURCE_ID</code>へHTTPS URLを指定します。Bubbleに設定できるのは、Asset Managerへ登録済みでMIME typeが<code>image/*</code>のアセットだけです。</p>
|
|
179
|
-
<h2 id="text-style">3. 文字style
|
|
180
|
-
<p>SVG Text
|
|
181
|
-
<pre><code class="language-text">define
|
|
182
|
-
background [#fff4cc]
|
|
183
|
-
text [#332200]
|
|
184
|
-
font [Noto Sans JP]
|
|
185
|
-
size [100]
|
|
186
|
-
align [left]
|
|
187
|
-
bubble direction [up]
|
|
177
|
+
<h2 id="text-style">3. 文字layout styleを選ぶ</h2>
|
|
178
|
+
<p>standalone BubbleはSVG Text 0.8.0のlayout compositionを内包します。<code>default</code>または任意の名前を指定すると、初回参照時に背景透明のSVG Text既定styleとして初期化されます。</p>
|
|
179
|
+
<pre><code class="language-text">define bubble style [hero-dialogue] using text style [default]
|
|
188
180
|
</code></pre>
|
|
189
|
-
<p>Bubble
|
|
190
|
-
<p>SVG Text 0.4.xは文字providerです。名前付き文字styleの定義、SVG文字skinの生成、文字幅の測定を担当します。Bubbleの配置は<code>set bubble placement</code>で設定し、tailや吹き出し外形はSVG Text providerの責務ではありません。</p>
|
|
181
|
+
<p>独自のfont、色、alignmentを使うアプリhostは、<code>createSvgTextLayoutComposition()</code>へstyleを定義し、<code>createSvgTextOverlayTextCapability()</code>でBubbleへ注入します。既定経路も同じ<code>layoutText()</code>を使い、SVG文字skinは生成しません。Bubbleの配置、tail、吹き出し外形はBubble側が担当します。</p>
|
|
191
182
|
<h2 id="bubble-style">4. Bubble styleを定義する</h2>
|
|
192
|
-
<p>まず、Bubble style
|
|
193
|
-
<pre><code class="language-text">define bubble style [hero-dialogue] using text style [
|
|
183
|
+
<p>まず、Bubble style名と文字layout style名を関連付けます。</p>
|
|
184
|
+
<pre><code class="language-text">define bubble style [hero-dialogue] using text style [default]
|
|
194
185
|
set bubble placement [up-right] for bubble style [hero-dialogue]
|
|
195
186
|
set bubble distance [12] for bubble style [hero-dialogue]
|
|
196
187
|
set bubble visual style [NORMAL] for bubble style [hero-dialogue]
|
|
@@ -252,6 +243,7 @@ left / left-up-left / up-left / up-up-left
|
|
|
252
243
|
<p><code>NEGATIVE</code>はfill colorとborder colorで表現できるため独立styleにはしません。orientationとsegmentsも公開入力にせず、幅、フォント、文字数、禁則処理後の行数から外形寸法を自動計算する方針です。</p>
|
|
253
244
|
<p>続けて、表情レイヤーと入力待ちアイコンを設定します。</p>
|
|
254
245
|
<pre><code class="language-text">set portrait base [HeroFace] for bubble style [hero-dialogue]
|
|
246
|
+
set portrait [top-left] offset x [-4] y [6] zoom [120] % corner radius [12] px for bubble style [hero-dialogue]
|
|
255
247
|
|
|
256
248
|
set blink frames [HeroEyesOpen,HeroEyesClosed]
|
|
257
249
|
every [0.4] seconds for bubble style [hero-dialogue]
|
|
@@ -268,7 +260,10 @@ set continue frames [Next1,Next2]
|
|
|
268
260
|
<li>「次へ」はループが分かるよう2枚以上必要です。</li>
|
|
269
261
|
<li><code>SECONDS</code>は0より大きい秒数です。</li>
|
|
270
262
|
<li><code>ASSETS</code>を空にすると、そのアニメーション設定を解除します。</li>
|
|
271
|
-
<li
|
|
263
|
+
<li>portrait配置の既定値は<code>left</code>です。<code>left</code>/<code>right</code>は対応する端の上下中央、<code>top-left</code>/<code>top-right</code>/<code>bottom-left</code>/<code>bottom-right</code>は対応する隅へ揃えます。portrait用の列は維持されるため、大きなoffsetで移動しない限り文字と重なりません。</li>
|
|
264
|
+
<li>portraitのxは右正、yは上正です。zoomは96pxのportrait枠に対する0より大きい百分率で、Bubble全体のscaleより先に適用します。角丸半径は0以上のpixel値で、表示幅または表示高の半分を上限にします。</li>
|
|
265
|
+
<li><code>none</code>を選ぶか表情ベースを空にすると、目パチ・口パク設定を含むportrait全体を解除します。別の配置へ戻すときは、先に表情ベースを再設定します。</li>
|
|
266
|
+
<li>角丸はBubbleのfill色でベース・目パチ・口パクの各レイヤーをmaskします。<code>NO_BUBBLE</code>にはmaskに使うfillがないため、portraitは矩形表示のままです。</li>
|
|
272
267
|
</ul>
|
|
273
268
|
<h2 id="lifecycle">5. 逐次表示、音声、表示サイズ</h2>
|
|
274
269
|
<p>Bubbleはセリフ全体を一度に描画するだけでなく、<code>CHARACTER</code>、<code>WORD</code>、<code>LINE</code>、<code>BLOCK</code>の単位で順次表示できます。<code>WORD</code>は形態素解析を行わず、空白または指定した区切り文字集合で分割します。区切り文字を表示するかどうかも選べます。</p>
|
|
@@ -352,7 +347,7 @@ think [MESSAGE] with bubble style [STYLE]
|
|
|
352
347
|
<li>各clone自身から<code>say</code>または<code>think</code>を実行します。</li>
|
|
353
348
|
<li>animation mode変更とcloseも、表示したのと同じcloneから実行します。</li>
|
|
354
349
|
</ol>
|
|
355
|
-
<p>cloneが停止・削除された場合は、そのtargetに属するtimer、
|
|
350
|
+
<p>cloneが停止・削除された場合は、そのtargetに属するtimer、overlay DOM、画像leaseが自動解放されます。明示的な<code>scratch-render</code>ではskinとdrawableも解放されます。</p>
|
|
356
351
|
<h2 id="cleanup">11. ブロック一覧</h2>
|
|
357
352
|
<table>
|
|
358
353
|
<thead>
|
|
@@ -390,6 +385,10 @@ think [MESSAGE] with bubble style [STYLE]
|
|
|
390
385
|
<td>portraitのベース画像を設定する</td>
|
|
391
386
|
</tr>
|
|
392
387
|
<tr>
|
|
388
|
+
<td><code>set portrait [PLACEMENT] offset x [X] y [Y] zoom [ZOOM] % corner radius [RADIUS] px for bubble style [STYLE]</code></td>
|
|
389
|
+
<td>portraitの有無、端/隅の配置、変形、角丸を設定する</td>
|
|
390
|
+
</tr>
|
|
391
|
+
<tr>
|
|
393
392
|
<td><code>set blink frames [ASSETS] every [SECONDS] seconds for bubble style [STYLE]</code></td>
|
|
394
393
|
<td>目パチ差分と間隔を設定する</td>
|
|
395
394
|
</tr>
|
|
@@ -483,8 +482,8 @@ think [MESSAGE] with bubble style [STYLE]
|
|
|
483
482
|
<td>画像・メディアアセットを使う前にAsset Manager 0.7.xを読み込む</td>
|
|
484
483
|
</tr>
|
|
485
484
|
<tr>
|
|
486
|
-
<td
|
|
487
|
-
<td>
|
|
485
|
+
<td>SVG overlay backendのエラー</td>
|
|
486
|
+
<td><code>renderer.addOverlay()</code>対応hostを使うか<code>scratch-render</code>を明示する</td>
|
|
488
487
|
</tr>
|
|
489
488
|
<tr>
|
|
490
489
|
<td>Async Inputを要求するエラー</td>
|
|
@@ -528,7 +527,7 @@ think [MESSAGE] with bubble style [STYLE]
|
|
|
528
527
|
</tr>
|
|
529
528
|
</tbody></table>
|
|
530
529
|
<h2>13. 自動解放されるタイミング</h2>
|
|
531
|
-
<p>次の場合、Bubbleが所有するtimer、text skin
|
|
530
|
+
<p>次の場合、Bubbleが所有するtimer、overlay DOM、画像leaseは自動的に解放されます。<code>scratch-render</code>を明示した場合はtext skinとrenderer drawableも解放されます。</p>
|
|
532
531
|
<ul>
|
|
533
532
|
<li><code>close this bubble</code></li>
|
|
534
533
|
<li>同じsprite/cloneで次の<code>say</code>または<code>think</code>を実行したとき</li>
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# 0.8.0: default SVG overlay backend
|
|
2
|
+
|
|
3
|
+
## 追加内容
|
|
4
|
+
|
|
5
|
+
- `bubbleRenderBackend`の既定値を`"svg-overlay"`へ変更する。
|
|
6
|
+
- `"scratch-render"`は明示指定できるrollback backendとして保持する。
|
|
7
|
+
- `renderer.addOverlay(root, "scale")`上の共有SVG rootにBubble surfaceを描画する。
|
|
8
|
+
- host-neutralな`svgOverlayTextCapability`と、解放可能な`svgOverlayImageCapability`を公開する。
|
|
9
|
+
- SVG Text 0.8.0を通常dependencyとし、既定で`createSvgTextLayoutComposition().layoutText()`の行layoutを座標・角丸ごと変換する。
|
|
10
|
+
- Bubble側の`createAssetManagerSvgOverlayImageCapability()`でAsset Managerの汎用DOM resourceを変換する。依存方向はBubbleからAsset Managerへの一方向を維持する。
|
|
11
|
+
- overlay API未対応hostは`BUBBLE-RUNTIME-004`を返す。`svgOverlayUnsupportedBehavior: "fallback"`を明示した場合だけ既存backendへ戻る。
|
|
12
|
+
|
|
13
|
+
## 自動検証結果
|
|
14
|
+
|
|
15
|
+
2026-08-18時点のunit testでは、次を合格条件としている。
|
|
16
|
+
|
|
17
|
+
- optionsを省略した既定経路でshow、text更新、shake、shape animationを行っても、Bubbleから`createDrawable()`、`createSVGSkin()`、`createBitmapSkin()`を呼ばない(許容値: 0回)。
|
|
18
|
+
- 2つのBubbleが1つのrootを共有し、最後のclose後に`removeOverlay()`を1回呼ぶ(許容値: 残存root 0、重複remove 0)。
|
|
19
|
+
- native size変更後にrootの`viewBox`を同期し、現在表示中のtextと`RESERVED`全文layoutを再計算する。
|
|
20
|
+
- `script`、event handler、`foreignObject`、未許可data URLを拒否する。
|
|
21
|
+
- capability所有のblob URLをreplacement/close時に各1回解放する。
|
|
22
|
+
- renderer cleanupが失敗した場合も、残りのlistener、DOM、image leaseの解放を継続してerrorを集約する。
|
|
23
|
+
- Asset Managerのsanitize済みSVG resourceをBubble側adapter経由で描画し、close時にleaseを1回解放する。
|
|
24
|
+
- SVG Textのhost-neutral layoutをBubble側adapterで変換し、renderer skinを生成せず行座標を維持する。
|
|
25
|
+
|
|
26
|
+
## release前のmanual gate
|
|
27
|
+
|
|
28
|
+
上流の[turbowarp-svg-text#26](https://github.com/kubohiroya/turbowarp-svg-text/issues/26)で公開されたhost-neutral layoutを0.8.0の通常dependencyとして採用し、[turbowarp-asset-manager#103](https://github.com/kubohiroya/turbowarp-asset-manager/issues/103)のDOM image resourceは0.12.0対応adapterから任意注入する。既定値変更後も次のmanual gateをrelease前に実施し、実測値をこの表へ記録する。
|
|
29
|
+
|
|
30
|
+
| 項目 | host | 許容基準 | 結果 |
|
|
31
|
+
| -------------------------- | ------------------------------------ | --------------------------------------------------------- | ------ |
|
|
32
|
+
| say/think、全visual style | Web、Desktop、Packager | reference screenshotの主要geometry差異なし | 未測定 |
|
|
33
|
+
| actor/background配置 | native 480×360と変更size、fullscreen | stage外clip、tail方向、centerに回帰なし | 未測定 |
|
|
34
|
+
| typewriter | 1,000 update | Chromium readback警告0、`Silhouette.unlazy()`増分0 | 未測定 |
|
|
35
|
+
| shape/shake/zoom | 各10秒 | dropped frame率が既存backend比+5 percentage points以内 | 未測定 |
|
|
36
|
+
| memory/lifecycle | show/replace/stopを100回 | close後のBubble DOM、object URL、animation、listener残存0 | 未測定 |
|
|
37
|
+
| raw canvas capture | `toDataURL()`、`captureStream()` | Bubbleが含まれない既知制約を確認 | 未測定 |
|
|
38
|
+
|
|
39
|
+
## capture制約
|
|
40
|
+
|
|
41
|
+
SVG overlayはbrowser/OSの最終compositeには含まれるが、WebGL canvasだけを取得する`renderer.canvas.toDataURL()`、`toBlob()`、`captureStream()`には含まれない。初期実装では専用compositorを提供しない。
|
|
42
|
+
|
|
43
|
+
## rollback
|
|
44
|
+
|
|
45
|
+
設定へ`bubbleRenderBackend: "scratch-render"`を明示する。公開済みの設定値と既存backendは削除せず、重大なhost回帰がある場合は明示errorまたはpatch releaseで対処する。暗黙fallbackは行わないため、rollbackはhost側で確認できる。
|