
RmlUi examples
Run RmlUi documents in native SFML windows. Start with the counter, then explore themes, draggable windows, templates and visual test pages.
Prerequisites
Run all commands from the monorepo root. Bootstrap installs dependencies and builds the packages. A display and OpenGL are required; on macOS the native build also needs Xcode Command Line Tools and CMake. See the quick start.
node tools/bootstrap.cjsAfter editing RmlUi TypeScript sources, run npm run build:ts --prefix packages/sfml.js-rmlui. Examples use the locally built package.
The launcher reads RmlUi 6.3's bundled resources under the package's third_party/rmlui directory. List all entries:
node packages/sfml.js-rmlui/examples/official.cjs --listExamples


Theme switching, accent colors and hover styles
node packages/sfml.js-rmlui/examples/official.cjs variables
Controls: 1 selects dark, 2 light, 3 high contrast, R a random accent and C resets the accent. Escape exits. Mission buttons demonstrate hover styles only; upstream does not attach click actions.
The original stylesheet uses fixed px lengths. This sample keeps a 1024 × 768 framebuffer on Retina as well, with highDpi: false, matching the upstream window. F8 toggles Debugger; Ctrl +/-/0 adjusts the shell's display density.

Movable and resizable inventory windows
node packages/sfml.js-rmlui/examples/official.cjs drag
Controls: Move and resize both windows with the mouse. Escape exits.
This ports the tutorial's window setup, separate from the upstream basic/drag application.

Nine-slice textures and external templates
node packages/sfml.js-rmlui/examples/official.cjs template
Controls: Inspect the decorated window. Escape exits.

Load an upstream document with its original template, fonts and textures
node packages/sfml.js-rmlui/examples/official.cjs load-document
Controls: Inspect the loaded document. Escape exits. Application actions from other upstream demos are not wired.

JavaScript FontEffectInstancer and native glyph texture callbacks
node packages/sfml.js-rmlui/examples/font-effect.cjs
Controls: Space toggles the glow effect. Escape exits.
Bounded smoke run: --frames N; --screenshot path.png captures the last frame.

File document loading, native memory snapshots and synchronous callback RCSS input
node packages/sfml.js-rmlui/examples/streams.cjs
Controls: Escape exits. Use --frames N --screenshot path.png for a bounded capture.

Corner anchoring, measured text, projected bounds and owned clipping geometry
node packages/sfml.js-rmlui/examples/element-utilities.cjs
Controls: Space selects the next corner. Escape exits.
--frames 6 --exercise --screenshot path.png verifies four corners and captures the last frame.

Balanced native layers, premultiplied blending, self-composite filters and saved mask snapshots
node packages/sfml.js-rmlui/examples/render-layers.cjs
Controls: Space moves shapes. Escape exits.
--frames 6 --exercise --screenshot path.png exercises both positions and captures the last frame.

Lazy premultiplied byte generation, owned handle transfer and scissored layer snapshots
node packages/sfml.js-rmlui/examples/callback-textures.cjs
Controls: Space regenerates colours. Escape exits.
--frames 6 --exercise --screenshot path.png verifies caching and regeneration, then captures the last frame.

Custom native context/input allocation and release, owned document streams, independent tags and Factory caches
node packages/sfml.js-rmlui/examples/factory-elements.cjs
Controls: type in the field, Space updates text, Escape exits.
--frames 6 --exercise --screenshot path.png verifies edits and captures the last frame.

Native scalars, recursive data-for, shared arrays, sparse patches, getter/transform evaluation, custom Factory views and delegated two-way controllers
node packages/sfml.js-rmlui/examples/data-models.cjs
Controls: Increment updates the count, edit the title, toggle details, Escape exits.
--frames 6 --exercise --screenshot path.png verifies actual bindings and captures the last frame.

All four upstream models: Basics, Events, Invaders and Forms, with native expressions and synchronous array changes
node packages/sfml.js-rmlui/examples/official.cjs data-binding
Controls: switch tabs, edit fields, record or clear mouse positions, add or remove subjects, start and fire at invaders. Escape exits.
--frames 45 --exercise --panel invaders --screenshot path.png checks real state and captures the selected tab.

Six original tabs, decorator and color tweens, form controls, a four-second submission animation, and live RML/RCSS editors
node packages/sfml.js-rmlui/examples/official.cjs basic-demo
Controls: switch tabs, change tween settings, submit the form, edit the sandbox. Escape cancels an open subject selection; otherwise it exits. F8 toggles Debugger.
--panel sandbox --frames 8 --exercise --screenshot path.png verifies both editors and captures the sandbox. Panels: welcome, decorators, font-effects, animations, controls, sandbox.

