Skip to content

@modoki/engine / index / AssetEntry

Interface: AssetEntry

Assets & GUIDs

atlas?

optional atlas?: AtlasCacheBlock

Built-atlas block ('atlas' assets only) — page dims + frame map. Populated into the global atlasFrameIndex on register so resolveSprite redirects members to their page. Absent ⇒ the atlas hasn't been packed yet (members resolve to source).


audio?

optional audio?: AudioManifestBlock

Baked audio block ('audio' assets only), copied from the .meta.jsonaudio/audioCache blocks at scan time. Drives buffer-vs-stream at load + the converted-variant URL at play time. Absent ⇒ unconverted; the runtime defaults to loadType: 'buffer' and serves the source file.


environment?

optional environment?: EnvManifestBlock

Baked environment block ('environment' HDR assets only) — present once the HDR has been downscaled (a ~env.hdr variant exists). Absent ⇒ the HDR loads from its raw source.


font?

optional font?: FontManifestBlock

Baked font block ('font' assets only), copied from the .meta.jsonfont block at scan time. Present only once the font has been through the MSDF atlas converter (baked ~atlas.png + ~metrics.json variants exist). Absent ⇒ the font is a plain CSS-family-name font (resolved by fontFamily, never a GUID ref) and has no SDF atlas.


guid

guid: string


hash?

optional hash?: string

Content hash of the converted asset (source bytes + import settings + encoder version), copied from the .meta.json cache block at scan time. Appended to served variant URLs as ?v=<hash> so a re-import (new hash → new URL) busts immutable browser/CDN caches. Absent for unconverted assets.


model?

optional model?: ModelImportSettings

Baked model import settings (model assets only) — lets the runtime mesh-template cache decide whether the model has LODs without re-reading the meta sidecar.


modelCache?

optional modelCache?: ModelCacheInfo

Baked model cache info (model assets only) — lodPaths, lodDistances etc. The runtime LOD resolver reads this; absence means the model is unconverted (single mesh, no LOD wrapping).


path

path: string


postprocessor?

optional postprocessor?: string

Model postprocessor id (model assets only), copied from the .meta.jsonpostprocessor field at scan time. Static models read their postprocessor from the ModelSource trait, but a rigged/skinned model has no such trait, so the rigged loader reads it here to apply filterMesh (e.g. drop a baked ground "Plane"). Absent ⇒ 'none'.


sprite?

optional sprite?: SpriteAssetRef

Sliced-sprite block ('sprite' assets only) — the parent texture + rect/pivot. Resolved to a URL+frame by resolveSprite.


texture?

optional texture?: TextureImportSettings

Baked texture import settings (texture assets only) — lets the runtime resolver pick a variant + configure the texture without a per-file fetch.


textureType?

optional textureType?: TextureType

Authored texture usage type (texture assets only) — 3d/2d/ui. Drives reference type-checking (a 2D field rejects a 3d texture).


type

type: AssetType

Built with Modoki.