Skip to content

0.14.0

Compare
Choose a tag to compare
@davesmith00000 davesmith00000 released this 25 Sep 13:00
· 635 commits to main since this release

Notable changes:

New Build Target Versions:

  • Scala.js 1.11.0
  • Scala 3.2.0
  • Mill 0.10.7

Timeline animations!

This is a brand new and frankly very exciting feature! You can now describe timeline-style animations which can happen consecutively and concurrently (just like you can in animation tools). Here is an example of a timeline that animates two sequential stages of movement for a graphic, and also affects it's appearance throughout the whole animation via the modifier:

  val tl: Seconds => Timeline[Graphic[_]] = delay =>
    timeline(
      layer(
        startAfter(delay),
        animate(5.seconds) {
          easeInOut >>> lerp(Point(0), Point(100)) >>> move(_)
        },
        animate(3.seconds) {
          easeInOut >>> lerp(Point(100), Point(100, 0)) >>> move(_)
        }
      ),
      layer(
        startAfter(delay),
        animate(8.seconds, modifier)
      )
    )

This is great for animating things like title screens, but we've also added 'scrubbing' support to the existing Clip and Sprite types so that you can control keyframe animations (such as those exported form Aseprite) using this method.

The DSL is available via import indigo.syntax.animation.*.

Timelines do not really know what they are animating, they are just a way to produce a value of a certain type over time. Thus they can return renderable nodes, Outcomes, or perhaps even model values if you get creative!

Electron installs do not re-do local module installs

This seemed like a small improvement at the time but has changed the way I work.

Global installs of Electron (particularly if you're a Nix user...) display extreme variation in terms of performance and capabilities across different platforms. However using a global install was convenient because it was nice and fast compared to doing indigoplugin.ElectronInstall.Version("^18.0.0") or indigoplugin.ElectronInstall.Latest in your sbt or Mill build. This was mostly down to npm reinstalling artefacts on every build, but this has now been fixed.

You are now advised to prefer a Version or Latest over Global.

Batch improvements and bug fixes

Batch is a cornerstone data type for Indigo that was introduced in the previous release. It was introduced for performance reasons with an expectation that the usability would need some work. Batch is still a bit rough around the edges, but it's getting better. Here are a few of the latest improvements:

  • Better tail operations + uncons
  • Better mkString
  • Catch only NonFatal errors during Batch.equals
  • Added flatten to Batch
  • Better pattern matching (still needs work!)
  • Improved constructors

Scene's now have their on context type

All the standard functions supply a FrameContext which provides a suite of useful tools and bits of information, but Scenes now have their own variation. SceneContext does everything that FrameContext does, but also provides the running sceneTime so that you can start animations from when you entered the scene, and the current scene name.

Other Improvements

  • Add advanced config parameter to disable browser context menu (#385)
  • Add ability to customize html background color
  • Replaced SceneAudio.None with Option types (#403)
  • Outcome can sequence List, Batch, and their non-empty their variations (other sequencing syntax options also added)
  • Improve the JS launch method so you can now supply an element (#407 & Fixed #400)
  • Many new SignalFunction helper methods
  • Vector2, 3, 4 and Vertex now have ceil and floor methods
  • Syntax: 1.second
  • Sprite's support ScrubTo animation action
  • SceneUpdateFragment's will accept an optional node
  • Layer's will accept an optional node
  • Clips can be exported to Graphics.
  • Clips can be fixed with toFrame
  • Clips support scrubbing
  • Clips expose frame info and clip length
  • Enabled/Disable lighting at the material level
  • Shape enhancements, modifier methods

Bug fixes

  • Fixed #390: closestPointOnLine works in all directions (Line Segment)
  • UBO hashing fixed
  • UBO data is only set if it has changed
  • Reset lastFrameAdvance after a AnimationAction.jumpTo in order to start animation in the correct place
  • Fixed #419: Signaleasing functions use SignalFunction versions
  • Fixed #420: Polygons with stroke 1 render better

What's Changed

New Contributors

Full Changelog: v0.13.0...v0.14.0