Traverse the sample directory and toggle descendant visibility using the upstream FileBrowser rules
node packages/sfml.js-rmlui/examples/official.cjs tree-view
Controls: click directory arrows to expand or collapse. Escape exits.
--frames 12 --exercise --screenshot path.png verifies an actual directory toggle.

Original transform sequences, color keys, fade cycle, transitions and animation events
node packages/sfml.js-rmlui/examples/official.cjs animation
Controls: Space pauses, Return steps once, +/- nudges, arrows animate, F8 toggles Debugger, Escape exits.
--frames 8 --exercise --screenshot path.png verifies pause, step and click controls before capture.

Regenerate 50 original rows per update; retain independent rendering and the 200-entry FPS ring
node packages/sfml.js-rmlui/examples/official.cjs benchmark
Controls: Space pauses rendering, Down renders once, Return pauses row updates, Right updates once, F8 toggles Debugger, Escape exits.
--frames 3 --screenshot path.png captures a bounded run.

Transfer native-owned icons between windows and change their order.
node packages/sfml.js-rmlui/examples/official.cjs basic-drag
Drag an icon into another window or onto a preceding icon. Escape exits.

Adjust original color filters, blur, shadows, transforms and opacity.
node packages/sfml.js-rmlui/examples/official.cjs effects
Open the menu, change sliders and reset the settings. Escape exits.

Rotate the original documents with orthographic and perspective projection.
node packages/sfml.js-rmlui/examples/official.cjs transform
Space pauses rotation; Escape exits.

Render the original SVG element, decorator and inline updates.
node packages/sfml.js-rmlui/examples/official.cjs svg
Use the original update controls; Escape exits.

Play the original mountain animation with native frame timing and rasterization.
node packages/sfml.js-rmlui/examples/official.cjs lottie
The animation loops automatically. Escape exits.

Use the original FNT glyph advances, kerning and native atlas textures.
node packages/sfml.js-rmlui/examples/official.cjs bitmap-font
Inspect the three original paragraphs. Escape exits.

Shape the original English, Arabic and Hindi paragraphs using their original fonts.
node packages/sfml.js-rmlui/examples/official.cjs harfbuzz
Click a language button to switch paragraphs. Escape exits.

Write original native log messages and severity prefixes to a chosen file.
node packages/sfml.js-rmlui/examples/official.cjs custom-log --log-file /tmp/rmlui-log.txt
The default log uses the system temporary directory. Escape exits.

Open the original native input and textarea with all ten original font faces.
Prepare the five optional Noto fonts once (38 MB, SHA-256 verified): npm run download:ime-fonts --prefix packages/sfml.js-rmlui. Valid cached files are reused.
node packages/sfml.js-rmlui/examples/official.cjs ime
Select a system input method and focus either field. Escape exits.

Run the original C++ game, menus, decorators and high-score data model.
node packages/sfml.js-rmlui/examples/official.cjs invaders
Left/Right moves, Space fires, Escape opens the pause menu and F8 toggles Debugger. Use the original menus to restart or exit.
Build the package first; the game module is produced in the same build directory. Loading needs no compiler. macOS is verified; Linux and Windows execution remain unverified.
Scores use application data storage. --scores-file /absolute/path/scores.txt selects an existing parent directory. --frames 8 --exercise starts a bounded game.

Run the original Lua documents and Game table with the original native game.
node packages/sfml.js-rmlui/examples/official.cjs lua-invaders
Left/Right moves, Space fires, Escape opens the pause menu and F8 toggles Debugger. Options persist beside the selected scores file.
Build the package first; the game module is produced in the same build directory. Loading needs no compiler. macOS is verified; Linux and Windows execution remain unverified.
--scores-file /absolute/path/scores.txt selects storage under an existing parent. --frames 8 --exercise starts a bounded game.

Browse 113 upstream visual test pages
node packages/sfml.js-rmlui/examples/official.cjs visual/clip_mask
Controls: F6 / F7 switches pages. Escape exits.
Append --frames 60 to close after 60 frames. --frames N accepts a positive integer for bounded smoke runs. These are previews without the upstream assertion harness.
The 113-page VisualTests assertions, physical IME checks, remaining game platform work and independent whole-project acceptance remain open. Renderer and module checks have separate evidence in their guides. Screenshots show the native applications running.