Home
Pages

src/ingest

declarative-hex-worlds

declarative-hex-worlds


declarative-hex-worlds / src/ingest

src/ingest

src/ingest/ — Node-side asset ingest: validates a FREE/EXTRA source root, walks the GLTF tree (with symlink hardening landing in Epic C2), extracts AssetBounds from accessor min/max metadata, and emits a normalized MedievalHexagonManifest JSON.

Precursor to the PRD-RB bootstrap flow: same walker, same AssetBounds extraction, different output sink (manifest JSON vs an asset tree mirrored under the consumer's <out>/addons/...).

Interfaces

GenerateManifestOptions

Defined in: packages/declarative-hex-worlds/src/ingest/ingest.ts:61

Options for scanning a local KayKit source folder into a package manifest.

This is a Node/build-time API for app-local FREE or EXTRA ingest pipelines; it is not intended for browser runtime imports.

Properties

edition

edition: "free" | "extra"

Defined in: packages/declarative-hex-worlds/src/ingest/ingest.ts:65

Pack edition being scanned.

generatedAt?

optional generatedAt?: string

Defined in: packages/declarative-hex-worlds/src/ingest/ingest.ts:67

Stable timestamp override for reproducible generated manifests.

sourceRoot

sourceRoot: string

Defined in: packages/declarative-hex-worlds/src/ingest/ingest.ts:63

Root folder of a KayKit Medieval Hexagon pack containing Assets/gltf.


ValidateSourceResult

Defined in: packages/declarative-hex-worlds/src/ingest/ingest.ts:73

Source validation summary for a local KayKit pack folder.

Properties

edition

edition: "free" | "extra"

Defined in: packages/declarative-hex-worlds/src/ingest/ingest.ts:77

Pack edition expected at the source root.

expectedCount

expectedCount: number

Defined in: packages/declarative-hex-worlds/src/ingest/ingest.ts:81

Expected model count for the requested edition.

gltfCount

gltfCount: number

Defined in: packages/declarative-hex-worlds/src/ingest/ingest.ts:79

Number of .gltf files found under Assets/gltf.

ok

ok: boolean

Defined in: packages/declarative-hex-worlds/src/ingest/ingest.ts:83

Whether the discovered count exactly matches the edition expectation.

sourceRoot

sourceRoot: string

Defined in: packages/declarative-hex-worlds/src/ingest/ingest.ts:75

Source root that was checked.


WriteManifestModuleOptions

Defined in: packages/declarative-hex-worlds/src/ingest/ingest.ts:89

Options for emitting a TypeScript manifest module.

Properties

exportName?

optional exportName?: string

Defined in: packages/declarative-hex-worlds/src/ingest/ingest.ts:91

Export identifier to use instead of the edition default.

typeImportPath?

optional typeImportPath?: string

Defined in: packages/declarative-hex-worlds/src/ingest/ingest.ts:93

Type import specifier written into the generated module.

Functions

copyGltfTree()

copyGltfTree(sourceRoot, destinationRoot): void

Defined in: packages/declarative-hex-worlds/src/ingest/ingest.ts:143

Copy the complete Assets/gltf tree into an output folder.

Existing output is replaced so generated package assets stay reproducible.

Parameters

sourceRoot

string

destinationRoot

string

Returns

void


defaultSourceRoot()

defaultSourceRoot(edition, cwd?): string

Defined in: packages/declarative-hex-worlds/src/ingest/ingest.ts:111

Resolve the conventional gitignored source folder for a pack edition.

Parameters

edition

"free" | "extra"

cwd?

string = ...

Returns

string


expectedModelCount()

expectedModelCount(edition): number

Defined in: packages/declarative-hex-worlds/src/ingest/ingest.ts:104

Return the expected GLTF model count for a KayKit pack edition.

Parameters

edition

"free" | "extra"

Returns

number


generateManifestFromSource()

generateManifestFromSource(options): MedievalHexagonManifest

Defined in: packages/declarative-hex-worlds/src/ingest/ingest.ts:165

Generate a normalized manifest by inspecting every GLTF in a local pack.

Bounds, buffers, textures, material slots, taxonomy fields, and license metadata are derived from source files and the known KayKit edition.

Parameters

options

GenerateManifestOptions

Returns

MedievalHexagonManifest


validateSourceRoot()

validateSourceRoot(sourceRoot, edition): ValidateSourceResult

Defined in: packages/declarative-hex-worlds/src/ingest/ingest.ts:125

Count local GLTF files and compare them against the known edition count.

The helper does not throw when the source is absent, which lets CLI doctor and build scripts report a clear local setup status.

Parameters

sourceRoot

string

edition

"free" | "extra"

Returns

ValidateSourceResult


writeManifestJson()

writeManifestJson(manifest, outputPath): void

Defined in: packages/declarative-hex-worlds/src/ingest/ingest.ts:260

Write a generated manifest as formatted JSON.

Parameters

manifest

MedievalHexagonManifest

outputPath

string

Returns

void


writeManifestModule()

writeManifestModule(manifest, outputPath, options?): void

Defined in: packages/declarative-hex-worlds/src/ingest/ingest.ts:205

Write a TypeScript module that exports a generated manifest.

Parameters

manifest

MedievalHexagonManifest

outputPath

string

options?

WriteManifestModuleOptions = {}

Returns

void