feat: add path_geometry data
All checks were successful
Deploy to GitHub Pages / build_site (push) Successful in 2m21s

This commit is contained in:
2024-04-24 19:11:00 +02:00
parent 1df62e25e7
commit 4db1cc7d4f
75 changed files with 56957 additions and 3939 deletions

View File

@ -55,14 +55,14 @@ export const NodeInputVec3Schema = z.object({
value: z.array(z.number()).optional(),
});
export const NodeInputModelSchema = z.object({
export const NodeInputGeometrySchema = z.object({
...DefaultOptionsSchema.shape,
type: z.literal("model"),
type: z.literal("geometry"),
});
export const NodeInputPlantSchema = z.object({
export const NodeInputPathSchema = z.object({
...DefaultOptionsSchema.shape,
type: z.literal("plant"),
type: z.literal("path"),
});
export const NodeInputSchema = z.union([
@ -73,8 +73,8 @@ export const NodeInputSchema = z.union([
NodeInputSelectSchema,
NodeInputSeedSchema,
NodeInputVec3Schema,
NodeInputModelSchema,
NodeInputPlantSchema
NodeInputGeometrySchema,
NodeInputPathSchema
]);
export type NodeInput = z.infer<typeof NodeInputSchema>;

View File

@ -104,13 +104,13 @@ pub struct NodeInputVec3 {
}
#[derive(Serialize, Deserialize)]
pub struct NodeInputModel {
pub struct NodeInputGeometry {
#[serde(flatten)]
pub default_options: DefaultOptions,
}
#[derive(Serialize, Deserialize)]
pub struct NodeInputPlant {
pub struct NodeInputPath {
#[serde(flatten)]
pub default_options: DefaultOptions,
}
@ -125,8 +125,8 @@ pub enum NodeInput {
select(NodeInputSelect),
seed(NodeInputSeed),
vec3(NodeInputVec3),
model(NodeInputModel),
plant(NodeInputPlant),
geometry(NodeInputGeometry),
path(NodeInputPath),
}
#[derive(Serialize, Deserialize)]