1681-engine 0.5.9 → 0.5.10
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 +42 -0
- package/README.md +3 -0
- package/dist/1681-engine.js +501 -438
- package/dist/ambient/life/Birds.js +73 -0
- package/dist/ambient/life/Butterflies.js +43 -0
- package/dist/ambient/life/ChimneySmoke.js +50 -0
- package/dist/ambient/life/Drift.js +75 -0
- package/dist/ambient/life/Fireflies.js +52 -0
- package/dist/ambient/life/lifeMotion.js +49 -0
- package/dist/assets/AssetLoader.js +115 -70
- package/dist/assets/Prepainter.js +61 -0
- package/dist/assets/workerPainter.js +39 -0
- package/dist/cjs/electron/electronLike.d.ts +55 -0
- package/dist/cjs/electron/electronLike.js +7 -0
- package/dist/cjs/electron/index.d.ts +14 -0
- package/dist/cjs/electron/index.js +20 -0
- package/dist/cjs/electron/lockdown.d.ts +33 -0
- package/dist/cjs/electron/lockdown.js +69 -0
- package/dist/cjs/electron/lockdownRules.d.ts +28 -0
- package/dist/cjs/electron/lockdownRules.js +61 -0
- package/dist/cjs/electron/sessionStore.d.ts +40 -0
- package/dist/cjs/electron/sessionStore.js +77 -0
- package/dist/cjs/electron/shellId.d.ts +22 -0
- package/dist/cjs/electron/shellId.js +31 -0
- package/dist/cjs/electron/webFiles.d.ts +13 -0
- package/dist/cjs/electron/webFiles.js +52 -0
- package/dist/cjs/electron/webPatcher.d.ts +80 -0
- package/dist/cjs/electron/webPatcher.js +216 -0
- package/dist/cjs/electron/webPointers.d.ts +19 -0
- package/dist/cjs/electron/webPointers.js +35 -0
- package/dist/cjs/package.json +1 -0
- package/dist/cjs/updates/index.d.ts +8 -0
- package/dist/cjs/updates/index.js +21 -0
- package/dist/cjs/updates/manifest.d.ts +73 -0
- package/dist/cjs/updates/manifest.js +67 -0
- package/dist/cjs/updates/pickUpdate.d.ts +42 -0
- package/dist/cjs/updates/pickUpdate.js +52 -0
- package/dist/cjs/updates/webPlan.d.ts +20 -0
- package/dist/cjs/updates/webPlan.js +34 -0
- package/dist/electron/lockdown.js +31 -0
- package/dist/electron/lockdownRules.js +42 -0
- package/dist/electron/sessionStore.js +48 -0
- package/dist/electron/shellId.js +18 -0
- package/dist/electron/webFiles.js +36 -0
- package/dist/electron/webPatcher.js +147 -0
- package/dist/electron/webPointers.js +25 -0
- package/dist/electron.js +19 -0
- package/dist/input/haptics.js +50 -0
- package/dist/net/ApiClient.js +96 -0
- package/dist/pixel/lifeArt.js +83 -0
- package/dist/pixel.js +63 -58
- package/dist/react/ConfirmButton.js +24 -0
- package/dist/react/baseCss.js +1 -0
- package/dist/react/labels.js +7 -6
- package/dist/react/useJsonSelector.js +13 -0
- package/dist/react.js +73 -68
- package/dist/tilemap/TilemapView.js +57 -32
- package/dist/tilemap/autotile.js +103 -0
- package/dist/tilemap/collision.js +29 -18
- package/dist/tilemap/ldtk.js +21 -0
- package/dist/tilemap/ldtkParse.js +191 -0
- package/dist/types/ambient/life/Birds.d.ts +50 -0
- package/dist/types/ambient/life/Birds.d.ts.map +1 -0
- package/dist/types/ambient/life/Butterflies.d.ts +32 -0
- package/dist/types/ambient/life/Butterflies.d.ts.map +1 -0
- package/dist/types/ambient/life/ChimneySmoke.d.ts +37 -0
- package/dist/types/ambient/life/ChimneySmoke.d.ts.map +1 -0
- package/dist/types/ambient/life/Drift.d.ts +58 -0
- package/dist/types/ambient/life/Drift.d.ts.map +1 -0
- package/dist/types/ambient/life/Fireflies.d.ts +43 -0
- package/dist/types/ambient/life/Fireflies.d.ts.map +1 -0
- package/dist/types/ambient/life/lifeMotion.d.ts +63 -0
- package/dist/types/ambient/life/lifeMotion.d.ts.map +1 -0
- package/dist/types/assets/AssetLoader.d.ts +20 -0
- package/dist/types/assets/AssetLoader.d.ts.map +1 -1
- package/dist/types/assets/Prepainter.d.ts +64 -0
- package/dist/types/assets/Prepainter.d.ts.map +1 -0
- package/dist/types/assets/workerPainter.d.ts +21 -0
- package/dist/types/assets/workerPainter.d.ts.map +1 -0
- package/dist/types/electron/electronLike.d.ts +56 -0
- package/dist/types/electron/electronLike.d.ts.map +1 -0
- package/dist/types/electron/index.d.ts +15 -0
- package/dist/types/electron/index.d.ts.map +1 -0
- package/dist/types/electron/lockdown.d.ts +34 -0
- package/dist/types/electron/lockdown.d.ts.map +1 -0
- package/dist/types/electron/lockdownRules.d.ts +29 -0
- package/dist/types/electron/lockdownRules.d.ts.map +1 -0
- package/dist/types/electron/sessionStore.d.ts +41 -0
- package/dist/types/electron/sessionStore.d.ts.map +1 -0
- package/dist/types/electron/shellId.d.ts +23 -0
- package/dist/types/electron/shellId.d.ts.map +1 -0
- package/dist/types/electron/webFiles.d.ts +14 -0
- package/dist/types/electron/webFiles.d.ts.map +1 -0
- package/dist/types/electron/webPatcher.d.ts +81 -0
- package/dist/types/electron/webPatcher.d.ts.map +1 -0
- package/dist/types/electron/webPointers.d.ts +20 -0
- package/dist/types/electron/webPointers.d.ts.map +1 -0
- package/dist/types/index.d.ts +15 -2
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/input/haptics.d.ts +42 -0
- package/dist/types/input/haptics.d.ts.map +1 -0
- package/dist/types/net/ApiClient.d.ts +74 -0
- package/dist/types/net/ApiClient.d.ts.map +1 -0
- package/dist/types/pixel/index.d.ts +1 -0
- package/dist/types/pixel/index.d.ts.map +1 -1
- package/dist/types/pixel/lifeArt.d.ts +63 -0
- package/dist/types/pixel/lifeArt.d.ts.map +1 -0
- package/dist/types/react/ConfirmButton.d.ts +26 -0
- package/dist/types/react/ConfirmButton.d.ts.map +1 -0
- package/dist/types/react/baseCss.d.ts +1 -1
- package/dist/types/react/baseCss.d.ts.map +1 -1
- package/dist/types/react/index.d.ts +2 -0
- package/dist/types/react/index.d.ts.map +1 -1
- package/dist/types/react/labels.d.ts +2 -0
- package/dist/types/react/labels.d.ts.map +1 -1
- package/dist/types/react/useJsonSelector.d.ts +13 -0
- package/dist/types/react/useJsonSelector.d.ts.map +1 -0
- package/dist/types/tilemap/TilemapView.d.ts +17 -0
- package/dist/types/tilemap/TilemapView.d.ts.map +1 -1
- package/dist/types/tilemap/autotile.d.ts +95 -0
- package/dist/types/tilemap/autotile.d.ts.map +1 -0
- package/dist/types/tilemap/collision.d.ts +8 -0
- package/dist/types/tilemap/collision.d.ts.map +1 -1
- package/dist/types/tilemap/ldtk.d.ts +97 -0
- package/dist/types/tilemap/ldtk.d.ts.map +1 -0
- package/dist/types/tilemap/ldtkParse.d.ts +26 -0
- package/dist/types/tilemap/ldtkParse.d.ts.map +1 -0
- package/dist/types/updates/index.d.ts +9 -0
- package/dist/types/updates/index.d.ts.map +1 -0
- package/dist/types/updates/manifest.d.ts +74 -0
- package/dist/types/updates/manifest.d.ts.map +1 -0
- package/dist/types/updates/pickUpdate.d.ts +43 -0
- package/dist/types/updates/pickUpdate.d.ts.map +1 -0
- package/dist/types/updates/webPlan.d.ts +21 -0
- package/dist/types/updates/webPlan.d.ts.map +1 -0
- package/dist/updates/manifest.js +35 -0
- package/dist/updates/pickUpdate.js +27 -0
- package/dist/updates/webPlan.js +14 -0
- package/dist/updates.js +15 -0
- package/package.json +31 -3
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,48 @@ and versions follow [Semantic Versioning](https://semver.org/); before 1.0 a min
|
|
|
5
5
|
|
|
6
6
|
## Unreleased
|
|
7
7
|
|
|
8
|
+
## 0.5.10
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- **LDtk import**: `parseLdtk` reads a project's levels into the same `TileMap` Tiled maps use, so `TilemapView`,
|
|
13
|
+
`collisionFromTiled` and `objectsOf` work on them: IntGrid, AutoLayer, Tiles and Entities layers, entity and level
|
|
14
|
+
fields, tile custom data and enum tags, world layouts, multi-worlds projects and separate `.ldtkl` level files.
|
|
15
|
+
`levelByName`, `levelAt`, `entitiesOf`, `intGridAt`, `ldtkExternalLevels`, `loadLdtkLevel`;
|
|
16
|
+
`AssetLoader.ldtk(key, url, { levels })` and `ldtkProject(key)`; `collisionFromIntGrid(grid, solid)`.
|
|
17
|
+
- **Autotiling**: `autotile`, `updateAutotile` and `paintTerrain` on 4-bit edge masks or 47-tile blob masks
|
|
18
|
+
(`edgeMask`, `blobMask`, `BLOB47_MASKS`, `blob47Index`), with stable variants, fallbacks and `connectsTo`; an edit
|
|
19
|
+
retiles only its 3x3 neighbourhood. `TilemapView.refreshTiles(layer, cells)` repaints only the chunks touched, and
|
|
20
|
+
`x`/`y` place a map at a world position. The `ldtk` example.
|
|
21
|
+
- **Ambient life**: `Drift` (leaves, seeds, embers, motes, ash), `Birds`, `Butterflies`, `Fireflies` and
|
|
22
|
+
`ChimneySmoke`, bounded pools that live only in view on whole pixels, spawned from a `LifeSource` callback
|
|
23
|
+
(`sourceOf`, `pickInView`) under a `LifeAir`; `paintLifeArt` in `1681-engine/pixel` paints their art.
|
|
24
|
+
- `Haptics` and `HapticGate`: a per-kind rate-limited buzz with an injectable player (`navigator.vibrate` by default).
|
|
25
|
+
- `ApiClient` and `ApiError`: a JSON REST client with a timeout, a bearer token, a 401 refreshed once and retried,
|
|
26
|
+
status and error hooks, and abort.
|
|
27
|
+
- `Prepainter` and `workerPainter`: big textures painted ahead in a worker for the neighbours of the current key, the
|
|
28
|
+
rest freed.
|
|
29
|
+
- React kit: `ConfirmButton` (a button asked twice), `useJsonSelector`, `useStoreJson`, the optional label
|
|
30
|
+
`confirmAgain`.
|
|
31
|
+
- **`1681-engine/updates`**: the pure half of file-by-file web updates from a release store, shared by desktop,
|
|
32
|
+
browser and phone builds — `LatestJson`/`WebManifest`/`WebFile`, `validManifest`, `planWeb`, `pickWebUpdate`,
|
|
33
|
+
`apkUpdateOf`, `pluginEntries`, `heldBundle`.
|
|
34
|
+
- **`1681-engine/electron`**, the main-process side of an Electron build: `WebPatcher` (each newer web built beside the
|
|
35
|
+
running one, checked by sha256, only for the same shell; one that never boots is dropped for the last good one),
|
|
36
|
+
`shellId`, `SessionStore`/`registerSessionStore` (an OS-encrypted `safeStorage` secret, refused under `basic_text`),
|
|
37
|
+
`lockDownWindow`, `denyPermissions`, `refuseDebugLaunch` and the pure link rules. Both subpaths ship as ES modules
|
|
38
|
+
and CommonJS (`dist/cjs`); `electron` is an optional peer dependency that nothing imports.
|
|
39
|
+
- **Browser tests** (`npm run test:browser`, Vitest browser mode on headless Chromium with SwiftShader): WebGL pixels
|
|
40
|
+
read back, canvas text, `FontFace`, `decodeAudioData`, TexturePacker atlases, silhouettes, `RichText`, `PixelLayer`,
|
|
41
|
+
`PixelMarks`, `Darkness`, the React `Panel`'s fitting, fullscreen and pointer lock, `Engine.create` and
|
|
42
|
+
`DrawCallCounter`, in a CI job of their own; `npm run check` stays node-only.
|
|
43
|
+
- Guide page "Desktop: patching, sessions, lockdown"; the tilemap page covers LDtk and autotiling.
|
|
44
|
+
|
|
45
|
+
### Fixed
|
|
46
|
+
|
|
47
|
+
- `AssetLoader` names the URL when an image, sprite sheet or atlas page cannot be decoded, and the family and URL when
|
|
48
|
+
a font cannot be loaded; the browser's bare message named neither.
|
|
49
|
+
|
|
8
50
|
## 0.5.9
|
|
9
51
|
|
|
10
52
|
### Added
|
package/README.md
CHANGED
|
@@ -76,6 +76,9 @@ pixels. Without it, textures are smooth and drawn at the screen's own density.
|
|
|
76
76
|
| **Localisation** | `Translator` with the English source as key, contexts, plurals, live switching; `extractStrings`. [Guide](docs/guide/i18n.md) |
|
|
77
77
|
| **Ambient** | `DayClock`, deterministic `weatherAt` and `WeatherLayer`, `ColorGrade`; in `/pixel`, `NightShade`, `SwayProp`, `DitherVignette`. [Guide](docs/guide/ambient.md) |
|
|
78
78
|
| **Game feel** | Pooled `FloatingText` for damage numbers, hit-stop, recoil and flash curves. [Guide](docs/guide/game-feel.md) |
|
|
79
|
+
| **LDtk and autotiling** | LDtk projects (IntGrid, auto-layers, entities with fields, world layouts, level files) read into the same tile map as Tiled; 4-bit and 47-tile blob autotiling that retiles only what an edit touched. [Guide](docs/guide/tilemap.md) |
|
|
80
|
+
| **Ambient life** | Drifting leaves, embers and ash, birds, butterflies, fireflies and chimney smoke, pooled and alive only in view. [Guide](docs/guide/ambient.md) |
|
|
81
|
+
| **Desktop** (`/electron`, `/updates`) | File-by-file web patching by sha256, an OS-encrypted session store and a window lockdown for Electron; the update rules shared with phones. [Guide](docs/guide/desktop.md) |
|
|
79
82
|
| **Diagnostics** | Error capture, WebGL context loss, a boot watch, frame sampling, and a `DebugOverlay` with collision boxes. [Guide](docs/guide/diagnostics-and-debug.md) |
|
|
80
83
|
|
|
81
84
|
### A React UI
|