import { Vector2, Vector2Like, Vector3, Vector3Like } from 'three'; import { LinkedList } from '../datacontainers/LinkedList.js'; import { SpawnRules } from '../procgen/SpawnDistributionMap.js'; export declare enum BlockType { NONE = 0, HOLE = 1, BEDROCK = 2, WATER = 3, ICE = 4, MUD = 5, TRUNK = 6, SAND = 7, GRASS = 8, ROCK = 9, SNOW = 10, FOLIAGE_LIGHT = 11, FOLIAGE_DARK = 12, LAST_PLACEHOLDER = 13 } export declare enum BiomeType { Temperate = "temperate", Arctic = "arctic", Desert = "desert", Tropical = "tropical", Scorched = "scorched", Swamp = "swamp", Glacier = "glacier", Taiga = "taiga", Grassland = "grassland" } export type SpriteBlockType = number; export type Block = { pos: Vector3; data: T; }; export declare enum BlockMode { REGULAR = 0, CHECKERBOARD = 1 } export type BlockRawData = { biome: BiomeType; landIndex: number; level: number; }; export type BlockData = Partial & { level: number; type: BlockType; mode?: BlockMode; }; export type GroundBlockData = { level: number; biome: BiomeType; landIndex: number; landId?: string; flags: number; }; export type GroundBlock = Block; export type PatchBlock = GroundBlock & { index: number; localPos: Vector3; }; export declare enum SpawnCategory { Flora = 0, Structure = 1 } export type SpawnType = string; export declare const VoidSpawnType = "void"; export type SpawnProfile = string; export type SpawnPreset = { spawnProfile: SpawnProfile; spawnCategory: SpawnCategory; }; export type SpawnProfiles = Record; export type SpawnPresets = Record; export type SpawnedItems = Record; /** * CHUNK volume * * y * | * | * |_ _ _ x * / * / * z * * PATCH surface * * _ _ _ x (cols) * | * | * | * z (as y) rows * */ /** * Patch surfaces */ export declare enum PatchSides { EDGES = "edge", CORNERS = "corner", ALL = "all" } export declare enum PatchSideId { LEFT_EDGE = 0, RIGHT_EDGE = 1, BOTTOM_EDGE = 2, TOP_EDGE = 3, BOTTOM_LEFT_CORNER = 4, BOTTOM_RIGHT_CORNER = 5, TOP_LEFT_CORNER = 6, TOP_RIGHT_CORNER = 7 } export declare enum PatchOffsetId { XmY0 = 0,// left XpY0 = 1,// right X0Ym = 2,// bottom X0Yp = 3,// top XmYm = 4,// bottom-left XpYm = 5,// bottom-right XmYp = 6,// top-left XpYp = 7 } export declare enum PatchBoundId { xMyM = "xMyM", xMyP = "xMyP", xPyP = "xPyP", xPyM = "xPyM" } export type PatchBoundingPoints = Record; /** * Chunk volumes */ export declare enum CubeSide { FACE_LEFT = 0,// xM FACE_RIGHT = 1,// xP FACE_DOWN = 2,// yM FACE_UP = 3,// yP FACE_BACK = 4,// zM FACE_FRONT = 5,// zP EDGE_LEFT_DOWN = 6, EDGE_LEFT_UP = 7, EDGE_LEFT_BACK = 8, EDGE_LEFT_FRONT = 9, EDGE_RIGHT_DOWN = 10, EDGE_RIGHT_UP = 11, EDGE_RIGHT_BACK = 12, EDGE_RIGHT_FRONT = 13, EDGE_DOWN_BACK = 14, EDGE_DOWN_FRONT = 15, EDGE_UP_BACK = 16, EDGE_UP_FRONT = 17, CORNER_LEFT_DOWN_BACK = 18, CORNER_LEFT_DOWN_FRONT = 19, CORNER_LEFT_UP_BACK = 20, CORNER_LEFT_UP_FRONT = 21, CORNER_RIGHT_DOWN_BACK = 22, CORNER_RIGHT_DOWN_FRONT = 23, CORNER_RIGHT_UP_BACK = 24, CORNER_RIGHT_UP_FRONT = 25 } export declare enum CubeSides { FACES = "faces", EDGES = "edges", CORNERS = "corners", ALL = "all" } /** * or VolumeNeighbour */ export declare enum CubeOffsetId { xMyMzM = 0, xMyMz0 = 1,// LEFT_DOWN edge xMyMzP = 2,// LEFT_UP edge xMy0zM = 3,// LEFT_BACK edge xMy0z0 = 4,// LEFT face xMy0zP = 5,// LEFT_FRONT edge xMyPzM = 6,// LEFT_UP xMyPz0 = 7,// LEFT_UP xMyPzP = 8,// LEFT_UP x0yMzM = 9,// DOWN_BACK x0yMz0 = 10,// DOWN x0yMzP = 11,// DOWN_FRONT x0y0zM = 12,// BACK x0y0zP = 13,// FRONT x0yPzM = 14,// UP_BACK edge x0yPz0 = 15,// UP face x0yPzP = 16,// UP_FRONT edge xPyMzM = 17,// RIGHT_DOWN_BACK corner xPyMz0 = 18,// RIGHT_DOWN edge xPyMzP = 19,// RIGHT_DOWN_FRONT corner xPy0zM = 20,// RIGHT_BACK edge xPy0z0 = 21,// RIGHT face xPy0zP = 22,// RIGHT_FRONT edge xPyPzM = 23,// RIGHT_UP_BACK corner xPyPz0 = 24,// RIGHT_UP edge xPyPzP = 25 } export declare enum ChunkBoundId { xMyMzM = 0, xMyPzM = 1, xPyPzM = 2, xPyMzM = 3, xMyMzP = 4, xMyPzP = 5, xPyPzP = 6, xPyMzP = 7 } /** * Cardinal directions */ export declare enum CardinalDirections { N = 0, E = 1, S = 2, W = 3 } export declare enum IntercardinalDirections { NE = 0, NW = 1, SE = 2, SW = 3 } export type CardinalExtendedDirections = CardinalDirections & IntercardinalDirections; type Point = { x: number; y: number; }; /** * External procedural layer conf format */ export type ProcLayerExtCfg = { seed: string; spline: Point[]; blend_weight?: any; blend_mode?: any; spread: number; period?: number; periodicity?: number; harmonics: number; harmonic_gain: number; harmonic_spread: number; }; export type PatchKey = string; export type PatchId = Vector2Like; export type ChunkKey = string; export type ChunkId = Vector3Like; export type PatchIndex = Record; export type ChunkIndex = Record; export type LandConfigId = string; export type BiomeLandKey = string; type LandBaseFields = { x: number; y: number; }; type LandConfigFields = { type: BlockType; subtype: BlockType; mixratio: number; fadein: any; fadeout: any; }; export type SpawnElement = { weight: number; type: string; size: number; }; type LandPreprocessedFields = { key: BiomeLandKey; flora: SpawnElement[]; }; type LandRawFields = LandBaseFields & Partial & { flora?: Record; }; export type LandFields = LandBaseFields & LandConfigFields & LandPreprocessedFields; export type BiomeLandsConf = Record; export type BiomesRawConf = Record; export type BiomeLands = LinkedList; export type BiomesConf = Record; export {};