interface Primitives · Vectors

Point

interface Point extends Vector

A position. A point made with values.point(…) is reactive: code that depends on it runs again when it moves.

values.point(…) of a group creates a reactive point at a copy of the position it gets. Pins and handles have a position too and can be passed wherever a point is expected. A computation called without result returns a new plain point: it has the position, but writes into it are not reported. To keep a reactive point at a computed position, pass it as result in Reactive.do.

Writing x and then y from outside a reactive action are two updates; Reactive.block makes them one.

Shapes hold point objects. A point passed when a shape is created is stored, not copied, so the shape moves with it; a reactive point must belong to the same group as the shape, or the creation throws. [x, y] and { x, y } become plain points of the shape, and writes into plain points are not reported, so visuals made from them are not redrawn. For a shape that follows its points, create them with values.point(…) of the same group.

Inherited

From Vector x, y