Skip to content

Changes since version 2.12.1

New Features

  • Cross-instance MV compatibility — any two Algebra instances with the same (dim, sig, dtype, modulus) parameters are now interchangeable end to end: multivectors, BladeMask, Expression, tensor, solver, and matrix combine across equal-parameter instances instead of only the identical instance.
  • Algebra.compare / __eq__ / __hash__ — a new equality API compares the algebra parameters (dim, sig, dtype, modulus). opns, precision, and display settings are intentionally excluded, so ==, in, and dict/set keys now work on algebras.

  • Active elements — new interactive composites: ActEllipse (radius, translate, and rotate handles), ActPolygon (an editable open/closed PointPath with per-vertex handles), ActCircle (centre translate + radius handle), and ActLine (endpoint + midpoint-translate handles).

  • ActPolygon vertex editing — Ctrl+drag any vertex inserts a new one; Ctrl+right-click deletes any vertex; Ctrl+Shift+right-click opens a closed polygon.
  • ActRectangle2D rotation + min_size — stores angle, renders rotation-aware corners/resize, adds a rim rotate handle, and clamps corner resize with min_size.
  • Body on_click + per-role handle styles — ActRectangle2D/ActEllipse/ ActPolygon accept on_click (selectable body); composites gain translate_handle_style / rotate_handle_style.
  • ActPoint drag/click bindings — button + modifier-specific triggers via drag_bindings/click_bindings.
  • Keyboard shortcuts — Visualizer.on_key / VizSceneHandle.on_key / ImageCanvas.on_key register per-scene key handlers (per-pane focus, the interaction:key protocol, and SceneConfig.keyboard).
  • Control selected state — Control.selected / ControlView.set_selected highlight a button as active (toggle-button style).
  • EllipseStyle fill — EllipseStyle(fill=True, fill_opacity=…) draws a semi-transparent fill disc under the outline.
  • ShapeFromPoints protocol + DragPreview — a protocol unifying the composites' create_from_points(a, b) classmethods, and a DragPreview helper driving the transient-entity lifecycle for any factory implementing it.

  • CirclePointStyle + IconPointStyle — new point marker variants: a flat filled/outline circle and a canvas-textured icon glyph, dispatched in factory.js like CrossHairPointStyle/SquarePointStyle.

  • Screen-space point markers — SquarePointStyle / CirclePointStyle / IconPointStyle / CrossHairPointStyle gain a screen_space flag; when set, size (and thickness / arm_thickness) are interpreted as CSS pixels and the marker is rescaled every frame to a constant on-screen size (uniform in ortho, distance-based + billboarded in perspective). Act composite handles opt in by default.

  • pytanga.viz.labelme — dataclasses (LabelShape/LabelMeDocument), a LabelMeStore (load/loads/save/dumps, add_shapes, shapes_from_objects), mapping every labelme shape type to an entity or active composite.

  • Image labeling app — py/examples/apps/image_labeling_app.py, a VisualizerApp with rect/ellipse/circle/line/polygon/point tools, a File menu, and CLI load/save of labelme JSON. The reusable ImageLabeler pane (toolbar + canvas + LabeledShape state) is extracted so it can be embedded in any layout or split pane.
  • ImageCanvas.min_zoom — images can be zoomed out to 1/4 of their fit size instead of being locked at 1:1.
  • StackView(fill=True) — a new fill flag (sets preferred_width/ preferred_height to fr(1)) so a stack can fill the leftover space in a flow container or split pane.

Bug Fixes

  • Image-plane click anchor — clicking an ImageCanvas no longer re-derives the world position from the event's view-relative screen_position; the raw raycast hit is kept.
  • Scene-config camera reset — set_cursor (and other scene_config re-pushes) no longer re-applies the stale camera, so pan/zoom is preserved.
  • Per-pane key focus — the pane now gains keyboard focus on pointer-down even when a drag handler calls stopPropagation.
  • Image-plane depth — the image plane no longer writes depth, so overlay lines drawn at the image's z=0 render on top instead of z-fighting.
  • Image-plane raycast shadowing — the raycast now sorts the image plane last, so shape bodies drawn at the image's z=0 win equal-distance hits.
  • Quadric spaces now precompiled — BasisQ2/BasisQ3 (G(6,0)/G(10,0) float64) now ship precompiled instead of falling back to JIT.
  • Late image pixel frame — an image whose binary pixel frame arrives after its entity JSON no longer renders black; the renderer re-attaches the texture when the frame lands.