@rbxts/a-plant-generator - v0.2.0
    Preparing search index...

    Preset gallery

    The built-in presets are ordinary model specifications. This gallery compiles six contrasting forms and fixes the seed and iteration count for a stable comparison.

    Six generated plant architectures arranged on a neutral specimen stage.

    Left to right: flowering stem, branching herb, bush, conifer, broad-canopy tree, and vine. All use seed 2026; morphology-specific iteration counts let each architecture reach a readable mature silhouette.

    import { PLANT_PRESETS, PlantCompiler, PlantGenerator } from "@rbxts/a-plant-generator";

    export const galleryEntries = [
    { presetId: "flowering-stem", seed: 2026, iterations: 5 },
    { presetId: "branching-herb", seed: 2026, iterations: 5 },
    { presetId: "bush", seed: 2026, iterations: 4 },
    { presetId: "conifer", seed: 2026, iterations: 6 },
    { presetId: "broad-canopy-tree", seed: 2026, iterations: 4 },
    { presetId: "vine", seed: 2026, iterations: 6 },
    ] as const;

    export const presetGallery = galleryEntries.map((entry) => ({
    ...entry,
    result: PlantGenerator.generate(PlantCompiler.compile(PLANT_PRESETS[entry.presetId]!), {
    seed: entry.seed,
    iterations: entry.iterations,
    limits: { maxSymbols: 25_000, maxSegments: 2_000 },
    }),
    }));

    Pass each result to a renderer and space the returned handles with updateTransform. Reuse compiled models when generating many copies of the same preset, and keep an explicit Instance budget in runtime scenes.

    The six showcase presets use separate architectural programs: persistent leaders, sympodial forks, basal axes, tiered whorls, a clear bole with radial crown division, and a curved climbing axis. Their productions are deterministic, so changing only the seed does not alter topology. To introduce variation, extend a preset with weighted productions as shown in Seed determinism.