Soundor
Engine

Engine 0.5.0

Release notes for Engine 0.5.0.

All Engine releases

3 changes — 3 features

Minor Changes

  • #184 2a4f506 Thanks @dm-balakin! - A cursor style sets the pointer's shape over a node and its children: 'auto' (the default, the parent's: the arrow at the root, the I-beam in a text input), 'default', 'none', 'pointer', 'text', 'crosshair', 'move', and the 'ew-', 'ns-', 'nesw-' and 'nwse-resize' cursors. While a pointer is pressed, the pressed node's cursor shows wherever it is dragged. Both runtimes resolve it the same way; the JUCE runtime shows the platform's own cursors.

    Hover follows what changes under a pointer that does not move, as in browsers: when the tree, a layout or a scroll puts another node under a still mouse, pointerleave and pointerenter fire (and Pressable's onHoverIn/onHoverOut), and the cursor follows, in the next tick or frame.

  • #185 be7853c Thanks @dm-balakin! - Pointer events have movementX/movementY: how far the pointer moved since its previous event, in logical pixels. A node can lock the pointer while it is pressed, for knobs and faders that turn past the screen's edge: node.requestPointerLock() (from pointerdown) hides the pointer, the screen's edges no longer stop it, its events stay at the position the lock began with only the movement changing, and on release (or exitPointerLock()) the pointer shows again where it began. pointerLockNode() is the node holding it. The JUCE runtime keeps the hidden pointer in the view, moving it back as it strays, and ends the lock however the press ends; the web runtime uses the browser's Pointer Lock. The implicit pointer capture now starts before the pointerdown listeners run, so they can lock the press. The test runtime and user.pointer support both.

  • #178 ce7601d Thanks @dm-balakin! - Bring your own fonts: import inter from './Inter.ttf' (or .otf) bundles a font file, and registerFont('Inter', inter, { weight, style }) from soundor:ui makes it a face of a family, as CSS's @font-face does. Text whose fontFamily is a registered family is set in its closest registered face (bold and italic synthesized where none is), in views and canvases alike; text already shown is laid out again. In the web runtime, a fontFamily is now quoted in CSS (unless generic), so names such as 'Inter 18pt' work as they do natively.

On this page