Repository navigation
v0.3.7
Add experimental declarative animation primitives.
ui/motionprovides frame-time driven animation values: physics springs, tweens and cubic-bezier easing, keyframes and repeat modes, inertia, stagger, presence, color mixing and range mapping. Sampling usesel.Context.Now; only unsettled values callContext.Animating, so a settled application stays event-driven, and reduced motion jumps directly to the declared target.Transformis paint-only, so layout and automation bounds stay unchanged.LayoutGroupperforms position-only FLIP forDivelements in one scroll coordinate space.PointerGlowdraws a cursor-origin glow and ripple driven by pointer movement, andConfettikeeps an uncapped reusable particle slice, emitting and updating without allocating once capacity is available; both ownDecorate.Transform,PointerGlow,ConfettiandLayoutGroupreplace an element's existingDecoratecallback; wrap an element if it must also use another decoration. The API is experimental and may change.- The module depends on
ui/el,ui/core,ui/themeand Gio, never onui/kitorui/window, and is listed in theinternal/depstable as opt-in for heavy dependencies.examples/motion(go run ./examples/motion -section effects) demonstrates the pointer effects and an order confetti burst.
Validation: gofmt, vet, module tests, go test -race ./ui/motion, the offline component check from a clean checkout, and CGO_ENABLED=0 GOOS=windows go build ./....
本版新增实验性的声明式动效基础能力 ui/motion:弹簧、补间、缓动、关键帧、惯性与交错,只作用于绘制的变换、FLIP 布局组、指针光晕/波纹和彩纸,并附 examples/motion 示例。API 尚不稳定。
Compare: v0.3.6...v0.3.7