auto-git:
[add] src/foliage/bundled-foliage-manifest.ts
This commit is contained in:
195
src/foliage/bundled-foliage-manifest.ts
Normal file
195
src/foliage/bundled-foliage-manifest.ts
Normal file
@@ -0,0 +1,195 @@
|
||||
import {
|
||||
createBundledFoliageManifest,
|
||||
validateBundledFoliageManifest
|
||||
} from "./bundled-foliage";
|
||||
|
||||
export const BUNDLED_FOLIAGE_RELATIVE_PATHS = [
|
||||
"Grass/BlueFescue/BlueFescue_LOD0.glb",
|
||||
"Grass/BlueFescue/BlueFescue_LOD1.glb",
|
||||
"Grass/BlueFescue/BlueFescue_LOD2.glb",
|
||||
"Grass/BlueFescue/BlueFescue_LOD3.glb",
|
||||
"Grass/BroadBlade/BroadBlade_LOD0.glb",
|
||||
"Grass/BroadBlade/BroadBlade_LOD1.glb",
|
||||
"Grass/BroadBlade/BroadBlade_LOD2.glb",
|
||||
"Grass/BroadBlade/BroadBlade_LOD3.glb",
|
||||
"Grass/DryTuft/DryTuft_LOD0.glb",
|
||||
"Grass/DryTuft/DryTuft_LOD1.glb",
|
||||
"Grass/DryTuft/DryTuft_LOD2.glb",
|
||||
"Grass/DryTuft/DryTuft_LOD3.glb",
|
||||
"Grass/Foxtail/Foxtail_LOD0.glb",
|
||||
"Grass/Foxtail/Foxtail_LOD1.glb",
|
||||
"Grass/Foxtail/Foxtail_LOD2.glb",
|
||||
"Grass/Foxtail/Foxtail_LOD3.glb",
|
||||
"Grass/MarshReed/MarshReed_LOD0.glb",
|
||||
"Grass/MarshReed/MarshReed_LOD1.glb",
|
||||
"Grass/MarshReed/MarshReed_LOD2.glb",
|
||||
"Grass/MarshReed/MarshReed_LOD3.glb",
|
||||
"Grass/MeadowSoft/MeadowSoft_LOD0.glb",
|
||||
"Grass/MeadowSoft/MeadowSoft_LOD1.glb",
|
||||
"Grass/MeadowSoft/MeadowSoft_LOD2.glb",
|
||||
"Grass/MeadowSoft/MeadowSoft_LOD3.glb",
|
||||
"Grass/SparseField/SparseField_LOD0.glb",
|
||||
"Grass/SparseField/SparseField_LOD1.glb",
|
||||
"Grass/SparseField/SparseField_LOD2.glb",
|
||||
"Grass/SparseField/SparseField_LOD3.glb",
|
||||
"Grass/Windswept/Windswept_LOD0.glb",
|
||||
"Grass/Windswept/Windswept_LOD1.glb",
|
||||
"Grass/Windswept/Windswept_LOD2.glb",
|
||||
"Grass/Windswept/Windswept_LOD3.glb",
|
||||
"GrassDry/BrittleGrassClump/BrittleGrassClump_LOD0.glb",
|
||||
"GrassDry/BrittleGrassClump/BrittleGrassClump_LOD1.glb",
|
||||
"GrassDry/BrittleGrassClump/BrittleGrassClump_LOD2.glb",
|
||||
"GrassDry/BrittleGrassClump/BrittleGrassClump_LOD3.glb",
|
||||
"GrassDry/BrokenHayPile/BrokenHayPile_LOD0.glb",
|
||||
"GrassDry/BrokenHayPile/BrokenHayPile_LOD1.glb",
|
||||
"GrassDry/BrokenHayPile/BrokenHayPile_LOD2.glb",
|
||||
"GrassDry/BrokenHayPile/BrokenHayPile_LOD3.glb",
|
||||
"GrassDry/CutStubblePatch/CutStubblePatch_LOD0.glb",
|
||||
"GrassDry/CutStubblePatch/CutStubblePatch_LOD1.glb",
|
||||
"GrassDry/CutStubblePatch/CutStubblePatch_LOD2.glb",
|
||||
"GrassDry/CutStubblePatch/CutStubblePatch_LOD3.glb",
|
||||
"GrassDry/DryTuftFan/DryTuftFan_LOD0.glb",
|
||||
"GrassDry/DryTuftFan/DryTuftFan_LOD1.glb",
|
||||
"GrassDry/DryTuftFan/DryTuftFan_LOD2.glb",
|
||||
"GrassDry/DryTuftFan/DryTuftFan_LOD3.glb",
|
||||
"GrassDry/GoldenSparseGrass/GoldenSparseGrass_LOD0.glb",
|
||||
"GrassDry/GoldenSparseGrass/GoldenSparseGrass_LOD1.glb",
|
||||
"GrassDry/GoldenSparseGrass/GoldenSparseGrass_LOD2.glb",
|
||||
"GrassDry/GoldenSparseGrass/GoldenSparseGrass_LOD3.glb",
|
||||
"GrassDry/MownClippings/MownClippings_LOD0.glb",
|
||||
"GrassDry/MownClippings/MownClippings_LOD1.glb",
|
||||
"GrassDry/MownClippings/MownClippings_LOD2.glb",
|
||||
"GrassDry/MownClippings/MownClippings_LOD3.glb",
|
||||
"GrassDry/StrawLitterMat/StrawLitterMat_LOD0.glb",
|
||||
"GrassDry/StrawLitterMat/StrawLitterMat_LOD1.glb",
|
||||
"GrassDry/StrawLitterMat/StrawLitterMat_LOD2.glb",
|
||||
"GrassDry/StrawLitterMat/StrawLitterMat_LOD3.glb",
|
||||
"GrassDry/WheatStubbleRow/WheatStubbleRow_LOD0.glb",
|
||||
"GrassDry/WheatStubbleRow/WheatStubbleRow_LOD1.glb",
|
||||
"GrassDry/WheatStubbleRow/WheatStubbleRow_LOD2.glb",
|
||||
"GrassDry/WheatStubbleRow/WheatStubbleRow_LOD3.glb",
|
||||
"GrassTall/BentWildGrass/BentWildGrass_LOD0.glb",
|
||||
"GrassTall/BentWildGrass/BentWildGrass_LOD1.glb",
|
||||
"GrassTall/BentWildGrass/BentWildGrass_LOD2.glb",
|
||||
"GrassTall/BentWildGrass/BentWildGrass_LOD3.glb",
|
||||
"GrassTall/DryPrairieClump/DryPrairieClump_LOD0.glb",
|
||||
"GrassTall/DryPrairieClump/DryPrairieClump_LOD1.glb",
|
||||
"GrassTall/DryPrairieClump/DryPrairieClump_LOD2.glb",
|
||||
"GrassTall/DryPrairieClump/DryPrairieClump_LOD3.glb",
|
||||
"GrassTall/FeatherGrassClump/FeatherGrassClump_LOD0.glb",
|
||||
"GrassTall/FeatherGrassClump/FeatherGrassClump_LOD1.glb",
|
||||
"GrassTall/FeatherGrassClump/FeatherGrassClump_LOD2.glb",
|
||||
"GrassTall/FeatherGrassClump/FeatherGrassClump_LOD3.glb",
|
||||
"GrassTall/ReedGrassClump/ReedGrassClump_LOD0.glb",
|
||||
"GrassTall/ReedGrassClump/ReedGrassClump_LOD1.glb",
|
||||
"GrassTall/ReedGrassClump/ReedGrassClump_LOD2.glb",
|
||||
"GrassTall/ReedGrassClump/ReedGrassClump_LOD3.glb",
|
||||
"GrassTall/SeedStemClump/SeedStemClump_LOD0.glb",
|
||||
"GrassTall/SeedStemClump/SeedStemClump_LOD1.glb",
|
||||
"GrassTall/SeedStemClump/SeedStemClump_LOD2.glb",
|
||||
"GrassTall/SeedStemClump/SeedStemClump_LOD3.glb",
|
||||
"GrassTall/TallMeadowClump/TallMeadowClump_LOD0.glb",
|
||||
"GrassTall/TallMeadowClump/TallMeadowClump_LOD1.glb",
|
||||
"GrassTall/TallMeadowClump/TallMeadowClump_LOD2.glb",
|
||||
"GrassTall/TallMeadowClump/TallMeadowClump_LOD3.glb",
|
||||
"GrassTall/TuftedRushClump/TuftedRushClump_LOD0.glb",
|
||||
"GrassTall/TuftedRushClump/TuftedRushClump_LOD1.glb",
|
||||
"GrassTall/TuftedRushClump/TuftedRushClump_LOD2.glb",
|
||||
"GrassTall/TuftedRushClump/TuftedRushClump_LOD3.glb",
|
||||
"GrassTall/WildOatClump/WildOatClump_LOD0.glb",
|
||||
"GrassTall/WildOatClump/WildOatClump_LOD1.glb",
|
||||
"GrassTall/WildOatClump/WildOatClump_LOD2.glb",
|
||||
"GrassTall/WildOatClump/WildOatClump_LOD3.glb",
|
||||
"Weed/CloverPatch/CloverPatch_LOD0.glb",
|
||||
"Weed/CloverPatch/CloverPatch_LOD1.glb",
|
||||
"Weed/CloverPatch/CloverPatch_LOD2.glb",
|
||||
"Weed/CloverPatch/CloverPatch_LOD3.glb",
|
||||
"Weed/DandelionRosette/DandelionRosette_LOD0.glb",
|
||||
"Weed/DandelionRosette/DandelionRosette_LOD1.glb",
|
||||
"Weed/DandelionRosette/DandelionRosette_LOD2.glb",
|
||||
"Weed/DandelionRosette/DandelionRosette_LOD3.glb",
|
||||
"Weed/DockWeed/DockWeed_LOD0.glb",
|
||||
"Weed/DockWeed/DockWeed_LOD1.glb",
|
||||
"Weed/DockWeed/DockWeed_LOD2.glb",
|
||||
"Weed/DockWeed/DockWeed_LOD3.glb",
|
||||
"Weed/GroundIvy/GroundIvy_LOD0.glb",
|
||||
"Weed/GroundIvy/GroundIvy_LOD1.glb",
|
||||
"Weed/GroundIvy/GroundIvy_LOD2.glb",
|
||||
"Weed/GroundIvy/GroundIvy_LOD3.glb",
|
||||
"Weed/NettlePatch/NettlePatch_LOD0.glb",
|
||||
"Weed/NettlePatch/NettlePatch_LOD1.glb",
|
||||
"Weed/NettlePatch/NettlePatch_LOD2.glb",
|
||||
"Weed/NettlePatch/NettlePatch_LOD3.glb",
|
||||
"Weed/PlantainCluster/PlantainCluster_LOD0.glb",
|
||||
"Weed/PlantainCluster/PlantainCluster_LOD1.glb",
|
||||
"Weed/PlantainCluster/PlantainCluster_LOD2.glb",
|
||||
"Weed/PlantainCluster/PlantainCluster_LOD3.glb",
|
||||
"Weed/RagweedSprig/RagweedSprig_LOD0.glb",
|
||||
"Weed/RagweedSprig/RagweedSprig_LOD1.glb",
|
||||
"Weed/RagweedSprig/RagweedSprig_LOD2.glb",
|
||||
"Weed/RagweedSprig/RagweedSprig_LOD3.glb",
|
||||
"Weed/ThistleRosette/ThistleRosette_LOD0.glb",
|
||||
"Weed/ThistleRosette/ThistleRosette_LOD1.glb",
|
||||
"Weed/ThistleRosette/ThistleRosette_LOD2.glb",
|
||||
"Weed/ThistleRosette/ThistleRosette_LOD3.glb",
|
||||
"WheatUnderstory/BroadPlantainPatch/BroadPlantainPatch_LOD0.glb",
|
||||
"WheatUnderstory/BroadPlantainPatch/BroadPlantainPatch_LOD1.glb",
|
||||
"WheatUnderstory/BroadPlantainPatch/BroadPlantainPatch_LOD2.glb",
|
||||
"WheatUnderstory/BroadPlantainPatch/BroadPlantainPatch_LOD3.glb",
|
||||
"WheatUnderstory/ChickweedMat/ChickweedMat_LOD0.glb",
|
||||
"WheatUnderstory/ChickweedMat/ChickweedMat_LOD1.glb",
|
||||
"WheatUnderstory/ChickweedMat/ChickweedMat_LOD2.glb",
|
||||
"WheatUnderstory/ChickweedMat/ChickweedMat_LOD3.glb",
|
||||
"WheatUnderstory/FieldWeedSprig/FieldWeedSprig_LOD0.glb",
|
||||
"WheatUnderstory/FieldWeedSprig/FieldWeedSprig_LOD1.glb",
|
||||
"WheatUnderstory/FieldWeedSprig/FieldWeedSprig_LOD2.glb",
|
||||
"WheatUnderstory/FieldWeedSprig/FieldWeedSprig_LOD3.glb",
|
||||
"WheatUnderstory/RedCloverTuft/RedCloverTuft_LOD0.glb",
|
||||
"WheatUnderstory/RedCloverTuft/RedCloverTuft_LOD1.glb",
|
||||
"WheatUnderstory/RedCloverTuft/RedCloverTuft_LOD2.glb",
|
||||
"WheatUnderstory/RedCloverTuft/RedCloverTuft_LOD3.glb",
|
||||
"WheatUnderstory/RibwortPlantain/RibwortPlantain_LOD0.glb",
|
||||
"WheatUnderstory/RibwortPlantain/RibwortPlantain_LOD1.glb",
|
||||
"WheatUnderstory/RibwortPlantain/RibwortPlantain_LOD2.glb",
|
||||
"WheatUnderstory/RibwortPlantain/RibwortPlantain_LOD3.glb",
|
||||
"WheatUnderstory/TinyBlueFlowerClump/TinyBlueFlowerClump_LOD0.glb",
|
||||
"WheatUnderstory/TinyBlueFlowerClump/TinyBlueFlowerClump_LOD1.glb",
|
||||
"WheatUnderstory/TinyBlueFlowerClump/TinyBlueFlowerClump_LOD2.glb",
|
||||
"WheatUnderstory/TinyBlueFlowerClump/TinyBlueFlowerClump_LOD3.glb",
|
||||
"WheatUnderstory/TinyDaisyClump/TinyDaisyClump_LOD0.glb",
|
||||
"WheatUnderstory/TinyDaisyClump/TinyDaisyClump_LOD1.glb",
|
||||
"WheatUnderstory/TinyDaisyClump/TinyDaisyClump_LOD2.glb",
|
||||
"WheatUnderstory/TinyDaisyClump/TinyDaisyClump_LOD3.glb",
|
||||
"WheatUnderstory/WhiteCloverPatch/WhiteCloverPatch_LOD0.glb",
|
||||
"WheatUnderstory/WhiteCloverPatch/WhiteCloverPatch_LOD1.glb",
|
||||
"WheatUnderstory/WhiteCloverPatch/WhiteCloverPatch_LOD2.glb",
|
||||
"WheatUnderstory/WhiteCloverPatch/WhiteCloverPatch_LOD3.glb"
|
||||
] as const;
|
||||
|
||||
export const BUNDLED_FOLIAGE_PROTOTYPES = createBundledFoliageManifest(
|
||||
BUNDLED_FOLIAGE_RELATIVE_PATHS
|
||||
);
|
||||
|
||||
export const BUNDLED_FOLIAGE_PROTOTYPE_REGISTRY = Object.fromEntries(
|
||||
BUNDLED_FOLIAGE_PROTOTYPES.map((prototype) => [prototype.id, prototype])
|
||||
);
|
||||
|
||||
const BUNDLED_FOLIAGE_PROTOTYPE_IDS = new Set(
|
||||
BUNDLED_FOLIAGE_PROTOTYPES.map((prototype) => prototype.id)
|
||||
);
|
||||
|
||||
const manifestDiagnostics = validateBundledFoliageManifest(
|
||||
BUNDLED_FOLIAGE_PROTOTYPES
|
||||
);
|
||||
|
||||
if (manifestDiagnostics.length > 0) {
|
||||
throw new Error(
|
||||
`Bundled foliage manifest is invalid: ${manifestDiagnostics
|
||||
.map((diagnostic) => diagnostic.message)
|
||||
.join(" | ")}`
|
||||
);
|
||||
}
|
||||
|
||||
export function isBundledFoliagePrototypeId(prototypeId: string): boolean {
|
||||
return BUNDLED_FOLIAGE_PROTOTYPE_IDS.has(prototypeId);
|
||||
}
|
||||
Reference in New Issue
Block a user