GlbMerge

Two GLBs as one, so a renderer that takes a single model can show both. The base file's JSON and binary data are kept as they are, so its indices, extensions and the coordinates read from it stay valid; the added model's are appended after them, under one new root node that carries its translation.

Functions

Link copied to clipboard
fun append(base: ByteArray, added: ByteArray, translation: FloatArray, copyright: String?): ByteArray?

base with added moved by translation, and copyright as the file's notice. Null when either is not a GLB 2 with one embedded buffer, or added uses something this does not carry over (extensions, skins, morph targets, sparse data, files).