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
chore(gates): the settings, gizmo, mutator and decision checks follow the Spine rows and the hearing ring, and the release notes cover what landed
yhh3de4f63b7873
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 81cfd22e0..1cb29eaad 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -24,6 +24,7 @@ published separately; it ships inside the editor.- **A material reads its maps through Tiling, Offset and Rotation.** The Model shader's `u_uvTiling`, `u_uvOffset` and `u_uvRotation` move where every map is read (colour, normal, occlusion, metal-roughness, emission), as Unity's Tiling and Offset do; Ground Blend takes them too. A glTF's `KHR_texture_transform` is imported into them, turned into the engine's V-up uv, where before it was dropped with a warning and a tiled texture set was stretched once over each mesh: a three.js port of a container port lost 224 of them. Maps of one material that disagree are all read through the first map's, and the import says so. A cut-out's shadow and depth prepass read through the same transform, so a tiled fence casts the shadow of the fence drawn.- **The sky lights the scene.** Sky Atmosphere's **Light the Scene** makes the sky the scene's environment: every Ambient light that names no environment of its own lights with it, its diffuse light from the dome and the clouds and its reflection on metal and wet ground, scaled by the light's colour and intensity as an imported one is. The sky is worked out again as it changes (the sun moving, a weather coming in, clouds drifting), at most once a second; with clouds that takes about 20 ms on a desktop. The sun's disc is left out, since the directional light the sky follows is its direct light. Below the horizon it is the ground, lit by the sky's sun and dome and giving back **Ground Albedo** of it (0.2 by default, between asphalt and grass; Unreal's atmosphere uses 0.4), so a wall in shadow takes the sunlit ground's bounce as well as the sky's: under a high clear sun that doubles its fill, under a low hazy one it adds little. Off by default, so a scene already lit by hand looks as it did.+- **The sky's lower half is the sunlit ground.** When Sky Atmosphere lights the scene, the panorama below the horizon is the ground lit by the sky's own sun and by the dome above, giving back **Ground Albedo** of it (0.2) and fading into the horizon colour; it was the horizon's haze at a quarter, a ground that took no sun. A wall in shadow takes the sunlit ground's bounce. Lighting only: the sky drawn below the horizon is unchanged.- **Rooms stay dark under a sky that changes (sky occlusion).** With **Sky occlusion** on in the Lighting settings (`BakedLighting.skyOcclusion`), a probe bake keeps how much of the sky each probe sees instead of the sky itself: the probes hold the lights and their bounces, and the sky the frame has now (a live Sky Atmosphere, a weather, an environment) is added through what each probe sees of it, to the diffuse light and to the sky's reflection. A ball inside a roofed room measured 119 where the baked sky gave it 150, and a ball outside kept its light. A `.esprobes` baked this way carries `skyVisibility`; one without it lights as before. Probes are read per object, as Unity's light probes are: one large mesh spanning indoors and out takes one value.- **Color Grade has split toning, an S-curve and lift.** **Shadow Tint** and **Highlight Tint** multiply the dark and the bright tones (blended by luma between **Tone Low** and **Tone High**), **S-Curve** blends in a smoothstep about the picture's range and **Lift** adds a tinted black level, all on the picture as the display shows it (put the grade after Tonemap). Defaults are white, white, 0 and black, so no existing grade changes. A reference game's neutral-grey shed turned out to be a scene as orange as ours, graded teal in the shadows and lifted toward teal in the blacks; color-grade-split checks the three tones on both backends.- **A captured probe volume drives reflections too.** What a shiny surface inside a capturing `LightProbeVolume` reflects is the capture, box-projected, rather than the outdoor sky: the SDK prefilters each capture into a column of one reflection atlas beside the sky and the frame uses it wherever no baked `ReflectionProbe` is. A mesh now picks its reflection box by its world bounds (its centre, else the smallest box it overlaps), as probes do, so an imported level's walls whose origin sits outside the room still reflect it. A capture face now counts as done only once it is drawn. probe-capture-reflection checks a chrome ball shows the green wall on its right and the magenta one on its left, on both backends.@@ -33,6 +34,8 @@ published separately; it ships inside the editor.- **Direct Lighting Only and Indirect Lighting Only view modes.** Beside Clay in the viewport's Show menu (and `Renderer.setViewShading(view, 'directLighting' | 'indirectLighting')`), as Unreal's lighting components: clay lit by the lights alone, or by everything that is not a light (ambient, sky, reflections, probes, bakes). The two add up to Clay, so a dark shadow says at once whether its fill is missing or merely weak.- **A post-process pass can read an earlier pass of its own effect.** A texture param named `u_pass_<name>` is bound to the output of the sub-pass called `<name>`, which the chain keeps alive until it has been read, so an effect can be a pyramid (down, then up, adding each level back) and not only a line of passes.- **A probe volume lights each pixel, not each object.** A lit mesh inside a `LightProbeVolume` reads the baked grid where each of its pixels stands, so one large mesh that spans a dark room and the open yard outside it (a merged building, an imported level) is dark inside and lit outside, as in Unity's Adaptive Probe Volumes; before, it took the one value at its origin and was lit the same end to end. The grids ride one half-float atlas the frame builds when a bake changes. A mesh with lightmap UVs that has no bake still reads its volume per object, as before.+- **Instances in the open scene take a changed prefab at once.** A prefab saved, applied, re-baked or rewritten on disk re-derives every instance of it in the open scene, keeping overrides and entity ids.+- **A 2D rig's bones keep an id, take a new parent and rebind onto another skeleton.** A bone carries an id, so removing or reordering a bone no longer moves what a scene added to it onto another; `setRigBoneParent` hangs a bone off another where it stands, `rebindRigToSkeleton` binds a rig to another rig's bones by name, and the editor rewrites a clip's paths to follow.- **Defaults follow the project's units.** Every default that is a length, a speed or an acceleration — a character's capsule, a first-person walk and jump, a view model's near plane, a nav volume's cells, a perceiver's range, a particle's size and speed — is written at 100 units a metre and scaled by the project's units per metre (Project Settings → Physics → 3D). A centimetre project gets exactly the defaults it had; a metre project (an imported glTF scene) now gets metres instead of values 100 times too big. A value a scene states is never scaled. A component declares its own with `worldUnitFields`. Post-process effects follow too: a length a volume leaves unset (rain and snow shelter range and puddle size, SSR distance and thickness, GTAO / SSAO / SSGI radius, contact-shadow length, depth-of-field focus, voxel GI cell, height-fog start and range) takes its default in the project's units, and fog density and height falloff — rates per length — by the inverse; the inspector offers ranges in those units and writes an added effect's defaults in them. A metre project's rain used to shelter within 3 km.- **`Particle.emitAt(emitter, count, position, { normal, velocity })` spawns a burst where something happened, now** — an impact's sparks, a muzzle's flash — from the emitter's own settings, its shape turned onto the normal, without moving the emitter or replaying it (Unity's `ParticleSystem.Emit`). CPU-simulated emitters.- **A first-person player has its own jump feel.** `FirstPersonController.gravityScale` (the player's gravity as a share of the world's), `coyoteTime` (a jump just after walking off an edge still takes off) and `jumpBuffer` (a jump pressed just before landing takes off as it lands).@@ -51,6 +54,7 @@ published separately; it ships inside the editor.- **A bake falls light off as the frame does.** The lightmap and probe bake (TypeScript and the C++ kernel alike) took every point and spot light as (1 - d/r)²; the frame lights them linearly by default, with Inner Radius and Falloff, so a baked room disagreed with its own lamps. Both now use the frame's falloff, inverse-square included. Bakes made before read as out of date.- **A mesh is lit by the probe volume it draws in, not the one its origin is in.** An imported level's meshes keep the origin the file gave them, often the world's centre, so a shed's walls were in no volume and took the open sky's light indoors. The volume is now chosen by the mesh's world box (its centre, else the smallest volume it overlaps), and per pixel each pixel reads the grid where it stands.- **Rain does not fall through a glass roof.** The rain's map of what stands overhead took only what casts a shadow, so a see-through roof set to cast none — glass, as it usually is — left the floor under it wet. A see-through surface keeps rain off whether or not light passes it; what is opaque and casts no shadow (a held gun) still stays out. Gate: ssr-shelter-glass.+- **The prefab bar and the Details header fit a narrow panel.** The prefab bar is two rows, icons only below 300px, and the header's facts and Add Component no longer overlap.- **A character controller or a 3D collider added with its defaults is a real size.** Their defaults were metres (a 0.3 radius, a 0.5 box) under a world that reads centimetres unless told otherwise: a 3 mm character, a 5 mm crate. They are a 1.6 m person and a 1 m box now, in whatever units the project uses. Every example and template stated its sizes, so none changes.- **A model's import no longer calls it tiny in a metre project.** The note read every model as if a world unit were a design pixel; it now measures the model in metres by the project's units per metre and suggests that as the Scale.- **Navigation bakes an imported level.** The bake took only bodies with a static RigidBody3D, so a level of mesh colliders (static by themselves) baked to no ground; and it placed every collider at its LOCAL pose and unscaled, so one under a parent landed elsewhere. It now takes what the solver builds, where the solver builds it.diff --git a/desktop b/desktopindex d5ff12ae0..aefb69f5f 160000--- a/desktop+++ b/desktop@@ -1 +1 @@-Subproject commit d5ff12ae041b3594ba363385ed61cca77d4490e8+Subproject commit aefb69f5fbf6ea82ecb204548e2817c1966d68f8diff --git a/tools/check-gizmo-coverage.mjs b/tools/check-gizmo-coverage.mjsindex 147f308c3..3e6793cef 100644--- a/tools/check-gizmo-coverage.mjs+++ b/tools/check-gizmo-coverage.mjs@@ -71,6 +71,7 @@ const DISPOSITION = {'GripSurface.size': 'extent','Hunter.attackRange': 'extent','Perceiver.range': 'extent',+ 'Perceiver.hearingRange': 'extent','ThirdPersonCamera.distance': 'extent','ThirdPersonCamera.obstructionRadius': 'extent','BoxCollider2D.radius': 'extent',diff --git a/tools/check-mutator-parity.mjs b/tools/check-mutator-parity.mjsindex 390d7779d..3e5d1223b 100644--- a/tools/check-mutator-parity.mjs+++ b/tools/check-mutator-parity.mjs@@ -49,7 +49,9 @@ const REACHED_VIA = {* adding one is a visible diff — which is the only ratchet a discovered list can* have without becoming a place to put the next one.*/-const OWED = {};+const OWED = {+ setSpineVersion: 'the per-runtime Spine rows replaced the version row, and nothing reads the recorded preference, so no person has a door to it',+};if (!existsSync(EDITOR)) {console.log('check-mutator-parity: no editor checkout — no mutator was judged.');diff --git a/tools/check-project-settings.mjs b/tools/check-project-settings.mjsindex d59636d8f..4029b5b39 100644--- a/tools/check-project-settings.mjs+++ b/tools/check-project-settings.mjs@@ -185,10 +185,8 @@ if (fields.length === 0) {// The consumers, each as "does this text carry the field". Deliberately textual:// the alternative is importing the editor's module graph into a lint script.-const editorApply = storeSrc.slice(- storeSrc.indexOf('private applyEditorRuntimeConfig'),- storeSrc.indexOf('private applyEditorRuntimeConfig') + 1200,-);+const editorApplyAt = storeSrc.indexOf('private applyEditorRuntimeConfig');+const editorApply = storeSrc.slice(editorApplyAt, storeSrc.indexOf('\n }\n', editorApplyAt));const playPayload = storeSrc.slice(storeSrc.indexOf('playPayload()'),storeSrc.indexOf('audioFeature()'),@@ -323,7 +321,7 @@ const BLOCKS = [name: 'RuntimeBuildConfig', file: 'sdk/src/defaults.ts',keys: Object.fromEntries(['sceneTransitionDuration', 'sceneTransitionColor', 'defaultFontFamily', 'maxDeltaTime', 'maxFixedSteps', 'textCanvasSize',- 'assetLoadTimeout', 'assetFailureCooldown', 'textureCacheBudget', 'audioCacheBudget', 'retainedBudget',+ 'assetLoadTimeout', 'assetFailureCooldown', 'textureCacheBudget', 'audioCacheBudget', 'retainedBudget', 'multiTouch',].map((k) => [k, { ui: `project.runtime.${k}` }])),},];@@ -375,12 +373,7 @@ const CONSUMPTION = {spineVersion: {kind: 'metadata-only',why: 'the runtimes a package carries are detected from its own skeletons '- + '(sideModuleScan → detectSpineVersion); nothing reads this field',- /** Everything a creator is told about it: none of it may promise an effect. */- saidBy: ['set.project.spine.version.desc', 'set.project.spine.none'],- /** …and one of them must SAY it has none. Absence of a lie is not a truth: the- * row looks like every other one, so silence still reads as "this works". */- disclaimedBy: 'set.project.spine.version.desc',+ + '(sideModuleScan → detectSpineVersion) and decided per runtime by the Spine rows; nothing reads this field',/*** The readers that are not the settings UI. An agent tool's* description promised "the build bundles that runtime", which matches no@@ -399,7 +392,7 @@ const messages = existsSync(path.join(ROOT, MESSAGES)) ? read(MESSAGES) : '';/** Every tracked line naming `needle` under `dirs`, as `<path>:<line>`. */function grep(needle, dirs) {try {- return execFileSync('git', ['grep', '-n', '--', needle, ...dirs],+ return execFileSync('git', ['grep', '-nw', '--', needle, ...dirs],{ cwd: ROOT, encoding: 'utf8' }).split('\n').filter(Boolean).filter((l) => !l.includes('.generated.'));} catch {diff --git a/tools/lib/runtimeDecisions.mjs b/tools/lib/runtimeDecisions.mjsindex 65ea8552d..e52e155c3 100644--- a/tools/lib/runtimeDecisions.mjs+++ b/tools/lib/runtimeDecisions.mjs@@ -126,7 +126,10 @@ export const DECISIONS = [owed: 'nothing in sdk/src or pipeline/src reads it; sideModuleScan detects '+ 'each skeleton\'s version instead. Wiring it up is a feature, not a gap to close here',},- editor: { has: true, cite: { path: 'desktop/src/settings/projectSettings.ts', probe: /'project\.spine\.version'/ } },+ editor: {+ has: false,+ owed: 'the per-runtime Spine rows (Auto, Include, Exclude) replaced the version row; no row records a preference now',+ },agent: { has: true, cite: { path: 'desktop/src/main.tsx', probe: /spineVersion: \(v\) => ProjectStore\.setSpineVersion/ } },},{diff --git a/tools/releaseNotes.mjs b/tools/releaseNotes.mjsindex fa679eddc..00ffbddd2 100644--- a/tools/releaseNotes.mjs+++ b/tools/releaseNotes.mjs@@ -4306,4 +4306,82 @@ export const NOTED = {{"note": "The profiler no longer calls a long render stall vsync."},"fix(profiler): the long tasks under a pinned frame name the scope that timed them":{"note": "The profiler no longer calls a long render stall vsync."},+ "fix(gates): the world anchor system declares what it touches, the sky effect door and the 3D physics declarations have their dispositions, and the generated tables, baked scene and long shader literal follow":+ {"internal": "a build-check and generated-file fix; nothing a creator can observe"},+ "fix(ci): the shading-mode count test names the last mode, the fetch names the full commit, and the pipeline tests get the Spine runtimes they read":+ {"internal": "a build-check and generated-file fix; nothing a creator can observe"},+ "fix(ci): refresh the API snapshots, count the probe grid sampler, and fetch the commit the grip checks read":+ {"internal": "a build-check and generated-file fix; nothing a creator can observe"},+ "feat(post): Color Grade has split toning, an S-curve and lift":+ {"note": "Color Grade has split toning, an S-curve and lift."},+ "feat(probes): a captured probe volume drives reflections too":+ {"note": "A captured probe volume drives reflections too."},+ "feat(probes): a probe volume can be filled at run time":+ {"note": "A probe volume can be filled at run time."},+ "feat(light): inverse-square falloff; a bake falls light off as the frame does":+ {"note": "Lamps can fall off as real ones do."},+ "feat(sky): a project's own sky lights the scene; probes chosen by a mesh's box":+ {"note": "A sky of your own lights the scene."},+ "feat(sky): the sky's lower half is the sunlit ground":+ {"note": "The sky's lower half is the sunlit ground."},+ "feat(render): Direct and Indirect Lighting Only view modes":+ {"note": "Direct Lighting Only and Indirect Lighting Only view modes."},+ "feat(postprocess): pyramid bloom; a pass reads earlier passes of its effect":+ {"note": "Bloom glows round and soft, and costs less."},+ "feat(render): probe volumes light each pixel":+ {"note": "A probe volume lights each pixel, not each object."},+ "fix(render): a glass roof keeps rain off":+ {"note": "Rain does not fall through a glass roof."},+ "feat(postprocess): effect lengths follow the project's units":+ {"note": "Defaults follow the project's units."},+ "feat: defaults follow the project's units; Particle.emitAt; first-person jump feel":+ {"note": "Defaults follow the project's units."},+ "feat(ui): UIWorldAnchor \u2014 a UI node over a point in the 3D world":+ {"note": "A UI node can stand over a point in the 3D world."},+ "feat(ai): hearing, world-pose perception, nav bakes implicit statics; rays can meet characters":+ {"note": "Perceivers hear."},+ "fix(render): an overlay camera composites over the camera beneath":+ {"note": "Post-process volumes skip a camera that draws over another one."},+ "feat(physics3d): a collider with no RigidBody3D is a static body":+ {"note": "A 3D collider with no RigidBody3D is a static body, as in Unity."},+ "feat(physics3d): the 3D world is made from project settings, not constants":+ {"note": "The 3D physics world is set in Project Settings, not in code."},+ "feat(render): sky occlusion \u2014 rooms stay dark under a sky that changes":+ {"note": "Rooms stay dark under a sky that changes (sky occlusion)."},+ "feat(prefab): instances in the open scene take a changed prefab at once":+ {"note": "Instances in the open scene take a changed prefab at once."},+ "fix(editor): the prefab bar and the Details header fit a narrow panel":+ {"note": "The prefab bar and the Details header fit a narrow panel."},+ "feat(rig2d): bones keep an id, take a new parent, and rebind onto another skeleton by name":+ {"note": "A 2D rig's bones keep an id, take a new parent and rebind onto another skeleton."},+ "feat(render): the sky lights the scene \u2014 Sky Atmosphere as the environment":+ {"note": "The sky lights the scene."},+ "fix(render): what a three.js container port showed \u2014 tiled maps, the sky through walls, wet floors indoors":+ {"note": "A material reads its maps through Tiling, Offset and Rotation."},+ "fix(postprocess): a colour written among a volume's uniforms is read as a colour, not blended into NaN":+ {"note": "A colour written among a post-process volume's uniforms is read as a colour."},+ "feat(viewport): Direct and Indirect Lighting Only view modes":+ {"note": "Direct Lighting Only and Indirect Lighting Only view modes."},+ "feat(editor): post-process inspector in the project's units":+ {"note": "Defaults follow the project's units."},+ "feat(editor): defaults follow the project's 3D units; import note reads them":+ {"note": "Defaults follow the project's units."},+ "fix(mcp): start the editor again after it goes away":+ {"note": "The editor's MCP server starts its editor again after the editor goes away."},+ "feat(settings): the 3D physics world is set in Project Settings":+ {"note": "The 3D physics world is set in Project Settings, not in code."},+ "feat(lighting): a Sky occlusion switch in the bake settings":+ {"note": "Rooms stay dark under a sky that changes (sky occlusion)."},+ "feat(prefab): a changed prefab reaches the open scene's instances at once":+ {"note": "Instances in the open scene take a changed prefab at once."},+ "fix(editor): the prefab bar and the Details header fit a narrow panel":+ {"note": "The prefab bar and the Details header fit a narrow panel."},+ "feat(rig): rebind a 2D rig after it is bound \u2014 new parents, another rig's skeleton, clips that follow, skins rebound in the scene":+ {"note": "A 2D rig's bones keep an id, take a new parent and rebind onto another skeleton."},+ "feat(editor): a finger joint is dragged in the viewport, a clip plays under the grip, and the fingers' surfaces are listed and made":+ {"note": "A grip is edited where it is held."},+ "feat(settings): Project Settings \u2192 Runtime \u2192 Multi-touch sets whether a game starts with several fingers or one":+ {"note": "Multi-touch can be turned off."},+ "feat(viewport): a perceiver's hearing range is drawn beside its sight, and the sky occlusion hint uses the editor's own tip":+ {"note": "Perceivers hear."},};