Node posing keeps each node's last matrix in one array, copied in place

This commit is contained in:
Denis Groshev committed 2026-11-17 16:29:08 +01:00
1 parent 2c2e9de14d
commit c6e53e5315
1 file changed
+7 -1
+7 -1
View File
@@ -94,7 +94,13 @@ function poseNodes(item, model) {
posed.set(name, NO_NODE);
continue;
}
posed.set(name, Array.from(matrix).slice(0, 16));
// The last matrix written, kept in one array per node, copied in place.
let kept = last;
if (!(kept instanceof Float64Array)) {
kept = new Float64Array(16);
posed.set(name, kept);
}
for (let i = 0; i < 16; i++) kept[i] = matrix[i];
// The node copies the matrix it is given.
node.matrix = Cesium.Matrix4.fromArray(matrix, 0, scratchNodeMatrix);
}