Skip to content

Mobster 0.1.0

Choose a tag to compare

@tingham tingham released this 08 Sep 00:33
· 88 commits to main since this release
a669c15

A Guide is now a stateless evaluator. This replaces the surface 0.0.1 documented.

let guide = Guide(frame: frame)
try guide.initialize(source: .preset(GridPreset(count: 4, gutter: 0.05)),
                     frame: frame, adhesion: 0.4, duration: 1,
                     settleEpsilon: 1, budget: budget)
let moved = guide.evaluate(lines, at: t)

Mobster evaluates between two frames. Carrying positions across successive sets of targets is the consuming application's work.

Changed

Vert and Line replace Sample and Stroke. A vert carries a location, an optional identifier, and optional mass, drag and coupling. A line carries verts and an identifier and holds no behaviour of its own.

Tokens, membership, settlement listeners and the skip take lifecycle are gone. All existed because a Guide tracked points between frames.

Resolution is derived rather than supplied, from the Frame and the settle epsilon, because a read snaps to the containing texel and a texel larger than the epsilon carries more error than the tolerance being settled within. Where the derived resolution outruns the budget, initialize refuses and reports an epsilon that would fit.

Adhesion is a control between zero and one. The consumer never sees a reach.

The verts supplied are the anchors. A consumer holding undisplaced content receives a stable result where a vert far from every path settles short and stays short. One feeding a result back has declared a new anchor and asked for a further displacement.

Physics. Mass is an exponent on progress. Drag runs downward from one: one is the plain travel, zero holds back across the whole run, minus one carries a vert away before it returns. Coupling advances a vert's neighbours along their own travel, signed, decaying per hop so reach needs no parameter. Every vert is home at the duration regardless of any of it.

Grid preset joins Golden Ratio, Thirds, Columns, Rows, Ruler and Curve.

Not here

Source layer interpretation, which moved to OneBrush. Mobster takes paths or a preset.

Decimation and smoothing. The field is exact whatever the vertex count, so detail below what it can resolve is wasted work rather than a wrong answer, and the refusal guards the cost.

Shared displacement, where a line preserves its shape. Time offsets cannot produce it, and whether it is wanted is a judgement to be made from the harness.

What a guide costs

The field is a grid and the bake costs grid squares times guide segments. A finer epsilon means more squares, more verts mean more segments, and the two multiply. There is no single vert limit: a few hundred at a fine epsilon, thousands at a coarse one. The bake happens once, at initialize.

The promise not yet made

Two integration modes persist a relationship rather than positions, so they recompute displacement on every document open. Determinism holds within a build, verified bit exact across separate processes. Two builds agreeing is a separate promise and nothing makes it.

Verification

208 tests. Five reconciliations in Documentation/Reviews/. The cuts since the revamp began have not been reconciled.