From 552321eb2adbb3614a768790c23ac7abd0ba131a Mon Sep 17 00:00:00 2001 From: Titus Date: Mon, 16 Nov 2026 11:56:57 +0100 Subject: [PATCH] The 3D layout follows SDK 4.171.1 and Python 0.130.1: a Map with a width under 0, and how to count what is new A Map whose width or height is not over 0 is no plate (a width under 0 made the call throw before). The readers page says that an element with a Pin on the map is never answered as held, so what is new is counted by the ids not handed back, and that a layout which hands every point back now costs less than one from nothing. The SDK pin moves to 4.171.1 and the reference is regenerated from it. Co-Authored-By: Claude Fable 5.2 --- package-lock.json | 8 ++++---- package.json | 2 +- src/content/docs/docs/changelog.md | 1 + src/content/docs/docs/development/typescript-readers.md | 6 +++--- src/content/docs/docs/development/typescript.md | 2 +- 5 files changed, 10 insertions(+), 9 deletions(-) diff --git a/package-lock.json b/package-lock.json index 535145f7..5fe1bc45 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,7 +14,7 @@ "starlight-page-actions": "0.7.1" }, "devDependencies": { - "@onlyworlds/sdk": "4.171.0", + "@onlyworlds/sdk": "4.171.1", "typescript": "5.9.3" } }, @@ -1685,9 +1685,9 @@ } }, "node_modules/@onlyworlds/sdk": { - "version": "4.171.0", - "resolved": "https://registry.npmjs.org/@onlyworlds/sdk/-/sdk-4.171.0.tgz", - "integrity": "sha512-IxSW9BbIfKDCIpPcf96IuCI7kk/1QRflVAzDmIrEP8j5uZ77QBXNpM8bHmQJjupmIw8RBDw8s/wV3YOTUHdmAQ==", + "version": "4.171.1", + "resolved": "https://registry.npmjs.org/@onlyworlds/sdk/-/sdk-4.171.1.tgz", + "integrity": "sha512-PPcsrUC8KevPtqKrlT1mzovrUIwh+BXxkodT4SK45m2JSlT4qUmLRvf99j4HnlZZDMpHE4yLpf/7vZGDqqPW+g==", "dev": true, "license": "MIT", "dependencies": { diff --git a/package.json b/package.json index 63880dcf..a6a0d838 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ "starlight-page-actions": "0.7.1" }, "devDependencies": { - "@onlyworlds/sdk": "4.171.0", + "@onlyworlds/sdk": "4.171.1", "typescript": "5.9.3" }, "overrides": { diff --git a/src/content/docs/docs/changelog.md b/src/content/docs/docs/changelog.md index 66fb34e0..aa46cf1f 100644 --- a/src/content/docs/docs/changelog.md +++ b/src/content/docs/docs/changelog.md @@ -9,6 +9,7 @@ What changed on onlyworlds.com for everyone is on its own [Changelog](https://ww ## 2026-11-16 +- **[A world laid out in 3D](/docs/development/typescript-readers#a-world-laid-out-in-3d): TypeScript SDK 4.171.1 and [Python](/docs/development/python) 0.130.1.** A Map whose width or height is under 0 no longer stops the layout: a width or height that is not over 0 makes the Map no plate, and the world is laid out by its links. A layout that hands earlier points back no longer works out the push between two elements that both stand still, so keeping a picture still costs less than laying it out from nothing; no point of any answer changes. The page now says how to count what is new: by the ids you did not hand back. - **[A world laid out in 3D](/docs/development/typescript-readers#a-world-laid-out-in-3d): TypeScript SDK 4.171.0's `layoutByLinks3d` and [Python](/docs/development/python) 0.130.0's `layout_by_links_3d`.** One method in both packages lays a whole graph out in three dimensions by its links, with the world's map as a flat plate, and held points keep a picture still as the world grows. Its word, `by-links-3d`, is the tool's own until its page in the standard is published. - **[The default layouts are a profile](/docs/schema/profiles#default-layouts) (serial 132).** The two methods that draw a world nobody has laid out, `by-kind` and `around`, are written out in the standard, with a fixture of 17, 10 and 15 cases: the same graph gives the same points in every tool and language. A method's word is its version. The [map-space profile](/docs/schema/profiles#map-space)'s rule on layout maps now ends on what reading may do: reading or drawing a layout map changes none of its Pins, and laying it out again is a write like any other. - **[What a saved layout does not place](/docs/development/typescript-readers#a-worlds-default-picture): TypeScript SDK 4.170.0's `unplacedByKind` and `unplacedAround`, and [Python](/docs/development/python) 0.129.0's `unplaced_by_kind` and `unplaced_around`**, answer the ids a layout method would place that a saved layout Map has no Pin for, so a tool can say how many elements a world has gained since the layout was saved. Both packages now replay the profile's own fixture from the standard's distribution. diff --git a/src/content/docs/docs/development/typescript-readers.md b/src/content/docs/docs/development/typescript-readers.md index 26a8e6df..e3339713 100644 --- a/src/content/docs/docs/development/typescript-readers.md +++ b/src/content/docs/docs/development/typescript-readers.md @@ -200,7 +200,7 @@ const { points } = layoutByKind(graph); // [{ id, x, y }, ...], each x and y w ## A world laid out in 3D -`layoutByLinks3d(graph, elements?, { held, heldUnit })` (since 4.171.0) lays a whole graph out in three dimensions by its links. The most linked elements become centres, each with its group round it. The groups are packed apart and settled by 300 seeded steps, what hangs off the body fans out from it, and what is not joined to the main piece stands on a shelf under the picture. Pass the world's elements as the second argument and its maps join in: the Map that holds the most of the graph's elements by a Pin, three or more, becomes a flat plate with each pinned element at its Pin. Maps and Pins are read through `mapSpace` and `layoutOf`. A Pin's `z` is not read, and a layout map is never the plate. +`layoutByLinks3d(graph, elements?, { held, heldUnit })` (since 4.171.0) lays a whole graph out in three dimensions by its links. The most linked elements become centres, each with its group round it. The groups are packed apart and settled by 300 seeded steps, what hangs off the body fans out from it, and what is not joined to the main piece stands on a shelf under the picture. Pass the world's elements as the second argument and its maps join in: the Map that holds the most of the graph's elements by a Pin, three or more, becomes a flat plate with each pinned element at its Pin. Maps and Pins are read through `mapSpace` and `layoutOf`. A Pin's `z` is not read, and a layout map is never the plate. A Map whose `width` or `height` is not over 0 is no plate either: when it is the Map that holds the most, the world is laid out by its links alone (since 4.171.1; before that a width under 0 made the call throw). It answers one row per node, in the order you passed them: @@ -212,11 +212,11 @@ It answers one row per node, in the order you passed them: | `group` | The id of the centre the element stands with, or null. | | `part` | For an element with no centre: `map`, `one-link` or `no-link`. Null where `group` is an id. | | `centres` | The centres' ids, in the method's rank order. | -| `held` | True where the point is one you handed back. | +| `held` | True where the point is one you handed back. An element with a Pin on the map is never held, so false does not mean new. | The same input gives the same points in every browser and in the Python package's `layout_by_links_3d`: to the last bit for a centre, a grouped element and a pinned one, and within a billionth of a rest for the rest. The package's tests replay a fixture both packages hold. -To keep a picture still as a world grows, hand an earlier answer's points back as `held` (element id to `[x, y, z]`), with `heldUnit: 1` when you saved them as whole numbers. A held element stays where it was (one with a Pin on the map stands at its Pin, held or not), and what is new is placed round it. Nothing is saved: to keep a picture, save it as a layout Map yourself. A saved layout keeps points only; the groups are read again from the world. +To keep a picture still as a world grows, hand an earlier answer's points back as `held` (element id to `[x, y, z]`), with `heldUnit: 1` when you saved them as whole numbers. A held element stays where it was (one with a Pin on the map stands at its Pin, held or not), and what is new is placed round it. To count what is new, count the ids you did not hand back, never `held: false`. A layout that hands every point back costs less than one from nothing (since 4.171.1). Nothing is saved: to keep a picture, save it as a layout Map yourself. A saved layout keeps points only; the groups are read again from the world. The method's word, `by-links-3d`, is the tool's own until its page in the standard is published. Until then a release may move its points. diff --git a/src/content/docs/docs/development/typescript.md b/src/content/docs/docs/development/typescript.md index baffbd4e..5d8625a6 100644 --- a/src/content/docs/docs/development/typescript.md +++ b/src/content/docs/docs/development/typescript.md @@ -395,7 +395,7 @@ The package also ships `SCHEMA.md` (every field and its meaning, generated) and ## Reference -Generated from the types of `@onlyworlds/sdk` 4.171.0, the version these docs pin. The full declarations ship in the package (`dist/index.d.ts`), with `SCHEMA.md` and `AGENTS.md` beside them. +Generated from the types of `@onlyworlds/sdk` 4.171.1, the version these docs pin. The full declarations ship in the package (`dist/index.d.ts`), with `SCHEMA.md` and `AGENTS.md` beside them. ### Client options