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: the SDK test corpus type-checks again
yhh746d6544ee81
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 772ad2fd0..84edd17e1 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -16,6 +16,9 @@ published separately; it ships inside the editor.### Added+- **A project can keep folders out of its asset database.** `assetExclude` in the project manifest names folders (a source-art repository, docs, a server) the asset scan does not index, does not write a `.meta` into and the editor does not watch.+- **Small plants need not cast a shadow.** A plant part takes `castShadows: false`, so ground cover too small to be worth a shadow-map draw is left out of the shadow pass.+- **A project plugin that needs trust says so.** Opening a project whose editor plugin has not been trusted shows a notice with a way to review it, instead of leaving its missing pieces (a ground that is not drawn) unexplained.- **A game's generated ground shows in the editor.** An editor plugin may now import the engine subpaths the editor is built on (`esengine/terrain`, `esengine/worldgen`, `esengine/water`, `esengine/spline`, `esengine/tilemap`, `esengine/replication`), as the editor's own instances, so a project plugin can register the terrain provider its game registers and the viewport draws the ground the game will. New projects' `.gitignore` leaves `.esengine/plugins/` and `.esengine/platforms/` versioned, as the plugin page always said, and ignores the typings and the session.- **A lookup table is adopted as data.** A PNG shaped like a colour lookup table (N slices of N by N: 1024 by 32, 256 by 16, 4096 by 64) is given no compression, no mips, no sRGB decode and clamped edges when it is added to a project, where it used to take the picture defaults and answer wrongly until someone found why.- **An Outdoor Environment to create.** **Create → Rendering → Outdoor Environment** makes a sun, a sky light, a clock, a weather and a global volume with the sky (clouds that cast shadows), the haze (beams in their gaps) and a plain grade, already pointing at one another. It is the arrangement the Terrain & Water example uses, for the engine's scale of a hundred units to the metre.diff --git a/sdk/tests/terrain-quadtree.test.ts b/sdk/tests/terrain-quadtree.test.tsindex 4cabaec73..b0376514e 100644--- a/sdk/tests/terrain-quadtree.test.ts+++ b/sdk/tests/terrain-quadtree.test.ts@@ -47,7 +47,7 @@ describe('ground without end', () => {rockSlope: 0.35, dirtHeight: 0.62, snowHeight: 0.88 });it('is the same ground for the same seed anywhere, as far out as it is asked', () => {- const a = ground.height(123456.5, -98765.25), b = new NoiseSource({ ...(ground as unknown as { p: never }).p }).height(123456.5, -98765.25);+ const a = ground.height(123456.5, -98765.25), b = new NoiseSource({ ...(ground as unknown as { p: object }).p } as ConstructorParameters<typeof NoiseSource>[0]).height(123456.5, -98765.25);expect(a).toBe(b);expect(a).toBeGreaterThanOrEqual(0);expect(a).toBeLessThanOrEqual(200);@@ -67,8 +67,8 @@ describe('the pages', () => {const ground = new NoiseSource({ seed: 2, frequency: 2, octaves: 4, persistence: 0.5, ridged: 0, warp: 0, erosion: 0, sizeX: 500, height: 100,rockSlope: 0.35, dirtHeight: 0.62, snowHeight: 0.88 });- it('hold a node\'s heights to a 65535th of the ground\'s range, with a border, and its box', () => {- const page = makePage(ground, 64, -32, 32);+ it('hold a node\'s heights to a 65535th of the ground\'s range, with a border, and its box', async () => {+ const page = await makePage(ground, 64, -32, 32);const n = PAGE_SIDE;// The first sample past the border is the node's corner.const k = (1 * n + 1) * 4;diff --git a/sdk/tests/water-floating.test.ts b/sdk/tests/water-floating.test.tsindex 5eff34807..aae7911c5 100644--- a/sdk/tests/water-floating.test.ts+++ b/sdk/tests/water-floating.test.ts@@ -8,7 +8,7 @@ const gravity: [number, number, number] = [0, -9.81, 0];const floating = (extra: Partial<FloatingData> = {}): FloatingData => ({ buoyancy: 1, drag: 0, radius: 50, points: [], wake: 1, ...extra });const body = (extra: Partial<FloatingBody> = {}): FloatingBody => ({ position: [0, 0, 0], velocity: [0, 0, 0], angularVelocity: [0, 0, 0], mass: 100, ...extra });const water = (depth: number, flow: [number, number, number] = [0, 0, 0]): WaterSample => ({- entity: 1 as never, depth, normal: [0, 1, 0], flow, surface: [0, 0, 0], inside: true,+ entity: 1 as never, depth, normal: [0, 1, 0], flow, surface: [0, 0, 0], bodyId: "", inside: true,});const at: [number, number, number] = [0, 0, 0];diff --git a/sdk/tests/water-ripples.test.ts b/sdk/tests/water-ripples.test.tsindex aca97b0df..9b37ed648 100644--- a/sdk/tests/water-ripples.test.ts+++ b/sdk/tests/water-ripples.test.ts@@ -98,7 +98,7 @@ describe('RippleField', () => {describe('wakeStrength', () => {const floating: FloatingData = { buoyancy: 1, drag: 0, radius: 50, points: [], wake: 1 };- const sample = (depth: number): WaterSample => ({ entity: 1 as never, depth, normal: [0, 1, 0], flow: [0, 0, 0], surface: [0, 0, 0], inside: true });+ const sample = (depth: number): WaterSample => ({ entity: 1 as never, depth, normal: [0, 1, 0], flow: [0, 0, 0], surface: [0, 0, 0], bodyId: "", inside: true });it('is a dip for what goes down into the water, and a bump for what comes up', () => {expect(wakeStrength(sample(-10), [0, -300, 0], floating, 1 / 60)).toBeLessThan(0);diff --git a/tools/releaseNotes.mjs b/tools/releaseNotes.mjsindex 5ff855321..14658fc95 100644--- a/tools/releaseNotes.mjs+++ b/tools/releaseNotes.mjs@@ -2892,6 +2892,14 @@ export const NOTED = {{"note":"A game's generated ground shows in the editor."},"fix(scaffold): a new project's gitignore keeps its plugins and platform profiles versioned, and ignores only what the editor generates":{"note":"A game's generated ground shows in the editor."},+ "feat(assets): a project names folders its asset database leaves alone":+ {"note":"A project can keep folders out of its asset database."},+ "feat(worldgen): a plant part may cast no shadow, and far cells are capped at two cells wide":+ {"note":"Small plants need not cast a shadow."},+ "feat(editor): a project plugin that needs trust says so with a notice":+ {"note":"A project plugin that needs trust says so."},+ "test: the SDK test corpus type-checks again":+ {"internal":"Test typings."},"feat(water): two tiled, scrolling detail normal maps give the surface its sparkle":{"note":"Sparkle on the water."},"fix(lod): a LODGroup with only a cull size is no longer ignored":