Skip to content

Releases: pythonarcade/arcade

4.0.0.dev6: Pyglet update (#2881)

Choose a tag to compare

@pvcraven pvcraven released this 07 Aug 13:11
8bdf4d6

New Features

  • GUI: Added an experimental animation API in arcade.gui.experimentalUIAnimatedGroup wraps a widget subtree and tweens its transform properties over time via animate().
    • UIAnimatedGroup caches its subtree into a surface and exposes non-layouting transform properties (scale, angle, alpha, offset_x, offset_y, tint); it is interactive, hit-testing hovered/pressed/on_click against its untransformed rect. UIRenderGroup is the non-interactive caching primitive.
    • animate() supports multiple properties per call, sequencing via then(), repetition (repeat, yoyo), relative targets (rel()), easing, delays and on_finish callbacks.
    • Animations are resolved per property: starting a new animation takes over its properties from running ones, other properties keep animating.
    • Interpolates numbers, tuples, Color and vector types; non-interpolatable values snap at the end.
    • The low level Transition* classes remain available for custom behavior.

Fixes

  • GUI: Fixed UILabel.update_font always reporting a font change when the requested font was a fallback tuple (e.g. UIFlatButton's default styles), which caused a full UI re-render every frame. This made widget-heavy UIs, such as the exp_scroll_area example, run at a few FPS.
  • Fixed rotate_around_point missing from arcade.math.__all__, which made it unavailable via from arcade.math import *.

Breaking Changes

  • Updated pyglet to 3.0.dev7 (from 3.0.dev3).
    • Between dev4 and dev5, pyglet removed window._matrices and moved window view/projection/viewport onto its own camera (default_camera in dev5/dev6, renamed to camera in dev7), backed by a per-frame ring-buffer UBO. Arcade now fully owns its own window matrix UBO, independent of pyglet's camera/ring buffer, so rendering behavior for cameras, sprites, and shapes is unchanged.
    • Advanced users who mix raw pyglet camera/window code with Arcade should note: window._matrices no longer exists, and window.camera (pyglet's default_camera prior to dev7) is pyglet's own concept (a Camera2D), distinct from arcade.Window.default_camera (Arcade's own DefaultProjector) — both exist simultaneously and serve different roles. arcade.Window now also exposes a camera property as an alias for default_camera, matching pyglet's dev7 rename.
    • Fixed BackgroundTexture scale and offset producing incorrect visual transforms — Arcade's code was inadvertently relying on bugs in pyglet's pre-dev7 Mat3.scale/Mat3.translate that have since been fixed upstream. Visual output for BackgroundTexture users with non-default scale/offset values will change to be correct.

Misc Changes

  • Resolved security vulnerabilities in the setuptools, click, and typer dependencies (typer bumped to 0.27.1) via uv audit/uv lock.

3.3.3

Choose a tag to compare

@pvcraven pvcraven released this 09 Oct 15:48
33e5960

3.3.2

Choose a tag to compare

@github-actions github-actions released this 04 Jul 01:08
6113762
  • GUI
    • Fix UIScrollBar creation
    • Fix memory leak: widgets were not garbage collected- 6113762 Update version (#2749)

3.3.1

Choose a tag to compare

@github-actions github-actions released this 25 Jun 14:12
  • Fixed an issue causing NinePatch to not render correctly
  • TextureAtlas now as a version attribute that is incremented when the
    atlas is resized or rebuilt. This way it's easy to track when texture coordinates
    has changed.
  • Added Text.visible (bool) property to control the visibility of text objects.
  • Fixed an issue causing points and lines to draw random primitives when
    passing in an empty list.
  • GUI
    • Fix caret did not deactivate because of consumed mouse events. 2725
    • Property listener can now receive:
      • no args
      • instance
      • instance, value
      • instance, value, old value

      Listener accepting *args receive instance, value like in previous versions.

3.3.0

Choose a tag to compare

@github-actions github-actions released this 09 Jun 13:32
4d8c653
  • Fixed an issue causing a crash when closing the window
  • Added Window.closed (bool) attribute indicating if the window is closed
  • Fixed an issue where on_draw could be dispatched after the window was closed
  • Added PymunkPhysicsEngine.update_sprite for manually updating a sprite's shape
    to synchronize sprite hit boxes with the physics engine
  • Fixed an issue causing on_mouse_leave to be called from disabled Sections
  • Various documentation fixes and improvements
  • Scene
    • Scene.add_sprite now returns the added sprite
    • Scene.add_sprite_list now returns the added sprite list
    • Scene.add_sprite_before now returns the added sprite list
    • Scene.move_sprite_list_before now returns the moved sprite list
    • Scene.remove_sprite_list_by_index now returns the removed sprite list
    • Scene.remove_sprite_list_by_name now returns the removed sprite list
  • GUI
    • Fix UILabel with enabled multiline sometimes cut off text
    • Improved UIWidget usability for resizing and positioning:
      • Added property setters for width, height, and size that ensure positive values
      • Added property setters for center_x and center_y
      • Added property setters for left, right, top, and bottom
      • Users can now set widget position and size more intuitively without needing to access the rect property
  • Rendering:
    • The arcade.gl package was restructured to be more modular in preparation for
      other backends such as WebGL and WebGPU
    • Rewrote many shader programs to not use geometry shaders, which are not supported in WebGL
      and some other rendering backends
    • Fixed a few instances og exceptions not being raised properly in edge cases
    • BREAKING CHANGE: SpriteList now has multiple rendering systems supporting both WebGL and Desktop GL.
      If you have customized spritelist rendering you now need to modify the SpriteListData instance
      on the spritelist accessed through SpriteList.data. This instance holds all the GPU-related
      resources for the spritelist such as buffers, textures, geometry and shader program.

3.2.0

Choose a tag to compare

@github-actions github-actions released this 09 May 20:09
02fe853
  • GUI
    • Fix UIScrollArea.add always returning None
    • Support layer in UIView.add_widget()
    • Fix a bug which caused UIScrollArea to refresh on every frame
    • Add stepping to UISlider (thanks csd4ni3l)
    • Experimental controller support (incl. documentation)
  • Text objects are now lazy and can be created before the window
  • Introduce arcade.SpriteSequence[T] as a covariant supertype of arcade.SpriteList[T]
    (this is similar to Python's Sequence[T], which is a supertype of list[T])
    and various improvements to the typing of the API that leverage it
  • Fixed a nasty memory leak in texture atlases. This only affects projects managing their own atlases
  • Fixed a bug causing some events to not trigger on the window's keyboard and mouse state handlers
  • New minimum pyglet version is now 2.1.5
  • Some shader programs were rewritten to not use geometry shaders in preparation for webgl support

3.1.0

Choose a tag to compare

@github-actions github-actions released this 02 Apr 21:27
93d5603
  • Drop Python 3.9 support
  • Disable shadow window on all platforms to provide a consistent experience
  • Performance
    • Improved performance of arcade.SpriteList.remove() ~300%
    • Improved arcade.SpriteList.pop() performance making it O(1) instead of O(N)
    • Improved performance of arcade.hitbox.Hitbox.get_adjusted_points() ~35%
    • Improved performance of arcade.SpriteList.draw_hit_boxes() ~20x
  • GUI
    • arcade.gui.widgets.text.UIInputText
      • now supports styles for normal, disabled, hovered, pressed and invalid states
      • provides a invalid property to indicate if the input is invalid
    • Added experimental arcade.gui.experimental.UIRestrictedInput
      a subclass of UIInputText that restricts the input to a specific set of characters
    • arcade.gui.NinePatchTexture is now lazy and can be created before a window exists allowing creation during imports.
    • Improve arcade.gui.experimental.scroll_area.ScrollBar behavior to match HTML scrollbars
  • Support drawing hitboxes using RBG or RGBA
  • Fixed a bug causing some events to not trigger on the window's keyboard and mouse state handlers
  • Many documenation fixes and improvements
  • Various example fixes

3.0.2

Choose a tag to compare

@github-actions github-actions released this 11 Mar 13:34
46ce22d

3.0.1

Choose a tag to compare

@github-actions github-actions released this 17 Feb 15:32
ea6e01f

3.0.0

Choose a tag to compare

@github-actions github-actions released this 25 Jan 18:31

CHANGELOG

Read more