Skip to content

fix issue 1#16

Open
watermelon-neko wants to merge 1 commit intoswe-productivity:masterfrom
watermelon-neko:pr1
Open

fix issue 1#16
watermelon-neko wants to merge 1 commit intoswe-productivity:masterfrom
watermelon-neko:pr1

Conversation

@watermelon-neko
Copy link

fix #1

Added RepeatSpacing (Span/Pitch/Envelope/Gap) and AngularSpacing (Span/Pitch) choice enums.

Updated repeat to compute translation spacing based on the selected method, using the instance bounding box width along the direction for Envelope/Gap. Also avoids the count=1 divide-by-zero edge case.

Updated circular_repeat to take start_angle, end_angle, and spacing. In Span mode, it distributes from start to end. In Pitch mode, end_angle is interpreted as the pitch (0 defaults to full-circle spacing).

Updated tests to pass the new parameters.

@watermelon-neko
Copy link
Author

image image

@timon-schelling timon-schelling self-assigned this Mar 6, 2026
Copy link
Collaborator

@timon-schelling timon-schelling left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Otherwise this look promising

_: impl Ctx,
#[implementations(Table<Graphic>, Table<Vector>, Table<Raster<CPU>>, Table<Color>, Table<GradientStops>)] instance: Table<I>,
start_angle: Angle,
end_angle: Angle,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should be a start and span/offset angle, and that angle should have not hard limits of -180/180.

#[repr(C)]
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, serde::Serialize, serde::Deserialize, Hash, DynAny, specta::Type, node_macro::ChoiceType)]
#[widget(Radio)]
pub enum RepeatSpacing {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

order should be like in the issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add options to the 'Repeat' node for the spacing with envelope/span/pitch/gap

2 participants