0.14.0
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, Outcome
s, 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 Scene
s 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
withOption
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
andVertex
now have ceil and floor methods- Syntax:
1.second
Sprite
's supportScrubTo
animation actionSceneUpdateFragment
's will accept an optional nodeLayer
's will accept an optional nodeClip
s can be exported toGraphic
s.Clip
s can be fixed withtoFrame
Clip
s support scrubbingClip
s 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 aAnimationAction.jumpTo
in order to start animation in the correct place - Fixed #419:
Signal
easing functions useSignalFunction
versions - Fixed #420:
Polygon
s with stroke 1 render better
What's Changed
- Move Lens to indigo.shared.utils package (#381) by @zikolach in #383
- Fixed #390: closestPointOnLine works in all directions by @davesmith00000 in #392
- Working on Batch improvements by @davesmith00000 in #389
- Zikolach feature/301/context menu config by @davesmith00000 in #393
- Add ability to customize html background color by @zikolach in #386
- Fixed #379: Do no reinstall local electron by @davesmith00000 in #395
- Do not re-set UBOs whose data has not changed by @davesmith00000 in #394
- Bugfix aseprite json by @solarized-fox in #398
- example mill template in docs is incomplete by @solarized-fox in #402
- Reset lastFrameAdvance after an AnimationAction.jumpTo by @solarized-fox in #399
- simplification: replace SceneAudio.None with Option types by @solarized-fox in #403
- Sequencing things by @davesmith00000 in #405
- Improve launch method by @davesmith00000 in #407
- Upgrades 9/9/2022 by @davesmith00000 in #406
- Timeline Animations by @davesmith00000 in #416
- Scenes use
SceneContext
in place ofFrameContext
by @davesmith00000 in #413
New Contributors
- @solarized-fox made their first contribution in #398
Full Changelog: v0.13.0...v0.14.0