amenui
en·中 github ↗ v0.0.1
01文档 02组件 03实验室 04作品
en·中github ↗
×

文档 / 概念 / 设计 / 设计 文档 / 概念 / 设计 /

设计

03.5

本页只有英文。

本页内容 ▾
  1. Terms
  2. 0. Three rules
  3. 2. Parameters must be exact

A self-drawn interface framework. Anything on screen (text, pictures, shapes, controls) can loosen along its own true outline, morph, and come back together; the look is a swappable material. Rust and wgpu, one codebase for native and web (WebGPU, falling back to WebGL2 when there is no WebGPU adapter or its device fails, the canvas left untouched until a WebGPU device is there; WebGPU only without the webgl feature, where a browser without it fails to start with app::web::StartError::Adapter, which the module's start_failure() export and web/amenui.js's opts.onFail(kind, message) tell the page).

This document is what the implementation follows. A design change starts here.

Terms

TermMeaningIn the code
Coverage bufferRGBA8 render target: tone, accent and a type code plus anti-aliased coverage; pictures write premultiplied colourink
Signed distance field (SDF) bufferRGBA8 target, max-blended: R signed distance (0.5 on the outline, ±SPREAD px), G picture slot, B looseness, A material override or print pitchnear
G-buffer stageThe first pass: every instance drawn into the coverage and SDF buffersstage 1
Screen-space shading stageThe second pass: the material reads both buffers and the wave field and writes the framestage 2
LoosenessHow far an instance has come apart, 0 (intact) to 1loose, loosen
Wave fieldRipple fronts, the pointer lens and other sources, evaluated analyticallyField, Fx
FrontOne expanding ripple ring from a press or a commitFront
MarkA small pattern a loosened picture is redrawn with (a character, a dither cell, a stroke…)marks
Field mapA coarse energy and flow grid over the windowfieldmap

0. Three rules

  1. No boxes. Every effect follows true outlines (the edges of glyphs, shapes and pictures), never a text box or a grid cell.
  2. One way to make things move. Events put things into the wave field; the field and each instance's own clock decide the picture. Components never animate directly.
  3. Calm at rest, generous in change. The pointer passing over text leaves the text alone. An interface that has stopped is a clean, readable page.

2. Parameters must be exact

Sliders are not the main means. The number control (number):

  • Shows the current value and unit, with a step button on each side.
  • Once focused, type a number directly; Enter confirms, Esc cancels.
  • Up and Down change it by a step; with Shift, by ten steps.
  • Dragging sideways across the value scrubs it continuously (a secondary means).

Every parameter of Fx is exposed through it: the text pitch, irregularity, misregistration, wave speed, wave lifetime, wave width, trail length, push, lens radius and condensing time. The picture pitch and the other picture parameters are in Markr, each with a number control as well.