The .drft container · interface

DrftManifest

What the file says is coming, known from the first few kilobytes.

Explained in The .drft container.

interface DrftManifest
import type { DrftManifest } from '@driftengine/drft';

In depth

The chunk table is a manifest and always was: a fixed 32-byte header, then chunkCount x 16 bytes naming every chunk's kind, offset and length. For a 187-mesh car that is about 3 KB, so a reader holding the first three kilobytes of a 74 MB file knows exactly what the rest of it contains and how big each piece is. That is what lets a loading bar say "142 of 187 parts" rather than counting bytes and hoping.

Properties

NameTypeDescription
totalBytesreadonlynumber
meshCountreadonlynumber
textureCountreadonlynumber
meshBytesreadonlynumberBytes of geometry, of images, and of everything else, from the table alone.
textureBytesreadonlynumber
lodCountreadonlynumberHow many coarse levels of detail this file carries, which is normally one or none.
More

Worth reporting rather than leaving to be discovered, because it is the difference between a load that opens on an outline and one that opens on an empty room, and a caller composing words for a progress readout wants to know that before the first stage rather than after it.

splatBlockCountreadonlynumberHow many SPLT blocks this file carries, and how many bytes they are between them.
More

Blocks, not splats, because the number a progress readout wants is how many refinements are still coming — the splat count is in every block's own header and a caller has it from the first one. Zero for a file with no capture, which is most of them.

splatBytesreadonlynumber