Commit Graph

14 Commits

Author SHA1 Message Date
Abe Pazos
6db05951ef Remove unused imports 2025-08-04 12:00:35 +02:00
Edwin Jakobs
b259e9c2de [orx-shapes] Add rectangle align, distribute and fit functions 2025-07-06 23:35:40 +02:00
Edwin Jakobs
ee8a709cc0 [orx-shapes] Add placeIn methods for Rectangle and Box 2025-02-27 10:20:17 +01:00
Edwin Jakobs
6ad584a262 [orx-shapes] Add extensions for creating sub-shapes and positioning boxes
Introduce `Rectangle.sub` and `Box.sub` functions to derive sub-rectangles and sub-boxes from existing shapes using relative dimensions. Add `Box.place` to position a box relative to another using customizable anchors.
2025-02-26 22:12:26 +01:00
Edwin Jakobs
b3e8543555 [orx-shapes] Add place function and demo for rectangle placement
Introduce `Rectangle.place` to position rectangles dynamically within bounds using anchor points. Added a demo (`DemoRectanglePlace01`) showcasing a 10x10 grid of rectangles evenly distributed across the canvas.
2025-02-25 07:08:48 +01:00
Edwin Jakobs
17e10a59ee [orx-shapes] Add utilities for sub-list operations in Rectangle grids
Introduced functions for slicing, dropping, and selecting columns in 2D rectangle grids, including `uniformBlock` for random sub-block extraction.
2025-02-20 23:56:52 +01:00
Edwin Jakobs
291038e621 [orx-shapes] Add box splitting and subtraction utilities
Introduce `splitAtX`, `splitAtY`, and `splitAtZ` methods to divide a box along specific axes. Implement `subtract` methods to handle box subtraction and remove intersecting regions, with support for operations on individual boxes and lists of boxes.
2025-02-20 23:56:52 +01:00
Edwin Jakobs
b03e39b52e [orx-shapes] Add rectangle splitting and subtraction utilities
Introduce functions to split rectangles at specified axes and subtract overlapping areas. These utilities allow precise manipulation of rectangle shapes, including dividing and removing intersections while preserving non-overlapping sections.
2025-02-20 23:56:52 +01:00
Edwin Jakobs
a7d878a710 [orx-shapes] Add irregular grid support and demo examples
This commit introduces `Rectangle.irregularGrid`, enabling the creation of grids with irregular spacing based on weights. New helper methods and properties for 2D rectangle lists, such as subgrid selection, bounds calculation, and random access, are also added. Additionally, two new demos showcase regular and irregular grid features.
2025-02-20 16:57:35 +01:00
Edwin Jakobs
3f31cbe117 [orx-shapes] Add transpose function for 2D rectangle grids 2025-02-20 16:57:35 +01:00
Edwin Jakobs
2236da00bf [orx-shapes] Add generated and verified documentation 2025-01-19 00:49:05 +01:00
Edwin Jakobs
2438dbe770 [orx-shapes] Add Box.intersection() and Box.grid() 2024-09-26 22:15:25 +02:00
Edwin Jakobs
6b9c3593ae [orx-shapes] Add Rectangle.intersection() 2024-09-25 22:26:37 +02:00
Edwin Jakobs
8fbb106823 [orx-shapes] Refactor package layout 2024-01-23 09:38:43 +01:00