From 76b8355edee70e782e1892b1b5efb5115ccbf583 Mon Sep 17 00:00:00 2001 From: "D. Berge" Date: Thu, 21 Aug 2025 14:51:49 +0200 Subject: [PATCH] Add encoding type 4 to bundle --- lib/www/server/lib/binary/bundle.js | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/lib/www/server/lib/binary/bundle.js b/lib/www/server/lib/binary/bundle.js index 1f161b6..935ae35 100644 --- a/lib/www/server/lib/binary/bundle.js +++ b/lib/www/server/lib/binary/bundle.js @@ -273,6 +273,31 @@ function bundle (json, opts = {}) { }); return encode.sequential(json, el => el.sequence, el => el.point, deltas, values, type) + } else if (type == 4) { + /* Bare final positions + * + * Δelem 0: Sequence no. (Uint16Array, Uint8Array) + * elem 0‒1: Float32Array, Float32Array – Final positions (x, y) + * + */ + + deltas.push({ + key: el => el[2], + baseType: Uint16Array, + incrType: Int8Array + }); + + values.push({ + key: el => el[3], + type: Float32Array + }); + + values.push({ + key: el => el[4], + type: Float32Array + }); + + return encode.sequential(json, el => el[0], el => el[1], deltas, values, type) } else if (type == 0xa) { /* 4D comparison data: *