Skip to content

v20.17.0

Latest

Choose a tag to compare

@github-actions github-actions released this 21 Nov 23:42
e20d91c

Highlights: isometric, staggered and hexagonal Tiled maps are now drawn by the GPU, as orthogonal ones are: up to 98% less of the main thread's time per tile layer, with nothing to enable. Also new: mask transitions shaped like an image or a sprite that close on the player, and two effects, GradientMapEffect (palette swaps, duotones) and DitherEffect (a retro limited-color look). A map with layer offsets now looks as it does in Tiled: the offsets were ignored before.

Added

  • Transitions: a mask transition can take the shape of an image or a Sprite, close on the player (center) and fill the shape (invert), on state.transition, MaskEffect and Trigger (#1399)
  • Tiled: isometric, staggered and hexagonal maps are rendered by the GPU on WebGL and WebGPU, as orthogonal ones are. Nothing to enable: a tile layer drawn from a single tileset uses it by itself (#1897)
  • Effects: GradientMapEffect recolors a sprite or a scene from its brightness, through two to eight colors: a palette per team, a duotone, a night scene, or a hard palette swap with smooth: false
  • Effects: DitherEffect draws a scene in a few colors with an ordered dither between them, as early consoles did: levels of each channel or a palette of two to sixteen colors, in pixels size pixels wide

Performance

  • Tiled: on the GPU, drawing an isometric tile layer takes about 90% less of the main thread's time with 1200 tiles in view (0.68 to 0.07 ms a frame) and about 98% less with 4000 (2.0 to 0.04 ms). Staggered and hexagonal maps gain the same
  • Tiled: for reference, orthogonal tile layers, on the GPU since 19.4, measure about 85% less with 1000 tiles in view (0.62 to 0.09 ms) and about 97% less with 3600 (1.9 to 0.06 ms)
  • Effects: FlashEffect and TintPulseEffect are drawn by the ColorMatrixEffect shader, as SepiaEffect, DesaturateEffect and InvertEffect are: two fewer shaders to compile, and the pulse is computed once a frame rather than for every pixel. Nothing to change in a game

Fixed

  • Tiled: a layer's offset in Tiled is applied: to a tile layer (where it is drawn and where getTile() looks), to the objects of an object layer, and to the tile layers inside a group. It was ignored
  • Tiled: tiles larger than a cell are drawn wherever they are in view; they were cut off or left out along the edges of the view and of the map
  • Tiled: staggered and hexagonal maps are drawn where Tiled draws them: a tile larger than its cell stands on it, a tileset's tileoffset moves its tiles, and maps of odd sizes stay on whole pixels
  • Tiled: orthogonal layers drawn by the GPU show the soft edges of large tiles over the tiles behind them, lay large tiles over each other in the map's order, and read a tileset with a margin right
  • Tiled: an isometric, staggered or hexagonal layer with an opacity below 1 fades as one picture on WebGL and WebGPU; each tile showed through the one in front of it
  • Tiled: a tile layer removed from its container and added again, and a tile missing from its tileset's image, no longer throw
  • NineSliceSprite blinks with flicker(), as a Sprite does; it ignored it
  • Text: a stroked multi-line label with textBaseline: "hanging" keeps the top of its outline on macOS, where its first row was cut off (#1870) (thanks @Goldloli)
  • glTF: a model compressed with Draco or meshopt, which the loader cannot decode, says so in the console, naming the extension, instead of failing on an unrelated accessor error
  • Physics: a method of the built-in adapter (setVelocity, applyForce, setStatic and the like) called on a renderable with no body says so, and a raycast passes over an object whose body is not the adapter's; both threw
  • Sprites: an atlas frame the packer stored rotated is drawn where the sprite is; it was drawn off the screen unless the sprite stood at (0, 0), so its animation blinked. A NineSliceSprite made from such a frame is no longer stretched along the wrong axes
  • WebGL: with antiAlias on, a frame that captures the canvas and then draws over it (renderer.toFrameTexture(), a screen_texture effect, an advanced blend mode) is no longer shown black at times in Chromium
  • Transitions: a mask transition shaped like a sprite of the level says so in the console, once, when that sprite is gone with its level and a plain iris is used instead. A mask transition given no shape also says so once, not on every change
  • Path2D: an SVG A arc that is exactly a half circle, as when its radius is too small and is scaled up to fit, is drawn as an arc; rounding could turn it into a straight line between its endpoints (thanks @SwastikTripathi)

Chore

  • Dependencies: update the development tools, clearing the 46 vulnerabilities reported by the security audit
  • Lint: lint each package on its own and cache the result, so pnpm lint skips what has not changed
  • CI: fix the test job losing its browser page at random, and run the test suite in about half the time
  • Package: the npm package includes CHANGELOG.md and the license, which were left out, and its sideEffects field names the published bundle
  • Size: the engine is about 8% smaller to download (323 kB minified and gzipped, from 350 kB), as the comments in its shaders are no longer published

New Contributors

  • @Goldloli made their first contribution
    • Text: keep the top of a stroked label's outline under the "hanging" baseline on macOS (#1898) thanks @Goldloli (ec92e25)

Full Changelog: 20.16.0...20.17.0