Changes since version 2.12.1¶
New Features¶
- Cross-instance MV compatibility — any two
Algebrainstances with the same(dim, sig, dtype, modulus)parameters are now interchangeable end to end: multivectors,BladeMask,Expression,tensor,solver, andmatrixcombine 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/closedPointPathwith per-vertex handles),ActCircle(centre translate + radius handle), andActLine(endpoint + midpoint-translate handles). ActPolygonvertex editing — Ctrl+drag any vertex inserts a new one; Ctrl+right-click deletes any vertex; Ctrl+Shift+right-click opens a closed polygon.ActRectangle2Drotation +min_size— storesangle, renders rotation-aware corners/resize, adds a rim rotate handle, and clamps corner resize withmin_size.- Body
on_click+ per-role handle styles —ActRectangle2D/ActEllipse/ActPolygonaccepton_click(selectable body); composites gaintranslate_handle_style/rotate_handle_style. ActPointdrag/click bindings — button + modifier-specific triggers viadrag_bindings/click_bindings.- Keyboard shortcuts —
Visualizer.on_key/VizSceneHandle.on_key/ImageCanvas.on_keyregister per-scene key handlers (per-pane focus, theinteraction:keyprotocol, andSceneConfig.keyboard). - Control
selectedstate —Control.selected/ControlView.set_selectedhighlight a button as active (toggle-button style). EllipseStylefill —EllipseStyle(fill=True, fill_opacity=…)draws a semi-transparent fill disc under the outline.-
ShapeFromPointsprotocol +DragPreview— a protocol unifying the composites'create_from_points(a, b)classmethods, and aDragPreviewhelper 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 infactory.jslikeCrossHairPointStyle/SquarePointStyle. -
Screen-space point markers —
SquarePointStyle/CirclePointStyle/IconPointStyle/CrossHairPointStylegain ascreen_spaceflag; when set,size(andthickness/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), aLabelMeStore(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, aVisualizerAppwith rect/ellipse/circle/line/polygon/point tools, a File menu, and CLI load/save of labelme JSON. The reusableImageLabelerpane (toolbar + canvas +LabeledShapestate) 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 (setspreferred_width/preferred_heighttofr(1)) so a stack can fill the leftover space in a flow container or split pane.
Bug Fixes¶
- Image-plane click anchor — clicking an
ImageCanvasno longer re-derives the world position from the event's view-relativescreen_position; the raw raycast hit is kept. - Scene-config camera reset —
set_cursor(and otherscene_configre-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=0render 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=0win 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.