Skip to content

Nevu-UI V0.8.0 - NevuCobject V2, Panel, Switch, Performance

Choose a tag to compare

@GolemBebrov GolemBebrov released this 08 Jun 10:44
· 9 commits to main since this release

This update focuses on performance optimizations, memory footprint reduction, animation extensions, and core Cython refactoring!

Big Changes:

  • Refactored: Redesigned NevuCobject architecture to V2, introducing major performance and structural updates:
    • Conditional Event/Update Execution: Added direct check flags to execute heavy draw, logic, and update routines only when overridden or explicitly flagged, significantly reducing overhead per object.
    • Standardized State & System Hooks: Moved internal input and hover handling and transition groups entirely to optimized Cython methods.
    • Optimized Event Cycle: Implemented low-overhead _core_event_cycle and _core_event_cycle_clear for lightning-fast internal event routing
  • Added: InitializedWindow subclass to support direct embedding into external window contexts:
    • Implemented static factory methods from_raylib, from_pygame, from_sdl to easily hook the Nevu-UI lifecycle onto pre-existing, externally initialized display and renderer contexts.
    • Allows wrapping native pygame displays, Pygame SDL2 renderers, or raylib contexts without letting Nevu-UI initialize the window from scratch, enabling cleaner integration with third-party window managers.
    • Standardized internal context bindings, window resizing handlers, and rendering pipeline adaptation for these pre-existing targets.
  • Added: Switch widget supporting smooth dragging, transition animations. (only works correctly on raylib framework, pygame fix will be soon maybe)
  • Added: Panel layout extending Grid for background widget rendering and slotted components.
  • Refactored: NvVector2 internally rewritten to use a raw c-struct nv_vector2_t, resulting in a performance speedup for vector calculations
  • Refactored: Display
    • all of the renderers have been standardized to almost identical API
    • Renamed:
    • DisplayBase -> WindowRendererBase
    • DisplaySdl -> WindowRendererSdl
    • DisplayRayLib -> WindowRendererRaylib
    • DisplayClassic -> WindowRendererPygame
  • Optimized: Redesigned ZSystem collision logic! Replaced heavy NumPy where-queries with direct memory views to drastically reduce garbage collection overhead and memory allocations in hot cycles.
  • Added: static_run mode in Manager to run a heavily optimized main loop process.
  • Added: New Cython module NvSpecific for specific fucntions
  • Added: 10+ new transitions and ease curves to the animation library such as spring, pulse, breathe, shake_easing, smoothstep, etc..
  • Added: AnimationQueue class for sequential animation chaining.

Small - Medium Changes:

  • Added: bg_variant param into NevuObject
  • Added: AnimatedGradient supporting animated properties managed by an internal animation manager.
  • Optimized: Added __slots__ to animations and various utility classes: NevuEvent, PygameMouse, RaylibMouse, Time to optimize memory footprint.
  • Refactored: Cleaned up outdated widgets to single-line exceptions.
  • Refactored: Simplified character classification in InputType by introducing a centralized _Letters class.
  • Cleaned: Modernized imports and standardized module exposures inside __init__.py.
  • Fixed: Menu bug with layout incorect layout position before first resize.

Full Changelog: v0.7.6...v0.8.0