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
test(gates): ContentRect and GroupOpacity have dispositions, and the 2D light-cap scene fills the eight channels the mask has now
yhhd001bf9a0067
diff --git a/fixtures/scenes/shadow2d-light-cap.esscene b/fixtures/scenes/shadow2d-light-cap.essceneindex fd501b23b..326411307 100644--- a/fixtures/scenes/shadow2d-light-cap.esscene+++ b/fixtures/scenes/shadow2d-light-cap.esscene@@ -348,6 +348,176 @@},{"id": 11,+ "name": "Light0-a",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -60,+ "y": 0,+ "z": 0+ }+ }+ },+ {+ "type": "Light",+ "data": {+ "type": 0,+ "color": {+ "r": 0,+ "g": 1,+ "b": 0,+ "a": 1+ },+ "intensity": 1,+ "radius": 150,+ "shadowSoftness": 0+ }+ }+ ]+ },+ {+ "id": 12,+ "name": "Light0-b",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -60,+ "y": 0,+ "z": 0+ }+ }+ },+ {+ "type": "Light",+ "data": {+ "type": 0,+ "color": {+ "r": 0,+ "g": 1,+ "b": 0,+ "a": 1+ },+ "intensity": 1,+ "radius": 150,+ "shadowSoftness": 0+ }+ }+ ]+ },+ {+ "id": 13,+ "name": "Light0-c",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -60,+ "y": 0,+ "z": 0+ }+ }+ },+ {+ "type": "Light",+ "data": {+ "type": 0,+ "color": {+ "r": 0,+ "g": 1,+ "b": 0,+ "a": 1+ },+ "intensity": 1,+ "radius": 150,+ "shadowSoftness": 0+ }+ }+ ]+ },+ {+ "id": 14,+ "name": "Light0-d",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -60,+ "y": 0,+ "z": 0+ }+ }+ },+ {+ "type": "Light",+ "data": {+ "type": 0,+ "color": {+ "r": 0,+ "g": 1,+ "b": 0,+ "a": 1+ },+ "intensity": 1,+ "radius": 150,+ "shadowSoftness": 0+ }+ }+ ]+ },+ {+ "id": 15,+ "name": "Light0-e",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -60,+ "y": 0,+ "z": 0+ }+ }+ },+ {+ "type": "Light",+ "data": {+ "type": 0,+ "color": {+ "r": 0,+ "g": 1,+ "b": 0,+ "a": 1+ },+ "intensity": 1,+ "radius": 150,+ "shadowSoftness": 0+ }+ }+ ]+ },+ {+ "id": 16,"name": "Light0","parent": null,"children": [],diff --git a/tools/check-corpus-authoring.mjs b/tools/check-corpus-authoring.mjsindex 674e4dd8c..11e79ba2b 100644--- a/tools/check-corpus-authoring.mjs+++ b/tools/check-corpus-authoring.mjs@@ -130,6 +130,8 @@ const DISPOSITION = {// — code-only: an example demonstrates it from TypeScript, honestly —SpringBone: ['owed', 'no example carries a rigged character with hair or a tail yet; the first one imported with its chains goes into one'],+ ContentRect: ['owed', 'the Cocos importer writes it on every node it converts, and no example is an imported Cocos scene yet; the first one that is carries it'],+ GroupOpacity: ['owed', 'the Cocos importer writes it for a UIOpacity; it arrives in the corpus with the first imported Cocos scene'],SpringBoneCollider: ['owed', 'no example has a spring-bone chain to keep out of anything; it arrives with the first SpringBone'],Replicated: ['code-only', 'multiplayer-arena declares its replicated set beside the server systems that own it; the wire table is a contract both ends compile against, not scene content'],diff --git a/tools/check-gizmo-coverage.mjs b/tools/check-gizmo-coverage.mjsindex 20aa23477..19cb42304 100644--- a/tools/check-gizmo-coverage.mjs+++ b/tools/check-gizmo-coverage.mjs@@ -162,6 +162,7 @@ const DISPOSITION = {'WaterBody.waveHeight': ['no-place', 'the height of the tallest wave, not a region of the entity'],'WaterBody.bedDepth': ['renders', 'a river\'s bed is cut into the terrain, which draws it'],'SpringBone.radius': ['no-place', 'the thickness of the strand, kept clear of the colliders; a margin on each bone, not a region of the root'],+ 'ContentRect.size': ['owed', 'a sprite or text on the entity follows it and is the outline, but a bare rect (a clip box, a hit area) draws nothing yet'],'Sprite.size': ['renders', 'the sprite drawn at it is the outline'],'Sprite.tileSize': ['renders', 'the repeat of a drawn sprite'],'ShapeRenderer.size': ['renders', 'the shape drawn at it is the outline'],diff --git a/tools/renderScenes.mjs b/tools/renderScenes.mjsindex a69df30b2..1ccd4b950 100644--- a/tools/renderScenes.mjs+++ b/tools/renderScenes.mjs@@ -851,9 +851,10 @@ export const SCENES = [// have held: the counters are the capacity, the criteria above are the correctness.// 0.64ms of a frame here against 0.057ms with the casters off.{ id: "shadow2d-load", tier: "pr", webgpu: true, env: { ESTELLA_VERIFY_PLAY: "1", ESTELLA_VERIFY_SCENE: "/scenes/shadow2d-load.esscene", ESTELLA_VERIFY_MANIFEST: "/scenes/shadow2d-load.textures.json", ESTELLA_VERIFY_W: "1280", ESTELLA_VERIFY_H: "720", ESTELLA_VERIFY_STEPS: "6", ESTELLA_VERIFY_COUNTERS: "{\"render.shadow2d.occluders\":100,\"render.shadow2d.lights\":4}" } },- // Five lights that want to cast and a mask with four channels: the fifth goes- // without, which is a lit floor rather than a dark one. The scene is asymmetric on- // purpose — a symmetric one cannot see a mask sampled upside down.+ // A mask with eight channels, all held by lights Light0 meets (the outer four share+ // three, the five beside it take the rest): Light0 goes without, which is a lit floor+ // rather than a dark one. The scene is asymmetric on purpose — a symmetric one cannot+ // see a mask sampled upside down.{ id: "shadow2d-light-cap", tier: "pr", webgpu: true, env: { ESTELLA_VERIFY_PLAY: "1", ESTELLA_VERIFY_SCENE: "/scenes/shadow2d-light-cap.esscene", ESTELLA_VERIFY_MANIFEST: "/scenes/shadow2d-light-cap.textures.json", ESTELLA_VERIFY_W: "200", ESTELLA_VERIFY_H: "1000", ESTELLA_VERIFY_STEPS: "4", ESTELLA_VERIFY_EXPECT: "[{\"x\":0.70,\"y\":0.1,\"rgb\":[0,0,0],\"tol\":40},{\"x\":0.70,\"y\":0.3,\"rgb\":[0,0,0],\"tol\":40},{\"x\":0.70,\"y\":0.7,\"rgb\":[0,0,0],\"tol\":40},{\"x\":0.70,\"y\":0.9,\"rgb\":[0,0,0],\"tol\":40},{\"x\":0.70,\"y\":0.5,\"rgb\":[0,120,0],\"tol\":70}]" } },// Two cameras with half the frame each: what a camera draws is bounded by the rect// it asked for, and one covering the other is what taking that rect off the device