This commit is contained in:
release-bot
2026-02-08 22:56:41 +01:00
parent 72d6cd6ea2
commit c7f808ce2d
14 changed files with 193 additions and 113 deletions

View File

@@ -26,7 +26,6 @@ const DefaultOptionsSchema = z.object({
export const NodeInputFloatSchema = z.object({
...DefaultOptionsSchema.shape,
type: z.literal('float'),
element: z.literal('slider').optional(),
value: z.number().optional(),
min: z.number().optional(),
max: z.number().optional(),
@@ -36,12 +35,17 @@ export const NodeInputFloatSchema = z.object({
export const NodeInputIntegerSchema = z.object({
...DefaultOptionsSchema.shape,
type: z.literal('integer'),
element: z.literal('slider').optional(),
value: z.number().optional(),
min: z.number().optional(),
max: z.number().optional()
});
export const NodeInputShapeSchema = z.object({
...DefaultOptionsSchema.shape,
type: z.literal('shape'),
value: z.array(z.number()).optional()
});
export const NodeInputBooleanSchema = z.object({
...DefaultOptionsSchema.shape,
type: z.literal('boolean'),
@@ -84,6 +88,7 @@ export const NodeInputSchema = z.union([
NodeInputBooleanSchema,
NodeInputFloatSchema,
NodeInputIntegerSchema,
NodeInputShapeSchema,
NodeInputSelectSchema,
NodeInputSeedSchema,
NodeInputVec3Schema,

View File

@@ -103,6 +103,15 @@ pub struct NodeInputVec3 {
pub value: Option<Vec<f64>>,
}
#[derive(Serialize, Deserialize)]
pub struct NodeInputShape {
#[serde(flatten)]
pub default_options: DefaultOptions,
#[serde(skip_serializing_if = "Option::is_none")]
pub value: Option<Vec<f64>>,
}
#[derive(Serialize, Deserialize)]
pub struct NodeInputGeometry {
#[serde(flatten)]
@@ -125,6 +134,7 @@ pub enum NodeInput {
select(NodeInputSelect),
seed(NodeInputSeed),
vec3(NodeInputVec3),
shape(NodeInputShape),
geometry(NodeInputGeometry),
path(NodeInputPath),
}