DocsReference
Known differences
The runtimes read the same document and share their layout, component, animation and geometry rules. A few things are drawn by each engine’s own tools, and differ slightly. The table compares the web and Godot; Unity has its own list below.
| Area | Web | Godot |
|---|---|---|
| Fonts not embedded | The family name with a system-ui fallback: the page has to provide the font. The Web HTML export links Google Fonts for it |
EnvyUI.fonts mapping, else a SystemFont with that name |
| Rounded clipping | Always clips to the rounded corners | clip_children when the frame has a visible fill, otherwise a rectangle |
| Drop shadows | CSS box-shadow; a shape’s shadow is a drop-shadow that follows its outline |
StyleBoxFlat shadow_size, about blur × 0.6; a shape’s shadow is drawn along its outline |
| Inner shadow | box-shadow: inset, border on top |
A shader, border underneath |
| Extra fills and strokes | A layer stack inside the node | Two canvas items under the children; a button’s hover border color doesn’t apply while it has extra fills or strokes |
| Layer blur | filter: blur() on the layer |
Blurs a screen copy of the layer’s area, so content behind a translucent layer is blurred too |
| Background blur | backdrop-filter |
A screen-texture shader, a little softer at large radii; only blurs what was drawn earlier on the same canvas layer |
| Group opacity | The group is flattened | modulate multiplies each child, visible where children overlap |
| Large corner radii | Smooth | Slightly faceted (StyleBoxFlat corner detail tops out at 20) |
| Focus search | Nearest button by position | Godot’s own search; unusual layouts can pick a different neighbor |
| Reduced motion | Screen transitions are skipped, autoplay entrances show their end pose and autoplay loops don’t start | Not applied |
| Nine-slice fills | Frames and buttons only. On shapes they stretch | Any outline. On a box smaller than its margins, Godot scales the margins down and the web clips |
| Image crop | Embedded (data:) images only. A linked image shows whole |
Any image |
| Project files | Load .envy through the web runtime’s loader |
Read .envy zips directly. Hot reload watches .envy.json only |
| Uppercase text | CSS text-transform, which turns ß into SS |
Label.uppercase, which leaves ß |
| Lists | Re-expanded when a change reaches a path a list reads, elements reused by id | Rebuilt only when item keys or order change; other changes update in place |
| Line and path strokes | Round ends and joins | No round ends or joins |
| Language switch | setLocale changes the text only |
set_locale rebuilds the open screens: animations started by game code stop and autoplay animations start again |
| Text input length | maxLength counts UTF-16 units; a longer value stays whole until edited |
maxLength counts code points; a longer value is cut when the field opens, and Enter on it unchanged writes nothing |
| Holding a direction on a slider | Keys repeat. Held gamepad directions repeat as the gamepad polling does | Keys repeat. A held d-pad or stick moves one step per press |
| Text input look | The field shows the text as typed, also when the label is uppercase. The label’s outline and shadow are not drawn while typing | The same. A field without a label in an auto-layout button sits inside the button’s padding |
| Styled text (runs) | Drawn as spans | A RichTextLabel only for a text with styled parts, filled with add_text so nothing is read as BBCode. Plain text stays a Label. Italic uses an italic face where there is one (embedded, or a system font), else a slant |
| Shrink to fit | Measured with the browser’s text engine | Measured with Godot’s. On a fill side a shrinking text lets go of its minimum size, so text that still overflows at its minimum is cut off at the box instead of showing past it. A fitted text draws its lines without the extra 3 px between them. A text with styled parts keeps a Label’s line pitch and height |
| Animated corner radius | Exact | Steps in whole pixels. Inner shadow and background blur keep the layer’s own corners |
| Animated size on a host that resizes | The layer’s room is measured again | The slot follows its parent |
| Sounds | Plays what the browser plays | Decodes the bytes itself: see Godot sound formats |
Embedded fonts, layout, anchors, auto layout, components, properties, bindings, events, transitions, overlays, translations and easing behave the same in both, apart from reduced motion above.
Unity
The Unity runtime follows the same rules, and its tests read the Godot test fixtures. Where it differs from the web:
- Fonts not embedded:
EnvyUI.fontsmappings (a font asset or a TTF/OTFFont, per family and weight) win, then fonts embedded in the document, then an installed font of that family, then Unity’s default. Weights are matched like CSS. - Text weight: UI Toolkit draws text from signed distance fields, so glyphs look about 10% lighter than in Chrome at the same size and weight. Weights still match each other.
- Letter spacing: converted from the document’s pixels, with the space after the last glyph added back, so centered and right-aligned text lines up with the web.
- Hot reload: in the Unity editor only, for
.envy.jsonfiles. - Text inputs: a UI Toolkit
TextFieldover the label.maxLengthcounts UTF-16 units, as on the web. The field shows the text as typed, also when the label is uppercase, without the label’s outline or shadow. - Styled text: rich text tags on the label, only for a text with styled parts, with every word kept as plain text. A run’s weight draws bold from 600 up and otherwise at the text’s weight, because TextCore picks one font for a whole label. Italic is TextCore’s slant, even with an italic face embedded. A text at weight 600 or heavier can’t show a lighter run. Line height is one pitch for the whole text, set from the text’s size, so a bigger run doesn’t make its line taller as it does on the web.
- Shrink to fit: measured with Unity’s text engine, so the same text can land a size or two from the web with different fonts.
- Animated size: if the host resizes during a track, the layer keeps the room it measured when the track began until the track ends.
- Animated gradients: drawn into a small texture each frame (radial at 64 px, still at 256 px), so a large radial gradient looks softer while its stops animate.
- Sounds: wav is read in C#. ogg and mp3 are written to a temporary file when the document loads and decoded by Unity, and stay silent until that finishes. See Unity sound formats.
See Unity runtime for how each part of a document is drawn.
Updated View as Markdown