npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@rbxts/a-plant-generator

v0.1.2

Published

Deterministic, renderer-independent procedural botany for roblox-ts.

Readme

@rbxts/a-plant-generator

CI npm docs license

Deterministic, renderer-independent procedural botany for roblox-ts. It combines bounded L-system derivation, stable 2D/3D turtles, plant topology, mesh builders, phyllotaxis, developmental animation, cellular map systems, IFS utilities, and optional Roblox renderers without depending on a game framework.

Status: 0.1.2. Core APIs are usable; cellular maps and EditableMesh adapters are explicitly experimental while their mechanisms are functional and tested.

| Preset architectures | Golden-angle phyllotaxis | | ------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | | Six deterministic plant preset architectures | Planar and cylindrical phyllotaxis forms | | Growth progression | Inflorescence architectures | | Five deterministic stages of one generated plant | Six generated inflorescence architectures |

Install

npm install @rbxts/a-plant-generator

30-second quick start

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

const model = PlantCompiler.compile(PLANT_PRESETS["broad-canopy-tree"]!);
const plant = PlantGenerator.generate(model, {
	seed: 12345,
	iterations: 5,
	limits: { maxSymbols: 50_000, maxSegments: 5_000 },
});

print(plant.statistics.segments, plant.descriptor.modelHash);

The same model, seed, parameters, time, and limits produce the same topology and compact descriptor. Derivation never creates Instances.

Growth and rendering

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

const model = PlantCompiler.compile(PLANT_PRESETS["timed-tree"]!);
const result = PlantGenerator.generate(model, { seed: 9, iterations: 4 });

// Parent ownership is explicit; the renderer never assumes Workspace.
const renderer = new PartPlantRenderer({ parent: script, maxInstances: 2_000 });
const handle = renderer.render(result);
handle.setGrowth(0.65);
handle.setLod("medium");
// Later: handle.destroy(); renderer.destroy();

For frame-budgeted generation:

const session = PlantGenerator.createSession(model, {
	seed: 9,
	iterations: 6,
	limits: { maxWorkUnits: 250_000 },
});
while (!session.isComplete()) session.step(500);
const result = session.getResult();

Capabilities

  • deterministic context-free, stochastic, context-sensitive, parametric, and bracketed rewriting;
  • edge/node replacement graphs with explicit contact points;
  • stable 2D/3D turtles, polygon capture, custom commands, tropism, and axial branch context;
  • renderer-neutral branch graphs, buds, attachments, pruning, bounds, biomass, traversal, and hashes;
  • tubes with parallel-transport frames, mesh validation/merge/transform, blades, petals, ribbons, disks, compound leaves, and flowers;
  • planar/cylindrical phyllotaxis, deterministic jitter, spacing relaxation, and parastichy analysis;
  • timed symbols, absolute-time scrubbing, event enumeration, and built-in, piecewise, keyframed, or registered growth functions;
  • experimental planar/spherical/3D cellular structures and weighted/controlled IFS tools;
  • versioned model specs, migrations, named behavior registries, immutable preset extension, compact network descriptors, LRU caches, and strict budgets;
  • pooled/batched Part rendering with default or custom organ Parts, plus an injected, size-guarded EditableMesh capability boundary.

Architecture and performance

The pipeline is model spec -> compiled production index -> bounded derivation -> turtle -> branch graph -> optional mesh -> optional renderer. Core modules use plain data and never access Roblox services. See Architecture, Concepts, Book coverage, and Performance.

Exponential derivation is always a risk. Set symbol, segment, vertex, triangle, stack, iteration, Instance, and total work limits for untrusted or user-authored models. Prefer incremental sessions and distance LOD for interactive worlds.

Compatibility

  • roblox-ts 3.0.0;
  • TypeScript 5.5.3, matching the compiler's pinned TypeScript line;
  • @rbxts/types 1.0.938 or compatible later API dumps;
  • Node 20.19 or newer for development tools;
  • EditableMesh requires the Roblox capability/security settings described in Roblox rendering.

Guides

Getting started · Examples · L-systems · Turtles · Tree modeling · Phyllotaxis · Animation · Networking · Extending · Security · Troubleshooting

API reference and all guides are published at mateusdcc.github.io/plant-generator.

Contributing and license

See CONTRIBUTING.md. Package code is MIT licensed. The Algorithmic Beauty of Plants and its text, figures, photographs, and illustrations are not included and are not licensed by this repository; see NOTICE.md and Academic references.