threejs-worldgen
    Preparing search index...

    Interface CityCreateOptions

    Options for City.create: settings plus the objects a city needs (not JSON).

    interface CityCreateOptions {
        architecture?: ArchitectureName | "auto";
        architectures?: DeepPartial<Record<ArchitectureName, Architecture>>;
        blocks?: DeepPartial<BlockOptions>;
        buildBudget?: number;
        buildings?: DeepPartial<BuildingOptions>;
        camera?: Camera;
        center?: [number, number];
        climate?: Climate | null;
        districts?: DeepPartial<DistrictOptions>;
        facade?: DeepPartial<FacadeOptions>;
        farm?: DeepPartial<FarmOptions>;
        field?: DeepPartial<TensorFieldOptions>;
        frame?: LocalFrame;
        landmarks?: DeepPartial<LandmarkOptions>;
        lod?: DeepPartial<LodOptions>;
        lotJitter?: number;
        progressive?: boolean;
        radius?: number;
        roadLook?: DeepPartial<RoadLookOptions>;
        roads?: DeepPartial<RoadOptions>;
        roadside?: DeepPartial<RoadsideOptions>;
        scene?: Object3D<Object3DEventMap>;
        seed?: string | number;
        siteResolution?: number;
        size?: SettlementSize;
        sizes?: DeepPartial<Record<SettlementSize, SizeClass>>;
        style?: RoadStyle | "auto";
        terrain?: DeepPartial<TerrainOptions>;
        weather?: DeepPartial<WeatherOptions>;
        world: World;
    }

    Hierarchy (View Summary)

    Index
    architecture?: ArchitectureName | "auto"

    Regional building tradition; 'auto' picks one from the climate at the centre.

    architectures?: DeepPartial<Record<ArchitectureName, Architecture>>

    The architectures (materials, roofs, stilts, balconies, …).

    Block extraction.

    buildBudget?: number

    Milliseconds per update() spent generating when progressive.

    Building rules.

    camera?: Camera

    Camera for level of detail. Without one, everything stays at full detail.

    center?: [number, number]

    Centre, frame-local [x, z] metres.

    climate?: Climate | null

    Climate override for 'auto' architecture (null = read from the world at the centre).

    District layout and per-district rules.

    Facades and roofs.

    Farmsteads (size: 'farmstead'): yard, buildings, driveway, fields and crops.

    Street direction field.

    frame?: LocalFrame

    Local frame the settlement is laid out in (world.frame by default; world.frameAt(lat, lon) on planets).

    Churches, town halls and water towers (how many each size class gets is in sizes).

    Level of detail.

    lotJitter?: number

    Lot split jitter: 0 = regular halves, 1 = very uneven.

    progressive?: boolean

    Spread generation over several frames (see buildBudget) instead of finishing in create.

    radius?: number

    Radius, metres (0 = the middle of the size class's range).

    Road surfaces.

    Road network rules.

    Lots along roads through open ground (outside blocks).

    scene?: Object3D<Object3DEventMap>

    If given, the city is added to it and updates itself via scene.onBeforeRender.

    seed?: string | number

    Seed: same seed, options and world give the same settlement.

    siteResolution?: number

    Terrain sampling resolution, metres (0 = automatic from the radius).

    Size class (sets radius, height limit, layout style and district shares).

    Size classes.

    style?: RoadStyle | "auto"

    Street layout; 'auto' takes the size class's.

    Terrain shaping.

    Weather and wear per material group (hooks for a weather system).

    world: World

    The world the settlement stands on (its height, water and climate; flattening goes here).