Skip to content
Shapemetry

Types - Tree

API reference for ./model/tree on @huukhanhnguyen/types.

See the Guide for the package's role.

API reference

Signatures are generated from the live package .d.ts - not hand-written.

BranchSection

type

type BranchSection
// = {
    origin: Point;
    orientation: EulerXYZ;
    radius: number;
}

EulerXYZ

type

type EulerXYZ
// = {
    x: number;
    y: number;
    z: number;
}

QueuedBranch

type

type QueuedBranch
// = {
    origin: Point;
    orientation: EulerXYZ;
    length: number;
    radius: number;
    level: number;
    sectionCount: number;
    segmentCount: number;
}

TreeBarkOptions

type

type TreeBarkOptions
// = {
    /** Builtin material dispatch key (see TREE_BUILTIN_MATERIALS above). */
    type: string;
}

TreeBranchOptions

type

type TreeBranchOptions
// = {
    levels: number;
    angle: Record<number, number>;
    children: Record<number, number>;
    force: {
        direction: {
            x: number;
            y: number;
            z: number;
        };
        strength: number;
    };
    gnarliness: Record<number, number>;
    length: Record<number, number>;
    radius: Record<number, number>;
    sections: Record<number, number>;
    segments: Record<number, number>;
    start: Record<number, number>;
    taper: Record<number, number>;
    twist: Record<number, number>;
}

TreeLeavesOptions

type

type TreeLeavesOptions
// = {
    /** Builtin material dispatch key (see TREE_BUILTIN_MATERIALS above). */
    type: string;
    billboard: "single" | "double";
    angle: number;
    count: number;
    start: number;
    size: number;
    sizeVariance: number;
}

TreeMaterialRecord

type

type TreeMaterialRecord
// = {
    texture: string;
    alphaTest?: number;
    roughness?: number;
}
Last updated: 📖 1 min readEdit on GitHub