@jgengine/rapier 0.38.4 → 0.39.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +70 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -26,6 +26,76 @@ At publish, rename this heading to the new version and mirror the entries into
|
|
|
26
26
|
`packages/core/src/meta/changelog.ts` (the typed `CHANGELOG` export).
|
|
27
27
|
-->
|
|
28
28
|
|
|
29
|
+
## 0.39.0
|
|
30
|
+
|
|
31
|
+
### Migrate
|
|
32
|
+
|
|
33
|
+
- **Bump lockstep SDK packages to `^0.39.0`:** `@jgengine/{core,rapier,react,ws,node,sql,convex,shell,editor,assets,navbake}`. CLI `jgengine` is `0.36.0`; `@jgengine/github` is `0.26.0`.
|
|
34
|
+
- `scene.entity.spawn` now defaults `onExisting` to `"keep"`: spawning a live id adopts the body already there and returns its id, instead of throwing. A re-stream, a restore or a far teleport can no longer make a second body for one resident. Pass `onExisting: "throw"` where a duplicate is a bug, or `"replace"` to respawn fresh.
|
|
35
|
+
|
|
36
|
+
### Added
|
|
37
|
+
|
|
38
|
+
- `createPerception` (`@jgengine/core/world`) takes `solids` — the world collision set, normally `ctx.world.solids` — and a sighting then needs a clear line against it, so an agent no longer sees a target through a building. `maxSightRaysPerPass` (default 64) bounds the wall tests one agent's tick may spend; a pair the budget leaves unchecked is not sighted, and `PerceptionStats.occlusionDropped` counts those. Omitting `solids` keeps the cheap cone.
|
|
39
|
+
- `sightLineBlocked(solids, from, to)` (`@jgengine/core/world`) is the standalone "is anything solid between these two points" test those rays use.
|
|
40
|
+
- `mood` on `defineGame` (`Mood` from `@jgengine/core/render/lookMood`): one art-direction field for the light — `"day"`, `"bright"`, `"golden"`, `"dusk"`, `"overcast"` or `"night"`, or `{ preset, sun, skyColor, horizonColor, groundColor, fog, exposure, saturation, contrast, shadows }` to move a few tokens. It sets a cascaded shadow-casting key sun, a bounce opposite it, hemisphere fill, ambient, the dome's colours and sun (keeping the world sky's radius, clouds and day cycle), the haze range and the grade tint, all in agreement. `look` stays the rendering style; the two compose.
|
|
41
|
+
- `resolveMood` and `MOOD_PRESETS` (`@jgengine/core/render/lookMood`).
|
|
42
|
+
- `sky()` now passes `sunColor`, `fogColor`, `moonIntensity` and `moonColor` through.
|
|
43
|
+
- `road({ materials: { road, sidewalk, curb } })` takes scanned PBR surfaces per layer, e.g. `{ road: librarySurfaceScan("asphalt/dry"), sidewalk: librarySurfaceScan("concrete/smooth", { tint: 0 }) }`. The carriageway and its welded junctions tile one world-XZ scan with a second rotated sample against visible repeats; sidewalks and gutters tile along the kerb. Colour (or, at `tint` 0, grain over the authored colour), roughness around the authored value, the scan's normal map and AO all land; the tyre wear, patching and edge grime still layer on top. A map that fails to load, or the `low` tier, keeps the procedural surface.
|
|
44
|
+
- `material.scan` on any model override (`ModelMaterialOverride.scan`): a scanned surface projected triplanar from the model's own geometry in metres, so a kit model whose UVs only address a palette atlas takes real plaster, concrete or wood grain. `tint` 0 keeps the model's colours. Works on entity models, scattered and static-batched props; off on the `low` tier and until the maps load.
|
|
45
|
+
- `librarySurfaceScan(name, options)` (`@jgengine/assets/catalogs/materialLibrary`) names a library scan for terrain, roads or models; `libraryTerrainMaterial` is now this.
|
|
46
|
+
- Library finishes `paint/gloss` (lacquered car paint: clearcoat 1 over a soft base) and `paint/satin`, response-only: `material: { ...librarySurfaceParameters("paint/gloss"), color }`.
|
|
47
|
+
- `road({ sidewalk: { slabs } })`: paving slab length in metres (default 1.5), `false` for none.
|
|
48
|
+
- The dev runner ships ambientCG `Asphalt003` and `Concrete006` (CC0) beside the existing packs.
|
|
49
|
+
- `bun run release --wait` finishes a release instead of handing it back: it commits the cut, hands the PR to `land` (push, open or update, arm auto-merge), waits for the merge, fast-forwards `main`, waits for the Publish run and prints `release: published @jgengine/core@<version> (publish run <id>)`. A failed run prints `release: publish run <id> failed at job "<job>" at step "<step>" <url>` and exits 1. A release lane spent 265 minutes in 24 h in `Start-Sleep 480; gh run view …; npm view …` loops around this step.
|
|
50
|
+
- `bun run release:await [<version>] [--run <id>]` is the wait on its own, for a version that is already cut; it answers from the registry, not from the workflow's own success message, so a run that reported success without the version on npm is a failure that names both.
|
|
51
|
+
- `bun run worktree:reap` removes every worktree whose branch has merged into `origin/beta` and whose tree has no uncommitted changes. Committed work survives because it lives in the branch, not the working copy. `lane:close` runs it after a PR merges and `agent:worktree` runs it before a new lane, so `.claude/worktrees` stops growing by a working copy per lane — 151 GB of them on this machine. A locked, detached, unmerged or dirty tree is kept and named with its reason.
|
|
52
|
+
|
|
53
|
+
### Changed
|
|
54
|
+
|
|
55
|
+
- `look: "cinematic"` tone-maps with ACES instead of AgX. Under a sunny sky AgX's flat curve read as a milky veil over the whole frame, and all seven shipped games had already overridden it to ACES. Other looks keep AgX.
|
|
56
|
+
- A styled `look` (anything but `"neutral"`/`"flat"`) with no `mood` and no authored ambient/hemisphere/directional light now gets the mood its sky implies (`"day"`, or `"dusk"`/`"night"` under those sky presets) instead of the sky's bare sun and hemisphere. Skies on a day cycle are left alone. Set `lighting` to keep a hand-built rig.
|
|
57
|
+
- The scene document's sky `sunIntensity`/`ambientIntensity` scale a mood's rig, and its sun angles place the mood's key light, so editor lighting controls keep working under a mood. Document lamps (light markers, environment point lights) join the mood's rig.
|
|
58
|
+
- Every `road()` sidewalk is now raised on a real 14 cm kerb with a vertical kerb face and an outer skirt (it was a 4 cm lip that read as paint on the road), and is laid in slabs whose joints run square to the kerb, each slab its own tone. Matches the generated city's kerb step.
|
|
59
|
+
- The gutter strip is poured concrete between kerb and asphalt (a dusty shoulder with no sidewalk), 35–60 cm wide, never darker than the road. It was a half-metre band at 45% of the road's brightness: a cartoon outline along every street.
|
|
60
|
+
- Lane dashes, stop lines and crosswalks are worn paint: 15–30 cm wide (dashes were 3.5% of the road width, half a metre on an avenue), taking the asphalt's grain and wearing through to it in polished patches.
|
|
61
|
+
- The procedural pavement's crack network is sparse hairlines that wander, instead of a 3 m Voronoi grid of 9 cm lines drawn over every road and sidewalk.
|
|
62
|
+
- `bun run land:batch <branch ...>` lands several finished, independent branches as one push: it merges each onto the growing `beta` tip in order, verifies every merge, skips a branch that conflicts or fails with the reason, and pushes the survivors once so CI runs once instead of once per branch.
|
|
63
|
+
- `bun run land:batch --explain` reads the recorded batch and names the commit a red tip most likely came from.
|
|
64
|
+
- `publish.yml` starts when the release commit's CI finishes and refuses a commit CI has not passed, instead of re-running the full test suite on the release commit: one environment-sensitive test can no longer block a release whose PR was green (#2279). A release still builds, type-checks the packed SDK, checks for source artifacts, packs the candidate and compiles a real adopter against those tarballs.
|
|
65
|
+
- `bun scripts/check-release-ci.ts` reads the `ci.yml` verdict for one commit, so a manual publish answers the same question.
|
|
66
|
+
- Measurement note batch1: a prose-only change, the shape every lane ships a note in.
|
|
67
|
+
- Measurement note batch2: a prose-only change, the shape every lane ships a note in.
|
|
68
|
+
- Measurement note batch3: a prose-only change, the shape every lane ships a note in.
|
|
69
|
+
- Measurement note batch4: a prose-only change, the shape every lane ships a note in.
|
|
70
|
+
- Measurement note batch5: a prose-only change, the shape every lane ships a note in.
|
|
71
|
+
- Measurement line batch6.
|
|
72
|
+
- Measurement note explain1: a prose-only change, the shape every lane ships a note in.
|
|
73
|
+
- Measurement note explain2: a prose-only change, the shape every lane ships a note in.
|
|
74
|
+
- Measurement note explain3: a prose-only change, the shape every lane ships a note in.
|
|
75
|
+
- Measurement note explain4: a prose-only change, the shape every lane ships a note in.
|
|
76
|
+
- Measurement note explain5: a prose-only change, the shape every lane ships a note in.
|
|
77
|
+
- Measurement note explain6: a prose-only change, the shape every lane ships a note in.
|
|
78
|
+
- Measurement note one1: a prose-only change, the shape every lane ships a note in.
|
|
79
|
+
|
|
80
|
+
### Fixed
|
|
81
|
+
|
|
82
|
+
- `downloadArchive` (`@jgengine/assets/download`) is typed as the `ArrayBuffer`-backed `Uint8Array` it returns, so its bytes are accepted where a `fetch` body is expected.
|
|
83
|
+
- Auto-exposure metered nothing: the WebGL2 pack buffer it reads back into was never sized, so every read failed, the meter saw black, and exposure sat pinned at its maximum (2.5x by default) in every game with a post chain. That is the washed-out, milky look. The buffer is now sized before the first read.
|
|
84
|
+
- `defineGame` now passes `look` through to the playable, so `look: "flat"` also turns off the shell's image-based light rig.
|
|
85
|
+
- A push to `beta` no longer cancels the run already in flight: `beta` serialises, so every verdict the branch reports was reached. On 24 Oct 11 of 44 pushes to `beta` were cancelled, 122 runner-minutes went on runs killed after they started, and "is beta green" was answered by a run that never finished.
|
|
86
|
+
- GitHub still keeps only the newest pending run when a burst arrives; what changes is that no beta run is killed once it starts.
|
|
87
|
+
- `main` is unchanged (never cancelled); a pull request still cancels its own superseded run.
|
|
88
|
+
- `check:consumer-types` installs the candidate it packed. It packed only the `@jgengine/*` packages the games catalog names, so a packed package's own dependency range (`@jgengine/editor` on `@jgengine/navbake@^0.38.4`, `@jgengine/assets` on `@jgengine/core@^0.38.4`) went to the registry, where the version does not exist until after the publish step. The install failed with `No version matching "^0.38.4"` and stopped 0.38.4's first publish run before anything was published. Every published package is now packed, and each one is written into the adopter's `overrides` as well as its catalog, so a transitive range resolves to the tarball.
|
|
89
|
+
- `check-game-front-end` counts `CreditsPane` as a game's credits surface. 0.38.4's games pin reported `Games/deepward - no credits` for a game that renders the credits in the `GameMenu` the engine ships (`CreditsPane` in a detail slot), because the pattern only knew `CreditsScreen`, `CreditsPanel` and the generated asset credits. Harbor Heat's baselined `#credits` entry no longer applies at the current pin, so the baseline shrinks from 8 entries to 7; Brightway Park's stays until the games pin that ships its menu.
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
- The ci aggregate job accepts a smoke run that actually ran and passed when the path map says no game surface changed. A script under scripts/** is in the heavy set but not in the game map, so GAMES=none with SMOKE=success is a real combination; the job asserted on skipped and failed an otherwise green run, which is what blocked this PR.
|
|
93
|
+
- `check:scaffold-launch` now fails on a second Chrome launch path: only `scripts/browser-lib.ts` and the scaffold template may name the debugger flag, and every capture script must reach the browser through `scripts/browser-lib.ts` (#2132).
|
|
94
|
+
- `bun run ci:status` answers a branch with no PR with one line on stdout, `ci:status: no open PR for <branch> on <owner/name> - nothing to answer`, and still exits 3. The line used to go to stderr only, so a lane that reads stdout saw silence and fell back to polling.
|
|
95
|
+
- `GameMenu` keeps its text readable on a bright scene. The detail pane now carries its own scrim (a dark gradient by default; pass `detailStyle={{ background: "none" }}` for no surface), the surface tint is stronger on the right, and the dim-text default rose from 0.66–0.68 alpha to 0.84–0.88.
|
|
96
|
+
- The selected verb is a filled rail with a 3px accent bar and a ring instead of a thin border, so the current row reads at a glance on any background. `--jg-accent-glow` still colours the fill.
|
|
97
|
+
- `createSessionLoop` and `createRunLoop` take a `persist` seam: the loop writes its own live state on each carry (or every N), on open, on choose and on close, and reads it back at construction. A process killed mid-session now comes back carrying what it had instead of zero. A failing write is ignored so a full disk cannot end a session.
|
|
98
|
+
|
|
29
99
|
## 0.38.4
|
|
30
100
|
|
|
31
101
|
### Migrate
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jgengine/rapier",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.39.0",
|
|
4
4
|
"description": "Rapier physics backend for JGengine",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"test": "bun test src"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@jgengine/core": "^0.
|
|
33
|
+
"@jgengine/core": "^0.39.0",
|
|
34
34
|
"@dimforge/rapier3d-compat": "0.19.3"
|
|
35
35
|
},
|
|
36
36
|
"publishConfig": {
|