@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
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type BubbleSvgOverlayImageCapability } from "./svg-overlay-surface.js";
|
|
2
|
+
export interface AssetManagerDOMImageResource {
|
|
3
|
+
readonly height: number;
|
|
4
|
+
readonly mimeType: string;
|
|
5
|
+
readonly url: string;
|
|
6
|
+
readonly width: number;
|
|
7
|
+
release(): void;
|
|
8
|
+
}
|
|
9
|
+
export interface AssetManagerDOMImageCapability {
|
|
10
|
+
getMimeType(name: unknown): string;
|
|
11
|
+
isRegistered(name: unknown): boolean;
|
|
12
|
+
resolveDOMImageResource(name: unknown): Promise<AssetManagerDOMImageResource>;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Adapts Asset Manager's host-neutral DOM resource API to Bubble's SVG overlay contract.
|
|
16
|
+
* Asset Manager owns byte validation and SVG sanitization; Bubble owns its capability shape.
|
|
17
|
+
*/
|
|
18
|
+
export declare function createAssetManagerSvgOverlayImageCapability(capabilityInput: AssetManagerDOMImageCapability): BubbleSvgOverlayImageCapability;
|
|
@@ -3,12 +3,14 @@ import { type BubbleOffset, type BubbleOffsetInput } from "./actor-transform.js"
|
|
|
3
3
|
import { type BubbleVisualStyle } from "./bubble-svg.js";
|
|
4
4
|
import { type BubbleRevealInput, type BubbleRevealUnit, type NormalizedBubbleReveal } from "./reveal.js";
|
|
5
5
|
import type { BubbleTextCapability, BubbleTextTarget } from "./text-capability.js";
|
|
6
|
+
import { type BubblePortraitOffset, type BubblePortraitOffsetInput, type BubblePortraitPlacement } from "./portrait-layout.js";
|
|
6
7
|
export type { BubbleTextCapability, BubbleTextTarget, } from "./text-capability.js";
|
|
7
8
|
export { UnicodeLineBreakProvider, wrapText, type LineBreakOpportunity, type LineBreakProvider, type TextWidthMeasurer, type WrappedTextLayout, type WrappedTextLine, type WrapTextInput, } from "./text-layout.js";
|
|
8
9
|
export { bubbleBackgroundRegions, bubbleDirectionAliases, bubbleDirectionNames, defaultBubblePlacementInput, normalizeBubblePlacement, type BubbleActorPlacement, type BubbleBackgroundPlacement, type BubbleBackgroundRegion, type BubbleDirectionAlias, type BubbleDirectionName, type BubblePlacement, type BubblePlacementInput, } from "./placement.js";
|
|
9
10
|
export { actorRelativeBubbleCenter, defaultBubbleDistance, defaultBubbleOffset, defaultBubbleTailLength, normalizeBubbleDistance, normalizeBubbleOffset, normalizeBubbleTailLength, type ActorBounds, type ActorRelativeCenterInput, type BubbleOffset, type BubbleOffsetInput, } from "./actor-transform.js";
|
|
10
11
|
export { bubbleBodyCenterOffset, bubbleVisualStyles, renderBubbleSvg, type BubbleBodyCenterOffsetInput, type BubbleShapeTransition, type BubbleVisualStyle, type RenderBubbleSvgInput, } from "./bubble-svg.js";
|
|
11
12
|
export { bubbleRevealUnits, normalizeBubbleReveal, revealedBubbleText, splitBubbleText, type BubbleRevealInput, type BubbleRevealLayout, type BubbleRevealUnit, type NormalizedBubbleReveal, } from "./reveal.js";
|
|
13
|
+
export { bubblePortraitPlacements, defaultBubblePortraitCornerRadius, defaultBubblePortraitOffset, defaultBubblePortraitPlacement, normalizeBubblePortraitCornerRadius, normalizeBubblePortraitOffset, normalizeBubblePortraitPlacement, type BubblePortraitOffset, type BubblePortraitOffsetInput, type BubblePortraitPlacement, } from "./portrait-layout.js";
|
|
12
14
|
export type BubbleKind = "say" | "think";
|
|
13
15
|
export type BubbleAnimationMode = "idle" | "talking" | "awaiting-continue";
|
|
14
16
|
export type BubbleEase = "linear" | "easeIn" | "easeOut" | "easeInOut";
|
|
@@ -42,6 +44,11 @@ export interface BubblePortraitInput {
|
|
|
42
44
|
readonly base: string;
|
|
43
45
|
readonly blink?: BubbleFrameAnimationInput;
|
|
44
46
|
readonly lipSync?: BubbleFrameAnimationInput;
|
|
47
|
+
readonly placement?: BubblePortraitPlacement;
|
|
48
|
+
/** Portrait-local [x, y, zoom percent]. */
|
|
49
|
+
readonly offset?: BubblePortraitOffsetInput;
|
|
50
|
+
/** Radius in pixels. */
|
|
51
|
+
readonly cornerRadius?: number;
|
|
45
52
|
}
|
|
46
53
|
export interface BubbleStyleInput {
|
|
47
54
|
readonly name: string;
|
|
@@ -70,6 +77,9 @@ export interface BubblePortrait {
|
|
|
70
77
|
readonly base: string;
|
|
71
78
|
readonly blink?: BubbleFrameAnimation;
|
|
72
79
|
readonly lipSync?: BubbleFrameAnimation;
|
|
80
|
+
readonly placement: BubblePortraitPlacement;
|
|
81
|
+
readonly offset: BubblePortraitOffset;
|
|
82
|
+
readonly cornerRadius: number;
|
|
73
83
|
}
|
|
74
84
|
export interface BubbleStyle {
|
|
75
85
|
readonly name: string;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare const bubblePortraitPlacements: readonly ["left", "right", "top-left", "top-right", "bottom-left", "bottom-right"];
|
|
2
|
+
export type BubblePortraitPlacement = (typeof bubblePortraitPlacements)[number];
|
|
3
|
+
export type BubblePortraitOffsetInput = readonly [x: number, y: number] | readonly [x: number, y: number, zoomPercent: number];
|
|
4
|
+
export interface BubblePortraitOffset {
|
|
5
|
+
readonly x: number;
|
|
6
|
+
readonly y: number;
|
|
7
|
+
readonly zoomPercent: number;
|
|
8
|
+
}
|
|
9
|
+
export declare const defaultBubblePortraitPlacement: BubblePortraitPlacement;
|
|
10
|
+
export declare const defaultBubblePortraitOffset: BubblePortraitOffset;
|
|
11
|
+
export declare const defaultBubblePortraitCornerRadius = 0;
|
|
12
|
+
export declare function normalizeBubblePortraitPlacement(value: unknown): BubblePortraitPlacement;
|
|
13
|
+
export declare function normalizeBubblePortraitOffset(value: BubblePortraitOffsetInput): BubblePortraitOffset;
|
|
14
|
+
export declare function normalizeBubblePortraitCornerRadius(value: unknown): number;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { BubbleMotionInput, BubbleScheduler } from "./composition.js";
|
|
2
|
+
export declare function clampMotionProgress(value: number): number;
|
|
3
|
+
export declare function easeMotionProgress(value: number, ease: BubbleMotionInput["ease"]): number;
|
|
4
|
+
/**
|
|
5
|
+
* Drive a motion with Bubble's scheduler so tests and non-browser hosts can
|
|
6
|
+
* provide deterministic time without requestAnimationFrame.
|
|
7
|
+
*/
|
|
8
|
+
export declare function runMotionTimeline(scheduler: BubbleScheduler, durationSeconds: number, onFrame: (progress: number) => void): Promise<void>;
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { type BubbleImageCapability, type BubbleScheduler, type BubbleStyle, type BubbleSurface, type BubbleTextCapability } from "./composition.js";
|
|
2
|
+
export type BubbleRenderBackend = "scratch-render" | "svg-overlay";
|
|
3
|
+
export type BubbleOverlayUnsupportedBehavior = "error" | "fallback";
|
|
4
|
+
export declare const bubbleRenderBackends: readonly ["scratch-render", "svg-overlay"];
|
|
5
|
+
export declare const defaultBubbleRenderBackend: BubbleRenderBackend;
|
|
6
|
+
export declare const defaultBubbleOverlayUnsupportedBehavior: BubbleOverlayUnsupportedBehavior;
|
|
7
|
+
export interface BubbleSvgOverlayTextLine {
|
|
8
|
+
/** Optional baseline relative to the center of the text layout. */
|
|
9
|
+
readonly baseline?: number;
|
|
10
|
+
readonly text: string;
|
|
11
|
+
/** Optional x coordinate relative to the center of the text layout. */
|
|
12
|
+
readonly x?: number;
|
|
13
|
+
}
|
|
14
|
+
export interface BubbleSvgOverlayTextLayout {
|
|
15
|
+
readonly alignment: "center" | "left" | "right";
|
|
16
|
+
readonly backgroundColor?: string;
|
|
17
|
+
readonly backgroundCornerRadius?: number;
|
|
18
|
+
readonly fill: string;
|
|
19
|
+
readonly fontFamily: string;
|
|
20
|
+
readonly fontSize: number;
|
|
21
|
+
readonly fontStyle?: "normal" | "italic";
|
|
22
|
+
readonly fontWeight?: "normal" | "bold" | number;
|
|
23
|
+
readonly height: number;
|
|
24
|
+
readonly lineHeight: number;
|
|
25
|
+
readonly lines: readonly (string | BubbleSvgOverlayTextLine)[];
|
|
26
|
+
readonly preserveWhitespace?: boolean;
|
|
27
|
+
readonly width: number;
|
|
28
|
+
}
|
|
29
|
+
export interface BubbleSvgOverlayTextCapability {
|
|
30
|
+
layoutText(input: Readonly<{
|
|
31
|
+
nativeSize: Readonly<{
|
|
32
|
+
height: number;
|
|
33
|
+
width: number;
|
|
34
|
+
}>;
|
|
35
|
+
styleName: string;
|
|
36
|
+
text: string;
|
|
37
|
+
}>): BubbleSvgOverlayTextLayout;
|
|
38
|
+
measureText?(input: Readonly<{
|
|
39
|
+
nativeSize: Readonly<{
|
|
40
|
+
height: number;
|
|
41
|
+
width: number;
|
|
42
|
+
}>;
|
|
43
|
+
styleName: string;
|
|
44
|
+
text: string;
|
|
45
|
+
}>): number;
|
|
46
|
+
}
|
|
47
|
+
export interface BubbleSvgOverlayImageResource {
|
|
48
|
+
readonly height: number;
|
|
49
|
+
readonly mimeType: string;
|
|
50
|
+
/** A capability-owned blob URL or an approved raster data URL. */
|
|
51
|
+
readonly src: string;
|
|
52
|
+
/** Required when mimeType is image/svg+xml; the provider owns sanitizing bytes. */
|
|
53
|
+
readonly svgSecurity?: "sanitized";
|
|
54
|
+
readonly width: number;
|
|
55
|
+
/** Required for blob URLs and called on replacement and disposal. */
|
|
56
|
+
readonly release?: () => void | Promise<void>;
|
|
57
|
+
}
|
|
58
|
+
export interface BubbleSvgOverlayImageCapability {
|
|
59
|
+
getMimeType(name: unknown): string;
|
|
60
|
+
isRegistered(name: unknown): boolean;
|
|
61
|
+
resolveImage(name: unknown): BubbleSvgOverlayImageResource | Promise<BubbleSvgOverlayImageResource>;
|
|
62
|
+
}
|
|
63
|
+
export interface BubbleSvgOverlayRenderer {
|
|
64
|
+
addOverlay(element: Element, mode?: string): unknown;
|
|
65
|
+
getNativeSize(): unknown;
|
|
66
|
+
removeOverlay(element: Element): void;
|
|
67
|
+
on?(event: string, listener: (...args: unknown[]) => void): void;
|
|
68
|
+
off?(event: string, listener: (...args: unknown[]) => void): void;
|
|
69
|
+
}
|
|
70
|
+
export interface BubbleSvgOverlayActor {
|
|
71
|
+
readonly id: string;
|
|
72
|
+
readonly isStage: boolean;
|
|
73
|
+
readonly visible?: boolean;
|
|
74
|
+
readonly x?: number;
|
|
75
|
+
readonly y?: number;
|
|
76
|
+
getBoundsForBubble?(): {
|
|
77
|
+
readonly bottom: number;
|
|
78
|
+
readonly left: number;
|
|
79
|
+
readonly right: number;
|
|
80
|
+
readonly top: number;
|
|
81
|
+
};
|
|
82
|
+
onTargetVisualChange?: ((target?: BubbleSvgOverlayActor) => void) | null;
|
|
83
|
+
}
|
|
84
|
+
export interface BubbleSvgOverlaySurfaceManager {
|
|
85
|
+
readonly document: Document;
|
|
86
|
+
readonly renderer: BubbleSvgOverlayRenderer;
|
|
87
|
+
acquire(group: SVGGElement): void;
|
|
88
|
+
release(group: SVGGElement): void;
|
|
89
|
+
updateNativeSize(): Readonly<{
|
|
90
|
+
height: number;
|
|
91
|
+
width: number;
|
|
92
|
+
}>;
|
|
93
|
+
}
|
|
94
|
+
export declare function createSvgOverlayTextAdapter(capabilityInput: BubbleSvgOverlayTextCapability, renderer: Pick<BubbleSvgOverlayRenderer, "getNativeSize">): BubbleTextCapability;
|
|
95
|
+
export declare function createSvgOverlayImageAdapter(capabilityInput: BubbleSvgOverlayImageCapability): BubbleImageCapability;
|
|
96
|
+
export declare function createSvgOverlaySurfaceManager(renderer: BubbleSvgOverlayRenderer, documentInput: Document): BubbleSvgOverlaySurfaceManager;
|
|
97
|
+
export declare function createSvgOverlaySurface(manager: BubbleSvgOverlaySurfaceManager, actor: BubbleSvgOverlayActor, actorKey: string, style: BubbleStyle, scheduler: BubbleScheduler): BubbleSurface;
|
|
@@ -9,8 +9,8 @@ export type BubbleTextTarget = object;
|
|
|
9
9
|
* Text rendering contract consumed by Bubble composition.
|
|
10
10
|
*
|
|
11
11
|
* Bubble owns placement, outer shape, portraits, reveal, and animation. A
|
|
12
|
-
* text adapter owns text styles,
|
|
13
|
-
*
|
|
12
|
+
* text adapter owns text styles, layout or rendering, measurement, and target
|
|
13
|
+
* resource release.
|
|
14
14
|
*/
|
|
15
15
|
export interface BubbleTextCapability {
|
|
16
16
|
setText(input: {
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { type BubbleComposition, type BubbleCompositionOptions, type BubbleAudioCapability, type BubbleImageCapability, type BubbleScheduler, type BubbleTextCapability } from "./composition.js";
|
|
2
2
|
import { type TurboWarpSvgTextExtension } from "./turbowarp-svg-text-adapter.js";
|
|
3
|
-
export {
|
|
3
|
+
export { createAssetManagerSvgOverlayImageCapability, type AssetManagerDOMImageCapability, type AssetManagerDOMImageResource, } from "./asset-manager-image-adapter.js";
|
|
4
|
+
export { createSvgTextCompositionCapability, createSvgTextOverlayTextCapability, createTurboWarpSvgTextCapability, type SvgTextLayoutCompositionLike, type TurboWarpSvgTextExtension, } from "./turbowarp-svg-text-adapter.js";
|
|
5
|
+
import { type BubbleOverlayUnsupportedBehavior, type BubbleRenderBackend, type BubbleSvgOverlayImageCapability, type BubbleSvgOverlayTextCapability } from "./svg-overlay-surface.js";
|
|
6
|
+
export { createSvgOverlayImageAdapter, createSvgOverlaySurface, createSvgOverlaySurfaceManager, createSvgOverlayTextAdapter, bubbleRenderBackends, defaultBubbleOverlayUnsupportedBehavior, defaultBubbleRenderBackend, type BubbleOverlayUnsupportedBehavior, type BubbleRenderBackend, type BubbleSvgOverlayActor, type BubbleSvgOverlayImageCapability, type BubbleSvgOverlayImageResource, type BubbleSvgOverlayRenderer, type BubbleSvgOverlaySurfaceManager, type BubbleSvgOverlayTextCapability, type BubbleSvgOverlayTextLine, type BubbleSvgOverlayTextLayout, } from "./svg-overlay-surface.js";
|
|
4
7
|
export interface TurboWarpBubbleTarget {
|
|
5
8
|
readonly id: string;
|
|
6
9
|
readonly isStage: boolean;
|
|
@@ -30,6 +33,10 @@ export interface TurboWarpBubbleRenderer {
|
|
|
30
33
|
/** Scratch/TurboWarp's ghost effect is used to implement fade motions. */
|
|
31
34
|
updateDrawableEffect?(drawableId: number, effectName: string, value: number): void;
|
|
32
35
|
setDrawableOrder?(drawableId: number, order: number, layerGroup: string, relative?: boolean): void;
|
|
36
|
+
addOverlay?(element: Element, mode?: string): unknown;
|
|
37
|
+
removeOverlay?(element: Element): void;
|
|
38
|
+
on?(event: string, listener: (...args: unknown[]) => void): void;
|
|
39
|
+
off?(event: string, listener: (...args: unknown[]) => void): void;
|
|
33
40
|
}
|
|
34
41
|
export interface TurboWarpAssetManagerExtension {
|
|
35
42
|
isLoaded(args: Readonly<{
|
|
@@ -57,13 +64,23 @@ export interface TurboWarpBubbleRuntime {
|
|
|
57
64
|
requestRedraw?(): void;
|
|
58
65
|
}
|
|
59
66
|
export interface TurboWarpBubbleCompositionOptions {
|
|
67
|
+
/** Defaults to the skin-free svg-overlay backend. */
|
|
68
|
+
readonly bubbleRenderBackend?: BubbleRenderBackend;
|
|
69
|
+
/** Defaults to error so the skin-free default never silently creates skins. */
|
|
70
|
+
readonly svgOverlayUnsupportedBehavior?: BubbleOverlayUnsupportedBehavior;
|
|
71
|
+
/** Host-neutral text layout supplied by turbowarp-svg-text or another host. */
|
|
72
|
+
readonly svgOverlayTextCapability?: BubbleSvgOverlayTextCapability;
|
|
73
|
+
/** Releasable DOM image resources supplied by Asset Manager or another host. */
|
|
74
|
+
readonly svgOverlayImageCapability?: BubbleSvgOverlayImageCapability;
|
|
75
|
+
/** Browser document override for packaged players and deterministic tests. */
|
|
76
|
+
readonly document?: Document;
|
|
60
77
|
readonly imageResolver?: BubbleImageCapability;
|
|
61
78
|
readonly audio?: BubbleAudioCapability;
|
|
62
79
|
readonly textCapability?: BubbleTextCapability;
|
|
63
80
|
readonly scheduler?: BubbleScheduler;
|
|
64
81
|
readonly onAnimationError?: BubbleCompositionOptions["onAnimationError"];
|
|
65
82
|
}
|
|
66
|
-
export type BubbleRuntimeAdapterErrorCode = "BUBBLE-RUNTIME-001" | "BUBBLE-RUNTIME-002" | "BUBBLE-RUNTIME-003";
|
|
83
|
+
export type BubbleRuntimeAdapterErrorCode = "BUBBLE-RUNTIME-001" | "BUBBLE-RUNTIME-002" | "BUBBLE-RUNTIME-003" | "BUBBLE-RUNTIME-004";
|
|
67
84
|
export declare class BubbleRuntimeAdapterError extends Error {
|
|
68
85
|
readonly code: BubbleRuntimeAdapterErrorCode;
|
|
69
86
|
constructor(code: BubbleRuntimeAdapterErrorCode, message: string);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { BubbleTextCapability } from "./text-capability.js";
|
|
2
|
+
import type { BubbleSvgOverlayTextCapability } from "./svg-overlay-surface.js";
|
|
2
3
|
export interface TurboWarpSvgTextExtension {
|
|
3
4
|
setText(args: Readonly<{
|
|
4
5
|
STYLE: unknown;
|
|
@@ -9,6 +10,34 @@ export interface TurboWarpSvgTextExtension {
|
|
|
9
10
|
measureText?(styleName: unknown, text: unknown): number;
|
|
10
11
|
releaseTextActor(target: unknown): boolean;
|
|
11
12
|
}
|
|
13
|
+
interface SvgTextLayoutLineLike {
|
|
14
|
+
readonly baseline: number;
|
|
15
|
+
readonly text: string;
|
|
16
|
+
readonly width: number;
|
|
17
|
+
readonly x: number;
|
|
18
|
+
}
|
|
19
|
+
interface SvgTextLayoutLike {
|
|
20
|
+
readonly height: number;
|
|
21
|
+
readonly lines: readonly SvgTextLayoutLineLike[];
|
|
22
|
+
readonly preserveWhitespace: boolean;
|
|
23
|
+
readonly style: Readonly<{
|
|
24
|
+
alignment: "center" | "left" | "right";
|
|
25
|
+
backgroundColor: string;
|
|
26
|
+
cornerRadius: number;
|
|
27
|
+
font: string;
|
|
28
|
+
fontSize: number;
|
|
29
|
+
lineHeight: number;
|
|
30
|
+
textColor: string;
|
|
31
|
+
}>;
|
|
32
|
+
readonly width: number;
|
|
33
|
+
}
|
|
34
|
+
export interface SvgTextLayoutCompositionLike {
|
|
35
|
+
layoutText(input: Readonly<{
|
|
36
|
+
nativeSize: readonly [width: number, height: number];
|
|
37
|
+
styleName: string;
|
|
38
|
+
text: string;
|
|
39
|
+
}>): SvgTextLayoutLike;
|
|
40
|
+
}
|
|
12
41
|
/**
|
|
13
42
|
* Adapt the TurboWarp SVG Text extension to Bubble's host-neutral text
|
|
14
43
|
* capability contract.
|
|
@@ -19,3 +48,9 @@ export declare function createTurboWarpSvgTextCapability(extensionInput: unknown
|
|
|
19
48
|
* This helper keeps the core package independent from SVG Text's target type.
|
|
20
49
|
*/
|
|
21
50
|
export declare function createSvgTextCompositionCapability(compositionInput: unknown): BubbleTextCapability;
|
|
51
|
+
/**
|
|
52
|
+
* Adapt SVG Text's host-neutral layout composition to Bubble's SVG overlay.
|
|
53
|
+
* The adapter preserves SVG Text's line coordinates without creating skins.
|
|
54
|
+
*/
|
|
55
|
+
export declare function createSvgTextOverlayTextCapability(compositionInput: SvgTextLayoutCompositionLike): BubbleSvgOverlayTextCapability;
|
|
56
|
+
export {};
|
|
@@ -78,63 +78,38 @@
|
|
|
78
78
|
<text x="312" y="302" class="small">Next2</text>
|
|
79
79
|
<text x="443" y="302" class="small">次へアイコン 2枚目</text>
|
|
80
80
|
</g></g>
|
|
81
|
-
<g role="group" aria-label="SVG Textでdialogue-text styleを定義">
|
|
82
|
-
<rect x="48" y="506" width="510" height="94" rx="12" fill="#9966ff" stroke="#000000" stroke-opacity="0.14" stroke-width="2"/>
|
|
83
|
-
<rect x="66" y="506" width="28" height="6" rx="3" fill="#000000" fill-opacity="0.18"/>
|
|
84
|
-
<text x="65" y="533" class="block-text" style="font-size:12px">define text style</text>
|
|
85
|
-
<rect x="198.47999999999996" y="514" width="112.71999999999998" height="25" rx="12.5" fill="#ffffff" fill-opacity="0.96"/>
|
|
86
|
-
<text x="206.47999999999996" y="533" class="input-text" style="font-size:12px">dialogue-text</text>
|
|
87
|
-
<text x="318.19999999999993" y="533" class="block-text" style="font-size:12px">background</text>
|
|
88
|
-
<rect x="399.5999999999999" y="514" width="68.07999999999998" height="25" rx="12.5" fill="#ffffff" fill-opacity="0.96"/>
|
|
89
|
-
<text x="407.5999999999999" y="533" class="input-text" style="font-size:12px">#fff4cc</text>
|
|
90
|
-
<text x="65" y="558" class="block-text" style="font-size:12px">text</text>
|
|
91
|
-
<rect x="101.75999999999999" y="539" width="68.07999999999998" height="25" rx="12.5" fill="#ffffff" fill-opacity="0.96"/>
|
|
92
|
-
<text x="109.75999999999999" y="558" class="input-text" style="font-size:12px">#332200</text>
|
|
93
|
-
<text x="176.83999999999997" y="558" class="block-text" style="font-size:12px">font</text>
|
|
94
|
-
<rect x="213.59999999999997" y="539" width="105.27999999999999" height="25" rx="12.5" fill="#ffffff" fill-opacity="0.96"/>
|
|
95
|
-
<text x="221.59999999999997" y="558" class="input-text" style="font-size:12px">Noto Sans JP</text>
|
|
96
|
-
<text x="325.87999999999994" y="558" class="block-text" style="font-size:12px">size</text>
|
|
97
|
-
<rect x="362.63999999999993" y="539" width="38.32" height="25" rx="12.5" fill="#ffffff" fill-opacity="0.96"/>
|
|
98
|
-
<text x="370.63999999999993" y="558" class="input-text" style="font-size:12px">100</text>
|
|
99
|
-
<text x="407.9599999999999" y="558" class="block-text" style="font-size:12px">align</text>
|
|
100
|
-
<rect x="452.1599999999999" y="539" width="45.76" height="25" rx="12.5" fill="#ffffff" fill-opacity="0.96"/>
|
|
101
|
-
<text x="460.1599999999999" y="558" class="input-text" style="font-size:12px">left</text>
|
|
102
|
-
<text x="65" y="583" class="block-text" style="font-size:12px">bubble direction</text>
|
|
103
|
-
<rect x="191.03999999999996" y="564" width="34" height="25" rx="12.5" fill="#ffffff" fill-opacity="0.96"/>
|
|
104
|
-
<text x="199.03999999999996" y="583" class="input-text" style="font-size:12px">up</text>
|
|
105
|
-
</g>
|
|
106
81
|
<g role="group" aria-label="Bubble styleを定義">
|
|
107
|
-
<rect x="48" y="
|
|
108
|
-
<rect x="66" y="
|
|
109
|
-
<text x="65" y="
|
|
110
|
-
<rect x="213.35999999999999" y="
|
|
111
|
-
<text x="221.35999999999999" y="
|
|
112
|
-
<text x="333.08" y="
|
|
113
|
-
<rect x="459.11999999999995" y="
|
|
114
|
-
<text x="467.11999999999995" y="
|
|
82
|
+
<rect x="48" y="506" width="510" height="50" rx="12" fill="#ff6680" stroke="#000000" stroke-opacity="0.14" stroke-width="2"/>
|
|
83
|
+
<rect x="66" y="506" width="28" height="6" rx="3" fill="#000000" fill-opacity="0.18"/>
|
|
84
|
+
<text x="65" y="537" class="block-text" style="font-size:12px">define bubble style</text>
|
|
85
|
+
<rect x="213.35999999999999" y="518" width="112.71999999999998" height="25" rx="12.5" fill="#ffffff" fill-opacity="0.96"/>
|
|
86
|
+
<text x="221.35999999999999" y="537" class="input-text" style="font-size:12px">hero-dialogue</text>
|
|
87
|
+
<text x="333.08" y="537" class="block-text" style="font-size:12px">using text style</text>
|
|
88
|
+
<rect x="459.11999999999995" y="518" width="68.07999999999998" height="25" rx="12.5" fill="#ffffff" fill-opacity="0.96"/>
|
|
89
|
+
<text x="467.11999999999995" y="537" class="input-text" style="font-size:12px">default</text>
|
|
115
90
|
</g>
|
|
116
91
|
<g role="group" aria-label="Bubbleの配置を設定">
|
|
117
|
-
<rect x="48" y="
|
|
118
|
-
<rect x="66" y="
|
|
119
|
-
<text x="65" y="
|
|
120
|
-
<rect x="220.79999999999998" y="
|
|
121
|
-
<text x="228.79999999999998" y="
|
|
122
|
-
<text x="303.31999999999994" y="
|
|
123
|
-
<rect x="429.3599999999999" y="
|
|
124
|
-
<text x="437.3599999999999" y="
|
|
92
|
+
<rect x="48" y="566" width="510" height="50" rx="12" fill="#ff6680" stroke="#000000" stroke-opacity="0.14" stroke-width="2"/>
|
|
93
|
+
<rect x="66" y="566" width="28" height="6" rx="3" fill="#000000" fill-opacity="0.18"/>
|
|
94
|
+
<text x="65" y="597" class="block-text" style="font-size:12px">set bubble placement</text>
|
|
95
|
+
<rect x="220.79999999999998" y="578" width="75.51999999999998" height="25" rx="12.5" fill="#ffffff" fill-opacity="0.96"/>
|
|
96
|
+
<text x="228.79999999999998" y="597" class="input-text" style="font-size:12px">up-right</text>
|
|
97
|
+
<text x="303.31999999999994" y="597" class="block-text" style="font-size:12px">for bubble style</text>
|
|
98
|
+
<rect x="429.3599999999999" y="578" width="112.71999999999998" height="25" rx="12.5" fill="#ffffff" fill-opacity="0.96"/>
|
|
99
|
+
<text x="437.3599999999999" y="597" class="input-text" style="font-size:12px">hero-dialogue</text>
|
|
125
100
|
</g>
|
|
126
101
|
<g role="group" aria-label="表情ベースを設定">
|
|
127
|
-
<rect x="48" y="
|
|
128
|
-
<rect x="66" y="
|
|
129
|
-
<text x="65" y="
|
|
130
|
-
<rect x="198.47999999999996" y="
|
|
131
|
-
<text x="206.47999999999996" y="
|
|
132
|
-
<text x="280.99999999999994" y="
|
|
133
|
-
<rect x="407.0399999999999" y="
|
|
134
|
-
<text x="415.0399999999999" y="
|
|
135
|
-
</g>
|
|
136
|
-
<text x="52" y="
|
|
137
|
-
<text x="52" y="
|
|
102
|
+
<rect x="48" y="626" width="510" height="50" rx="12" fill="#ff6680" stroke="#000000" stroke-opacity="0.14" stroke-width="2"/>
|
|
103
|
+
<rect x="66" y="626" width="28" height="6" rx="3" fill="#000000" fill-opacity="0.18"/>
|
|
104
|
+
<text x="65" y="657" class="block-text" style="font-size:12px">set portrait base</text>
|
|
105
|
+
<rect x="198.47999999999996" y="638" width="75.51999999999998" height="25" rx="12.5" fill="#ffffff" fill-opacity="0.96"/>
|
|
106
|
+
<text x="206.47999999999996" y="657" class="input-text" style="font-size:12px">HeroFace</text>
|
|
107
|
+
<text x="280.99999999999994" y="657" class="block-text" style="font-size:12px">for bubble style</text>
|
|
108
|
+
<rect x="407.0399999999999" y="638" width="112.71999999999998" height="25" rx="12.5" fill="#ffffff" fill-opacity="0.96"/>
|
|
109
|
+
<text x="415.0399999999999" y="657" class="input-text" style="font-size:12px">hero-dialogue</text>
|
|
110
|
+
</g>
|
|
111
|
+
<text x="52" y="698" class="body">続けて blink・lip-sync・continue のフレームを設定</text>
|
|
112
|
+
<text x="52" y="726" class="small">目パチ 0.4秒 / 口パク 0.1秒 / 次へ 0.2秒</text>
|
|
138
113
|
<g role="group" aria-label="目パチフレームを設定">
|
|
139
114
|
<rect x="640" y="150" width="510" height="70" rx="12" fill="#ff6680" stroke="#000000" stroke-opacity="0.14" stroke-width="2"/>
|
|
140
115
|
<rect x="658" y="150" width="28" height="6" rx="3" fill="#000000" fill-opacity="0.18"/>
|
package/docs/block-manual.ja.md
CHANGED
|
@@ -2,22 +2,23 @@
|
|
|
2
2
|
|
|
3
3
|
このマニュアルでは、`turbowarp-bubble`をTurboWarpのカスタム拡張機能として使い、SVG本体、文字、キャラクター表情、目パチ、口パク、「次へ」アイコンを組み合わせたBubbleを表示します。
|
|
4
4
|
|
|
5
|
+
> **紙芝居DSL 4.0集約ランタイム:** 集約ランタイムのパレットで**Bubble**見出し直下のドキュメントボタンを押すと、このマニュアルを開けます。集約されたブロックも、ここで説明するstyle、配置、portrait、逐次表示、音声、待機、animation、clone、自動解放の動作を保ち、拡張機能別の名前空間とBubbleアイコンで由来を識別できます。
|
|
6
|
+
|
|
5
7
|

|
|
6
8
|
|
|
7
9
|
## 1. 必要な拡張機能
|
|
8
10
|
|
|
9
|
-
入力待ちを含む完全な例では
|
|
11
|
+
入力待ちを含む完全な例では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待機を使う場合だけ必要です。
|
|
10
12
|
|
|
11
13
|
| 順番 | 拡張機能 | 読み込み先 |
|
|
12
14
|
| ---: | ------------------------ | -------------------------------------------------------------------------------------------------------- |
|
|
13
15
|
| 1 | Temporary Variables | TurboWarpの拡張機能ライブラリから追加 |
|
|
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
|
-
開発中のBubbleを試す場合は、このリポジトリの`dist/turbowarp-bubble.js
|
|
21
|
+
開発中のBubbleを試す場合は、このリポジトリの`dist/turbowarp-bubble.js`をローカルカスタム拡張機能として読み込みます。既定SVG overlayに必要なrenderer APIがない場合、画像・メディア機能の使用時にAsset Managerがない場合、待機開始時にAsync InputかRuntime Expressionがない場合は、Bubbleが明示的なエラーを返します。低レベルComposition APIでは別のtext capabilityを注入できます。
|
|
21
22
|
|
|
22
23
|
参考:
|
|
23
24
|
|
|
@@ -56,30 +57,22 @@ register resource [costume:Assets:Next2] as asset [Next2]
|
|
|
56
57
|
|
|
57
58
|
URL画像を使う場合は、`RESOURCE_ID`へHTTPS URLを指定します。Bubbleに設定できるのは、Asset Managerへ登録済みでMIME typeが`image/*`のアセットだけです。
|
|
58
59
|
|
|
59
|
-
## 3. 文字style
|
|
60
|
+
## 3. 文字layout styleを選ぶ
|
|
60
61
|
|
|
61
|
-
SVG Text
|
|
62
|
+
standalone BubbleはSVG Text 0.8.0のlayout compositionを内包します。`default`または任意の名前を指定すると、初回参照時に背景透明のSVG Text既定styleとして初期化されます。
|
|
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は文字providerです。名前付き文字styleの定義、SVG文字skinの生成、文字幅の測定を担当します。Bubbleの配置は`set bubble placement`で設定し、tailや吹き出し外形はSVG Text providerの責務ではありません。
|
|
68
|
+
独自のfont、色、alignmentを使うアプリhostは、`createSvgTextLayoutComposition()`へstyleを定義し、`createSvgTextOverlayTextCapability()`でBubbleへ注入します。既定経路も同じ`layoutText()`を使い、SVG文字skinは生成しません。Bubbleの配置、tail、吹き出し外形はBubble側が担当します。
|
|
76
69
|
|
|
77
70
|
## 4. Bubble styleを定義する
|
|
78
71
|
|
|
79
|
-
まず、Bubble style
|
|
72
|
+
まず、Bubble style名と文字layout style名を関連付けます。
|
|
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 @@ visual styleを省略した場合は`NORMAL`です。本体drawableは文字・p
|
|
|
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
|
- 「次へ」はループが分かるよう2枚以上必要です。
|
|
172
166
|
- `SECONDS`は0より大きい秒数です。
|
|
173
167
|
- `ASSETS`を空にすると、そのアニメーション設定を解除します。
|
|
174
|
-
-
|
|
168
|
+
- portrait配置の既定値は`left`です。`left`/`right`は対応する端の上下中央、`top-left`/`top-right`/`bottom-left`/`bottom-right`は対応する隅へ揃えます。portrait用の列は維持されるため、大きなoffsetで移動しない限り文字と重なりません。
|
|
169
|
+
- portraitのxは右正、yは上正です。zoomは96pxのportrait枠に対する0より大きい百分率で、Bubble全体のscaleより先に適用します。角丸半径は0以上のpixel値で、表示幅または表示高の半分を上限にします。
|
|
170
|
+
- `none`を選ぶか表情ベースを空にすると、目パチ・口パク設定を含むportrait全体を解除します。別の配置へ戻すときは、先に表情ベースを再設定します。
|
|
171
|
+
- 角丸はBubbleのfill色でベース・目パチ・口パクの各レイヤーをmaskします。`NO_BUBBLE`にはmaskに使うfillがないため、portraitは矩形表示のままです。
|
|
175
172
|
|
|
176
173
|
## 5. 逐次表示、音声、表示サイズ
|
|
177
174
|
|
|
@@ -257,46 +254,47 @@ Bubble styleの定義は拡張機能内で共有されますが、表示中のBu
|
|
|
257
254
|
2. 各clone自身から`say`または`think`を実行します。
|
|
258
255
|
3. animation mode変更とcloseも、表示したのと同じcloneから実行します。
|
|
259
256
|
|
|
260
|
-
cloneが停止・削除された場合は、そのtargetに属するtimer、
|
|
257
|
+
cloneが停止・削除された場合は、そのtargetに属するtimer、overlay DOM、画像leaseが自動解放されます。明示的な`scratch-render`ではskinとdrawableも解放されます。
|
|
261
258
|
|
|
262
259
|
## 11. ブロック一覧
|
|
263
260
|
|
|
264
|
-
| ブロック
|
|
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
|
+
| ブロック | 説明 |
|
|
262
|
+
| -------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------- |
|
|
263
|
+
| `define bubble style [STYLE] using text style [TEXT_STYLE]` | Bubble styleを定義または再定義する |
|
|
264
|
+
| `set bubble placement [PLACEMENT] for bubble style [STYLE]` | Actor相対方向・角度、または背景相対領域を設定する |
|
|
265
|
+
| `set bubble distance [DISTANCE] for bubble style [STYLE]` | Actor boundsからtail先端までの距離を設定する |
|
|
266
|
+
| `set bubble visual style [VISUAL_STYLE] for bubble style [STYLE]` | Bubble本体のSVG形状を10種類から設定する |
|
|
267
|
+
| `set bubble tail length [LENGTH] for bubble style [STYLE]` | Bubble borderからtail先端までの基準長を設定する |
|
|
268
|
+
| `set bubble offset x [X] y [Y] scale [SCALE] % for bubble style [STYLE]` | 本体位置と、文字を含む全体のscaleを設定する |
|
|
269
|
+
| `set portrait base [ASSET] for bubble style [STYLE]` | portraitのベース画像を設定する |
|
|
270
|
+
| `set portrait [PLACEMENT] offset x [X] y [Y] zoom [ZOOM] % corner radius [RADIUS] px for bubble style [STYLE]` | portraitの有無、端/隅の配置、変形、角丸を設定する |
|
|
271
|
+
| `set blink frames [ASSETS] every [SECONDS] seconds for bubble style [STYLE]` | 目パチ差分と間隔を設定する |
|
|
272
|
+
| `set lip-sync frames [ASSETS] every [SECONDS] seconds for bubble style [STYLE]` | 口パク差分と間隔を設定する |
|
|
273
|
+
| `set continue frames [ASSETS] every [SECONDS] seconds for bubble style [STYLE]` | `awaiting-continue`中の「次へ」アニメーションを設定する |
|
|
274
|
+
| `set bubble reveal unit [UNIT] every [SECONDS] seconds layout [LAYOUT] for bubble style [STYLE]` | CHARACTER/WORD/LINE/BLOCKの逐次表示を設定する |
|
|
275
|
+
| `set bubble word delimiters [DELIMITERS] show [SHOW] for bubble style [STYLE]` | WORDの区切り文字集合と表示可否を設定する |
|
|
276
|
+
| `set bubble reveal sound [ASSET] for bubble style [STYLE]` | 表示単位ごとの効果音を設定する |
|
|
277
|
+
| `set bubble voice [ASSET] for bubble style [STYLE]` | 表示開始時のフルボイスを設定する |
|
|
278
|
+
| `finish [UNIT] with condition [CONDITION] or timeout after [TIMEOUT] seconds` | 未表示単位を最後まで進め、条件またはtimeoutを待つ |
|
|
279
|
+
| `set bubble show animation [MOTION] for [SECONDS] seconds for bubble style [STYLE]` | 表示開始animationを設定する |
|
|
280
|
+
| `set bubble hide animation [MOTION] for [SECONDS] seconds for bubble style [STYLE]` | 表示終了animationを設定する |
|
|
281
|
+
| `animate this bubble [MOTION]` | Bubble全体のanimationを再生する |
|
|
282
|
+
| `shake this bubble direction [DIRECTION] count [COUNT] ease [EASE]` | 吹き出し全体を指定方向へ揺らす |
|
|
283
|
+
| `explode this bubble relative scale [SCALE] count [COUNT] ease [EASE]` | 吹き出し全体を相対倍率で変化させる |
|
|
284
|
+
| `animate bubble shape to [VISUAL_STYLE] speed [SPEED] for [SECONDS] seconds` | Bubble外形を時間経過で切り替える |
|
|
285
|
+
| `say [MESSAGE] with bubble style [STYLE]` | `talking` modeでsay表示を開始・置換する |
|
|
286
|
+
| `think [MESSAGE] with bubble style [STYLE]` | `talking` modeでthink表示を開始・置換する |
|
|
287
|
+
| `set this bubble animation mode [MODE]` | `talking`、`awaiting-continue`、`idle`からmodeを選ぶ |
|
|
288
|
+
| `wait with this bubble until condition [CONDITION] or timeout after [TIMEOUT] seconds` | Runtime Expressionの条件成立またはtimeoutまで待つ |
|
|
289
|
+
| `close this bubble` | 自分のBubbleと所有resourceを解放する |
|
|
290
|
+
| `Bubble version` | Bubble実装versionを返す |
|
|
293
291
|
|
|
294
292
|
## 12. よくあるエラー
|
|
295
293
|
|
|
296
294
|
| 状況 | 原因と対処 |
|
|
297
295
|
| ---------------------------------- | ------------------------------------------------------------------------ |
|
|
298
296
|
| Asset Managerを要求するエラー | 画像・メディアアセットを使う前にAsset Manager 0.7.xを読み込む |
|
|
299
|
-
|
|
|
297
|
+
| SVG overlay backendのエラー | `renderer.addOverlay()`対応hostを使うか`scratch-render`を明示する |
|
|
300
298
|
| Async Inputを要求するエラー | Bubble待機より前にAsync Input 0.3.xをサンドボックスなしで読み込む |
|
|
301
299
|
| Runtime Expressionを要求するエラー | Bubble待機より前にRuntime Expression 0.3.xをサンドボックスなしで読み込む |
|
|
302
300
|
| `bubble style is not defined` | `define bubble style`を先に実行する。緑の旗の再実行時も再定義する |
|
|
@@ -310,7 +308,7 @@ cloneが停止・削除された場合は、そのtargetに属するtimer、SVG
|
|
|
310
308
|
|
|
311
309
|
## 13. 自動解放されるタイミング
|
|
312
310
|
|
|
313
|
-
次の場合、Bubbleが所有するtimer、text skin
|
|
311
|
+
次の場合、Bubbleが所有するtimer、overlay DOM、画像leaseは自動的に解放されます。`scratch-render`を明示した場合はtext skinとrenderer drawableも解放されます。
|
|
314
312
|
|
|
315
313
|
- `close this bubble`
|
|
316
314
|
- 同じsprite/cloneで次の`say`または`think`を実行したとき
|