Repository navigation
API Class UISelect
Defined in: src/engine/ui/components.ts:1011
ADR 0428: a drop-down list (HTML's <select>), its UIOption children the choices. It shows the chosen option's
text and an arrow; a click, submit or its label (focus) opens the list, a popup drawn above everything else in its
canvas and outside its ancestors' clips, below it (above it where it wouldn't fit). Choosing sends input then
change. value is the chosen option's value (its text without one); with multiple, options toggle and value
is the first chosen one.
UIFocusable
new UISelect(): UISelect;Defined in: src/engine/ui/components.ts:1022
UISelect
UIFocusable.constructor
accentColor: Color | null = null;Defined in: src/engine/ui/components.ts:1020
The arrow's and a chosen option's highlight colour; null: the default blue.
alignContent: UIAlignContent = "stretch";Defined in: src/engine/ui/components.ts:227
How wrapped lines share the space across the direction (only with flexWrap).
UIFocusable.alignContent
alignItems: UIAlign = "stretch";Defined in: src/engine/ui/components.ts:152
UIFocusable.alignItems
alignSelf: UIAlignSelf = "auto";Defined in: src/engine/ui/components.ts:225
This element's alignment across its parent's direction; auto takes the parent's alignItems.
UIFocusable.alignSelf
aspectRatio: number = 0;Defined in: src/engine/ui/components.ts:236
Width divided by height, kept when only one of them is set (aspect-ratio: 16 / 9); 0: none.
UIFocusable.aspectRatio
backdropBlur: number = 0;Defined in: src/engine/ui/components.ts:374
UIFocusable.backdropBlur
backdropBrightness: number = 1;Defined in: src/engine/ui/components.ts:375
UIFocusable.backdropBrightness
backdropContrast: number = 1;Defined in: src/engine/ui/components.ts:376
UIFocusable.backdropContrast
backdropDropShadowBlur: number = 0;Defined in: src/engine/ui/components.ts:386
UIFocusable.backdropDropShadowBlur
backdropDropShadowColor: Color | null = null;Defined in: src/engine/ui/components.ts:383
UIFocusable.backdropDropShadowColor
backdropDropShadowOffsetX: number = 0;Defined in: src/engine/ui/components.ts:384
UIFocusable.backdropDropShadowOffsetX
backdropDropShadowOffsetY: number = 0;Defined in: src/engine/ui/components.ts:385
UIFocusable.backdropDropShadowOffsetY
backdropGrayscale: number = 0;Defined in: src/engine/ui/components.ts:377
UIFocusable.backdropGrayscale
backdropHueRotate: number = 0;Defined in: src/engine/ui/components.ts:378
UIFocusable.backdropHueRotate
backdropInvert: number = 0;Defined in: src/engine/ui/components.ts:379
UIFocusable.backdropInvert
backdropOpacity: number = 1;Defined in: src/engine/ui/components.ts:380
UIFocusable.backdropOpacity
backdropSaturate: number = 1;Defined in: src/engine/ui/components.ts:381
UIFocusable.backdropSaturate
backdropSepia: number = 0;Defined in: src/engine/ui/components.ts:382
UIFocusable.backdropSepia
backgroundColor: Color | null = null;Defined in: src/engine/ui/components.ts:393
Null: transparent.
UIFocusable.backgroundColor
backgroundImage: string = "";Defined in: src/engine/ui/components.ts:420
Drawn over the background: url(asset:images/wood.png) (stretched to the box), linear-gradient(angle, stops…)
or radial-gradient(stops…) (a circle at the centre), stops being a colour and an optional position in %.
A gradient replaces backgroundColor. Empty: none.
UIFocusable.backgroundImage
borderBottomLeftRadius: number = -1;Defined in: src/engine/ui/components.ts:414
UIFocusable.borderBottomLeftRadius
borderBottomRightRadius: number = -1;Defined in: src/engine/ui/components.ts:413
UIFocusable.borderBottomRightRadius
borderBottomWidth: number | null = null;Defined in: src/engine/ui/components.ts:403
UIFocusable.borderBottomWidth
borderColor: Color = Color.black;Defined in: src/engine/ui/components.ts:398
UIFocusable.borderColor
borderLeftWidth: number | null = null;Defined in: src/engine/ui/components.ts:404
UIFocusable.borderLeftWidth
borderRadius: number = 0;Defined in: src/engine/ui/components.ts:395
Every corner's radius, for the corners whose own radius below is -1.
UIFocusable.borderRadius
borderRightWidth: number | null = null;Defined in: src/engine/ui/components.ts:402
UIFocusable.borderRightWidth
borderTopLeftRadius: number = -1;Defined in: src/engine/ui/components.ts:411
One corner's radius in UI pixels; -1 (the default) takes borderRadius. A stylesheet's border-radius with two
to four values sets these, as CSS does (top-left, top-right, bottom-right, bottom-left).
UIFocusable.borderTopLeftRadius
borderTopRightRadius: number = -1;Defined in: src/engine/ui/components.ts:412
UIFocusable.borderTopRightRadius
borderTopWidth: number | null = null;Defined in: src/engine/ui/components.ts:401
The border's width on one side (border-top-width …). Null (the default): borderWidth. Unequal sides draw each side as its own edge.
UIFocusable.borderTopWidth
borderWidth: number = 0;Defined in: src/engine/ui/components.ts:397
The border's width on every side (border-width takes one to four values; border a width, solid or none, and a colour).
UIFocusable.borderWidth
bottom: UILength = "auto";Defined in: src/engine/ui/components.ts:166
UIFocusable.bottom
boxShadowBlur: number = 0;Defined in: src/engine/ui/components.ts:431
How far the shadow blurs, in UI pixels (CSS's blur radius).
UIFocusable.boxShadowBlur
boxShadowColor: Color | null = null;Defined in: src/engine/ui/components.ts:425
A shadow under the background, box-shadow: offset-x offset-y blur colour in a stylesheet (ADR 0422). It's
drawn by the background, so a panel without a backgroundColor or gradient casts none. Null: no shadow.
UIFocusable.boxShadowColor
boxShadowOffsetX: number = 0;Defined in: src/engine/ui/components.ts:427
The shadow's offset to the right, in UI pixels.
UIFocusable.boxShadowOffsetX
boxShadowOffsetY: number = 0;Defined in: src/engine/ui/components.ts:429
The shadow's offset down, in UI pixels.
UIFocusable.boxShadowOffsetY
color: Color = Color.white;Defined in: src/engine/ui/components.ts:1018
direction: UIDirection | null = null;Defined in: src/engine/ui/components.ts:303
ADR 0432: its direction (CSS direction, HTML dir); null (the default) takes its parent's, and a canvas is ltr.
In rtl a row lays out from the right and a scroller's horizontal scrolling starts at the right: scrollX is 0
there and negative toward the left, as browsers' scrollLeft. A text's base direction (its runs' order, start/end alignment) is its own or an ancestor's direction when one is set, else the language's.
UIFocusable.direction
display: UIDisplay = "flex";Defined in: src/engine/ui/components.ts:179
none removes the element and its children from layout, drawing and the pointer, like CSS
display: none, while its node stays active (its scripts run, and its state reads as before).
flex (the default) lays it out.
UIFocusable.display
draggable: boolean = false;Defined in: src/engine/ui/components.ts:309
ADR 0426: a pointer press on it (or inside it) that moves starts a UI drag: dragstart on it, drag while it
moves, dragenter/dragover/dragleave on the elements under the pointer, drop where it's released (if a
dragover there was prevented), then dragend. HTML's draggable attribute.
UIFocusable.draggable
filterBlur: number = 0;Defined in: src/engine/ui/components.ts:347
blur(): a Gaussian blur, its standard deviation in UI pixels. 0: none.
UIFocusable.filterBlur
filterBrightness: number = 1;Defined in: src/engine/ui/components.ts:349
brightness(): 1 as it is, 0 black, above 1 brighter.
UIFocusable.filterBrightness
filterContrast: number = 1;Defined in: src/engine/ui/components.ts:351
contrast(): 1 as it is, 0 flat grey.
UIFocusable.filterContrast
filterDropShadowBlur: number = 0;Defined in: src/engine/ui/components.ts:369
UIFocusable.filterDropShadowBlur
filterDropShadowColor: Color | null = null;Defined in: src/engine/ui/components.ts:365
drop-shadow()'s colour: a shadow of what's drawn (its shape, not its box). Null: none.
UIFocusable.filterDropShadowColor
filterDropShadowOffsetX: number = 0;Defined in: src/engine/ui/components.ts:367
The drop shadow's offset right and down, and its blur, in UI pixels.
UIFocusable.filterDropShadowOffsetX
filterDropShadowOffsetY: number = 0;Defined in: src/engine/ui/components.ts:368
UIFocusable.filterDropShadowOffsetY
filterGrayscale: number = 0;Defined in: src/engine/ui/components.ts:353
grayscale(): 0 as it is, 1 fully grey.
UIFocusable.filterGrayscale
filterHueRotate: number = 0;Defined in: src/engine/ui/components.ts:355
hue-rotate(), in degrees.
UIFocusable.filterHueRotate
filterInvert: number = 0;Defined in: src/engine/ui/components.ts:357
invert(): 0 as it is, 1 inverted.
UIFocusable.filterInvert
filterOpacity: number = 1;Defined in: src/engine/ui/components.ts:359
opacity(): like opacity, applied as a filter step (after the ones before it). 1 as it is.
UIFocusable.filterOpacity
filterSaturate: number = 1;Defined in: src/engine/ui/components.ts:361
saturate(): 1 as it is, 0 grey, above 1 more saturated.
UIFocusable.filterSaturate
filterSepia: number = 0;Defined in: src/engine/ui/components.ts:363
sepia(): 0 as it is, 1 fully sepia.
UIFocusable.filterSepia
flexBasis: UILength = "auto";Defined in: src/engine/ui/components.ts:234
Its size along the parent's direction before growing and shrinking: pixels, a percentage, or "auto" (its width/height).
UIFocusable.flexBasis
flexDirection: UIFlexDirection = "row";Defined in: src/engine/ui/components.ts:150
How this element lays out its children.
UIFocusable.flexDirection
flexGrow: number = 0;Defined in: src/engine/ui/components.ts:169
How much of the parent's free space this element takes, relative to its siblings.
UIFocusable.flexGrow
flexShrink: number | null = null;Defined in: src/engine/ui/components.ts:232
How much this element shrinks, relative to its siblings, when they don't fit. Null (the default): its kind's, as before: text shrinks (and wraps to what's left), other elements keep their size.
UIFocusable.flexShrink
flexWrap: UIFlexWrap = "nowrap";Defined in: src/engine/ui/components.ts:223
Whether children that don't fit on one line wrap onto more (wrap-reverse: new lines go before the first).
UIFocusable.flexWrap
focusable: boolean = true;Defined in: src/engine/ui/components.ts:742
False takes it out of focus: navigation skips it and a click doesn't focus it.
UIFocusable.focusable
focusColor: Color;Defined in: src/engine/ui/components.ts:749
Drawn while it has focus and the last UI input was navigation, not the pointer.
UIFocusable.focusColor
font: string = "";Defined in: src/engine/ui/components.ts:1016
fontSize: number = 16;Defined in: src/engine/ui/components.ts:1017
gap: number = 0;Defined in: src/engine/ui/components.ts:154
Space between children.
UIFocusable.gap
height: UILength = "auto";Defined in: src/engine/ui/components.ts:161
UIFocusable.height
inert: boolean = false;Defined in: src/engine/ui/components.ts:200
HTML's inert: the element and everything inside it are drawn as before but take no part in interaction: the
pointer passes through them (to what's behind), and they can't take focus or be navigated to (focus inside leaves).
Svelte's outros set it on outroing elements.
UIFocusable.inert
interactable: boolean = true;Defined in: src/engine/ui/components.ts:747
False: it ignores the pointer (it still blocks it from the game), can't take focus, and matches :disabled (HTML's
disabled attribute sets it false). ADR 0428: every control has it (buttons, fields, checkboxes, sliders, selects…).
UIFocusable.interactable
justifyContent: UIJustify = "flex-start";Defined in: src/engine/ui/components.ts:151
UIFocusable.justifyContent
left: UILength = "auto";Defined in: src/engine/ui/components.ts:167
UIFocusable.left
margin: number = 0;Defined in: src/engine/ui/components.ts:158
Space around the element, on every side.
UIFocusable.margin
marginBottom: number | null = null;Defined in: src/engine/ui/components.ts:214
UIFocusable.marginBottom
marginLeft: number | null = null;Defined in: src/engine/ui/components.ts:215
UIFocusable.marginLeft
marginRight: number | null = null;Defined in: src/engine/ui/components.ts:213
UIFocusable.marginRight
marginTop: number | null = null;Defined in: src/engine/ui/components.ts:212
Space around the element on one side (margin-top …; the margin shorthand takes one to four values). Null: margin.
UIFocusable.marginTop
maxHeight: UILength = "none";Defined in: src/engine/ui/components.ts:221
UIFocusable.maxHeight
maxWidth: UILength = "none";Defined in: src/engine/ui/components.ts:220
The largest size layout gives it: pixels, a percentage of the parent, or "none" (no maximum).
UIFocusable.maxWidth
minHeight: UILength = "auto";Defined in: src/engine/ui/components.ts:218
UIFocusable.minHeight
minWidth: UILength = "auto";Defined in: src/engine/ui/components.ts:217
The smallest size layout gives it: pixels, a percentage of the parent, or "auto" (no minimum).
UIFocusable.minWidth
multiple: boolean = false;Defined in: src/engine/ui/components.ts:1013
navDown: GameObject | null = null;Defined in: src/engine/ui/components.ts:754
UIFocusable.navDown
navigation: UINavigationMode = "auto";Defined in: src/engine/ui/components.ts:751
auto: explicit neighbours, else the nearest element that way; explicit: neighbours only; none: navigate doesn't leave it.
UIFocusable.navigation
navLeft: GameObject | null = null;Defined in: src/engine/ui/components.ts:755
UIFocusable.navLeft
navRight: GameObject | null = null;Defined in: src/engine/ui/components.ts:756
UIFocusable.navRight
navUp: GameObject | null = null;Defined in: src/engine/ui/components.ts:753
Explicit neighbours: where navigate up, down, left and right goes from here (null: the search, in auto).
UIFocusable.navUp
opacity: number = 1;Defined in: src/engine/ui/components.ts:171
0..1, multiplied into its children's.
UIFocusable.opacity
open: boolean = false;Defined in: src/engine/ui/components.ts:1015
True while its list shows; scripts may open and close it.
overflow: UIOverflow = "visible";Defined in: src/engine/ui/components.ts:244
hidden clips its children to its padding box (inside its border): they are drawn and take the pointer only
there. It also draws them together, at its own place in the order (as an element with a zIndex does).
auto and scroll clip them the same way and scroll them (ADR 0427): by the wheel, a touch or pen drag, the
keyboard, a draggable scrollbar, navigation and scrollX/scrollY. The stylesheet's overflow: x y sets the
two axes (overflowX, overflowY).
UIFocusable.overflow
overflowX: UIOverflow | null = null;Defined in: src/engine/ui/components.ts:246
ADR 0427: the horizontal axis's overflow (overflow-x); null (the default) takes overflow.
UIFocusable.overflowX
overflowY: UIOverflow | null = null;Defined in: src/engine/ui/components.ts:248
ADR 0427: the vertical axis's overflow (overflow-y); null takes overflow.
UIFocusable.overflowY
overscrollBehavior: UIOverscrollBehavior = "auto";Defined in: src/engine/ui/components.ts:261
ADR 0427: contain or none: once it can't scroll further, the wheel and drags don't go on to scroll its ancestors.
UIFocusable.overscrollBehavior
padding: number = 0;Defined in: src/engine/ui/components.ts:156
Space inside the element, on every side.
UIFocusable.padding
paddingBottom: number | null = null;Defined in: src/engine/ui/components.ts:209
UIFocusable.paddingBottom
paddingLeft: number | null = null;Defined in: src/engine/ui/components.ts:210
UIFocusable.paddingLeft
paddingRight: number | null = null;Defined in: src/engine/ui/components.ts:208
UIFocusable.paddingRight
paddingTop: number | null = null;Defined in: src/engine/ui/components.ts:207
Space inside the element on one side (padding-top …; the padding shorthand takes one to four values, as in
CSS). Null (the default): padding, the all-sides value.
UIFocusable.paddingTop
positionType: UIPositionType = "relative";Defined in: src/engine/ui/components.ts:163
absolute takes the element out of its parent's flow, placed by top/right/bottom/left.
UIFocusable.positionType
raycastTarget: boolean = true;Defined in: src/engine/ui/components.ts:194
Whether the pointer stops at this element, like Unity's Graphic.raycastTarget (ADR 0385). True (the default):
a press over it goes to the UI, never to the game (Input.pointerOverUI is true), and reaches the button or
input field it's in, if any; over text, an image or a panel outside one, it does nothing. False: the pointer
passes through to whatever is behind it (other UI, or the game). Text, images, buttons and input fields stop
it; a panel only when it draws a background (even a transparent one) or a border, as a panel without either is
a layout box (Unity's empty RectTransform). Children aren't affected: each element has its own.
UIFocusable.raycastTarget
right: UILength = "auto";Defined in: src/engine/ui/components.ts:165
UIFocusable.right
rotate: number = 0;Defined in: src/engine/ui/components.ts:330
How far it's drawn turned clockwise about its transform origin, in degrees (rotate: 45deg, 0.25turn, 1rad).
UIFocusable.rotate
scaleX: number = 1;Defined in: src/engine/ui/components.ts:327
How much it's drawn stretched across (scale: 2 sets both; scale: 2 1 each), about its transform origin. 1: as laid out.
UIFocusable.scaleX
scaleY: number = 1;Defined in: src/engine/ui/components.ts:328
UIFocusable.scaleY
scrollbarGutter: UIScrollbarGutter = "auto";Defined in: src/engine/ui/components.ts:273
ADR 0432: whether the vertical scrollbar's space is kept (scrollbar-gutter): auto draws the bar over the content;
stable (on an element that clips) reserves it beside the padding box, on the bar's side, whether or not the bar
shows, so clientWidth is smaller and the content doesn't move when it appears; stable both-edges on both sides.
UIFocusable.scrollbarGutter
scrollbarThumbColor: Color | null = null;Defined in: src/engine/ui/components.ts:265
ADR 0427: its scrollbars' thumb colour (scrollbar-color: thumb track); null: the default, a light grey.
UIFocusable.scrollbarThumbColor
scrollbarTrackColor: Color | null = null;Defined in: src/engine/ui/components.ts:267
ADR 0427: its scrollbars' track colour; null: the default, a faint dark strip.
UIFocusable.scrollbarTrackColor
scrollbarWidth: UIScrollbarWidth = "auto";Defined in: src/engine/ui/components.ts:263
ADR 0427: its scrollbars' thickness (scrollbar-width): auto, thin or none.
UIFocusable.scrollbarWidth
scrollBehavior: UIScrollBehavior = "auto";Defined in: src/engine/ui/components.ts:259
ADR 0427: smooth animates scripted scrolling (scrollTo, scrollBy, scrollIntoView and navigation's); auto jumps.
UIFocusable.scrollBehavior
scrollMarginBottom: number = 0;Defined in: src/engine/ui/components.ts:296
UIFocusable.scrollMarginBottom
scrollMarginLeft: number = 0;Defined in: src/engine/ui/components.ts:297
UIFocusable.scrollMarginLeft
scrollMarginRight: number = 0;Defined in: src/engine/ui/components.ts:295
UIFocusable.scrollMarginRight
scrollMarginTop: number = 0;Defined in: src/engine/ui/components.ts:294
ADR 0432: this element's snap area outset from its border box (scroll-margin), UI pixels per side.
UIFocusable.scrollMarginTop
scrollPaddingBottom: number = 0;Defined in: src/engine/ui/components.ts:291
UIFocusable.scrollPaddingBottom
scrollPaddingLeft: number = 0;Defined in: src/engine/ui/components.ts:292
UIFocusable.scrollPaddingLeft
scrollPaddingRight: number = 0;Defined in: src/engine/ui/components.ts:290
UIFocusable.scrollPaddingRight
scrollPaddingTop: number = 0;Defined in: src/engine/ui/components.ts:289
ADR 0432: a scroller's snapport inset from its padding box (scroll-padding), UI pixels per side.
UIFocusable.scrollPaddingTop
scrollSnapAlignBlock: UIScrollSnapAlign = "none";Defined in: src/engine/ui/components.ts:283
ADR 0432: how this element lines up in its scroller when snapped, vertically (scroll-snap-align's first value).
UIFocusable.scrollSnapAlignBlock
scrollSnapAlignInline: UIScrollSnapAlign = "none";Defined in: src/engine/ui/components.ts:285
ADR 0432: …and horizontally (scroll-snap-align's second value; one value sets both).
UIFocusable.scrollSnapAlignInline
scrollSnapAxis: UIScrollSnapAxis = "none";Defined in: src/engine/ui/components.ts:279
ADR 0432: CSS Scroll Snap on a scroller (scroll-snap-type: <axis> [mandatory | proximity]): the axes it snaps
on. After the wheel settles, a touch drag's momentum, keys, scrollTo/scrollBy, scrollIntoView and
navigation, it rests where a descendant's scroll-snap-align says; after a layout change it snaps again.
UIFocusable.scrollSnapAxis
scrollSnapStop: UIScrollSnapStop = "normal";Defined in: src/engine/ui/components.ts:287
ADR 0432: always: a scroll gesture stops at this element's snap position rather than passing over it.
UIFocusable.scrollSnapStop
scrollSnapStrictness: UIScrollSnapStrictness = "proximity";Defined in: src/engine/ui/components.ts:281
ADR 0432: mandatory always rests on a snap position; proximity (the default) only near one.
UIFocusable.scrollSnapStrictness
scrollX: number = 0;Defined in: src/engine/ui/components.ts:256
ADR 0427: how far its content is scrolled right and down, in UI pixels (scrollLeft/scrollTop on the web).
Scripts write them; the UI core keeps them between 0 and how far the content reaches past its padding box, at
each layout. Only an element that clips (overflow other than visible) scrolls. ADR 0432: an axis whose content
starts at its far end (row-reverse, column-reverse, direction: rtl) is 0 showing that end and negative
toward the other, as CSSOM's offsets are.
UIFocusable.scrollX
scrollY: number = 0;Defined in: src/engine/ui/components.ts:257
UIFocusable.scrollY
top: UILength = "auto";Defined in: src/engine/ui/components.ts:164
UIFocusable.top
transformMatrix: string = "";Defined in: src/engine/ui/components.ts:342
ADR 0430: a full 2D matrix applied after translate, rotate and scale, as matrix(a, b, c, d, e, f) (pixels); "" (the
default) for none. A stylesheet's transform list that doesn't fold into the three (one with skew(), skewX(),
skewY() or matrix(), or a rotation after an unequal scale) sets it. It animates as CSS interpolates matrices.
UIFocusable.transformMatrix
transformOriginX: UILength = "50%";Defined in: src/engine/ui/components.ts:335
The point it turns and scales about, across its own box: pixels from its left edge, or a percentage of its width
(transform-origin: left top, 25% 75%, 10px 4px). Default: the middle.
UIFocusable.transformOriginX
transformOriginY: UILength = "50%";Defined in: src/engine/ui/components.ts:336
UIFocusable.transformOriginY
translateX: UILength = "0";Defined in: src/engine/ui/components.ts:323
How far the element is drawn moved right: pixels, or a percentage of its own width ("50%"). A stylesheet's
translate: x y or transform: translate(x, y) sets it with translateY. (The translate attribute stays
HTML's localisation marker: in markup write transform="translate(…)" or translate-x.)
UIFocusable.translateX
translateY: UILength = "0";Defined in: src/engine/ui/components.ts:325
How far it's drawn moved down: pixels, or a percentage of its own height.
UIFocusable.translateY
value: string = "";Defined in: src/engine/ui/components.ts:1012
verticalAlign: UIVerticalAlign = "baseline";Defined in: src/engine/ui/components.ts:185
Its place on a text's line (vertical-align), as an inline run or (ADR 0432) an atomic inline box: sub and super
lower and raise its baseline; middle, top, bottom, text-top, text-bottom align its box. Outside a text it
does nothing.
UIFocusable.verticalAlign
visible: boolean = true;Defined in: src/engine/ui/components.ts:173
False hides the element and its children but keeps its space (a disabled component or inactive node takes none).
UIFocusable.visible
width: UILength = "auto";Defined in: src/engine/ui/components.ts:160
Pixels (120), a percentage of the parent ("50%") or "auto" (sized by its content).
UIFocusable.width
zIndex: number = 0;Defined in: src/engine/ui/components.ts:314
Draw and pointer order among its siblings (higher on top, then document order), as in CSS. A non-zero value draws the element and its children together, ordered within it.
UIFocusable.zIndex
get changed(): boolean;Defined in: src/engine/ui/components.ts:779
ADR 0428: true for the one frame the player changed it (typed, toggled, dragged, chose), in every phase of that frame; a script's write never counts.
boolean
UIFocusable.changed
get enabled(): boolean;Defined in: src/engine/core/Component.ts:57
boolean
set enabled(value): void;Defined in: src/engine/core/Component.ts:61
boolean
void
UIFocusable.enabled
get focused(): boolean;Defined in: src/engine/ui/components.ts:759
True while it has focus (a click, a script or navigation gave it). Set it to focus or unfocus it.
boolean
set focused(value): void;Defined in: src/engine/ui/components.ts:763
boolean
void
UIFocusable.focused
get focusedChanged(): boolean;Defined in: src/engine/ui/components.ts:772
True for the one frame the player (the pointer or navigation) gave it focus or took it away, in every phase of that frame.
boolean
UIFocusable.focusedChanged
get gameObject(): GameObject;Defined in: src/engine/core/Component.ts:37
Unity-style alias for node.
UIFocusable.gameObject
get isActiveAndEnabled(): boolean;Defined in: src/engine/core/Component.ts:68
True when enabled, the node is active in the hierarchy, and the node is in a loaded world.
boolean
UIFocusable.isActiveAndEnabled
get node(): GameObject;Defined in: src/engine/core/Component.ts:32
The node this component is on.
UIFocusable.node
get owner(): GameObject;Defined in: src/engine/core/Component.ts:45
The node this component acts for: the node itself when attached directly, or the parent node when this component lives on a component node (ADR 0009).
UIFocusable.owner
get time(): Readonly<TimeState>;Defined in: src/engine/core/Component.ts:93
This component's World's clock (ADR 0032): the same values as Time, but safe to read
outside the World's frame too (after an await, say).
Readonly<TimeState>
UIFocusable.time
get transform(): Transform;Defined in: src/engine/core/Component.ts:51
The Transform of the node this component is on, if it has one.
UIFocusable.transform
get world(): WorldHandle;Defined in: src/engine/core/Component.ts:82
A handle on this component's World (ADR 0132): the same one Engine.findWorld returns. Load
a scene into it, pause, connect or destroy it: this.world.loadScene("scenes/level2.scene.json").
Throws for a World no Engine owns.
UIFocusable.world
instantiate(prefabPath, options?): GameObject;Defined in: src/engine/core/Component.ts:103
Instantiate a prefab in this component's World (ADR 0034), like GameObject.instantiate.
Use it in code that may run after an await: by then the frame is over and the current World
is the Engine's default one, which may not be this component's. A parent from another
World throws.
string
InstantiateOptions = {}
UIFocusable.instantiate
This wiki is generated from docs/wiki/ and the myco module's source on every push to master. Change pages there in a pull request: edits made here are not kept.
Basics
Gameplay
Rendering
Audio
- Playing sound
- Why is there no sound?
- Playlists
- Interactive music
- Sound generators
- Spatial audio
- Audio mixer
- Live mixing
- Loudness
- Audio profiler
- Audio takes
Reference