Skip to content

v20.13.0

Latest

Choose a tag to compare

@github-actions github-actions released this 06 Nov 10:24
· 4 commits to master since this release
f11f5e3

Added

  • Particles: a depth setting, so particles under a Camera3d spawn through a volume instead of on a flat sheet
  • Text: paintOrder, to draw the outline behind the glyphs ("stroke", the default) or over them ("fill")
  • Text: lineJoin and miterLimit, the shape of the outline's corners ("round" by default, "bevel" or "miter")
  • UI: UICheckbox, a checkbox with its label, that becomes a radio button with a group (#1722)
  • UI: UISlider, a horizontal or vertical slider with min, max and step, moved by dragging, clicking the track or the mouse wheel
  • UI: UIPanel lays out its children ("column", "row" or "grid"), scrolls them, and takes a nine-slice skin, a title and draggable
  • UI: UITextButton takes onClick, a skin and pressedColor, and the size, font and color settings the other widgets use; label is its text object
  • UI: every UIBaseElement has enabled, cancelPress() / onCancel(), and a hover and press bounce (hoverScale, pressScale)
  • UI: keyboard and gamepad navigation between widgets, once one takes the focus with focus()
  • UI: drop shadows on UIPanel and ProgressBar (shadowColor, shadowOffsetX, shadowOffsetY, shadowBlur)
  • UI: UISpriteElement is a UIBaseElement holding a Sprite, so it has everything the other widgets have; Sprite members other than its region and animation methods are on element.sprite
  • UI: the widgets' settings and skin types are exported, ProgressBar's onChange also gets the bar, and Container#clipContains(x, y) tells whether a container shows its children at a point

Deprecated

  • UI: UITextButton#bitmapText, for label

Fixed

  • Rendering: a translucent setColor() no longer fades what is drawn after it, nor changes getGlobalAlpha()
  • Rendering: on WebGL and WebGPU, a clip inside a clip is their overlap, as on Canvas (#1816)
  • WebGL: fillArc() handles an end angle before the start, and save() / restore() keep lineWidth and lineJoin, as on Canvas
  • Camera: post effects on a camera no longer wipe out the cameras drawn before it; a minimap with effects shows the view behind where it draws nothing
  • Camera: worldToLocal() / localToWorld() are right on a minimap or zoomed camera when the level is centred
  • Camera: fadeIn() and fadeOut() always call onComplete (#1810)
  • Container: reset(), and so level.load, keeps the pending sort of the persistent children it keeps
  • Container: onDeactivateEvent is called once per child of a removed container, not twice or more
  • Container: enableChildBoundsUpdate follows moving children, so the camera no longer culls the group
  • Container: physics bodies of nested children are added and removed at any depth; moving a group with bodies to another container no longer throws
  • World: a persistent container's children keep their physics bodies through a state change or level.load
  • Sprite: redefining the playing animation no longer crashes the next update when it is shorter
  • Sprite: a flicker() callback gets the sprite as this, after the flicker has ended
  • Particles: particles follow their emitter's visibilityLayer
  • Particles: an emitter without an image no longer leaks a texture per emitter or reset(); all share the renderer's white pixel (#1807)
  • Text: an outline no longer hides thin letters or gets cut off at the edges. Its corners are round by default and only its outer half shows: double lineWidth to keep its weight, or use paintOrder: "fill" and lineJoin: "miter" for the old look
  • Text: word wrap keeps \n line breaks, and no longer adds a blank first line for a long first word (Text and BitmapText)
  • Text: multi-line text is placed by textBaseline as one block, as BitmapText is, so it stays inside its bounds
  • Text: setText("1,000") after ["1", "000"] updates the text (Text and BitmapText)
  • Text: measureText("other text") no longer changes the label's own size and alignment (Text and BitmapText)
  • UI: a press on a UI element no longer also reaches the game behind it (onClick() / onRelease() return false by default; return true to let it through)
  • UI: a UITextButton with a CSS font no longer throws, draws its background where it is after a move, and no longer writes into its settings
  • UI: a blocking UIPanel stays opaque to hover while the pointer is on it
  • UI: dragging works by touch, and a dragged element in the world no longer jumps by the camera position
  • UI: hover survives a click, and ends when the pointer leaves the canvas or is cancelled
  • UI: a child clipped out of view gets no pointer events where it is hidden
  • UI: ProgressBar re-clamps its value when min or max change
  • Physics: a resting body stays grounded under heavier gravity or mass, at a low frame rate or on a rising floor
  • Physics: applyForce() reads its contact point in world coordinates, so a body away from the origin no longer spins the wrong way
  • Physics: setAngle() and angular velocity turn a body about its centre, not a corner, whatever its anchorPoint
  • Physics: a counter-clockwise polygon no longer collides with circles nowhere near it
  • Physics: a raycast no longer throws on Point, Sphere or Box3d shapes, and hits a rotated Ellipse where it is
  • Tiled: infinite maps place every chunk at its own column and row instead of wrapping tiles into other rows. cellAt() / setTile() take Tiled's tile coordinates, and TMXLayer.startx / starty give where the layer starts
  • Tiled: on staggered maps getTile() finds the right tile on every row, and a scrolled map draws again
  • Tiled: getTile() returns null just outside isometric, staggered and oblique maps
  • Tiled: no missing tiles at the view edges on staggered, hexagonal and oblique maps or with left / up render orders, and no hang when the view is outside a layer
  • Tiled: a tileset with a margin no longer takes the next tileset's tile ids, and an image collection covers all its tiles
  • Tiled: a map without nextobjectid no longer gives new objects the GUIDs of its own (#1809)
  • Loader: assets on the game's own origin are requested with its cookies and HTTP auth (#1801)
  • Loader: an asset on another origin loads whenever its server allows it (CORS), and one it blocks fails at load with an error naming it. crossOrigin now only applies to <video>, <script> and glTF images; "use-credentials" sends credentials, as withCredentials does
  • Loader: a preload() with no callback no longer calls the previous one's callback, and reload() works for custom asset types
  • Loader: progress restarts at each preload, and reaches 1 after a failed asset
  • Save: a key set again after remove() survives a reload
  • Tween: a path (array) tween no longer grows on each restart, nor turns NaN with yoyo
  • Tween: a repeating or yoyo tween repeats again when restarted
  • Math: isPowerOfTwo() rejects zero, negative and fractional values (thanks @mmporong)
  • Math: round() rounds negative values correctly and handles values past 2^31; isPowerOfFour() rejects fractions
  • Math: the observable vectors' negateSelf(), floorSelf(), ceilSelf() and clampSelf() return the vector and notify once
  • Color: parseHex() keeps the full alpha precision (thanks @mmporong)
  • Geometry: Line#contains() no longer reports points beyond the segment's ends (thanks @mmporong)
  • Geometry: Ellipse#scale() keeps the rotation
  • Pool: purge() keeps counting the instances still in use

Full Changelog: 20.12.0...20.13.0