diff --git a/editor/src/viewport_tools/tools/shape_tool.rs b/editor/src/viewport_tools/tools/shape_tool.rs index 117e9739..01b6c229 100644 --- a/editor/src/viewport_tools/tools/shape_tool.rs +++ b/editor/src/viewport_tools/tools/shape_tool.rs @@ -23,7 +23,7 @@ pub struct ShapeTool { } pub struct ShapeOptions { - vertices: u8, + vertices: u32, } impl Default for ShapeOptions { @@ -53,7 +53,7 @@ pub enum ShapeToolMessage { #[remain::sorted] #[derive(PartialEq, Clone, Debug, Hash, Serialize, Deserialize)] pub enum ShapeOptionsUpdate { - Vertices(u8), + Vertices(u32), } impl PropertyHolder for ShapeTool { @@ -64,8 +64,8 @@ impl PropertyHolder for ShapeTool { value: Some(self.options.vertices as f64), is_integer: true, min: Some(3.), - max: Some(256.), - on_update: WidgetCallback::new(|number_input: &NumberInput| ShapeToolMessage::UpdateOptions(ShapeOptionsUpdate::Vertices(number_input.value.unwrap() as u8)).into()), + max: Some(1000.), + on_update: WidgetCallback::new(|number_input: &NumberInput| ShapeToolMessage::UpdateOptions(ShapeOptionsUpdate::Vertices(number_input.value.unwrap() as u32)).into()), ..NumberInput::default() }))], }]) @@ -123,7 +123,7 @@ impl Default for ShapeToolFsmState { } #[derive(Clone, Debug, Default)] struct ShapeToolData { - sides: u8, + sides: u32, data: Resize, } diff --git a/graphene/src/layers/shape_layer.rs b/graphene/src/layers/shape_layer.rs index 1b58897a..b82052ee 100644 --- a/graphene/src/layers/shape_layer.rs +++ b/graphene/src/layers/shape_layer.rs @@ -105,7 +105,7 @@ impl ShapeLayer { /// /// # Panics /// This function panics if `sides` is zero. - pub fn ngon(sides: u8, style: PathStyle) -> Self { + pub fn ngon(sides: u32, style: PathStyle) -> Self { use std::f64::consts::{FRAC_PI_2, TAU}; fn unit_rotation(theta: f64) -> DVec2 { diff --git a/graphene/src/operation.rs b/graphene/src/operation.rs index d31bb70f..a8930d63 100644 --- a/graphene/src/operation.rs +++ b/graphene/src/operation.rs @@ -95,7 +95,7 @@ pub enum Operation { path: Vec, insert_index: isize, transform: [f64; 6], - sides: u8, + sides: u32, style: style::PathStyle, }, AddOverlayShape {