@bendyline/molen-tooling 0.0.5 → 0.0.6
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/dist/capture/harness.js +210 -210
- package/dist/capture/worldgen-preview.js +106 -106
- package/dist/cli.mjs +2 -2
- package/dist/docs-src/guide/3d-model-assets.md +6 -0
- package/dist/docs-src/guide/earth-view.md +71 -6
- package/dist/docs-src/guide/graphics-performance.md +6 -0
- package/dist/docs-src/guide/materials.md +1 -0
- package/dist/docs-src/guide/terrain.md +42 -0
- package/dist/docs-src/schemas/archive-set.md +48 -3
- package/dist/docs-src/schemas/matgraph.md +4 -0
- package/dist/docs-src/schemas/structure-placements.md +3 -0
- package/dist/index.d.mts +4 -0
- package/dist/index.mjs +1 -1
- package/dist/{mcp-DKm1h9hD.mjs → mcp-ClDdiqq4.mjs} +1 -1
- package/dist/{ops-DHyZWZUE.mjs → ops-2qoHKV54.mjs} +21 -0
- package/dist/templates/index.json +12 -12
- package/package.json +9 -9
package/dist/cli.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { $ as formatPacked, A as inspectContentPack, B as searchDocs, C as checkTypesOp, D as buildContentPack, E as reserveNamespace, F as previewFigure, H as describeOps, I as listFigurePresets, J as checkSoundbank, K as planAudio, L as exportFrames, M as bakeNetwork, N as generateTypes, O as extractContentPack, Q as formatBytes, R as driveScene, S as rasterizeMaterial, T as projectInfo, U as formatOp, V as OPS_CATALOG, W as checkScripts, X as stageAssets, Z as screenshotAsset, _ as loadComponentRegistry, b as diffSnapshots, c as validateAsset, d as runSimulation, dt as playExperience, et as packAsset, f as screenshotScene, g as listSchemasOp, h as listComponentsOp, i as bakeWorldgen, it as importAsset, j as verifyContentPack, k as fetchContentPack, l as applyUvPaintOp, m as getSchemaOp, n as worldgenStats, nt as listAssets, p as getComponentOp, q as importSound, r as previewWorldgen, s as simWatch, t as formatWorldgenStats, tt as inspectAsset, u as testTypes, v as scaffoldExperience, w as listTypes, x as runReplayFile, y as listTemplates } from "./ops-
|
|
2
|
+
import { $ as formatPacked, A as inspectContentPack, B as searchDocs, C as checkTypesOp, D as buildContentPack, E as reserveNamespace, F as previewFigure, H as describeOps, I as listFigurePresets, J as checkSoundbank, K as planAudio, L as exportFrames, M as bakeNetwork, N as generateTypes, O as extractContentPack, Q as formatBytes, R as driveScene, S as rasterizeMaterial, T as projectInfo, U as formatOp, V as OPS_CATALOG, W as checkScripts, X as stageAssets, Z as screenshotAsset, _ as loadComponentRegistry, b as diffSnapshots, c as validateAsset, d as runSimulation, dt as playExperience, et as packAsset, f as screenshotScene, g as listSchemasOp, h as listComponentsOp, i as bakeWorldgen, it as importAsset, j as verifyContentPack, k as fetchContentPack, l as applyUvPaintOp, m as getSchemaOp, n as worldgenStats, nt as listAssets, p as getComponentOp, q as importSound, r as previewWorldgen, s as simWatch, t as formatWorldgenStats, tt as inspectAsset, u as testTypes, v as scaffoldExperience, w as listTypes, x as runReplayFile, y as listTemplates } from "./ops-2qoHKV54.mjs";
|
|
3
3
|
import { dirname, join } from "node:path";
|
|
4
4
|
import { readFileSync } from "node:fs";
|
|
5
5
|
import { formatIssues } from "@bendyline/molen-schema";
|
|
@@ -1254,7 +1254,7 @@ async function cmdWorldgen(args) {
|
|
|
1254
1254
|
return 2;
|
|
1255
1255
|
}
|
|
1256
1256
|
async function cmdMcp() {
|
|
1257
|
-
const { startMcpServer } = await import("./mcp-
|
|
1257
|
+
const { startMcpServer } = await import("./mcp-ClDdiqq4.mjs");
|
|
1258
1258
|
await startMcpServer();
|
|
1259
1259
|
return 0;
|
|
1260
1260
|
}
|
|
@@ -26,6 +26,12 @@ capability for shapes that genuinely need sculpting, retopology, rigging, or com
|
|
|
26
26
|
|
|
27
27
|
For shared polygonal style, fidelity targets and canonical materials, follow [3D art guidelines](3d-art-guidelines.md).
|
|
28
28
|
|
|
29
|
+
For programmatic captures of reflective metal or glass, pass `reflections: true` to
|
|
30
|
+
`screenshotScene` or `screenshotAsset` from `@bendyline/molen-tooling`. This enables the
|
|
31
|
+
viewer's shared procedural sky/ground environment; the default remains the legacy light rig.
|
|
32
|
+
The repository landmark capture script accepts `--reflections` and records that mode in its
|
|
33
|
+
hash-bound report. See [sky reflections](sky.md#reflections) for the runtime lighting model.
|
|
34
|
+
|
|
29
35
|
## 1. Convert the prompt into an asset brief
|
|
30
36
|
|
|
31
37
|
Before making geometry, decide the points that affect the runtime result:
|
|
@@ -202,6 +202,57 @@ for `terrainchange` to refresh an attribution panel when the package changes. Di
|
|
|
202
202
|
completed flights resolve the destination immediately; manual panning rechecks the host source
|
|
203
203
|
after about five kilometers. A second jump while a region is loading follows the latest target.
|
|
204
204
|
|
|
205
|
+
## Byte cache and prefetch
|
|
206
|
+
|
|
207
|
+
Terrain, landcover, feature and building tiles, content packs and the small documents that name
|
|
208
|
+
them can persist across visits in a byte cache from `@bendyline/molen-pack/cache`. Ground a viewer
|
|
209
|
+
has seen then streams from disk instead of the network, and a revisited city costs almost no
|
|
210
|
+
requests. The cache splits each archive into 64 KiB blocks held in memory and in IndexedDB,
|
|
211
|
+
merges neighbouring misses into one range request, shares a block between concurrent reads, and
|
|
212
|
+
evicts least recently used blocks past a byte budget.
|
|
213
|
+
|
|
214
|
+
```ts
|
|
215
|
+
import { createBlockCache, createIndexedDbByteStore, createMemoryByteStore } from '@bendyline/molen-pack/cache';
|
|
216
|
+
import { loadEarthContent, mountEarthView, openPacksFromIndex } from '@bendyline/molen-earth/client';
|
|
217
|
+
|
|
218
|
+
const store = createIndexedDbByteStore({ name: 'my-app-bytes', budgetBytes: 300 * 1024 * 1024 });
|
|
219
|
+
const byteCache = createBlockCache(store ?? createMemoryByteStore());
|
|
220
|
+
|
|
221
|
+
const packs = await openPacksFromIndex(indexUrl, undefined, undefined, { byteCache });
|
|
222
|
+
const view = await mountEarthView({
|
|
223
|
+
canvas,
|
|
224
|
+
terrain,
|
|
225
|
+
baseUrl,
|
|
226
|
+
content: await loadEarthContent(packs),
|
|
227
|
+
byteCache,
|
|
228
|
+
camera: { latitude: 47.6205, longitude: -122.3493, range: 1500 },
|
|
229
|
+
});
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
The view opens the package's own archives through the cache, keyed by the SHA-256 that its
|
|
233
|
+
`files` list or archive sets give, or by URL when none is listed. Archives you pass in `archives`
|
|
234
|
+
are used as given, so route them through the cache yourself where you want them kept: wrap a
|
|
235
|
+
PMTiles source with `cachingRangeSource`, or open archive-set members with `cachingArchiveOpener`
|
|
236
|
+
from `@bendyline/molen-terrain/client`. A stable URL whose file is replaced in place needs
|
|
237
|
+
`keyBy: 'etag'`, so each server version becomes its own archive. Content packs are keyed by their
|
|
238
|
+
content hash, file and size. Pass the same cache to `openPacksFromIndex` and `mountEarthView` so
|
|
239
|
+
packs and terrain share one budget. `cachingDocumentFetch` keeps the small JSON documents (pack
|
|
240
|
+
index, archive sets, manifests) and revalidates them with `If-None-Match`, serving the stored copy
|
|
241
|
+
offline.
|
|
242
|
+
|
|
243
|
+
With a byte cache the view also prefetches. It follows the camera's own track, so it works for an
|
|
244
|
+
orbit pan, a car and an aircraft alike. It places virtual views 20, 40 and 60 seconds ahead,
|
|
245
|
+
selects their tiles the way the stream would, and reads those archive tiles into the cache. It
|
|
246
|
+
reads bytes only and decodes nothing, two reads at a time, only while the stream has a free load
|
|
247
|
+
slot, and pauses when the page is hidden, offline or on Save-Data. It waits out camera animations
|
|
248
|
+
(a fly-to, getting into a vehicle), whose momentary speed is not travel, and never looks more than
|
|
249
|
+
15 km ahead. Tune it with `prefetch` (`horizonSeconds`, `stepsSeconds`, `maxConcurrent`,
|
|
250
|
+
`maxDistanceMeters`), or turn it off with `prefetch: false`. A host
|
|
251
|
+
that knows the route, such as a simulator's flight plan, queues places with
|
|
252
|
+
`view.prefetch([{ latitude, longitude, altitude }])`. Those go first and resolve once read. A
|
|
253
|
+
`flyTo` within the current frame queues its destination. `view.cacheStats()` reports block hits,
|
|
254
|
+
network requests, stored bytes and prefetch progress.
|
|
255
|
+
|
|
205
256
|
## Ambient life
|
|
206
257
|
|
|
207
258
|
Cars drive the mapped roads, pedestrians walk the footways, trains run the railways and aircraft
|
|
@@ -235,14 +286,26 @@ tile must resolve the same model origin, avoiding inconsistent ground samples be
|
|
|
235
286
|
`replaceRoads: { length, width, deckHeight?, deckHeights? }` describes a model-local rectangle along +X:
|
|
236
287
|
mapped parallel bridge lines inside it are replaced only after the model loads successfully.
|
|
237
288
|
Outside approach fragments remain procedural. `deckHeight` joins those approaches to the
|
|
238
|
-
model's deck height above its origin, blending back over 100 m; include that margin in `bounds`.
|
|
289
|
+
model's deck height above its origin, blending back over at most 100 m; include that margin in `bounds`.
|
|
239
290
|
For sloped decks, use `deckHeights: [negativeXEnd, positiveXEnd]` instead of `deckHeight`.
|
|
240
291
|
Both heights are native model Y and follow the model's Y scale, resolved origin and heading.
|
|
241
|
-
|
|
292
|
+
Each remaining bridge fragment uses its nearest authored endpoint and returns to the height
|
|
293
|
+
of a connected ground road at its far end. If a replaced bridge ends on the model boundary,
|
|
294
|
+
an outward ground approach sharing that endpoint receives a local height correction, fading
|
|
295
|
+
back to terrain within 20 m or the approach length. The painter and traffic graph use the same
|
|
296
|
+
profile. This does not generate a slab beneath ground roads or lift nearby perpendicular
|
|
297
|
+
crossings, tunnels or disconnected riverbank paths.
|
|
242
298
|
Skewed or curved structures may add `replaceRoads.outline: [[x, z], ...]`, a simple native
|
|
243
299
|
footprint polygon. It replaces the rectangle for suppression, including concave bends;
|
|
244
|
-
parallel road segments outside it remain intact.
|
|
245
|
-
|
|
300
|
+
parallel road segments outside it remain intact. Connection stations use the outline's outer
|
|
301
|
+
intersections with native Z=0, ordered negative to positive X. Without an intersecting outline,
|
|
302
|
+
they fall back to X=-length/2 and X=+length/2. `deckHeights` keeps that endpoint order.
|
|
303
|
+
If the asset includes its retaining walls and approach pavement, set
|
|
304
|
+
`replaceRoads.includeConnectedApproaches: true`. A grade road is then clipped inside the outline
|
|
305
|
+
only if it shares a covered endpoint with a mapped bridge and continues outward along the bridge
|
|
306
|
+
axis. The remaining grade fragment receives a 20 m terrain blend. Nearby roads, transverse paths
|
|
307
|
+
and tunnels remain intact. This requires the source tile to retain the shared bridge/approach
|
|
308
|
+
endpoint; disconnected or generalized map geometry is left in place.
|
|
246
309
|
Sunken structures can declare `groundCutout: { outline: [[x, z], ...], basis: 'source evidence' }` on a placement. The simple polygon uses native model metres and follows the same heading and scale as the model. It should bound the ground opening covered by the authored concourse or rim. The terrain pyramid subtracts the polygon from actual elevation and draped ground triangles across tile and LOD boundaries, preserving interpolated heights and surface attributes along its edge. The cutout becomes active only when its successfully loaded structure is visible, and the original ground returns on layer hiding or eviction. Failed or cancelled models leave the ground intact. Heights remain available for anchoring; an opening does not itself author walkable floors or collision.
|
|
247
310
|
|
|
248
311
|
### Bridge elevations and terrain fit
|
|
@@ -439,8 +502,10 @@ on-demand material eviction policy is not yet implemented.
|
|
|
439
502
|
Constant roughness and metalness channels use exact numeric factors instead of textures;
|
|
440
503
|
other maps retain their authored pixels. Across the full library this removes 58 texture
|
|
441
504
|
allocations, reducing estimated base-level RGBA8 texel storage from 45.75 to 31.25 MiB.
|
|
442
|
-
These are storage estimates, not measured driver allocations.
|
|
443
|
-
linear sampling without mip averaging
|
|
505
|
+
These are storage estimates, not measured driver allocations. Hard alpha-cutout surfaces retain
|
|
506
|
+
linear sampling without mip averaging. Fine porous surfaces can opt into `alphaCoverage: true`:
|
|
507
|
+
mipmapped alpha blending preserves average open area at distance, with the same `BLEND` fallback
|
|
508
|
+
in portable GLBs. Review overlapping transparent layers and close-up hole detail from both sides.
|
|
444
509
|
|
|
445
510
|
Hosts composing their own renderer can supply `StructureModelLibrary` with
|
|
446
511
|
`resolveSurface: ({ ref, slot }) => materials.materialFor(slot, ref)` using a
|
|
@@ -113,6 +113,12 @@ pixels and its old entries are pruned. Store failures fall back to baking. `crea
|
|
|
113
113
|
and `mountEarthView` accept the store as `materialStore`; World Explorer passes the IndexedDB store
|
|
114
114
|
unless `materialCache=0`.
|
|
115
115
|
|
|
116
|
+
Terrain and content bytes persist the same way through a `BlockCache` from
|
|
117
|
+
`@bendyline/molen-pack/cache`, passed to `mountEarthView` as `byteCache` (see
|
|
118
|
+
[the Earth view](earth-view.md)). It saves network and decompression time, not frame time: decoding
|
|
119
|
+
and meshing still run for every tile the stream loads. Prefetching reads bytes only, so it never
|
|
120
|
+
competes with tile construction on the main thread.
|
|
121
|
+
|
|
116
122
|
World-generation workers also prepare building spatial cells and full/structural LOD indices.
|
|
117
123
|
The renderer requests `renderCellsOnly` when using cell LODs so it does not retain a redundant
|
|
118
124
|
canonical building mesh. Per-cell Three object assembly is a separate queue job. Generation
|
|
@@ -84,6 +84,7 @@ evidence across environments rather than a proof across JS engines; see
|
|
|
84
84
|
- `outputs` maps PBR slots (baseColor, roughness, metalness, normal, emissive, ao) to node ids.
|
|
85
85
|
- Cycles are a validation error naming the path.
|
|
86
86
|
- Optional `alphaTest: 0.5` renders base-color RGBA alpha as cutout holes; ramps accept `#rrggbbaa`. Omitted graphs remain opaque. Cutouts write depth normally and do not use blended transparency.
|
|
87
|
+
- For fine porous surfaces, `alphaCoverage: true` uses mipmapped alpha blending. It preserves average open area when holes become smaller than a pixel, avoiding repeating interference bands. It requires `baseColor` and cannot be combined with `alphaTest`. Portable glTF graph fallbacks use the same standard `BLEND` mode. As with other transparent materials, intersecting layers need appropriate geometry grouping and sorting; review them from both sides.
|
|
87
88
|
|
|
88
89
|
Bake and inspect:
|
|
89
90
|
|
|
@@ -242,6 +242,48 @@ transport call `createTerrainArchiveSetArchive(urlOrDocument, { openArchive })`
|
|
|
242
242
|
and `encodeTerrainArchiveSetPartitions` writes the run-length lists. Validate a set document with
|
|
243
243
|
`molen validate archive-set.json`.
|
|
244
244
|
|
|
245
|
+
A set can instead (or as well) be partitioned by **geohash**. Each entry of `geohash` is a tier:
|
|
246
|
+
a band of levels with one archive per geohash cell of `precision` characters, named by a URL
|
|
247
|
+
template, and the `cells` that have an archive as a run-length list of geohash indices (the
|
|
248
|
+
cell's characters read as one base-32 number). Equal-angle cells match data organized by geohash
|
|
249
|
+
and give readable names; a whole planet can be stacked as a small base plus, say, two-character
|
|
250
|
+
cells for the middle levels and three-character cells (1.40625°, about 156 km at the equator)
|
|
251
|
+
for detail:
|
|
252
|
+
|
|
253
|
+
```json
|
|
254
|
+
{
|
|
255
|
+
"format": "molen/archive-set@1",
|
|
256
|
+
"name": "world-elevation",
|
|
257
|
+
"tileType": "png",
|
|
258
|
+
"base": { "url": "base.pmtiles", "minLevel": 0, "maxLevel": 5 },
|
|
259
|
+
"archives": [],
|
|
260
|
+
"geohash": [
|
|
261
|
+
{ "precision": 2, "minLevel": 6, "maxLevel": 8, "url": "g2/{cell}.pmtiles", "cells": "320-330" },
|
|
262
|
+
{ "precision": 3, "minLevel": 9, "maxLevel": 13, "url": "g3/{cell}.pmtiles", "cells": "11331-11400" }
|
|
263
|
+
]
|
|
264
|
+
}
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
Geohash cells do not nest with Mercator tiles, so a tile belongs to the cell holding its center:
|
|
268
|
+
`terrainTileGeohash(level, x, y, precision)` in the kernel half is the rule, and producers must
|
|
269
|
+
place every tile by it (extra tiles in an archive are harmless). Cells not listed are never
|
|
270
|
+
requested, so open ocean costs nothing. `partitionLevel` is required only when `archives` is not
|
|
271
|
+
empty; tiers may not share levels with each other or the base. `encodeTerrainArchiveSetCells`
|
|
272
|
+
writes the `cells` list from geohashes, `terrainArchiveSetTierCells` expands it, and the kernel
|
|
273
|
+
exports the geohash helpers (`encodeGeohash`, `geohashIndex`, `geohashFromIndex`,
|
|
274
|
+
`geohashBounds`).
|
|
275
|
+
|
|
276
|
+
`openArchive(url, id, entry)` receives each member's `sha256` and `bytes` when the set lists them.
|
|
277
|
+
To keep tiles across visits, pass `cachingArchiveOpener(cache)` (`@bendyline/molen-terrain/client`)
|
|
278
|
+
over a `BlockCache` from `@bendyline/molen-pack/cache`. It keys each archive by its listed hash,
|
|
279
|
+
or by URL when none is listed, and reads repeated tiles from memory or IndexedDB. Without a host
|
|
280
|
+
archive, the package adapters open sources through an optional `transport` (`{ openArchive, fetch }`)
|
|
281
|
+
on `openTerrainPackageElevation`, `openTerrainPackagePyramid`, `openTerrainPackageSemantics` and the
|
|
282
|
+
stream factories. `openTerrainPackageArchive(source, baseUrl, { openArchive, fetch, id, entry })`
|
|
283
|
+
does the same for one source, and `terrainPackageArchiveEntry(pkg, source)` finds a single
|
|
284
|
+
archive's `files` record. The Earth view wires all of this from one `byteCache` option (see
|
|
285
|
+
[the Earth view](earth-view.md)).
|
|
286
|
+
|
|
245
287
|
Compilers write package archives with the portable PMTiles v3 writer in
|
|
246
288
|
`@bendyline/molen-terrain/kernel` (Node, Workers and browsers). `writePmtilesArchive(tiles,
|
|
247
289
|
{ tileType: 'png', bounds })` builds a whole archive in memory; for archives too large for memory,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Archive set (`molen/archive-set@1`)
|
|
2
2
|
|
|
3
|
-
One tile pyramid split across PMTiles archives: a coarse base plus detail archives partitioned by the tile at a fixed level.
|
|
3
|
+
One tile pyramid split across PMTiles archives: a coarse base plus detail archives partitioned by the tile at a fixed level or by geohash cell.
|
|
4
4
|
|
|
5
5
|
## Example
|
|
6
6
|
|
|
@@ -56,7 +56,7 @@ One tile pyramid split across PMTiles archives: a coarse base plus detail archiv
|
|
|
56
56
|
"type": "integer",
|
|
57
57
|
"minimum": 0,
|
|
58
58
|
"maximum": 10,
|
|
59
|
-
"description": "Level whose tiles partition the detail archives; a detail tile belongs to the archive listing its ancestor at this level."
|
|
59
|
+
"description": "Level whose tiles partition the detail archives; a detail tile belongs to the archive listing its ancestor at this level. Required when archives is not empty."
|
|
60
60
|
},
|
|
61
61
|
"base": {
|
|
62
62
|
"type": "object",
|
|
@@ -161,13 +161,58 @@ One tile pyramid split across PMTiles archives: a coarse base plus detail archiv
|
|
|
161
161
|
"additionalProperties": false
|
|
162
162
|
},
|
|
163
163
|
"description": "Detail archives, each owning a disjoint set of partition cells."
|
|
164
|
+
},
|
|
165
|
+
"geohash": {
|
|
166
|
+
"type": "array",
|
|
167
|
+
"items": {
|
|
168
|
+
"type": "object",
|
|
169
|
+
"properties": {
|
|
170
|
+
"precision": {
|
|
171
|
+
"type": "integer",
|
|
172
|
+
"minimum": 1,
|
|
173
|
+
"maximum": 6,
|
|
174
|
+
"description": "Geohash length of a cell (3: 1.40625° square, about 156 km at the equator)."
|
|
175
|
+
},
|
|
176
|
+
"minLevel": {
|
|
177
|
+
"type": "integer",
|
|
178
|
+
"minimum": 0,
|
|
179
|
+
"maximum": 30,
|
|
180
|
+
"description": "Coarsest level the tier serves."
|
|
181
|
+
},
|
|
182
|
+
"maxLevel": {
|
|
183
|
+
"type": "integer",
|
|
184
|
+
"minimum": 0,
|
|
185
|
+
"maximum": 30,
|
|
186
|
+
"description": "Finest level the tier serves."
|
|
187
|
+
},
|
|
188
|
+
"url": {
|
|
189
|
+
"type": "string",
|
|
190
|
+
"minLength": 1,
|
|
191
|
+
"pattern": "\\{cell\\}",
|
|
192
|
+
"description": "Archive URL template, relative to this document or absolute; {cell} becomes the cell geohash."
|
|
193
|
+
},
|
|
194
|
+
"cells": {
|
|
195
|
+
"type": "string",
|
|
196
|
+
"pattern": "^(\\d+(-\\d+)?(,\\d+(-\\d+)?)*)?$",
|
|
197
|
+
"description": "Run-length list of the cells that have an archive, as geohash indices (the characters read as one base-32 number)."
|
|
198
|
+
}
|
|
199
|
+
},
|
|
200
|
+
"required": [
|
|
201
|
+
"precision",
|
|
202
|
+
"minLevel",
|
|
203
|
+
"maxLevel",
|
|
204
|
+
"url",
|
|
205
|
+
"cells"
|
|
206
|
+
],
|
|
207
|
+
"additionalProperties": false
|
|
208
|
+
},
|
|
209
|
+
"description": "Geohash-partitioned tiers: per band of levels, one archive per cell; a tile belongs to the cell holding its center."
|
|
164
210
|
}
|
|
165
211
|
},
|
|
166
212
|
"required": [
|
|
167
213
|
"format",
|
|
168
214
|
"name",
|
|
169
215
|
"tileType",
|
|
170
|
-
"partitionLevel",
|
|
171
216
|
"archives"
|
|
172
217
|
],
|
|
173
218
|
"additionalProperties": false
|
|
@@ -62,6 +62,10 @@ A small node graph (noise, gradients, ramps, blends) CPU-rasterized to textures.
|
|
|
62
62
|
"const": "molen/matgraph@1",
|
|
63
63
|
"description": "Format envelope; always 'molen/matgraph@1'."
|
|
64
64
|
},
|
|
65
|
+
"alphaCoverage": {
|
|
66
|
+
"description": "Filter baseColor alpha as fractional surface coverage for porous surfaces. Uses mipmapped alpha blending; requires baseColor and excludes alphaTest. Like portable glTF BLEND, overlapping transparent surfaces require sorting.",
|
|
67
|
+
"type": "boolean"
|
|
68
|
+
},
|
|
65
69
|
"alphaTest": {
|
|
66
70
|
"description": "Optional alpha cutout threshold for baseColor RGBA. Omit for opaque materials; this does not enable blended transparency.",
|
|
67
71
|
"type": "number",
|
package/dist/index.d.mts
CHANGED
|
@@ -258,6 +258,8 @@ interface ScreenshotInput {
|
|
|
258
258
|
terrain?: TerrainShot;
|
|
259
259
|
/** Background clear color; defaults to sky-blue with terrain, else dark. */
|
|
260
260
|
clearColor?: string;
|
|
261
|
+
/** Enable the viewer's shared procedural sky/ground reflections for PBR metals and glass. */
|
|
262
|
+
reflections?: boolean;
|
|
261
263
|
}
|
|
262
264
|
interface RenderStats {
|
|
263
265
|
entitiesRendered: number;
|
|
@@ -294,6 +296,8 @@ interface AssetShotInput {
|
|
|
294
296
|
clipTime?: number;
|
|
295
297
|
size?: [number, number];
|
|
296
298
|
clearColor?: string;
|
|
299
|
+
/** Enable the viewer's shared procedural sky/ground reflection environment. */
|
|
300
|
+
reflections?: boolean;
|
|
297
301
|
outDir: string;
|
|
298
302
|
}
|
|
299
303
|
interface AssetShotOutput {
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as inspectContentPack, B as searchDocs, C as checkTypesOp, D as buildContentPack, E as reserveNamespace, G as schemaToTsType, H as describeOps, L as exportFrames, N as generateTypes, O as extractContentPack, P as renderTypesModule, R as driveScene, S as rasterizeMaterial, T as projectInfo, U as formatOp, V as OPS_CATALOG, W as checkScripts, X as stageAssets, Y as ASSET_INDEX_FILE, Z as screenshotAsset, a as lineupBatchDoc, at as findProjectFile, b as diffSnapshots, c as validateAsset, ct as loadSetupLike, d as runSimulation, dt as playExperience, et as packAsset, f as screenshotScene, ft as registerExperiencePlaySchema, g as listSchemasOp, h as listComponentsOp, i as bakeWorldgen, it as importAsset, j as verifyContentPack, k as fetchContentPack, l as applyUvPaintOp, lt as updateProjectFile, m as getSchemaOp, n as worldgenStats, nt as listAssets, o as loadStylePackFromDisk, ot as loadProject, p as getComponentOp, r as previewWorldgen, rt as assetFileIndex, s as simWatch, st as loadSceneDocument, tt as inspectAsset, u as testTypes, ut as parseExperiencePlayScenario, v as scaffoldExperience, w as listTypes, x as runReplayFile, y as listTemplates, z as locateDocsRoot } from "./ops-
|
|
1
|
+
import { A as inspectContentPack, B as searchDocs, C as checkTypesOp, D as buildContentPack, E as reserveNamespace, G as schemaToTsType, H as describeOps, L as exportFrames, N as generateTypes, O as extractContentPack, P as renderTypesModule, R as driveScene, S as rasterizeMaterial, T as projectInfo, U as formatOp, V as OPS_CATALOG, W as checkScripts, X as stageAssets, Y as ASSET_INDEX_FILE, Z as screenshotAsset, a as lineupBatchDoc, at as findProjectFile, b as diffSnapshots, c as validateAsset, ct as loadSetupLike, d as runSimulation, dt as playExperience, et as packAsset, f as screenshotScene, ft as registerExperiencePlaySchema, g as listSchemasOp, h as listComponentsOp, i as bakeWorldgen, it as importAsset, j as verifyContentPack, k as fetchContentPack, l as applyUvPaintOp, lt as updateProjectFile, m as getSchemaOp, n as worldgenStats, nt as listAssets, o as loadStylePackFromDisk, ot as loadProject, p as getComponentOp, r as previewWorldgen, rt as assetFileIndex, s as simWatch, st as loadSceneDocument, tt as inspectAsset, u as testTypes, ut as parseExperiencePlayScenario, v as scaffoldExperience, w as listTypes, x as runReplayFile, y as listTemplates, z as locateDocsRoot } from "./ops-2qoHKV54.mjs";
|
|
2
2
|
import { access, copyFile, mkdir, readFile, writeFile } from "node:fs/promises";
|
|
3
3
|
import { PNG } from "pngjs";
|
|
4
4
|
import { dirname } from "node:path";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as formatPacked, A as inspectContentPack, B as searchDocs, C as checkTypesOp, D as buildContentPack, E as reserveNamespace, F as previewFigure, H as describeOps, I as listFigurePresets, J as checkSoundbank, K as planAudio, L as exportFrames, M as bakeNetwork, N as generateTypes, O as extractContentPack, R as driveScene, S as rasterizeMaterial, T as projectInfo, U as formatOp, W as checkScripts, X as stageAssets, Z as screenshotAsset, _ as loadComponentRegistry, b as diffSnapshots, c as validateAsset, d as runSimulation, dt as playExperience, et as packAsset, f as screenshotScene, g as listSchemasOp, h as listComponentsOp, i as bakeWorldgen, it as importAsset, j as verifyContentPack, k as fetchContentPack, l as applyUvPaintOp, m as getSchemaOp, n as worldgenStats, nt as listAssets, p as getComponentOp, q as importSound, r as previewWorldgen, tt as inspectAsset, u as testTypes, v as scaffoldExperience, w as listTypes, x as runReplayFile, y as listTemplates } from "./ops-
|
|
1
|
+
import { $ as formatPacked, A as inspectContentPack, B as searchDocs, C as checkTypesOp, D as buildContentPack, E as reserveNamespace, F as previewFigure, H as describeOps, I as listFigurePresets, J as checkSoundbank, K as planAudio, L as exportFrames, M as bakeNetwork, N as generateTypes, O as extractContentPack, R as driveScene, S as rasterizeMaterial, T as projectInfo, U as formatOp, W as checkScripts, X as stageAssets, Z as screenshotAsset, _ as loadComponentRegistry, b as diffSnapshots, c as validateAsset, d as runSimulation, dt as playExperience, et as packAsset, f as screenshotScene, g as listSchemasOp, h as listComponentsOp, i as bakeWorldgen, it as importAsset, j as verifyContentPack, k as fetchContentPack, l as applyUvPaintOp, m as getSchemaOp, n as worldgenStats, nt as listAssets, p as getComponentOp, q as importSound, r as previewWorldgen, tt as inspectAsset, u as testTypes, v as scaffoldExperience, w as listTypes, x as runReplayFile, y as listTemplates } from "./ops-2qoHKV54.mjs";
|
|
2
2
|
import { mkdtemp, readFile, rm } from "node:fs/promises";
|
|
3
3
|
import { join } from "node:path";
|
|
4
4
|
import { z } from "zod";
|
|
@@ -2029,6 +2029,25 @@ async function screenshotAssetImpl(input) {
|
|
|
2029
2029
|
} },
|
|
2030
2030
|
plugins: {}
|
|
2031
2031
|
};
|
|
2032
|
+
if (input.reflections) keyframe.entities["capture-lighting"] = { environment: {
|
|
2033
|
+
ambient: {
|
|
2034
|
+
sky: "#e3e7eb",
|
|
2035
|
+
ground: "#73756b",
|
|
2036
|
+
intensity: 1.15
|
|
2037
|
+
},
|
|
2038
|
+
sun: {
|
|
2039
|
+
direction: [
|
|
2040
|
+
-8,
|
|
2041
|
+
14,
|
|
2042
|
+
9
|
|
2043
|
+
],
|
|
2044
|
+
color: "#fff1d3",
|
|
2045
|
+
intensity: 2.2
|
|
2046
|
+
},
|
|
2047
|
+
background: input.clearColor ?? "#bfd1df",
|
|
2048
|
+
toneMapping: "agx",
|
|
2049
|
+
exposure: 1.08
|
|
2050
|
+
} };
|
|
2032
2051
|
const { chromium } = await import("playwright");
|
|
2033
2052
|
const { browser, server } = await startCaptureResources(() => chromium.launch({ args: [
|
|
2034
2053
|
"--use-gl=angle",
|
|
@@ -2060,6 +2079,7 @@ async function screenshotAssetImpl(input) {
|
|
|
2060
2079
|
size,
|
|
2061
2080
|
terrain: null,
|
|
2062
2081
|
clearColor: input.clearColor ?? "#181d24",
|
|
2082
|
+
reflections: input.reflections ?? false,
|
|
2063
2083
|
assetsBaseUrl: `${server.url}/files/`,
|
|
2064
2084
|
assetsIndex: { [sidecar.id]: modelUrlRel }
|
|
2065
2085
|
};
|
|
@@ -7039,6 +7059,7 @@ async function screenshotSceneImpl(input) {
|
|
|
7039
7059
|
size,
|
|
7040
7060
|
terrain: terrainPayload ?? null,
|
|
7041
7061
|
clearColor,
|
|
7062
|
+
reflections: input.reflections ?? false,
|
|
7042
7063
|
assetsBaseUrl: filesRoot !== void 0 ? `${server.url}/files/` : null,
|
|
7043
7064
|
assetsIndex: assetsIndex ?? null
|
|
7044
7065
|
};
|
|
@@ -189,21 +189,21 @@
|
|
|
189
189
|
}
|
|
190
190
|
],
|
|
191
191
|
"versions": {
|
|
192
|
-
"@bendyline/molen-ambient": "0.0.
|
|
193
|
-
"@bendyline/molen-client": "0.0.
|
|
194
|
-
"@bendyline/molen-earth": "0.0.
|
|
195
|
-
"@bendyline/molen-entities": "0.0.
|
|
196
|
-
"@bendyline/molen-figures": "0.0.
|
|
197
|
-
"@bendyline/molen-input-react": "0.0.
|
|
192
|
+
"@bendyline/molen-ambient": "0.0.6",
|
|
193
|
+
"@bendyline/molen-client": "0.0.6",
|
|
194
|
+
"@bendyline/molen-earth": "0.0.6",
|
|
195
|
+
"@bendyline/molen-entities": "0.0.6",
|
|
196
|
+
"@bendyline/molen-figures": "0.0.6",
|
|
197
|
+
"@bendyline/molen-input-react": "0.0.6",
|
|
198
198
|
"@bendyline/molen-kernel": "0.0.4",
|
|
199
|
-
"@bendyline/molen-materials": "0.0.
|
|
200
|
-
"@bendyline/molen-pack": "0.0.
|
|
199
|
+
"@bendyline/molen-materials": "0.0.5",
|
|
200
|
+
"@bendyline/molen-pack": "0.0.5",
|
|
201
201
|
"@bendyline/molen-pathfinding": "0.0.4",
|
|
202
202
|
"@bendyline/molen-physics-rapier": "0.0.4",
|
|
203
203
|
"@bendyline/molen-schema": "0.0.4",
|
|
204
|
-
"@bendyline/molen-terrain": "0.0.
|
|
205
|
-
"@bendyline/molen-tooling": "0.0.
|
|
206
|
-
"@bendyline/molen-worldgen": "0.0.
|
|
207
|
-
"@bendyline/molen-worldgen-earth": "0.0.
|
|
204
|
+
"@bendyline/molen-terrain": "0.0.6",
|
|
205
|
+
"@bendyline/molen-tooling": "0.0.6",
|
|
206
|
+
"@bendyline/molen-worldgen": "0.0.6",
|
|
207
|
+
"@bendyline/molen-worldgen-earth": "0.0.6"
|
|
208
208
|
}
|
|
209
209
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bendyline/molen-tooling",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.6",
|
|
4
4
|
"private": false,
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -63,17 +63,17 @@
|
|
|
63
63
|
"quickhull3d": "3.1.1",
|
|
64
64
|
"sharp": "0.35.4",
|
|
65
65
|
"zod": "^4.6.5",
|
|
66
|
-
"@bendyline/molen-ambient": "0.0.
|
|
67
|
-
"@bendyline/molen-
|
|
66
|
+
"@bendyline/molen-ambient": "0.0.6",
|
|
67
|
+
"@bendyline/molen-figures": "0.0.6",
|
|
68
68
|
"@bendyline/molen-kernel": "0.0.4",
|
|
69
|
-
"@bendyline/molen-
|
|
70
|
-
"@bendyline/molen-pack": "0.0.
|
|
71
|
-
"@bendyline/molen-
|
|
69
|
+
"@bendyline/molen-client": "0.0.6",
|
|
70
|
+
"@bendyline/molen-pack": "0.0.5",
|
|
71
|
+
"@bendyline/molen-materials": "0.0.5",
|
|
72
72
|
"@bendyline/molen-physics-rapier": "0.0.4",
|
|
73
|
-
"@bendyline/molen-terrain": "0.0.5",
|
|
74
73
|
"@bendyline/molen-schema": "0.0.4",
|
|
75
|
-
"@bendyline/molen-worldgen": "0.0.
|
|
76
|
-
"@bendyline/molen-worldgen
|
|
74
|
+
"@bendyline/molen-worldgen-earth": "0.0.6",
|
|
75
|
+
"@bendyline/molen-worldgen": "0.0.6",
|
|
76
|
+
"@bendyline/molen-terrain": "0.0.6"
|
|
77
77
|
},
|
|
78
78
|
"devDependencies": {
|
|
79
79
|
"@biomejs/biome": "^2.5.0",
|