Examples
Small runnable snippets to explore Koya.
Hello Bar (static) #
24px bar, text "Koya" on the left, small white box on the right. Minimal starting point for a status bar.
koya -m assets -i examples/hello-bar.jsHello Window (XDG toplevel) #
Opens a standard XDG toplevel window with role: 'window', sets a title and app ID at runtime, and renders styled card UI inside it. Demonstrates Compositor.createWindow, setTitle, and setAppId.
koya -m assets -i examples/hello-window.jsScreenshot + Image Ops #
Captures the active display, resizes and blurs it, then displays in a floating window.
koya -m assets -i examples/screenshot-test.jsImage API pipeline #
Exercises the Koya/Image processing and lifetime APIs: load, resize, blur, crop, encode, perceptualHash, render, destroy, and unload. Each step reports pass/fail in a live status panel. Good reference for image processing workflows.
koya -m assets -i examples/image-api-test.jsText positioning and alignment #
Visual grid validating contentAlign, layout slots, and text justification.
koya -m assets -i examples/text-positioning.jsCustom mesh rendering #
Creates mesh renderables with custom vertex data, comparing vertex_color and texture_only shaders side by side. Geometry mutates at runtime: the colour quad morphs into a diamond, then the textured quad morphs into a star. Demonstrates UI.createElement with type: 'mesh' and UI.setGeometry.
koya -m assets -i examples/mesh.jsGPU particle visual test #
Exercises Koya overlay particles: continuous point/cone emission, acceleration, lifetime interpolation, moving detached trails, deterministic seeded twins, radial emission, clipping independence, dense pool recycling, post-FX ordering, and Vulkan screenshot capture. See UI/Renderable: Particles for the complete API.
koya -m assets -i examples/particle-visual-test.jsAlpha mask clipping #
Visual test for clipToMask and clipMaskAlphaThreshold, including rounded-box, sprite, and panel mask sources.
koya -m assets -i examples/ui-mask-test.jsClip to bounds #
Side-by-side comparison of clipToBounds: false (overflow visible) versus clipToBounds: true (overflow clipped). Scrolling content animates inside both panels so the difference is immediately visible.
koya -m assets -i examples/ui-clip-test.jsVulkan capture + encode #
Automated-capture oriented sample: renders a deterministic scene, captures with source: 'vulkan', encodes via Image.encode, computes psychovisual hashes via Image.perceptualHash, writes artifacts with Module/process, then exits.
koya -m assets -i examples/vulkan-capture-test.jsComposite opacity #
Visual comparison of subtree opacity modes:
propagate: parent alpha is multiplied into children before blendcomposite: subtree is composited first, then faded once
koya -m assets -i examples/ui-opacity-composite-test.jsAnimation dynamic t:0 capture #
Visual validation of dynamic-start animations:
- Left card: clips have only a
time: 1.0keyframe (no authoredtime: 0.0) - Expected: when clips switch, the next clip starts from the current visual pose (no identity snap)
- Right card: explicit
time: 0.0control animation for comparison
koya -m assets -i examples/ui-animation-dynamic-zero-test.jsRuntime profiling #
Run the window demo with engine and scripting timings, task counts, and queue sizes logged once per second. See Helix/Profiler for the snapshot format and how to profile your own application.
koya -m assets -i examples/profiler.jsMore examples and modules #
- Native plugins and source: Omnomios/helix-plugins
- Waybar-style bar built on Koya: Omnomios/koya-bar
- Experimental Linux phone interface built with Koya: Omnomios/koya-phone