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(particle): an emitter can wait startDelay seconds before it emits, with the duration counted from the end of the delay, and the Cocos start delay maps onto it
yhhc160486b945a
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 63baf0bc6..51cd6fe16 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -20,6 +20,7 @@ published separately; it ships inside the editor.- **Scroll areas can be pulled past an end and spring back.** A scroll area whose movement is Elastic now does what the setting always said: a drag past an end is stiffer the further out it goes, letting go returns the content, and a flick that reaches an end bounces off it. It is opt-in per area (`ScrollMovement.Elastic`; Clamped, the default, behaves as before), and the gesture model (`ScrollMotion`, with `ScrollContainer.dragTo` and `getOverscroll`) is exported for scrolling anything else the same way.- **More easing curves.** Sine, quart, quint, expo and circ (each in, out and in-out), bounce in and in-out, and smoothstep and smootherstep join the quad, cubic, back, elastic and out-bounce curves. They are new `EasingType` members after the existing ones, so a saved tween keeps its curve, and they ease the same in a C++ tween and a script value tween.- **World content has a rectangle: `ContentRect`.** A size and the pivot the entity's transform sits on, which the `Sprite` and `Text` on the entity follow and which a `UIMask` on it clips to — no `UINode` needed, so a clipping region or a scroll viewport can stand in the world. `contentRectContains` tests a world point against it.+- **An emitter can start late.** `ParticleEmitter.startDelay` holds back emission for that many seconds after the emitter starts playing; the duration of a non-looping emitter is counted from the end of the delay. Zero, the default, is the behaviour before.- **Particles can be stretched along their velocity.** `ParticleEmitter.renderMode` is `Billboard` (as before) or `Stretched`, which turns each particle's quad so its Y axis runs along the particle's velocity and makes it `size * lengthScale + speed * velocityScale` long: sparks, rain and streaks. A particle at rest keeps its own rotation. It is drawn by the CPU simulation; an emitter simulated on the GPU still draws as a billboard.- **Fade a whole group of world content with one value: `GroupOpacity`.** On an entity it fades that entity and everything under it; the opacities multiply down the hierarchy into each descendant's own alpha, as `UINode.opacity` does for a UI subtree. Sprites, text, shapes, trails and tilemap layers follow it. It is not a composited layer, so children that overlap show through one another while the group is partly faded.- **Open a Cocos Creator project from the editor.** Choosing a Cocos Creator 3.x folder in Open Project (recognised by the Creator version in its `package.json`) offers to convert its scenes and prefabs into a new Estella project beside it, `<name>-estella`, and opens that; the Cocos folder is only read. Opening the same folder again opens the converted project instead of converting twice.diff --git a/docs/astro/src/content/docs/world/particles.mdx b/docs/astro/src/content/docs/world/particles.mdxindex a313ce11f..32ee783e5 100644--- a/docs/astro/src/content/docs/world/particles.mdx+++ b/docs/astro/src/content/docs/world/particles.mdx@@ -91,6 +91,7 @@ in degrees.| `burstCount` | number | `0` | Particles released per burst. `0` disables bursts. || `burstInterval` | number | `1` | Seconds between bursts. || `duration` | number | `5` | Seconds the emitter runs before stopping (see `looping`). |+| `startDelay` | number | `0` | Seconds the emitter plays before it emits anything; `duration` counts from the end of the delay. || `looping` | boolean | `true` | Restart after `duration` instead of stopping. || `playOnStart` | boolean | `true` | Begin emitting as soon as the entity exists. || `maxParticles` | number | `1000` | Pool size — the hard cap on live particles. |diff --git a/docs/astro/src/content/docs/zh-cn/world/particles.mdx b/docs/astro/src/content/docs/zh-cn/world/particles.mdxindex e5bb8f244..1a5c4e21b 100644--- a/docs/astro/src/content/docs/zh-cn/world/particles.mdx+++ b/docs/astro/src/content/docs/zh-cn/world/particles.mdx@@ -82,6 +82,7 @@ const spawnEmbers = defineSystem([Commands()], (cmds) => {| `burstCount` | number | `0` | 每次爆发释放的粒子数。`0` 禁用爆发。 || `burstInterval` | number | `1` | 两次爆发之间的秒数。 || `duration` | number | `5` | 发射器停止前运行的秒数(见 `looping`)。 |+| `startDelay` | number | `0` | 发射器开始播放后、真正发射之前等待的秒数;`duration` 从延迟结束后开始计时。 || `looping` | boolean | `true` | 到 `duration` 后重新开始,而不是停止。 || `playOnStart` | boolean | `true` | 实体一存在就开始发射。 || `maxParticles` | number | `1000` | 池大小——存活粒子的硬上限。 |diff --git a/docs/astro/src/data/components.generated.json b/docs/astro/src/data/components.generated.jsonindex 00793e4d0..270cda0d6 100644--- a/docs/astro/src/data/components.generated.json+++ b/docs/astro/src/data/components.generated.json@@ -3450,6 +3450,13 @@"default": "5","range": "≥ 0"},+ {+ "key": "startDelay",+ "type": "number",+ "default": "0",+ "doc": "Seconds after the emitter starts playing before it emits anything. The duration counts from the end of the delay.",+ "range": "≥ 0"+ },{"key": "looping","type": "boolean",diff --git a/pipeline/src/import/cocos/particle.ts b/pipeline/src/import/cocos/particle.tsindex f30b8ea01..ce5a2d5fb 100644--- a/pipeline/src/import/cocos/particle.ts+++ b/pipeline/src/import/cocos/particle.ts@@ -190,7 +190,7 @@ export function particleSystem(c: { enabled: boolean; data: Raw }, ctx: ParticlesimulationSpace: num(d._simulationSpace, 1) === 0 ? 1 /* Local */ : 0 /* World */,};if (num(d.simulationSpeed, 1) !== 1) lose('particle-simulation-speed');- if (mid(curveRange(d.startDelay, 0, 0)) > 0) lose('particle-start-delay');+ out.startDelay = Math.max(0, mid(curveRange(d.startDelay, 0, 0)));if (mid(curveRange(d.rateOverDistance, 0, 0)) > 0) lose('particle-rate-over-distance');// colour: the start colour times the over-lifetime gradient, sampled by agediff --git a/pipeline/tests/cocos-particle.test.ts b/pipeline/tests/cocos-particle.test.tsindex a2b7bb71b..9f8f6d949 100644--- a/pipeline/tests/cocos-particle.test.ts+++ b/pipeline/tests/cocos-particle.test.ts@@ -104,6 +104,12 @@ describe('a particle system', () => {expect(validate('ParticleEmitter', def._default, d, def.assetFields)).toEqual([]);});+ it('carries the start delay, taking the middle of a range of them', () => {+ expect((convert({ startDelay: constant(0.4) }).out.data as Record<string, any>).startDelay).toBeCloseTo(0.4, 5);+ expect((convert({ startDelay: between(0.2, 0.6) }).out.data as Record<string, any>).startDelay).toBeCloseTo(0.4, 5);+ expect(convert().report.notes['particle-start-delay']).toBeUndefined();+ });+it('maps a stretched billboard with its scales, and counts the render modes it cannot draw', () => {const stretched = convert({ renderer: { _renderMode: 1, _velocityScale: 1, _lengthScale: 7 } });const d = stretched.out.data as Record<string, any>;diff --git a/sdk/etc/index.api.md b/sdk/etc/index.api.mdindex da1eca5e1..e2dc15170 100644--- a/sdk/etc/index.api.md+++ b/sdk/etc/index.api.md@@ -5,7 +5,7 @@ Symbols: 115 public · 161 beta · 1966 experimental · 3 deprecated## ABI_LAYOUT_HASH — const @experimental```-"7e1e50433c8b93cf"+"e41570f14820a1a8"```## ANCHOR_AXES — const @experimental@@ -6522,6 +6522,7 @@ spriteFPS: numberspriteLoop: booleanspriteRows: numberstartColor: Color+startDelay: numberstartSizeMax: numberstartSizeMin: numbersubEmitter: numberdiff --git a/sdk/etc/index.native.api.md b/sdk/etc/index.native.api.mdindex 36540b5cc..7c05bba7c 100644--- a/sdk/etc/index.native.api.md+++ b/sdk/etc/index.native.api.md@@ -5,7 +5,7 @@ Symbols: 115 public · 166 beta · 1985 experimental · 3 deprecated## ABI_LAYOUT_HASH — const @experimental```-"7e1e50433c8b93cf"+"e41570f14820a1a8"```## ANCHOR_AXES — const @experimental@@ -6725,6 +6725,7 @@ spriteFPS: numberspriteLoop: booleanspriteRows: numberstartColor: Color+startDelay: numberstartSizeMax: numberstartSizeMin: numbersubEmitter: numberdiff --git a/sdk/etc/index.node.api.md b/sdk/etc/index.node.api.mdindex 01a91ec76..b431f7222 100644--- a/sdk/etc/index.node.api.md+++ b/sdk/etc/index.node.api.md@@ -6517,6 +6517,7 @@ spriteFPS: numberspriteLoop: booleanspriteRows: numberstartColor: Color+startDelay: numberstartSizeMax: numberstartSizeMin: numbersubEmitter: numberdiff --git a/sdk/etc/minigame.api.md b/sdk/etc/minigame.api.mdindex c699c453b..3761c0530 100644--- a/sdk/etc/minigame.api.md+++ b/sdk/etc/minigame.api.md@@ -6812,6 +6812,7 @@ spriteFPS: numberspriteLoop: booleanspriteRows: numberstartColor: Color+startDelay: numberstartSizeMax: numberstartSizeMin: numbersubEmitter: numberdiff --git a/sdk/etc/wechat.api.md b/sdk/etc/wechat.api.mdindex 310bc9022..1bc2809b6 100644--- a/sdk/etc/wechat.api.md+++ b/sdk/etc/wechat.api.md@@ -6524,6 +6524,7 @@ spriteFPS: numberspriteLoop: booleanspriteRows: numberstartColor: Color+startDelay: numberstartSizeMax: numberstartSizeMin: numbersubEmitter: numberdiff --git a/sdk/src/ecs/bridge/ptrAccessors.generated.ts b/sdk/src/ecs/bridge/ptrAccessors.generated.tsindex 59974ac52..f45d6302b 100644--- a/sdk/src/ecs/bridge/ptrAccessors.generated.ts+++ b/sdk/src/ecs/bridge/ptrAccessors.generated.ts@@ -1226,6 +1226,7 @@ export interface ParticleEmitterPtrData {burstCount: number;burstInterval: number;duration: number;+ startDelay: number;looping: boolean;playOnStart: boolean;maxParticles: number;@@ -1301,71 +1302,72 @@ export function fillParticleEmitter(out.burstCount = u32[(ptr + 4) >> 2] | 0;out.burstInterval = f32[(ptr + 8) >> 2];out.duration = f32[(ptr + 12) >> 2];- out.looping = u8[ptr + 16] !== 0;- out.playOnStart = u8[ptr + 17] !== 0;- out.maxParticles = u32[(ptr + 20) >> 2] | 0;- out.gpuSimulation = u8[ptr + 24] !== 0;- out.lifetimeMin = f32[(ptr + 28) >> 2];- out.lifetimeMax = f32[(ptr + 32) >> 2];- out.shape = u32[(ptr + 36) >> 2] | 0;- out.shapeRadius = f32[(ptr + 40) >> 2];- const shapeSize_ = out.shapeSize; shapeSize_.x = f32[(ptr + 44) >> 2]; shapeSize_.y = f32[((ptr + 44) >> 2) + 1]; shapeSize_.z = f32[((ptr + 44) >> 2) + 2];- out.shapeAngle = f32[(ptr + 56) >> 2];- out.speedMin = f32[(ptr + 60) >> 2];- out.speedMax = f32[(ptr + 64) >> 2];- out.angleSpreadMin = f32[(ptr + 68) >> 2];- out.angleSpreadMax = f32[(ptr + 72) >> 2];- out.startSizeMin = f32[(ptr + 76) >> 2];- out.startSizeMax = f32[(ptr + 80) >> 2];- out.endSizeMin = f32[(ptr + 84) >> 2];- out.endSizeMax = f32[(ptr + 88) >> 2];- out.sizeEasing = u32[(ptr + 92) >> 2] | 0;- const startColor_ = out.startColor; startColor_.r = f32[(ptr + 96) >> 2]; startColor_.g = f32[((ptr + 96) >> 2) + 1]; startColor_.b = f32[((ptr + 96) >> 2) + 2]; startColor_.a = f32[((ptr + 96) >> 2) + 3];- const endColor_ = out.endColor; endColor_.r = f32[(ptr + 112) >> 2]; endColor_.g = f32[((ptr + 112) >> 2) + 1]; endColor_.b = f32[((ptr + 112) >> 2) + 2]; endColor_.a = f32[((ptr + 112) >> 2) + 3];- out.colorEasing = u32[(ptr + 128) >> 2] | 0;- out.rotationMin = f32[(ptr + 132) >> 2];- out.rotationMax = f32[(ptr + 136) >> 2];- out.angularVelocityMin = f32[(ptr + 140) >> 2];- out.angularVelocityMax = f32[(ptr + 144) >> 2];- const gravity_ = out.gravity; gravity_.x = f32[(ptr + 148) >> 2]; gravity_.y = f32[((ptr + 148) >> 2) + 1]; gravity_.z = f32[((ptr + 148) >> 2) + 2];- out.damping = f32[(ptr + 160) >> 2];- out.noiseStrength = f32[(ptr + 164) >> 2];- out.noiseFrequency = f32[(ptr + 168) >> 2];- out.noiseScrollSpeed = f32[(ptr + 172) >> 2];- out.noiseOctaves = u32[(ptr + 176) >> 2] | 0;- out.texture = u32[(ptr + 180) >> 2];- out.spriteColumns = u32[(ptr + 184) >> 2] | 0;- out.spriteRows = u32[(ptr + 188) >> 2] | 0;- out.spriteFPS = f32[(ptr + 192) >> 2];- out.spriteLoop = u8[ptr + 196] !== 0;- out.blendMode = u32[(ptr + 200) >> 2] | 0;- out.layer = u32[(ptr + 204) >> 2] | 0;- out.material = u32[(ptr + 208) >> 2];- out.simulationSpace = u32[(ptr + 212) >> 2] | 0;- out.renderMode = u32[(ptr + 216) >> 2] | 0;- out.velocityScale = f32[(ptr + 220) >> 2];- out.lengthScale = f32[(ptr + 224) >> 2];- out.enabled = u8[ptr + 228] !== 0;- out.subEmitterTrigger = u32[(ptr + 232) >> 2] | 0;- out.subEmitterChance = f32[(ptr + 236) >> 2];- out.subEmitterInheritVelocity = f32[(ptr + 240) >> 2];- out.subEmitter = u32[(ptr + 244) >> 2];- out.trailEnabled = u8[ptr + 248] !== 0;- out.trailWidth = f32[(ptr + 252) >> 2];- out.trailPoints = u32[(ptr + 256) >> 2] | 0;- out.trailMinDistance = f32[(ptr + 260) >> 2];- out.collisionEnabled = u8[ptr + 264] !== 0;- out.collisionFloor = f32[(ptr + 268) >> 2];- out.collisionMode = u32[(ptr + 272) >> 2] | 0;- out.collisionMask = u32[(ptr + 276) >> 2];- out.collisionQueryBudget = u32[(ptr + 280) >> 2] | 0;- out.collisionMaxDistance = f32[(ptr + 284) >> 2];- out.collisionFallback = u32[(ptr + 288) >> 2] | 0;- out.collisionEvents = u8[ptr + 292] !== 0;- out.collisionEventBudget = u32[(ptr + 296) >> 2] | 0;- out.collisionBounce = f32[(ptr + 300) >> 2];- out.collisionFriction = f32[(ptr + 304) >> 2];- out.collisionLifetimeLoss = f32[(ptr + 308) >> 2];+ out.startDelay = f32[(ptr + 16) >> 2];+ out.looping = u8[ptr + 20] !== 0;+ out.playOnStart = u8[ptr + 21] !== 0;+ out.maxParticles = u32[(ptr + 24) >> 2] | 0;+ out.gpuSimulation = u8[ptr + 28] !== 0;+ out.lifetimeMin = f32[(ptr + 32) >> 2];+ out.lifetimeMax = f32[(ptr + 36) >> 2];+ out.shape = u32[(ptr + 40) >> 2] | 0;+ out.shapeRadius = f32[(ptr + 44) >> 2];+ const shapeSize_ = out.shapeSize; shapeSize_.x = f32[(ptr + 48) >> 2]; shapeSize_.y = f32[((ptr + 48) >> 2) + 1]; shapeSize_.z = f32[((ptr + 48) >> 2) + 2];+ out.shapeAngle = f32[(ptr + 60) >> 2];+ out.speedMin = f32[(ptr + 64) >> 2];+ out.speedMax = f32[(ptr + 68) >> 2];+ out.angleSpreadMin = f32[(ptr + 72) >> 2];+ out.angleSpreadMax = f32[(ptr + 76) >> 2];+ out.startSizeMin = f32[(ptr + 80) >> 2];+ out.startSizeMax = f32[(ptr + 84) >> 2];+ out.endSizeMin = f32[(ptr + 88) >> 2];+ out.endSizeMax = f32[(ptr + 92) >> 2];+ out.sizeEasing = u32[(ptr + 96) >> 2] | 0;+ const startColor_ = out.startColor; startColor_.r = f32[(ptr + 100) >> 2]; startColor_.g = f32[((ptr + 100) >> 2) + 1]; startColor_.b = f32[((ptr + 100) >> 2) + 2]; startColor_.a = f32[((ptr + 100) >> 2) + 3];+ const endColor_ = out.endColor; endColor_.r = f32[(ptr + 116) >> 2]; endColor_.g = f32[((ptr + 116) >> 2) + 1]; endColor_.b = f32[((ptr + 116) >> 2) + 2]; endColor_.a = f32[((ptr + 116) >> 2) + 3];+ out.colorEasing = u32[(ptr + 132) >> 2] | 0;+ out.rotationMin = f32[(ptr + 136) >> 2];+ out.rotationMax = f32[(ptr + 140) >> 2];+ out.angularVelocityMin = f32[(ptr + 144) >> 2];+ out.angularVelocityMax = f32[(ptr + 148) >> 2];+ const gravity_ = out.gravity; gravity_.x = f32[(ptr + 152) >> 2]; gravity_.y = f32[((ptr + 152) >> 2) + 1]; gravity_.z = f32[((ptr + 152) >> 2) + 2];+ out.damping = f32[(ptr + 164) >> 2];+ out.noiseStrength = f32[(ptr + 168) >> 2];+ out.noiseFrequency = f32[(ptr + 172) >> 2];+ out.noiseScrollSpeed = f32[(ptr + 176) >> 2];+ out.noiseOctaves = u32[(ptr + 180) >> 2] | 0;+ out.texture = u32[(ptr + 184) >> 2];+ out.spriteColumns = u32[(ptr + 188) >> 2] | 0;+ out.spriteRows = u32[(ptr + 192) >> 2] | 0;+ out.spriteFPS = f32[(ptr + 196) >> 2];+ out.spriteLoop = u8[ptr + 200] !== 0;+ out.blendMode = u32[(ptr + 204) >> 2] | 0;+ out.layer = u32[(ptr + 208) >> 2] | 0;+ out.material = u32[(ptr + 212) >> 2];+ out.simulationSpace = u32[(ptr + 216) >> 2] | 0;+ out.renderMode = u32[(ptr + 220) >> 2] | 0;+ out.velocityScale = f32[(ptr + 224) >> 2];+ out.lengthScale = f32[(ptr + 228) >> 2];+ out.enabled = u8[ptr + 232] !== 0;+ out.subEmitterTrigger = u32[(ptr + 236) >> 2] | 0;+ out.subEmitterChance = f32[(ptr + 240) >> 2];+ out.subEmitterInheritVelocity = f32[(ptr + 244) >> 2];+ out.subEmitter = u32[(ptr + 248) >> 2];+ out.trailEnabled = u8[ptr + 252] !== 0;+ out.trailWidth = f32[(ptr + 256) >> 2];+ out.trailPoints = u32[(ptr + 260) >> 2] | 0;+ out.trailMinDistance = f32[(ptr + 264) >> 2];+ out.collisionEnabled = u8[ptr + 268] !== 0;+ out.collisionFloor = f32[(ptr + 272) >> 2];+ out.collisionMode = u32[(ptr + 276) >> 2] | 0;+ out.collisionMask = u32[(ptr + 280) >> 2];+ out.collisionQueryBudget = u32[(ptr + 284) >> 2] | 0;+ out.collisionMaxDistance = f32[(ptr + 288) >> 2];+ out.collisionFallback = u32[(ptr + 292) >> 2] | 0;+ out.collisionEvents = u8[ptr + 296] !== 0;+ out.collisionEventBudget = u32[(ptr + 300) >> 2] | 0;+ out.collisionBounce = f32[(ptr + 304) >> 2];+ out.collisionFriction = f32[(ptr + 308) >> 2];+ out.collisionLifetimeLoss = f32[(ptr + 312) >> 2];}export function writeParticleEmitter(@@ -1376,71 +1378,72 @@ export function writeParticleEmitter(u32[(ptr + 4) >> 2] = data.burstCount | 0;f32[(ptr + 8) >> 2] = data.burstInterval;f32[(ptr + 12) >> 2] = data.duration;- u8[ptr + 16] = data.looping ? 1 : 0;- u8[ptr + 17] = data.playOnStart ? 1 : 0;- u32[(ptr + 20) >> 2] = data.maxParticles | 0;- u8[ptr + 24] = data.gpuSimulation ? 1 : 0;- f32[(ptr + 28) >> 2] = data.lifetimeMin;- f32[(ptr + 32) >> 2] = data.lifetimeMax;- u32[(ptr + 36) >> 2] = data.shape | 0;- f32[(ptr + 40) >> 2] = data.shapeRadius;- f32[(ptr + 44) >> 2] = data.shapeSize.x; f32[((ptr + 44) >> 2) + 1] = data.shapeSize.y; f32[((ptr + 44) >> 2) + 2] = data.shapeSize.z;- f32[(ptr + 56) >> 2] = data.shapeAngle;- f32[(ptr + 60) >> 2] = data.speedMin;- f32[(ptr + 64) >> 2] = data.speedMax;- f32[(ptr + 68) >> 2] = data.angleSpreadMin;- f32[(ptr + 72) >> 2] = data.angleSpreadMax;- f32[(ptr + 76) >> 2] = data.startSizeMin;- f32[(ptr + 80) >> 2] = data.startSizeMax;- f32[(ptr + 84) >> 2] = data.endSizeMin;- f32[(ptr + 88) >> 2] = data.endSizeMax;- u32[(ptr + 92) >> 2] = data.sizeEasing | 0;- f32[(ptr + 96) >> 2] = data.startColor.r; f32[((ptr + 96) >> 2) + 1] = data.startColor.g; f32[((ptr + 96) >> 2) + 2] = data.startColor.b; f32[((ptr + 96) >> 2) + 3] = data.startColor.a;- f32[(ptr + 112) >> 2] = data.endColor.r; f32[((ptr + 112) >> 2) + 1] = data.endColor.g; f32[((ptr + 112) >> 2) + 2] = data.endColor.b; f32[((ptr + 112) >> 2) + 3] = data.endColor.a;- u32[(ptr + 128) >> 2] = data.colorEasing | 0;- f32[(ptr + 132) >> 2] = data.rotationMin;- f32[(ptr + 136) >> 2] = data.rotationMax;- f32[(ptr + 140) >> 2] = data.angularVelocityMin;- f32[(ptr + 144) >> 2] = data.angularVelocityMax;- f32[(ptr + 148) >> 2] = data.gravity.x; f32[((ptr + 148) >> 2) + 1] = data.gravity.y; f32[((ptr + 148) >> 2) + 2] = data.gravity.z;- f32[(ptr + 160) >> 2] = data.damping;- f32[(ptr + 164) >> 2] = data.noiseStrength;- f32[(ptr + 168) >> 2] = data.noiseFrequency;- f32[(ptr + 172) >> 2] = data.noiseScrollSpeed;- u32[(ptr + 176) >> 2] = data.noiseOctaves | 0;- u32[(ptr + 180) >> 2] = data.texture;- u32[(ptr + 184) >> 2] = data.spriteColumns | 0;- u32[(ptr + 188) >> 2] = data.spriteRows | 0;- f32[(ptr + 192) >> 2] = data.spriteFPS;- u8[ptr + 196] = data.spriteLoop ? 1 : 0;- u32[(ptr + 200) >> 2] = data.blendMode | 0;- u32[(ptr + 204) >> 2] = data.layer | 0;- u32[(ptr + 208) >> 2] = data.material;- u32[(ptr + 212) >> 2] = data.simulationSpace | 0;- u32[(ptr + 216) >> 2] = data.renderMode | 0;- f32[(ptr + 220) >> 2] = data.velocityScale;- f32[(ptr + 224) >> 2] = data.lengthScale;- u8[ptr + 228] = data.enabled ? 1 : 0;- u32[(ptr + 232) >> 2] = data.subEmitterTrigger | 0;- f32[(ptr + 236) >> 2] = data.subEmitterChance;- f32[(ptr + 240) >> 2] = data.subEmitterInheritVelocity;- u32[(ptr + 244) >> 2] = data.subEmitter;- u8[ptr + 248] = data.trailEnabled ? 1 : 0;- f32[(ptr + 252) >> 2] = data.trailWidth;- u32[(ptr + 256) >> 2] = data.trailPoints | 0;- f32[(ptr + 260) >> 2] = data.trailMinDistance;- u8[ptr + 264] = data.collisionEnabled ? 1 : 0;- f32[(ptr + 268) >> 2] = data.collisionFloor;- u32[(ptr + 272) >> 2] = data.collisionMode | 0;- u32[(ptr + 276) >> 2] = data.collisionMask;- u32[(ptr + 280) >> 2] = data.collisionQueryBudget | 0;- f32[(ptr + 284) >> 2] = data.collisionMaxDistance;- u32[(ptr + 288) >> 2] = data.collisionFallback | 0;- u8[ptr + 292] = data.collisionEvents ? 1 : 0;- u32[(ptr + 296) >> 2] = data.collisionEventBudget | 0;- f32[(ptr + 300) >> 2] = data.collisionBounce;- f32[(ptr + 304) >> 2] = data.collisionFriction;- f32[(ptr + 308) >> 2] = data.collisionLifetimeLoss;+ f32[(ptr + 16) >> 2] = data.startDelay;+ u8[ptr + 20] = data.looping ? 1 : 0;+ u8[ptr + 21] = data.playOnStart ? 1 : 0;+ u32[(ptr + 24) >> 2] = data.maxParticles | 0;+ u8[ptr + 28] = data.gpuSimulation ? 1 : 0;+ f32[(ptr + 32) >> 2] = data.lifetimeMin;+ f32[(ptr + 36) >> 2] = data.lifetimeMax;+ u32[(ptr + 40) >> 2] = data.shape | 0;+ f32[(ptr + 44) >> 2] = data.shapeRadius;+ f32[(ptr + 48) >> 2] = data.shapeSize.x; f32[((ptr + 48) >> 2) + 1] = data.shapeSize.y; f32[((ptr + 48) >> 2) + 2] = data.shapeSize.z;+ f32[(ptr + 60) >> 2] = data.shapeAngle;+ f32[(ptr + 64) >> 2] = data.speedMin;+ f32[(ptr + 68) >> 2] = data.speedMax;+ f32[(ptr + 72) >> 2] = data.angleSpreadMin;+ f32[(ptr + 76) >> 2] = data.angleSpreadMax;+ f32[(ptr + 80) >> 2] = data.startSizeMin;+ f32[(ptr + 84) >> 2] = data.startSizeMax;+ f32[(ptr + 88) >> 2] = data.endSizeMin;+ f32[(ptr + 92) >> 2] = data.endSizeMax;+ u32[(ptr + 96) >> 2] = data.sizeEasing | 0;+ f32[(ptr + 100) >> 2] = data.startColor.r; f32[((ptr + 100) >> 2) + 1] = data.startColor.g; f32[((ptr + 100) >> 2) + 2] = data.startColor.b; f32[((ptr + 100) >> 2) + 3] = data.startColor.a;+ f32[(ptr + 116) >> 2] = data.endColor.r; f32[((ptr + 116) >> 2) + 1] = data.endColor.g; f32[((ptr + 116) >> 2) + 2] = data.endColor.b; f32[((ptr + 116) >> 2) + 3] = data.endColor.a;+ u32[(ptr + 132) >> 2] = data.colorEasing | 0;+ f32[(ptr + 136) >> 2] = data.rotationMin;+ f32[(ptr + 140) >> 2] = data.rotationMax;+ f32[(ptr + 144) >> 2] = data.angularVelocityMin;+ f32[(ptr + 148) >> 2] = data.angularVelocityMax;+ f32[(ptr + 152) >> 2] = data.gravity.x; f32[((ptr + 152) >> 2) + 1] = data.gravity.y; f32[((ptr + 152) >> 2) + 2] = data.gravity.z;+ f32[(ptr + 164) >> 2] = data.damping;+ f32[(ptr + 168) >> 2] = data.noiseStrength;+ f32[(ptr + 172) >> 2] = data.noiseFrequency;+ f32[(ptr + 176) >> 2] = data.noiseScrollSpeed;+ u32[(ptr + 180) >> 2] = data.noiseOctaves | 0;+ u32[(ptr + 184) >> 2] = data.texture;+ u32[(ptr + 188) >> 2] = data.spriteColumns | 0;+ u32[(ptr + 192) >> 2] = data.spriteRows | 0;+ f32[(ptr + 196) >> 2] = data.spriteFPS;+ u8[ptr + 200] = data.spriteLoop ? 1 : 0;+ u32[(ptr + 204) >> 2] = data.blendMode | 0;+ u32[(ptr + 208) >> 2] = data.layer | 0;+ u32[(ptr + 212) >> 2] = data.material;+ u32[(ptr + 216) >> 2] = data.simulationSpace | 0;+ u32[(ptr + 220) >> 2] = data.renderMode | 0;+ f32[(ptr + 224) >> 2] = data.velocityScale;+ f32[(ptr + 228) >> 2] = data.lengthScale;+ u8[ptr + 232] = data.enabled ? 1 : 0;+ u32[(ptr + 236) >> 2] = data.subEmitterTrigger | 0;+ f32[(ptr + 240) >> 2] = data.subEmitterChance;+ f32[(ptr + 244) >> 2] = data.subEmitterInheritVelocity;+ u32[(ptr + 248) >> 2] = data.subEmitter;+ u8[ptr + 252] = data.trailEnabled ? 1 : 0;+ f32[(ptr + 256) >> 2] = data.trailWidth;+ u32[(ptr + 260) >> 2] = data.trailPoints | 0;+ f32[(ptr + 264) >> 2] = data.trailMinDistance;+ u8[ptr + 268] = data.collisionEnabled ? 1 : 0;+ f32[(ptr + 272) >> 2] = data.collisionFloor;+ u32[(ptr + 276) >> 2] = data.collisionMode | 0;+ u32[(ptr + 280) >> 2] = data.collisionMask;+ u32[(ptr + 284) >> 2] = data.collisionQueryBudget | 0;+ f32[(ptr + 288) >> 2] = data.collisionMaxDistance;+ u32[(ptr + 292) >> 2] = data.collisionFallback | 0;+ u8[ptr + 296] = data.collisionEvents ? 1 : 0;+ u32[(ptr + 300) >> 2] = data.collisionEventBudget | 0;+ f32[(ptr + 304) >> 2] = data.collisionBounce;+ f32[(ptr + 308) >> 2] = data.collisionFriction;+ f32[(ptr + 312) >> 2] = data.collisionLifetimeLoss;}export function createParticleEmitterData(): ParticleEmitterPtrData {@@ -1449,6 +1452,7 @@ export function createParticleEmitterData(): ParticleEmitterPtrData {burstCount: 0,burstInterval: 0,duration: 0,+ startDelay: 0,looping: false,playOnStart: false,maxParticles: 0,diff --git a/sdk/src/ecs/component.generated.ts b/sdk/src/ecs/component.generated.tsindex dcd9165d3..f65b1b197 100644--- a/sdk/src/ecs/component.generated.ts+++ b/sdk/src/ecs/component.generated.ts@@ -15,7 +15,7 @@ import type { AlignContent, AlignItems, AlignSelf, BodyType, CanvasScaleMode, Cl* getAbiLayoutHash(); BuiltinBridge.connect() compares them and refuses to* run on mismatch, because mismatched offsets read the wrong heap bytes.*/-export const ABI_LAYOUT_HASH = '7e1e50433c8b93cf';+export const ABI_LAYOUT_HASH = 'e41570f14820a1a8';/*** One asset-valued field of a component: which field, and what kind of@@ -704,6 +704,7 @@ export const COMPONENT_META: Record<string, ComponentMetaEntry> = {burstCount: 0,burstInterval: 1,duration: 5,+ startDelay: 0,looping: true,playOnStart: true,maxParticles: 1000,@@ -780,6 +781,7 @@ export const COMPONENT_META: Record<string, ComponentMetaEntry> = {burstCount: { min: 0, step: 1, category: "Emission" },burstInterval: { min: 0, category: "Emission" },duration: { min: 0, category: "Emission" },+ startDelay: { min: 0, tooltip: "Seconds after the emitter starts playing before it emits anything. The duration counts from the end of the delay.", category: "Emission" },looping: { category: "Emission" },playOnStart: { category: "Emission" },maxParticles: { min: 1, step: 1, category: "Emission" },@@ -1731,6 +1733,7 @@ export interface ParticleEmitterData {burstCount: number;burstInterval: number;duration: number;+ startDelay: number;looping: boolean;playOnStart: boolean;maxParticles: number;diff --git a/sdk/src/wasm/ptrLayouts.generated.ts b/sdk/src/wasm/ptrLayouts.generated.tsindex 6e638fb45..4436a861c 100644--- a/sdk/src/wasm/ptrLayouts.generated.ts+++ b/sdk/src/wasm/ptrLayouts.generated.ts@@ -337,71 +337,72 @@ export const PTR_LAYOUTS: Record<string, PtrLayout> = {{ name: 'burstCount', type: 'i32', offset: 4 },{ name: 'burstInterval', type: 'f32', offset: 8 },{ name: 'duration', type: 'f32', offset: 12 },- { name: 'looping', type: 'bool', offset: 16 },- { name: 'playOnStart', type: 'bool', offset: 17 },- { name: 'maxParticles', type: 'i32', offset: 20 },- { name: 'gpuSimulation', type: 'bool', offset: 24 },- { name: 'lifetimeMin', type: 'f32', offset: 28 },- { name: 'lifetimeMax', type: 'f32', offset: 32 },- { name: 'shape', type: 'i32', offset: 36 },- { name: 'shapeRadius', type: 'f32', offset: 40 },- { name: 'shapeSize', type: 'vec3', offset: 44 },- { name: 'shapeAngle', type: 'f32', offset: 56 },- { name: 'speedMin', type: 'f32', offset: 60 },- { name: 'speedMax', type: 'f32', offset: 64 },- { name: 'angleSpreadMin', type: 'f32', offset: 68 },- { name: 'angleSpreadMax', type: 'f32', offset: 72 },- { name: 'startSizeMin', type: 'f32', offset: 76 },- { name: 'startSizeMax', type: 'f32', offset: 80 },- { name: 'endSizeMin', type: 'f32', offset: 84 },- { name: 'endSizeMax', type: 'f32', offset: 88 },- { name: 'sizeEasing', type: 'i32', offset: 92 },- { name: 'startColor', type: 'color', offset: 96 },- { name: 'endColor', type: 'color', offset: 112 },- { name: 'colorEasing', type: 'i32', offset: 128 },- { name: 'rotationMin', type: 'f32', offset: 132 },- { name: 'rotationMax', type: 'f32', offset: 136 },- { name: 'angularVelocityMin', type: 'f32', offset: 140 },- { name: 'angularVelocityMax', type: 'f32', offset: 144 },- { name: 'gravity', type: 'vec3', offset: 148 },- { name: 'damping', type: 'f32', offset: 160 },- { name: 'noiseStrength', type: 'f32', offset: 164 },- { name: 'noiseFrequency', type: 'f32', offset: 168 },- { name: 'noiseScrollSpeed', type: 'f32', offset: 172 },- { name: 'noiseOctaves', type: 'i32', offset: 176 },- { name: 'texture', type: 'u32', offset: 180 },- { name: 'spriteColumns', type: 'i32', offset: 184 },- { name: 'spriteRows', type: 'i32', offset: 188 },- { name: 'spriteFPS', type: 'f32', offset: 192 },- { name: 'spriteLoop', type: 'bool', offset: 196 },- { name: 'blendMode', type: 'i32', offset: 200 },- { name: 'layer', type: 'i32', offset: 204 },- { name: 'material', type: 'u32', offset: 208 },- { name: 'simulationSpace', type: 'i32', offset: 212 },- { name: 'renderMode', type: 'i32', offset: 216 },- { name: 'velocityScale', type: 'f32', offset: 220 },- { name: 'lengthScale', type: 'f32', offset: 224 },- { name: 'enabled', type: 'bool', offset: 228 },- { name: 'subEmitterTrigger', type: 'i32', offset: 232 },- { name: 'subEmitterChance', type: 'f32', offset: 236 },- { name: 'subEmitterInheritVelocity', type: 'f32', offset: 240 },- { name: 'subEmitter', type: 'u32', offset: 244 },- { name: 'trailEnabled', type: 'bool', offset: 248 },- { name: 'trailWidth', type: 'f32', offset: 252 },- { name: 'trailPoints', type: 'i32', offset: 256 },- { name: 'trailMinDistance', type: 'f32', offset: 260 },- { name: 'collisionEnabled', type: 'bool', offset: 264 },- { name: 'collisionFloor', type: 'f32', offset: 268 },- { name: 'collisionMode', type: 'i32', offset: 272 },- { name: 'collisionMask', type: 'u32', offset: 276 },- { name: 'collisionQueryBudget', type: 'i32', offset: 280 },- { name: 'collisionMaxDistance', type: 'f32', offset: 284 },- { name: 'collisionFallback', type: 'i32', offset: 288 },- { name: 'collisionEvents', type: 'bool', offset: 292 },- { name: 'collisionEventBudget', type: 'i32', offset: 296 },- { name: 'collisionBounce', type: 'f32', offset: 300 },- { name: 'collisionFriction', type: 'f32', offset: 304 },- { name: 'collisionLifetimeLoss', type: 'f32', offset: 308 },+ { name: 'startDelay', type: 'f32', offset: 16 },+ { name: 'looping', type: 'bool', offset: 20 },+ { name: 'playOnStart', type: 'bool', offset: 21 },+ { name: 'maxParticles', type: 'i32', offset: 24 },+ { name: 'gpuSimulation', type: 'bool', offset: 28 },+ { name: 'lifetimeMin', type: 'f32', offset: 32 },+ { name: 'lifetimeMax', type: 'f32', offset: 36 },+ { name: 'shape', type: 'i32', offset: 40 },+ { name: 'shapeRadius', type: 'f32', offset: 44 },+ { name: 'shapeSize', type: 'vec3', offset: 48 },+ { name: 'shapeAngle', type: 'f32', offset: 60 },+ { name: 'speedMin', type: 'f32', offset: 64 },+ { name: 'speedMax', type: 'f32', offset: 68 },+ { name: 'angleSpreadMin', type: 'f32', offset: 72 },+ { name: 'angleSpreadMax', type: 'f32', offset: 76 },+ { name: 'startSizeMin', type: 'f32', offset: 80 },+ { name: 'startSizeMax', type: 'f32', offset: 84 },+ { name: 'endSizeMin', type: 'f32', offset: 88 },+ { name: 'endSizeMax', type: 'f32', offset: 92 },+ { name: 'sizeEasing', type: 'i32', offset: 96 },+ { name: 'startColor', type: 'color', offset: 100 },+ { name: 'endColor', type: 'color', offset: 116 },+ { name: 'colorEasing', type: 'i32', offset: 132 },+ { name: 'rotationMin', type: 'f32', offset: 136 },+ { name: 'rotationMax', type: 'f32', offset: 140 },+ { name: 'angularVelocityMin', type: 'f32', offset: 144 },+ { name: 'angularVelocityMax', type: 'f32', offset: 148 },+ { name: 'gravity', type: 'vec3', offset: 152 },+ { name: 'damping', type: 'f32', offset: 164 },+ { name: 'noiseStrength', type: 'f32', offset: 168 },+ { name: 'noiseFrequency', type: 'f32', offset: 172 },+ { name: 'noiseScrollSpeed', type: 'f32', offset: 176 },+ { name: 'noiseOctaves', type: 'i32', offset: 180 },+ { name: 'texture', type: 'u32', offset: 184 },+ { name: 'spriteColumns', type: 'i32', offset: 188 },+ { name: 'spriteRows', type: 'i32', offset: 192 },+ { name: 'spriteFPS', type: 'f32', offset: 196 },+ { name: 'spriteLoop', type: 'bool', offset: 200 },+ { name: 'blendMode', type: 'i32', offset: 204 },+ { name: 'layer', type: 'i32', offset: 208 },+ { name: 'material', type: 'u32', offset: 212 },+ { name: 'simulationSpace', type: 'i32', offset: 216 },+ { name: 'renderMode', type: 'i32', offset: 220 },+ { name: 'velocityScale', type: 'f32', offset: 224 },+ { name: 'lengthScale', type: 'f32', offset: 228 },+ { name: 'enabled', type: 'bool', offset: 232 },+ { name: 'subEmitterTrigger', type: 'i32', offset: 236 },+ { name: 'subEmitterChance', type: 'f32', offset: 240 },+ { name: 'subEmitterInheritVelocity', type: 'f32', offset: 244 },+ { name: 'subEmitter', type: 'u32', offset: 248 },+ { name: 'trailEnabled', type: 'bool', offset: 252 },+ { name: 'trailWidth', type: 'f32', offset: 256 },+ { name: 'trailPoints', type: 'i32', offset: 260 },+ { name: 'trailMinDistance', type: 'f32', offset: 264 },+ { name: 'collisionEnabled', type: 'bool', offset: 268 },+ { name: 'collisionFloor', type: 'f32', offset: 272 },+ { name: 'collisionMode', type: 'i32', offset: 276 },+ { name: 'collisionMask', type: 'u32', offset: 280 },+ { name: 'collisionQueryBudget', type: 'i32', offset: 284 },+ { name: 'collisionMaxDistance', type: 'f32', offset: 288 },+ { name: 'collisionFallback', type: 'i32', offset: 292 },+ { name: 'collisionEvents', type: 'bool', offset: 296 },+ { name: 'collisionEventBudget', type: 'i32', offset: 300 },+ { name: 'collisionBounce', type: 'f32', offset: 304 },+ { name: 'collisionFriction', type: 'f32', offset: 308 },+ { name: 'collisionLifetimeLoss', type: 'f32', offset: 312 },],},ParticleForceField: {diff --git a/sdk/src/wasm/wasm.generated.ts b/sdk/src/wasm/wasm.generated.tsindex 43b96ad22..4c35a9f54 100644--- a/sdk/src/wasm/wasm.generated.ts+++ b/sdk/src/wasm/wasm.generated.ts@@ -738,6 +738,7 @@ export interface ParticleEmitter {burstCount: number;burstInterval: number;duration: number;+ startDelay: number;looping: boolean;playOnStart: boolean;maxParticles: number;diff --git a/sdk/tests/__snapshots__/component-fieldmeta-golden.test.ts.snap b/sdk/tests/__snapshots__/component-fieldmeta-golden.test.ts.snapindex e677a56b6..c5f3e146f 100644--- a/sdk/tests/__snapshots__/component-fieldmeta-golden.test.ts.snap+++ b/sdk/tests/__snapshots__/component-fieldmeta-golden.test.ts.snap@@ -1054,6 +1054,11 @@ exports[`builtin FieldMeta (RC9-1 equivalence gate) > matches the golden snapsho"startColor": {"category": "Color",},+ "startDelay": {+ "category": "Emission",+ "min": 0,+ "tooltip": "Seconds after the emitter starts playing before it emits anything. The duration counts from the end of the delay.",+ },"startSizeMax": {"category": "Size","min": 0,diff --git a/src/esengine/aot/EngineDigest.generated.h b/src/esengine/aot/EngineDigest.generated.hindex 76d7a9876..2efd3dc99 100644--- a/src/esengine/aot/EngineDigest.generated.h+++ b/src/esengine/aot/EngineDigest.generated.h@@ -6,7 +6,7 @@/* One per address width, because the width is IN the digest: a host thattook the other one would refuse every module built for it. */-#define ES_ENGINE_ABI_DIGEST_32 0x9b05ee5f4e1f8502ULL-#define ES_ENGINE_ABI_DIGEST_64 0x2ce1a65275f59b66ULL+#define ES_ENGINE_ABI_DIGEST_32 0x426310d99a92b4adULL+#define ES_ENGINE_ABI_DIGEST_64 0xda66422d358dcce9ULL#define ES_ENGINE_ABI_DIGEST \(sizeof(es_addr_t) == 8 ? ES_ENGINE_ABI_DIGEST_64 : ES_ENGINE_ABI_DIGEST_32)diff --git a/src/esengine/bindings/EditorAPI.generated.cpp b/src/esengine/bindings/EditorAPI.generated.cppindex 291a0a52e..a09ce4068 100644--- a/src/esengine/bindings/EditorAPI.generated.cpp+++ b/src/esengine/bindings/EditorAPI.generated.cpp@@ -2,10 +2,10 @@* @file EditorAPI.generated.cpp* @brief Auto-generated editor API with string-dispatched component access* @details Generated by EHT - DO NOT EDIT- * @schema_hash b635f84e4d129fb8+ * @schema_hash 68323eb41201a201*/-#define ES_EDITOR_API_SCHEMA_HASH "b635f84e4d129fb8"+#define ES_EDITOR_API_SCHEMA_HASH "68323eb41201a201"#include <emscripten/bind.h>#include <string>@@ -462,6 +462,7 @@ std::string editor_getComponentSchema(const std::string& name) {{"key":"burstCount","type":"int","group":"ParticleEmitter"},{"key":"burstInterval","type":"float","group":"ParticleEmitter"},{"key":"duration","type":"float","group":"ParticleEmitter"},+ {"key":"startDelay","type":"float","group":"ParticleEmitter"},{"key":"looping","type":"bool","group":"ParticleEmitter"},{"key":"playOnStart","type":"bool","group":"ParticleEmitter"},{"key":"maxParticles","type":"int","group":"ParticleEmitter"},@@ -1559,6 +1560,7 @@ bool editor_setFloat(Registry& reg, u32 e, const std::string& comp, const std::sif (field == "rate") { c.rate = value; }else if (field == "burstInterval") { c.burstInterval = value; }else if (field == "duration") { c.duration = value; }+ else if (field == "startDelay") { c.startDelay = value; }else if (field == "lifetimeMin") { c.lifetimeMin = value; }else if (field == "lifetimeMax") { c.lifetimeMax = value; }else if (field == "shapeRadius") { c.shapeRadius = value; }@@ -2130,6 +2132,7 @@ f32 editor_getFloat(Registry& reg, u32 e, const std::string& comp, const std::stif (field == "rate") { return c.rate; }else if (field == "burstInterval") { return c.burstInterval; }else if (field == "duration") { return c.duration; }+ else if (field == "startDelay") { return c.startDelay; }else if (field == "lifetimeMin") { return c.lifetimeMin; }else if (field == "lifetimeMax") { return c.lifetimeMax; }else if (field == "shapeRadius") { return c.shapeRadius; }diff --git a/src/esengine/bindings/WebBindings.generated.cpp b/src/esengine/bindings/WebBindings.generated.cppindex dd02f93e0..67cd5161f 100644--- a/src/esengine/bindings/WebBindings.generated.cpp+++ b/src/esengine/bindings/WebBindings.generated.cpp@@ -942,6 +942,7 @@ struct ParticleEmitterJS {i32 burstCount;f32 burstInterval;f32 duration;+ f32 startDelay;bool looping;bool playOnStart;i32 maxParticles;@@ -1014,6 +1015,7 @@ void particleemitterApplyJS(esengine::ecs::ParticleEmitter& c, const ParticleEmic.burstCount = js.burstCount;c.burstInterval = js.burstInterval;c.duration = js.duration;+ c.startDelay = js.startDelay;c.looping = js.looping;c.playOnStart = js.playOnStart;c.maxParticles = js.maxParticles;@@ -1093,6 +1095,7 @@ ParticleEmitterJS particleemitterToJS(const esengine::ecs::ParticleEmitter& c) {js.burstCount = c.burstCount;js.burstInterval = c.burstInterval;js.duration = c.duration;+ js.startDelay = c.startDelay;js.looping = c.looping;js.playOnStart = c.playOnStart;js.maxParticles = c.maxParticles;@@ -2070,6 +2073,7 @@ EMSCRIPTEN_BINDINGS(esengine_components) {.field("burstCount", &ParticleEmitterJS::burstCount).field("burstInterval", &ParticleEmitterJS::burstInterval).field("duration", &ParticleEmitterJS::duration)+ .field("startDelay", &ParticleEmitterJS::startDelay).field("looping", &ParticleEmitterJS::looping).field("playOnStart", &ParticleEmitterJS::playOnStart).field("maxParticles", &ParticleEmitterJS::maxParticles)@@ -4003,71 +4007,72 @@ static_assert(offsetof(esengine::ecs::ParticleEmitter, rate) == 0, "ABI offset dstatic_assert(offsetof(esengine::ecs::ParticleEmitter, burstCount) == 4, "ABI offset drift: esengine::ecs::ParticleEmitter.burstCount (EHT expected 4)");static_assert(offsetof(esengine::ecs::ParticleEmitter, burstInterval) == 8, "ABI offset drift: esengine::ecs::ParticleEmitter.burstInterval (EHT expected 8)");static_assert(offsetof(esengine::ecs::ParticleEmitter, duration) == 12, "ABI offset drift: esengine::ecs::ParticleEmitter.duration (EHT expected 12)");-static_assert(offsetof(esengine::ecs::ParticleEmitter, looping) == 16, "ABI offset drift: esengine::ecs::ParticleEmitter.looping (EHT expected 16)");-static_assert(offsetof(esengine::ecs::ParticleEmitter, playOnStart) == 17, "ABI offset drift: esengine::ecs::ParticleEmitter.playOnStart (EHT expected 17)");-static_assert(offsetof(esengine::ecs::ParticleEmitter, maxParticles) == 20, "ABI offset drift: esengine::ecs::ParticleEmitter.maxParticles (EHT expected 20)");-static_assert(offsetof(esengine::ecs::ParticleEmitter, gpuSimulation) == 24, "ABI offset drift: esengine::ecs::ParticleEmitter.gpuSimulation (EHT expected 24)");-static_assert(offsetof(esengine::ecs::ParticleEmitter, lifetimeMin) == 28, "ABI offset drift: esengine::ecs::ParticleEmitter.lifetimeMin (EHT expected 28)");-static_assert(offsetof(esengine::ecs::ParticleEmitter, lifetimeMax) == 32, "ABI offset drift: esengine::ecs::ParticleEmitter.lifetimeMax (EHT expected 32)");-static_assert(offsetof(esengine::ecs::ParticleEmitter, shape) == 36, "ABI offset drift: esengine::ecs::ParticleEmitter.shape (EHT expected 36)");-static_assert(offsetof(esengine::ecs::ParticleEmitter, shapeRadius) == 40, "ABI offset drift: esengine::ecs::ParticleEmitter.shapeRadius (EHT expected 40)");-static_assert(offsetof(esengine::ecs::ParticleEmitter, shapeSize) == 44, "ABI offset drift: esengine::ecs::ParticleEmitter.shapeSize (EHT expected 44)");-static_assert(offsetof(esengine::ecs::ParticleEmitter, shapeAngle) == 56, "ABI offset drift: esengine::ecs::ParticleEmitter.shapeAngle (EHT expected 56)");-static_assert(offsetof(esengine::ecs::ParticleEmitter, speedMin) == 60, "ABI offset drift: esengine::ecs::ParticleEmitter.speedMin (EHT expected 60)");-static_assert(offsetof(esengine::ecs::ParticleEmitter, speedMax) == 64, "ABI offset drift: esengine::ecs::ParticleEmitter.speedMax (EHT expected 64)");-static_assert(offsetof(esengine::ecs::ParticleEmitter, angleSpreadMin) == 68, "ABI offset drift: esengine::ecs::ParticleEmitter.angleSpreadMin (EHT expected 68)");-static_assert(offsetof(esengine::ecs::ParticleEmitter, angleSpreadMax) == 72, "ABI offset drift: esengine::ecs::ParticleEmitter.angleSpreadMax (EHT expected 72)");-static_assert(offsetof(esengine::ecs::ParticleEmitter, startSizeMin) == 76, "ABI offset drift: esengine::ecs::ParticleEmitter.startSizeMin (EHT expected 76)");-static_assert(offsetof(esengine::ecs::ParticleEmitter, startSizeMax) == 80, "ABI offset drift: esengine::ecs::ParticleEmitter.startSizeMax (EHT expected 80)");-static_assert(offsetof(esengine::ecs::ParticleEmitter, endSizeMin) == 84, "ABI offset drift: esengine::ecs::ParticleEmitter.endSizeMin (EHT expected 84)");-static_assert(offsetof(esengine::ecs::ParticleEmitter, endSizeMax) == 88, "ABI offset drift: esengine::ecs::ParticleEmitter.endSizeMax (EHT expected 88)");-static_assert(offsetof(esengine::ecs::ParticleEmitter, sizeEasing) == 92, "ABI offset drift: esengine::ecs::ParticleEmitter.sizeEasing (EHT expected 92)");-static_assert(offsetof(esengine::ecs::ParticleEmitter, startColor) == 96, "ABI offset drift: esengine::ecs::ParticleEmitter.startColor (EHT expected 96)");-static_assert(offsetof(esengine::ecs::ParticleEmitter, endColor) == 112, "ABI offset drift: esengine::ecs::ParticleEmitter.endColor (EHT expected 112)");-static_assert(offsetof(esengine::ecs::ParticleEmitter, colorEasing) == 128, "ABI offset drift: esengine::ecs::ParticleEmitter.colorEasing (EHT expected 128)");-static_assert(offsetof(esengine::ecs::ParticleEmitter, rotationMin) == 132, "ABI offset drift: esengine::ecs::ParticleEmitter.rotationMin (EHT expected 132)");-static_assert(offsetof(esengine::ecs::ParticleEmitter, rotationMax) == 136, "ABI offset drift: esengine::ecs::ParticleEmitter.rotationMax (EHT expected 136)");-static_assert(offsetof(esengine::ecs::ParticleEmitter, angularVelocityMin) == 140, "ABI offset drift: esengine::ecs::ParticleEmitter.angularVelocityMin (EHT expected 140)");-static_assert(offsetof(esengine::ecs::ParticleEmitter, angularVelocityMax) == 144, "ABI offset drift: esengine::ecs::ParticleEmitter.angularVelocityMax (EHT expected 144)");-static_assert(offsetof(esengine::ecs::ParticleEmitter, gravity) == 148, "ABI offset drift: esengine::ecs::ParticleEmitter.gravity (EHT expected 148)");-static_assert(offsetof(esengine::ecs::ParticleEmitter, damping) == 160, "ABI offset drift: esengine::ecs::ParticleEmitter.damping (EHT expected 160)");-static_assert(offsetof(esengine::ecs::ParticleEmitter, noiseStrength) == 164, "ABI offset drift: esengine::ecs::ParticleEmitter.noiseStrength (EHT expected 164)");-static_assert(offsetof(esengine::ecs::ParticleEmitter, noiseFrequency) == 168, "ABI offset drift: esengine::ecs::ParticleEmitter.noiseFrequency (EHT expected 168)");-static_assert(offsetof(esengine::ecs::ParticleEmitter, noiseScrollSpeed) == 172, "ABI offset drift: esengine::ecs::ParticleEmitter.noiseScrollSpeed (EHT expected 172)");-static_assert(offsetof(esengine::ecs::ParticleEmitter, noiseOctaves) == 176, "ABI offset drift: esengine::ecs::ParticleEmitter.noiseOctaves (EHT expected 176)");-static_assert(offsetof(esengine::ecs::ParticleEmitter, texture) == 180, "ABI offset drift: esengine::ecs::ParticleEmitter.texture (EHT expected 180)");-static_assert(offsetof(esengine::ecs::ParticleEmitter, spriteColumns) == 184, "ABI offset drift: esengine::ecs::ParticleEmitter.spriteColumns (EHT expected 184)");-static_assert(offsetof(esengine::ecs::ParticleEmitter, spriteRows) == 188, "ABI offset drift: esengine::ecs::ParticleEmitter.spriteRows (EHT expected 188)");-static_assert(offsetof(esengine::ecs::ParticleEmitter, spriteFPS) == 192, "ABI offset drift: esengine::ecs::ParticleEmitter.spriteFPS (EHT expected 192)");-static_assert(offsetof(esengine::ecs::ParticleEmitter, spriteLoop) == 196, "ABI offset drift: esengine::ecs::ParticleEmitter.spriteLoop (EHT expected 196)");-static_assert(offsetof(esengine::ecs::ParticleEmitter, blendMode) == 200, "ABI offset drift: esengine::ecs::ParticleEmitter.blendMode (EHT expected 200)");-static_assert(offsetof(esengine::ecs::ParticleEmitter, layer) == 204, "ABI offset drift: esengine::ecs::ParticleEmitter.layer (EHT expected 204)");-static_assert(offsetof(esengine::ecs::ParticleEmitter, material) == 208, "ABI offset drift: esengine::ecs::ParticleEmitter.material (EHT expected 208)");-static_assert(offsetof(esengine::ecs::ParticleEmitter, simulationSpace) == 212, "ABI offset drift: esengine::ecs::ParticleEmitter.simulationSpace (EHT expected 212)");-static_assert(offsetof(esengine::ecs::ParticleEmitter, renderMode) == 216, "ABI offset drift: esengine::ecs::ParticleEmitter.renderMode (EHT expected 216)");-static_assert(offsetof(esengine::ecs::ParticleEmitter, velocityScale) == 220, "ABI offset drift: esengine::ecs::ParticleEmitter.velocityScale (EHT expected 220)");-static_assert(offsetof(esengine::ecs::ParticleEmitter, lengthScale) == 224, "ABI offset drift: esengine::ecs::ParticleEmitter.lengthScale (EHT expected 224)");-static_assert(offsetof(esengine::ecs::ParticleEmitter, enabled) == 228, "ABI offset drift: esengine::ecs::ParticleEmitter.enabled (EHT expected 228)");-static_assert(offsetof(esengine::ecs::ParticleEmitter, subEmitterTrigger) == 232, "ABI offset drift: esengine::ecs::ParticleEmitter.subEmitterTrigger (EHT expected 232)");-static_assert(offsetof(esengine::ecs::ParticleEmitter, subEmitterChance) == 236, "ABI offset drift: esengine::ecs::ParticleEmitter.subEmitterChance (EHT expected 236)");-static_assert(offsetof(esengine::ecs::ParticleEmitter, subEmitterInheritVelocity) == 240, "ABI offset drift: esengine::ecs::ParticleEmitter.subEmitterInheritVelocity (EHT expected 240)");-static_assert(offsetof(esengine::ecs::ParticleEmitter, subEmitter) == 244, "ABI offset drift: esengine::ecs::ParticleEmitter.subEmitter (EHT expected 244)");-static_assert(offsetof(esengine::ecs::ParticleEmitter, trailEnabled) == 248, "ABI offset drift: esengine::ecs::ParticleEmitter.trailEnabled (EHT expected 248)");-static_assert(offsetof(esengine::ecs::ParticleEmitter, trailWidth) == 252, "ABI offset drift: esengine::ecs::ParticleEmitter.trailWidth (EHT expected 252)");-static_assert(offsetof(esengine::ecs::ParticleEmitter, trailPoints) == 256, "ABI offset drift: esengine::ecs::ParticleEmitter.trailPoints (EHT expected 256)");-static_assert(offsetof(esengine::ecs::ParticleEmitter, trailMinDistance) == 260, "ABI offset drift: esengine::ecs::ParticleEmitter.trailMinDistance (EHT expected 260)");-static_assert(offsetof(esengine::ecs::ParticleEmitter, collisionEnabled) == 264, "ABI offset drift: esengine::ecs::ParticleEmitter.collisionEnabled (EHT expected 264)");-static_assert(offsetof(esengine::ecs::ParticleEmitter, collisionFloor) == 268, "ABI offset drift: esengine::ecs::ParticleEmitter.collisionFloor (EHT expected 268)");-static_assert(offsetof(esengine::ecs::ParticleEmitter, collisionMode) == 272, "ABI offset drift: esengine::ecs::ParticleEmitter.collisionMode (EHT expected 272)");-static_assert(offsetof(esengine::ecs::ParticleEmitter, collisionMask) == 276, "ABI offset drift: esengine::ecs::ParticleEmitter.collisionMask (EHT expected 276)");-static_assert(offsetof(esengine::ecs::ParticleEmitter, collisionQueryBudget) == 280, "ABI offset drift: esengine::ecs::ParticleEmitter.collisionQueryBudget (EHT expected 280)");-static_assert(offsetof(esengine::ecs::ParticleEmitter, collisionMaxDistance) == 284, "ABI offset drift: esengine::ecs::ParticleEmitter.collisionMaxDistance (EHT expected 284)");-static_assert(offsetof(esengine::ecs::ParticleEmitter, collisionFallback) == 288, "ABI offset drift: esengine::ecs::ParticleEmitter.collisionFallback (EHT expected 288)");-static_assert(offsetof(esengine::ecs::ParticleEmitter, collisionEvents) == 292, "ABI offset drift: esengine::ecs::ParticleEmitter.collisionEvents (EHT expected 292)");-static_assert(offsetof(esengine::ecs::ParticleEmitter, collisionEventBudget) == 296, "ABI offset drift: esengine::ecs::ParticleEmitter.collisionEventBudget (EHT expected 296)");-static_assert(offsetof(esengine::ecs::ParticleEmitter, collisionBounce) == 300, "ABI offset drift: esengine::ecs::ParticleEmitter.collisionBounce (EHT expected 300)");-static_assert(offsetof(esengine::ecs::ParticleEmitter, collisionFriction) == 304, "ABI offset drift: esengine::ecs::ParticleEmitter.collisionFriction (EHT expected 304)");-static_assert(offsetof(esengine::ecs::ParticleEmitter, collisionLifetimeLoss) == 308, "ABI offset drift: esengine::ecs::ParticleEmitter.collisionLifetimeLoss (EHT expected 308)");+static_assert(offsetof(esengine::ecs::ParticleEmitter, startDelay) == 16, "ABI offset drift: esengine::ecs::ParticleEmitter.startDelay (EHT expected 16)");+static_assert(offsetof(esengine::ecs::ParticleEmitter, looping) == 20, "ABI offset drift: esengine::ecs::ParticleEmitter.looping (EHT expected 20)");+static_assert(offsetof(esengine::ecs::ParticleEmitter, playOnStart) == 21, "ABI offset drift: esengine::ecs::ParticleEmitter.playOnStart (EHT expected 21)");+static_assert(offsetof(esengine::ecs::ParticleEmitter, maxParticles) == 24, "ABI offset drift: esengine::ecs::ParticleEmitter.maxParticles (EHT expected 24)");+static_assert(offsetof(esengine::ecs::ParticleEmitter, gpuSimulation) == 28, "ABI offset drift: esengine::ecs::ParticleEmitter.gpuSimulation (EHT expected 28)");+static_assert(offsetof(esengine::ecs::ParticleEmitter, lifetimeMin) == 32, "ABI offset drift: esengine::ecs::ParticleEmitter.lifetimeMin (EHT expected 32)");+static_assert(offsetof(esengine::ecs::ParticleEmitter, lifetimeMax) == 36, "ABI offset drift: esengine::ecs::ParticleEmitter.lifetimeMax (EHT expected 36)");+static_assert(offsetof(esengine::ecs::ParticleEmitter, shape) == 40, "ABI offset drift: esengine::ecs::ParticleEmitter.shape (EHT expected 40)");+static_assert(offsetof(esengine::ecs::ParticleEmitter, shapeRadius) == 44, "ABI offset drift: esengine::ecs::ParticleEmitter.shapeRadius (EHT expected 44)");+static_assert(offsetof(esengine::ecs::ParticleEmitter, shapeSize) == 48, "ABI offset drift: esengine::ecs::ParticleEmitter.shapeSize (EHT expected 48)");+static_assert(offsetof(esengine::ecs::ParticleEmitter, shapeAngle) == 60, "ABI offset drift: esengine::ecs::ParticleEmitter.shapeAngle (EHT expected 60)");+static_assert(offsetof(esengine::ecs::ParticleEmitter, speedMin) == 64, "ABI offset drift: esengine::ecs::ParticleEmitter.speedMin (EHT expected 64)");+static_assert(offsetof(esengine::ecs::ParticleEmitter, speedMax) == 68, "ABI offset drift: esengine::ecs::ParticleEmitter.speedMax (EHT expected 68)");+static_assert(offsetof(esengine::ecs::ParticleEmitter, angleSpreadMin) == 72, "ABI offset drift: esengine::ecs::ParticleEmitter.angleSpreadMin (EHT expected 72)");+static_assert(offsetof(esengine::ecs::ParticleEmitter, angleSpreadMax) == 76, "ABI offset drift: esengine::ecs::ParticleEmitter.angleSpreadMax (EHT expected 76)");+static_assert(offsetof(esengine::ecs::ParticleEmitter, startSizeMin) == 80, "ABI offset drift: esengine::ecs::ParticleEmitter.startSizeMin (EHT expected 80)");+static_assert(offsetof(esengine::ecs::ParticleEmitter, startSizeMax) == 84, "ABI offset drift: esengine::ecs::ParticleEmitter.startSizeMax (EHT expected 84)");+static_assert(offsetof(esengine::ecs::ParticleEmitter, endSizeMin) == 88, "ABI offset drift: esengine::ecs::ParticleEmitter.endSizeMin (EHT expected 88)");+static_assert(offsetof(esengine::ecs::ParticleEmitter, endSizeMax) == 92, "ABI offset drift: esengine::ecs::ParticleEmitter.endSizeMax (EHT expected 92)");+static_assert(offsetof(esengine::ecs::ParticleEmitter, sizeEasing) == 96, "ABI offset drift: esengine::ecs::ParticleEmitter.sizeEasing (EHT expected 96)");+static_assert(offsetof(esengine::ecs::ParticleEmitter, startColor) == 100, "ABI offset drift: esengine::ecs::ParticleEmitter.startColor (EHT expected 100)");+static_assert(offsetof(esengine::ecs::ParticleEmitter, endColor) == 116, "ABI offset drift: esengine::ecs::ParticleEmitter.endColor (EHT expected 116)");+static_assert(offsetof(esengine::ecs::ParticleEmitter, colorEasing) == 132, "ABI offset drift: esengine::ecs::ParticleEmitter.colorEasing (EHT expected 132)");+static_assert(offsetof(esengine::ecs::ParticleEmitter, rotationMin) == 136, "ABI offset drift: esengine::ecs::ParticleEmitter.rotationMin (EHT expected 136)");+static_assert(offsetof(esengine::ecs::ParticleEmitter, rotationMax) == 140, "ABI offset drift: esengine::ecs::ParticleEmitter.rotationMax (EHT expected 140)");+static_assert(offsetof(esengine::ecs::ParticleEmitter, angularVelocityMin) == 144, "ABI offset drift: esengine::ecs::ParticleEmitter.angularVelocityMin (EHT expected 144)");+static_assert(offsetof(esengine::ecs::ParticleEmitter, angularVelocityMax) == 148, "ABI offset drift: esengine::ecs::ParticleEmitter.angularVelocityMax (EHT expected 148)");+static_assert(offsetof(esengine::ecs::ParticleEmitter, gravity) == 152, "ABI offset drift: esengine::ecs::ParticleEmitter.gravity (EHT expected 152)");+static_assert(offsetof(esengine::ecs::ParticleEmitter, damping) == 164, "ABI offset drift: esengine::ecs::ParticleEmitter.damping (EHT expected 164)");+static_assert(offsetof(esengine::ecs::ParticleEmitter, noiseStrength) == 168, "ABI offset drift: esengine::ecs::ParticleEmitter.noiseStrength (EHT expected 168)");+static_assert(offsetof(esengine::ecs::ParticleEmitter, noiseFrequency) == 172, "ABI offset drift: esengine::ecs::ParticleEmitter.noiseFrequency (EHT expected 172)");+static_assert(offsetof(esengine::ecs::ParticleEmitter, noiseScrollSpeed) == 176, "ABI offset drift: esengine::ecs::ParticleEmitter.noiseScrollSpeed (EHT expected 176)");+static_assert(offsetof(esengine::ecs::ParticleEmitter, noiseOctaves) == 180, "ABI offset drift: esengine::ecs::ParticleEmitter.noiseOctaves (EHT expected 180)");+static_assert(offsetof(esengine::ecs::ParticleEmitter, texture) == 184, "ABI offset drift: esengine::ecs::ParticleEmitter.texture (EHT expected 184)");+static_assert(offsetof(esengine::ecs::ParticleEmitter, spriteColumns) == 188, "ABI offset drift: esengine::ecs::ParticleEmitter.spriteColumns (EHT expected 188)");+static_assert(offsetof(esengine::ecs::ParticleEmitter, spriteRows) == 192, "ABI offset drift: esengine::ecs::ParticleEmitter.spriteRows (EHT expected 192)");+static_assert(offsetof(esengine::ecs::ParticleEmitter, spriteFPS) == 196, "ABI offset drift: esengine::ecs::ParticleEmitter.spriteFPS (EHT expected 196)");+static_assert(offsetof(esengine::ecs::ParticleEmitter, spriteLoop) == 200, "ABI offset drift: esengine::ecs::ParticleEmitter.spriteLoop (EHT expected 200)");+static_assert(offsetof(esengine::ecs::ParticleEmitter, blendMode) == 204, "ABI offset drift: esengine::ecs::ParticleEmitter.blendMode (EHT expected 204)");+static_assert(offsetof(esengine::ecs::ParticleEmitter, layer) == 208, "ABI offset drift: esengine::ecs::ParticleEmitter.layer (EHT expected 208)");+static_assert(offsetof(esengine::ecs::ParticleEmitter, material) == 212, "ABI offset drift: esengine::ecs::ParticleEmitter.material (EHT expected 212)");+static_assert(offsetof(esengine::ecs::ParticleEmitter, simulationSpace) == 216, "ABI offset drift: esengine::ecs::ParticleEmitter.simulationSpace (EHT expected 216)");+static_assert(offsetof(esengine::ecs::ParticleEmitter, renderMode) == 220, "ABI offset drift: esengine::ecs::ParticleEmitter.renderMode (EHT expected 220)");+static_assert(offsetof(esengine::ecs::ParticleEmitter, velocityScale) == 224, "ABI offset drift: esengine::ecs::ParticleEmitter.velocityScale (EHT expected 224)");+static_assert(offsetof(esengine::ecs::ParticleEmitter, lengthScale) == 228, "ABI offset drift: esengine::ecs::ParticleEmitter.lengthScale (EHT expected 228)");+static_assert(offsetof(esengine::ecs::ParticleEmitter, enabled) == 232, "ABI offset drift: esengine::ecs::ParticleEmitter.enabled (EHT expected 232)");+static_assert(offsetof(esengine::ecs::ParticleEmitter, subEmitterTrigger) == 236, "ABI offset drift: esengine::ecs::ParticleEmitter.subEmitterTrigger (EHT expected 236)");+static_assert(offsetof(esengine::ecs::ParticleEmitter, subEmitterChance) == 240, "ABI offset drift: esengine::ecs::ParticleEmitter.subEmitterChance (EHT expected 240)");+static_assert(offsetof(esengine::ecs::ParticleEmitter, subEmitterInheritVelocity) == 244, "ABI offset drift: esengine::ecs::ParticleEmitter.subEmitterInheritVelocity (EHT expected 244)");+static_assert(offsetof(esengine::ecs::ParticleEmitter, subEmitter) == 248, "ABI offset drift: esengine::ecs::ParticleEmitter.subEmitter (EHT expected 248)");+static_assert(offsetof(esengine::ecs::ParticleEmitter, trailEnabled) == 252, "ABI offset drift: esengine::ecs::ParticleEmitter.trailEnabled (EHT expected 252)");+static_assert(offsetof(esengine::ecs::ParticleEmitter, trailWidth) == 256, "ABI offset drift: esengine::ecs::ParticleEmitter.trailWidth (EHT expected 256)");+static_assert(offsetof(esengine::ecs::ParticleEmitter, trailPoints) == 260, "ABI offset drift: esengine::ecs::ParticleEmitter.trailPoints (EHT expected 260)");+static_assert(offsetof(esengine::ecs::ParticleEmitter, trailMinDistance) == 264, "ABI offset drift: esengine::ecs::ParticleEmitter.trailMinDistance (EHT expected 264)");+static_assert(offsetof(esengine::ecs::ParticleEmitter, collisionEnabled) == 268, "ABI offset drift: esengine::ecs::ParticleEmitter.collisionEnabled (EHT expected 268)");+static_assert(offsetof(esengine::ecs::ParticleEmitter, collisionFloor) == 272, "ABI offset drift: esengine::ecs::ParticleEmitter.collisionFloor (EHT expected 272)");+static_assert(offsetof(esengine::ecs::ParticleEmitter, collisionMode) == 276, "ABI offset drift: esengine::ecs::ParticleEmitter.collisionMode (EHT expected 276)");+static_assert(offsetof(esengine::ecs::ParticleEmitter, collisionMask) == 280, "ABI offset drift: esengine::ecs::ParticleEmitter.collisionMask (EHT expected 280)");+static_assert(offsetof(esengine::ecs::ParticleEmitter, collisionQueryBudget) == 284, "ABI offset drift: esengine::ecs::ParticleEmitter.collisionQueryBudget (EHT expected 284)");+static_assert(offsetof(esengine::ecs::ParticleEmitter, collisionMaxDistance) == 288, "ABI offset drift: esengine::ecs::ParticleEmitter.collisionMaxDistance (EHT expected 288)");+static_assert(offsetof(esengine::ecs::ParticleEmitter, collisionFallback) == 292, "ABI offset drift: esengine::ecs::ParticleEmitter.collisionFallback (EHT expected 292)");+static_assert(offsetof(esengine::ecs::ParticleEmitter, collisionEvents) == 296, "ABI offset drift: esengine::ecs::ParticleEmitter.collisionEvents (EHT expected 296)");+static_assert(offsetof(esengine::ecs::ParticleEmitter, collisionEventBudget) == 300, "ABI offset drift: esengine::ecs::ParticleEmitter.collisionEventBudget (EHT expected 300)");+static_assert(offsetof(esengine::ecs::ParticleEmitter, collisionBounce) == 304, "ABI offset drift: esengine::ecs::ParticleEmitter.collisionBounce (EHT expected 304)");+static_assert(offsetof(esengine::ecs::ParticleEmitter, collisionFriction) == 308, "ABI offset drift: esengine::ecs::ParticleEmitter.collisionFriction (EHT expected 308)");+static_assert(offsetof(esengine::ecs::ParticleEmitter, collisionLifetimeLoss) == 312, "ABI offset drift: esengine::ecs::ParticleEmitter.collisionLifetimeLoss (EHT expected 312)");static_assert(offsetof(esengine::ecs::ParticleForceField, type) == 0, "ABI offset drift: esengine::ecs::ParticleForceField.type (EHT expected 0)");static_assert(offsetof(esengine::ecs::ParticleForceField, strength) == 4, "ABI offset drift: esengine::ecs::ParticleForceField.strength (EHT expected 4)");static_assert(offsetof(esengine::ecs::ParticleForceField, radius) == 8, "ABI offset drift: esengine::ecs::ParticleForceField.radius (EHT expected 8)");@@ -4265,7 +4270,7 @@ static_assert(offsetof(esengine::ecs::Velocity, angular) == 12, "ABI offset drif// ABI Hash -- runtime handshake against the SDK bundle// =============================================================================-static const char* kEsAbiLayoutHash = "7e1e50433c8b93cf";+static const char* kEsAbiLayoutHash = "e41570f14820a1a8";std::string esengineGetAbiLayoutHash() {return std::string(kEsAbiLayoutHash);diff --git a/src/esengine/ecs/components/ParticleEmitter.hpp b/src/esengine/ecs/components/ParticleEmitter.hppindex 12cda5edd..43b5799bf 100644--- a/src/esengine/ecs/components/ParticleEmitter.hpp+++ b/src/esengine/ecs/components/ParticleEmitter.hpp@@ -83,6 +83,9 @@ struct ParticleEmitter {ES_PROPERTY(min=0, category=Emission)f32 duration{5.0f};+ ES_PROPERTY(min=0, category=Emission, tooltip="Seconds after the emitter starts playing before it emits anything. The duration counts from the end of the delay.")+ f32 startDelay{0.0f};+ES_PROPERTY(category=Emission)bool looping{true};diff --git a/src/esengine/particle/ParticleSystem.cpp b/src/esengine/particle/ParticleSystem.cppindex a2969db26..6ff7ae95e 100644--- a/src/esengine/particle/ParticleSystem.cpp+++ b/src/esengine/particle/ParticleSystem.cpp@@ -152,8 +152,10 @@ void ParticleSystem::update(ecs::Registry& registry, f32 dt) {state.first_update = false;}+ // The delay is time the emitter plays without emitting; the duration is counted from its end.+ const f32 startDelay = std::max(emitter.startDelay, 0.0f);bool emitting = state.playing;- if (!emitter.looping && state.elapsed_time >= emitter.duration) {+ if (!emitter.looping && state.elapsed_time >= startDelay + emitter.duration) {emitting = false;}@@ -166,7 +168,8 @@ void ParticleSystem::update(ecs::Registry& registry, f32 dt) {if (emitting) {state.elapsed_time += dt;-+ }+ if (emitting && state.elapsed_time >= startDelay) {if (emitter.rate > 0.0f) {state.emission_accumulator += emitter.rate * dt;u32 toEmit = static_cast<u32>(state.emission_accumulator);diff --git a/tests/aot/generated/conformance/handshake.h b/tests/aot/generated/conformance/handshake.hindex e0ae9a30a..919d1e6fb 100644--- a/tests/aot/generated/conformance/handshake.h+++ b/tests/aot/generated/conformance/handshake.h@@ -1,5 +1,5 @@/* GENERATED by sdk/tests/aot-conformance.test.ts — do not edit. *//* The contract half of the handshake. The width half is the harness. */-#define ES_CONF_EXPECTED_CONTRACT_HASH 0x2ce1a65275f59b66ULL+#define ES_CONF_EXPECTED_CONTRACT_HASH 0xda66422d358dcce9ULL/* And which BUILD the artifact beside this one is. */#define ES_CONF_EXPECTED_MODULE_CONTRACT 0xc3d0e057d5701a2eULLdiff --git a/tests/aot/generated/conformance/systems_decl.c b/tests/aot/generated/conformance/systems_decl.cindex 854a05ad7..35fef1c8d 100644--- a/tests/aot/generated/conformance/systems_decl.c+++ b/tests/aot/generated/conformance/systems_decl.c@@ -10,7 +10,7 @@answer, it is a read of a different field. The address width belongsto the MACHINE, so it mixes in here rather than in the compiler and a32-bit artifact cannot load into a 64-bit host. */-#define ES_ABI_ENGINE_DIGEST 0x2ce1a65275f59b66ULL+#define ES_ABI_ENGINE_DIGEST 0xda66422d358dcce9ULLES_EXPORT const uint64_t es_abi_hash =ES_ABI_ENGINE_DIGEST ^ (0x9e3779b97f4a7c15ULL * (uint64_t)sizeof(es_addr_t));diff --git a/tests/aot/generated/move_system_decl.c b/tests/aot/generated/move_system_decl.cindex 2cf842a08..f1ef6fd11 100644--- a/tests/aot/generated/move_system_decl.c+++ b/tests/aot/generated/move_system_decl.c@@ -10,7 +10,7 @@answer, it is a read of a different field. The address width belongsto the MACHINE, so it mixes in here rather than in the compiler and a32-bit artifact cannot load into a 64-bit host. */-#define ES_ABI_ENGINE_DIGEST 0x2ce1a65275f59b66ULL+#define ES_ABI_ENGINE_DIGEST 0xda66422d358dcce9ULLES_EXPORT const uint64_t es_abi_hash =ES_ABI_ENGINE_DIGEST ^ (0x9e3779b97f4a7c15ULL * (uint64_t)sizeof(es_addr_t));diff --git a/tests/aot/generated/move_system_hash.h b/tests/aot/generated/move_system_hash.hindex 7b71a1bbb..ae35ea9cc 100644--- a/tests/aot/generated/move_system_hash.h+++ b/tests/aot/generated/move_system_hash.h@@ -1,6 +1,6 @@/* GENERATED by @estella/compiler — do not edit. *//* The contract half of the handshake. The width half is the harness. */-#define ES_EXPECTED_CONTRACT_HASH 0x2ce1a65275f59b66ULL+#define ES_EXPECTED_CONTRACT_HASH 0xda66422d358dcce9ULL/* And which BUILD the artifact beside this one is, which the sidecarwritten with it has to carry too. */#define ES_EXPECTED_MODULE_CONTRACT 0x10bf77bb714ea1e3ULLdiff --git a/tests/particle/test_particle.cpp b/tests/particle/test_particle.cppindex 3784ac49a..2e67fe7ec 100644--- a/tests/particle/test_particle.cpp+++ b/tests/particle/test_particle.cpp@@ -268,6 +268,55 @@ TEST_CASE("system_non_looping_stops_after_duration") {CHECK_EQ(system.totalAliveParticles(), 0u);}+TEST_CASE("system_start_delay_holds_emission_back_then_runs_the_duration_from_its_end") {+ ecs::Registry registry;+ ParticleSystem system;++ Entity e = registry.create();+ registry.emplace<ecs::Transform>(e);+ auto& emitter = registry.emplace<ecs::ParticleEmitter>(e);+ emitter.rate = 100.0f;+ emitter.lifetimeMin = 5.0f;+ emitter.lifetimeMax = 5.0f;+ emitter.maxParticles = 1000;+ emitter.startDelay = 0.5f;+ emitter.duration = 0.1f;+ emitter.looping = false;+ emitter.enabled = true;+ emitter.playOnStart = true;++ system.update(registry, 0.2f);+ system.update(registry, 0.2f);+ CHECK_EQ(system.totalAliveParticles(), 0u); // 0.4 s in: still inside the delay++ system.update(registry, 0.2f); // crosses 0.5 s: emission begins+ CHECK(system.totalAliveParticles() > 0u);+ const u32 started = system.totalAliveParticles();++ system.update(registry, 0.5f); // 0.6 s of play: the 0.1 s duration, counted from 0.5, has run out+ system.update(registry, 0.5f);+ CHECK_EQ(system.totalAliveParticles(), started); // a stopped emitter adds nothing more+}++TEST_CASE("system_no_start_delay_emits_on_the_first_update_as_before") {+ ecs::Registry registry;+ ParticleSystem system;++ Entity e = registry.create();+ registry.emplace<ecs::Transform>(e);+ auto& emitter = registry.emplace<ecs::ParticleEmitter>(e);+ emitter.rate = 0.0f;+ emitter.burstCount = 7;+ emitter.lifetimeMin = 5.0f;+ emitter.lifetimeMax = 5.0f;+ emitter.maxParticles = 100;+ emitter.enabled = true;+ emitter.playOnStart = true;++ system.update(registry, 0.016f);+ CHECK_EQ(system.totalAliveParticles(), 7u);+}+TEST_CASE("system_disabled_emitter_no_spawn") {ecs::Registry registry;ParticleSystem system;diff --git a/tools/releaseNotes.mjs b/tools/releaseNotes.mjsindex 7edf68d50..0f48900b0 100644--- a/tools/releaseNotes.mjs+++ b/tools/releaseNotes.mjs@@ -28,6 +28,8 @@ export const NOTES_FLOOR = 'v0.65.0';* the reader recognises anyway.*/export const NOTED = {+ 'feat(particle): an emitter can wait startDelay seconds before it emits, with the duration counted from the end of the delay, and the Cocos start delay maps onto it':+ {"note":"An emitter can start late."},'feat(particle): a stretched render mode lays a particle along its velocity and lengthens it with speed, and the Cocos stretched billboard maps onto it':{"note":"Particles can be stretched along their velocity."},'feat(cocos): a particle system colour gradient and size curve become the emitter colorGradient and sizeCurve instead of their two ends':