VaelisDocs
v1.0.0
Components · v1.0.0

SpeechBubble

Vaelis 1.0.0 SpeechBubble component reference: fields, script API, behavior and examples.

View as Markdownllms.txt
ScopeThis page documents the SpeechBubble component in Vaelis 1.0.0. Runtime fields are serialized scene data; the Script API section lists only members intentionally exposed to game scripts.
Where to find it in the editorTop UI → Speech Bubble, or Inspector → Add Component → Speech Bubble.

#What it does

Speech bubble UI attached to an entity, useful for dialogue and NPC callouts.

Component setup & editor toolsSpeechBubble provides an in-scene speech presentation attached to an entity.

#How to add and use SpeechBubble

Editor path: Select the target entity in the Hierarchy (left side) → look at the Inspector (right side) → click Add Component at the bottom of the Inspector → search for SpeechBubble → click the component row. The Add Component picker is a centered modal with a search box; it only lists components not already attached.

For components with a dedicated editor tool, the tool is opened or activated from the location described below. Do not assume that adding the component alone activates its editor; some systems require a separate window, panel, or viewport tool.

#Component setup & editor tools

  • Inspector → SpeechBubble: configure its display properties; use the documented SpeechBubble API to change content at runtime.

#What you should see after adding it

The component appears as its own section in the Inspector. Its serialized settings are listed in the Component data table below. If a field is conditional, it appears only when the relevant mode/type is selected. If a field is a runtime state field (for example grounded or resolved velocity), treat it as read-only diagnostic state unless the API reference explicitly documents it as writable.

#How to read the settings

For every setting below, the documentation distinguishes type, default, meaning, and tuning direction where behavior is known. When a value represents a direction, use the engine's coordinate convention documented in Coordinate system; do not substitute Unity/Godot conventions.

#Component data

FieldTypePurposeDefault
textstringCurrent bubble text.Hello!
visiblebooleanWhether visible.false
backgroundColorhex stringBubble background.#ffffff
textColorhex stringText color.#111111
borderColorhex stringBorder color.#111111
borderWidthnumberBorder width.2
fontSizenumberFont size.20
fontFamilystringFont family.Arial
paddingnumberBubble padding.12
cornerRadiusnumberCorner radius.10
maxWidthnumberMaximum text width.220
offsetXnumberWorld/UI X offset.0
offsetYnumberWorld/UI Y offset.-60
tailDirectionenumTail direction.down
tailSizenumberTail size.14
hideTimernumberWritten by the engine each frame; not an authored setting. (engine-managed runtime state)0

#Tuning behavior

These are the practical direction-of-change rules for the most important controls on this component.

SettingWhat changing it does
maxWidthHigher lets a line run longer before wrapping.
offsetYNegative values move the bubble upward from the entity in the default screen convention.
paddingHigher creates more interior space around text.
cornerRadiusHigher makes corners rounder.

#Script API

MemberKindDescription
textPropertyCurrent text.
visiblePropertyVisibility.
backgroundColorPropertyBackground color.
textColorPropertyText color.
borderColorPropertyBorder color.
borderWidthPropertyBorder width.
fontSizePropertyFont size.
fontFamilyPropertyFont family.
paddingPropertyPadding.
cornerRadiusPropertyCorner radius.
maxWidthPropertyMaximum width.
offsetXPropertyHorizontal offset.
offsetYPropertyVertical offset.
tailDirectionPropertyTail direction.
tailSizePropertyTail size.
show(text, duration)MethodSet text and show; optional duration hides automatically.
hide()MethodHide the bubble.

#Examples

js
this.speechBubble.show("Hello!", 2);
Need the full workflow?Components: complete workflow covers adding, configuring, testing, combining, and removing components.