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(api): tilemap and particles are beta, and the bar says why they may be
esengine9b3836764511
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 3090da4cb..d6c0ff117 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -95,6 +95,21 @@ published separately; it ships inside the editor.puts the continuation on the microtask queue, where no frame can run: five runsnow agree to 4e-5, where before they scattered.+- **`tilemap` and `particles` are `@beta`.** They were the two rows whose reason+ for being experimental was "the runtime surface has not been read for a tier+ yet". Read against the new bar, each was short of exactly one thing: its own+ component carried no written contract. Both have one now, and their `Data`+ interfaces — the fields you actually write — are promised with them, which is+ what `check-data-tiers` insists on.++ The breadth judgement is the part no machine makes, so it is argued rather than+ asserted: **tilemap is certified by two games and one of them runs on every+ change**, which is more evidence than four rows already at this tier; and+ **particles is certified by one, the same evidence `spine` and `scene` were+ published on.** What each `why` records now is the young half — tilemap's+ multi-tileset layer, whose singular field is still carried for older scenes,+ and the particle curves that only one game has authored.+- **`check-tier-bar` — a tier above `experimental` has to be earned, and nowsomething asks.** `check-subsystem-tiers` holds the table against the tags: averdict and the code carrying it are one answer. Nothing could say whether thediff --git a/docs/astro/src/data/apiStability.generated.json b/docs/astro/src/data/apiStability.generated.jsonindex d24dabfe8..bfdbcaa56 100644--- a/docs/astro/src/data/apiStability.generated.json+++ b/docs/astro/src/data/apiStability.generated.json@@ -2,8 +2,8 @@"note": "Generated by tools/api-stability.mjs from sdk/etc/*.api.md — do not edit.","counts": {"public": 113,- "beta": 72,- "experimental": 1652,+ "beta": 76,+ "experimental": 1648,"deprecated": 3},"total": 1837,@@ -219,9 +219,9 @@"id": "tilemap","title": "Tilemap","titleZh": "瓦片地图",- "tier": "experimental",- "why": "certified end to end by two games, but the runtime surface has not been read for a tier yet",- "whyZh": "有两个游戏端到端认证了它,但它的运行时面还没有被拿来定级",+ "tier": "beta",+ "why": "two games certify it and one of them runs on every change, which is broader evidence than several rows already at this tier; what is not settled is the multi-tileset layer, whose singular field is still carried for older scenes",+ "whyZh": "两个游戏认证了它,其中一个每次改动都跑 —— 这比几个已经在这一级的子系统证据还多;还没定下来的是多 tileset 的图层,单数字段仍为旧场景保留着","entry": ["TilemapLayer"]@@ -230,9 +230,9 @@"id": "particles","title": "Particles","titleZh": "粒子",- "tier": "experimental",- "why": "as tilemap — exercised by a certified game, not yet read for a tier",- "whyZh": "同瓦片地图 —— 有被认证的游戏在用,但还没被拿来定级",+ "tier": "beta",+ "why": "one certified game drives it, the same evidence spine and scene were published on; the authored curves are the young half — they override the start/end pairs, and only one game has authored any",+ "whyZh": "有一个被认证的游戏在驱动它,与 spine、scene 当初发布时的证据同级;年轻的那一半是可编辑曲线 —— 它们会覆盖 start/end,而只有一个游戏真的编过","entry": ["ParticleEmitter"]@@ -2024,6 +2024,30 @@"minigame"]},+ {+ "name": "ParticleEmitter",+ "kind": "const",+ "deprecated": false,+ "entries": [+ "index",+ "index.node",+ "index.native",+ "wechat",+ "minigame"+ ]+ },+ {+ "name": "ParticleEmitterData",+ "kind": "interface",+ "deprecated": false,+ "entries": [+ "index",+ "index.node",+ "index.native",+ "wechat",+ "minigame"+ ]+ },{"name": "Physics2D","kind": "const",@@ -2256,6 +2280,30 @@"minigame"]},+ {+ "name": "TilemapLayer",+ "kind": "const",+ "deprecated": false,+ "entries": [+ "index",+ "index.node",+ "index.native",+ "wechat",+ "minigame"+ ]+ },+ {+ "name": "TilemapLayerData",+ "kind": "interface",+ "deprecated": false,+ "entries": [+ "index",+ "index.node",+ "index.native",+ "wechat",+ "minigame"+ ]+ },{"name": "TouchPoint","kind": "interface",diff --git a/sdk/etc/index.api.md b/sdk/etc/index.api.mdindex 686bbe8e9..306f10f4b 100644--- a/sdk/etc/index.api.md+++ b/sdk/etc/index.api.md@@ -1,7 +1,7 @@# API surface — esengine/index<!-- Generated by tools/api-surface.mjs — do not edit. Run --update to accept changes. -->-Symbols: 113 public · 65 beta · 1515 experimental · 3 deprecated+Symbols: 113 public · 69 beta · 1511 experimental · 3 deprecated## ABI_LAYOUT_HASH — const @experimental```@@ -5163,12 +5163,12 @@ EaseOut = 2Linear = 0```-## ParticleEmitter — const @experimental+## ParticleEmitter — const @beta```BuiltinComponentDef<ParticleEmitterData>```-## ParticleEmitterData — interface @experimental+## ParticleEmitterData — interface @beta```angleSpreadMax: numberangleSpreadMin: number@@ -8224,12 +8224,12 @@ ComponentDef<TilemapData>source: string```-## TilemapLayer — const @experimental+## TilemapLayer — const @beta```BuiltinComponentDef<TilemapLayerData>```-## TilemapLayerData — interface @experimental+## TilemapLayerData — interface @beta```cellSize: Vec2hexSideLength: numberdiff --git a/sdk/etc/index.native.api.md b/sdk/etc/index.native.api.mdindex 67c806d9e..4bda2fae2 100644--- a/sdk/etc/index.native.api.md+++ b/sdk/etc/index.native.api.md@@ -1,7 +1,7 @@# API surface — esengine/index.native<!-- Generated by tools/api-surface.mjs — do not edit. Run --update to accept changes. -->-Symbols: 113 public · 70 beta · 1534 experimental · 3 deprecated+Symbols: 113 public · 74 beta · 1530 experimental · 3 deprecated## ABI_LAYOUT_HASH — const @experimental```@@ -5346,12 +5346,12 @@ EaseOut = 2Linear = 0```-## ParticleEmitter — const @experimental+## ParticleEmitter — const @beta```BuiltinComponentDef<ParticleEmitterData>```-## ParticleEmitterData — interface @experimental+## ParticleEmitterData — interface @beta```angleSpreadMax: numberangleSpreadMin: number@@ -8417,12 +8417,12 @@ ComponentDef<TilemapData>source: string```-## TilemapLayer — const @experimental+## TilemapLayer — const @beta```BuiltinComponentDef<TilemapLayerData>```-## TilemapLayerData — interface @experimental+## TilemapLayerData — interface @beta```cellSize: Vec2hexSideLength: numberdiff --git a/sdk/etc/index.node.api.md b/sdk/etc/index.node.api.mdindex 2b3c54233..39b8220ce 100644--- a/sdk/etc/index.node.api.md+++ b/sdk/etc/index.node.api.md@@ -1,7 +1,7 @@# API surface — esengine/index.node<!-- Generated by tools/api-surface.mjs — do not edit. Run --update to accept changes. -->-Symbols: 113 public · 67 beta · 1514 experimental · 3 deprecated+Symbols: 113 public · 71 beta · 1510 experimental · 3 deprecated## ANCHOR_AXES — const @experimental```@@ -5158,12 +5158,12 @@ EaseOut = 2Linear = 0```-## ParticleEmitter — const @experimental+## ParticleEmitter — const @beta```BuiltinComponentDef<ParticleEmitterData>```-## ParticleEmitterData — interface @experimental+## ParticleEmitterData — interface @beta```angleSpreadMax: numberangleSpreadMin: number@@ -8219,12 +8219,12 @@ ComponentDef<TilemapData>source: string```-## TilemapLayer — const @experimental+## TilemapLayer — const @beta```BuiltinComponentDef<TilemapLayerData>```-## TilemapLayerData — interface @experimental+## TilemapLayerData — interface @beta```cellSize: Vec2hexSideLength: numberdiff --git a/sdk/etc/minigame.api.md b/sdk/etc/minigame.api.mdindex d02a55100..6c5aedad6 100644--- a/sdk/etc/minigame.api.md+++ b/sdk/etc/minigame.api.md@@ -1,7 +1,7 @@# API surface — esengine/minigame<!-- Generated by tools/api-surface.mjs — do not edit. Run --update to accept changes. -->-Symbols: 113 public · 65 beta · 1536 experimental · 3 deprecated+Symbols: 113 public · 69 beta · 1532 experimental · 3 deprecated## ANCHOR_AXES — const @experimental```@@ -5404,12 +5404,12 @@ EaseOut = 2Linear = 0```-## ParticleEmitter — const @experimental+## ParticleEmitter — const @beta```BuiltinComponentDef<ParticleEmitterData>```-## ParticleEmitterData — interface @experimental+## ParticleEmitterData — interface @beta```angleSpreadMax: numberangleSpreadMin: number@@ -8465,12 +8465,12 @@ ComponentDef<TilemapData>source: string```-## TilemapLayer — const @experimental+## TilemapLayer — const @beta```BuiltinComponentDef<TilemapLayerData>```-## TilemapLayerData — interface @experimental+## TilemapLayerData — interface @beta```cellSize: Vec2hexSideLength: numberdiff --git a/sdk/etc/wechat.api.md b/sdk/etc/wechat.api.mdindex 6ce4d2a8f..f2cec3645 100644--- a/sdk/etc/wechat.api.md+++ b/sdk/etc/wechat.api.md@@ -1,7 +1,7 @@# API surface — esengine/wechat<!-- Generated by tools/api-surface.mjs — do not edit. Run --update to accept changes. -->-Symbols: 113 public · 65 beta · 1526 experimental · 3 deprecated+Symbols: 113 public · 69 beta · 1522 experimental · 3 deprecated## ANCHOR_AXES — const @experimental```@@ -5165,12 +5165,12 @@ EaseOut = 2Linear = 0```-## ParticleEmitter — const @experimental+## ParticleEmitter — const @beta```BuiltinComponentDef<ParticleEmitterData>```-## ParticleEmitterData — interface @experimental+## ParticleEmitterData — interface @beta```angleSpreadMax: numberangleSpreadMin: number@@ -8226,12 +8226,12 @@ ComponentDef<TilemapData>source: string```-## TilemapLayer — const @experimental+## TilemapLayer — const @beta```BuiltinComponentDef<TilemapLayerData>```-## TilemapLayerData — interface @experimental+## TilemapLayerData — interface @beta```cellSize: Vec2hexSideLength: numberdiff --git a/sdk/src/ecs/component.generated.ts b/sdk/src/ecs/component.generated.tsindex e02756090..50753d504 100644--- a/sdk/src/ecs/component.generated.ts+++ b/sdk/src/ecs/component.generated.ts@@ -1292,6 +1292,12 @@ export interface ParentData {entity: Entity;}+/**+ * The fields of the engine's `ParticleEmitter` component, generated from+ * the C++ struct so the two shapes cannot drift.+ *+ * @beta+ */export interface ParticleEmitterData {rate: number;burstCount: number;@@ -1465,6 +1471,12 @@ export interface SpriteData {enabled: boolean;}+/**+ * The fields of the engine's `TilemapLayer` component, generated from+ * the C++ struct so the two shapes cannot drift.+ *+ * @beta+ */export interface TilemapLayerData {cellSize: Vec2;orientation: number;diff --git a/sdk/src/ecs/component.ts b/sdk/src/ecs/component.tsindex 0e8170ff5..1d0bb18aa 100644--- a/sdk/src/ecs/component.ts+++ b/sdk/src/ecs/component.ts@@ -1018,6 +1018,14 @@ export const ParticleForceField = defineBuiltin<ParticleForceFieldData>('ParticlmetaDefaults<ParticleForceFieldData>('ParticleForceField'));+/**+ * One layer of a tile lattice: `cellSize` is its step in world units, and+ * `orientation` with the stagger fields cover isometric and hex, so it is not+ * only a square grid. The tiles are in a referenced `.estileset` rather than+ * here — render, collision and tile animation all derive from that.+ *+ * @beta+ */export const TilemapLayer = defineBuiltin<TilemapLayerData>('TilemapLayer',metaDefaults<TilemapLayerData>('TilemapLayer'),{@@ -1062,9 +1070,14 @@ export { ParticleEasing };// ParticleEmitter Component// =============================================================================-// ParticleEmitter = the generated C++ field shape + two out-of-band TS-only fields-// (gradient / curve) that have no C++ member — they are baked to a LUT the sim reads-// (see particlePlugin's scene codec). They live here, not in the generated interface.+/**+ * The generated C++ field shape plus two the simulation has no member for:+ * `colorGradient` and `sizeCurve` are authored in TypeScript and baked to a LUT+ * the sim reads (see particlePlugin's scene codec), which is why they live here+ * and not in the generated interface.+ *+ * @beta+ */export interface ParticleEmitterData extends ParticleEmitterDataCpp {/*** Color-over-life gradient (authored stops). When it has stops it overrides@@ -1078,6 +1091,14 @@ export interface ParticleEmitterData extends ParticleEmitterDataCpp {sizeCurve: { keys: { t: number; v: number }[] };}+/**+ * A particle system on an entity. `colorGradient` and `sizeCurve` OVERRIDE the+ * start/end pairs when they carry stops or keys and fall back to them when+ * empty; `simulationSpace` decides whether particles follow the entity or are+ * left behind by it. Integration is C++, over the whole system at once.+ *+ * @beta+ */export const ParticleEmitter = defineBuiltin<ParticleEmitterData>('ParticleEmitter',metaDefaults<ParticleEmitterData>('ParticleEmitter', { colorGradient: { stops: [] }, sizeCurve: { keys: [] } }),{diff --git a/src/esengine/ecs/components/ParticleEmitter.hpp b/src/esengine/ecs/components/ParticleEmitter.hppindex d40e59158..8b3bd3658 100644--- a/src/esengine/ecs/components/ParticleEmitter.hpp+++ b/src/esengine/ecs/components/ParticleEmitter.hpp@@ -43,7 +43,7 @@ enum class SubEmitterTrigger : i32 {Birth = 1,};-ES_COMPONENT(renderable=enabled)+ES_COMPONENT(renderable=enabled, stability=beta)struct ParticleEmitter {// EmissionES_PROPERTY(min=0, category=Emission)diff --git a/src/esengine/ecs/components/TilemapLayer.hpp b/src/esengine/ecs/components/TilemapLayer.hppindex b66f7e924..88d0ef402 100644--- a/src/esengine/ecs/components/TilemapLayer.hpp+++ b/src/esengine/ecs/components/TilemapLayer.hpp@@ -45,7 +45,7 @@ enum class TilemapStaggerIndex : u8 {* TilemapSystem's LayerData keyed by this entity. Chunks flow through* tilemap_exportChunks / tilemap_importChunks during scene I/O.*/-ES_COMPONENT(renderable=visible)+ES_COMPONENT(renderable=visible, stability=beta)struct TilemapLayer {ES_PROPERTY()glm::vec2 cellSize{32.0f, 32.0f};diff --git a/tools/apiSubsystems.mjs b/tools/apiSubsystems.mjsindex cd3bfe4eb..b9a3caad7 100644--- a/tools/apiSubsystems.mjs+++ b/tools/apiSubsystems.mjs@@ -191,9 +191,12 @@ export const SUBSYSTEMS = [title: 'Tilemap',titleZh: '瓦片地图',source: ['tilemap'],- tier: 'experimental',- why: 'certified end to end by two games, but the runtime surface has not been read for a tier yet',- whyZh: '有两个游戏端到端认证了它,但它的运行时面还没有被拿来定级',+ tier: 'beta',+ why: 'two games certify it and one of them runs on every change, which is broader evidence than '+ + 'several rows already at this tier; what is not settled is the multi-tileset layer, '+ + 'whose singular field is still carried for older scenes',+ whyZh: '两个游戏认证了它,其中一个每次改动都跑 —— 这比几个已经在这一级的子系统证据还多;'+ + '还没定下来的是多 tileset 的图层,单数字段仍为旧场景保留着',entry: ['TilemapLayer'],},{@@ -201,9 +204,12 @@ export const SUBSYSTEMS = [title: 'Particles',titleZh: '粒子',source: ['particle', 'trail'],- tier: 'experimental',- why: 'as tilemap — exercised by a certified game, not yet read for a tier',- whyZh: '同瓦片地图 —— 有被认证的游戏在用,但还没被拿来定级',+ tier: 'beta',+ why: 'one certified game drives it, the same evidence spine and scene were published on; '+ + 'the authored curves are the young half — they override the start/end pairs, and only '+ + 'one game has authored any',+ whyZh: '有一个被认证的游戏在驱动它,与 spine、scene 当初发布时的证据同级;'+ + '年轻的那一半是可编辑曲线 —— 它们会覆盖 start/end,而只有一个游戏真的编过',entry: ['ParticleEmitter'],},{