makepad/libs/flow/recipes/templates/expanded-prompt-to-mesh.splash
Arena Agent d8d5ea8b6a Repair integration manifests and port nigig exports onto upstream widget families
Restore missing required asset/flow packages from the pinned nigig revision; retain upstream script isolation, X11 hover, and widget-core fixes. Validated makepad-widgets data feature with Rust 1.97.1.
2026-10-26 11:23:26 +00:00

26 lines
908 B
Text

use mod.flow.*
/** The object idea to expand and reconstruct. */
let prompt = Input{ type: @text default: "a brass diving helmet" }
let expand = Llm{
system: "Rewrite the prompt as one clean product-view image brief for a single isolated object suitable for 3D reconstruction."
prompt: prompt.text()
}
let image = Image{ prompt: expand.text() width: 512 height: 512 }
let mesh = Mesh{
prompt: expand.text()
image: image.image()
remesh_resolution: 512
texture: true
decimation_target: 12000
texture_size: 1024
model: "trellis-2"
}
/** Publish the reconstructed GLB into the flow asset library. */
let published = Publish{ value: mesh.mesh() namespace: "flows" tags: ["flow", "mesh"] }
Flow{
label: "Expanded prompt to mesh"
brief: "Expands an object idea, paints its reconstruction view, and creates a textured mesh."
prompt, expand, image, mesh, published
}