A fast 2D and 3D game engine — TypeScript SDK, C++/WebAssembly core, visual editor. Ship one project to web, desktop, WeChat MiniGames, playable ads, and native Android / iOS.
TypeScript 2d-game-engine3d3d-game-engineandroidcppecsgame-editorgame-enginegamedeviostypescriptwebassemblywebglwebgpuwechat-minigame
feat(world): a streamed world opens in the editor with only what never streams, and cells are loaded and unloaded in the edit view without touching the document
yhh2e143cd6c3c9
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 68d31142f..751f0f900 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -16,6 +16,7 @@ published separately; it ships inside the editor.### Added+- **A streamed world opens in the editor without its cells.** Only its `WorldPersistent` entities are in the view when a scene with `StreamedWorld` opens, and the textures and meshes of the rest are not loaded. The World panel loads and unloads cells one at a time or all at once, the viewport marks the loaded ones, and the next session opens with the same cells loaded. The document still holds every entity: an unloaded cell is saved as it is, and Play and export see the whole world. The `get_world_cells` and `set_world_cells_loaded` tools do the same for an agent.- **Hands that hold things.** A `GripPose` holds a rig's hands in a named pose: `pistol`, `handle`, `cup`, `fist` and others, or one a game registers. A pose says how far each finger bends and nothing about bones, so it fits any rig with fingers; a change of pose eases over, a trigger moves the index finger alone, and it goes over what a clip does with the fingers by its weight.- **Clouds that keep time with the game.** Where a Sky Atmosphere's clouds are is now what the wind has done so far, so a wind that changes carries them on instead of moving the whole sky; a Weather's wind reaches them, their shapes change as they go, and a paused game has a still sky. They can have a second layer with its own height, grain and wind, and `skyClockState()` keeps their place in a save. Self-shadowing reaches through a deep cloud, edges wear into billows, and the lit edge near the sun is narrower.- **Ground that is a volume.** The optional `esengine/voxel` module adds `VoxelTerrain`, beside the height-field Terrain: it holds caves and overhangs, and can be carved, filled and painted with a sphere, a box or a capsule while the game runs. Only the chunks an edit reached are made again, with their collision, and a save holds only what was changed, chunk by chunk. A sleeping body is now woken when the collision under it changes, on a Terrain as well, where before it stayed in the air.diff --git a/desktop b/desktopindex 308d1ed7f..0a4da26fa 160000--- a/desktop+++ b/desktop@@ -1 +1 @@-Subproject commit 308d1ed7f458a4403f3b848648ce7c7313ba6566+Subproject commit 0a4da26fa04918d523c2f6133b48406ef19eb7eediff --git a/docs/astro/src/content/docs/world/streaming.mdx b/docs/astro/src/content/docs/world/streaming.mdxindex c9533202d..d48764665 100644--- a/docs/astro/src/content/docs/world/streaming.mdx+++ b/docs/astro/src/content/docs/world/streaming.mdx@@ -187,6 +187,8 @@ does not exist look the same from a camera.In the edit view, terrain detail, foliage, generated worlds and voxels grow around the viewport, 2D and 3D alike; a `WorldStreamingSource` in the scene only counts while the game runs.+A scene with `StreamedWorld` opens with only its `WorldPersistent` entities in the view, and the textures and meshes of its cells are not loaded. The World panel loads and unloads cells one at a time or all at once, the viewport marks the loaded ones, and the next session opens with the same cells loaded. The document always holds every entity: an unloaded cell is saved as it is, and Play and export see the whole world.+## Clearing or replacing a worldDisable or remove the streaming sources, then await `streamer.clear()`. It releasesdiff --git a/docs/astro/src/content/docs/zh-cn/world/streaming.mdx b/docs/astro/src/content/docs/zh-cn/world/streaming.mdxindex 33e76dd13..d935b2b0f 100644--- a/docs/astro/src/content/docs/zh-cn/world/streaming.mdx+++ b/docs/astro/src/content/docs/zh-cn/world/streaming.mdx@@ -154,6 +154,8 @@ report.loadCount; // 启动以来带进来过多少个地方编辑视图下,地形细节、植被、世界生成和体素都围绕视口生成,场景里的 `WorldStreamingSource` 只在运行时才起作用,2D 和 3D 视图都是如此。+打开带 `StreamedWorld` 的场景时,视图里只有 `WorldPersistent` 实体,其余格子的贴图和网格也不加载。在世界面板里可以逐格或全部加载、卸载,视口会标出已加载的格子,下次打开时保持同样的格子。文档始终保留全部实体:未加载的格子照常保存,运行和导出看到的都是完整世界。+## 清空或替换世界先禁用或移除流送源,再等待 `streamer.clear()`。它会释放已经预加载的资源,并等待尚未完成的准备、发布和卸载结束。diff --git a/tools/releaseNotes.mjs b/tools/releaseNotes.mjsindex 4fb58e428..3a16d7aef 100644--- a/tools/releaseNotes.mjs+++ b/tools/releaseNotes.mjs@@ -4248,6 +4248,8 @@ export const NOTED = {{"note": "A 2D character can be rigged in the editor, with no other program."},"fix(text): a glyph's outline costs what its size does, and text too large for a bitmap glyph draws from a distance field":{"note": "Zooming in on outlined text no longer freezes the editor."},+ "feat(world): a streamed world opens in the editor with only what never streams, and cells are loaded and unloaded in the edit view without touching the document":+ {"note": "A streamed world opens in the editor without its cells."},"fix(editor): what grows round the view follows the viewport in 2D and 3D, and a terrain stroke keeps only the tiles it touched":{"note": "While editing, foliage and generated worlds follow the viewport."},};