Due to a small overlook, mesh batches had color VBOs created always, regardless if there were colors or not. With this fixed, we're reduced memory footprint taken up pointlessly

This commit is contained in:
AlexandruPopovici
2023-05-07 17:14:43 +03:00
parent a8a43497d2
commit 3238427488
@@ -281,7 +281,7 @@ export class GeometryConverter {
const vertices = node.raw.vertices
const faces = node.raw.faces
const colorsRaw = node.raw.colors
let colors = null
let colors = undefined
let k = 0
while (k < faces.length) {
@@ -321,7 +321,7 @@ export class GeometryConverter {
attributes: {
POSITION: vertices,
INDEX: indices,
COLOR: colors
...(colors && { COLOR: colors })
},
bakeTransform: new Matrix4().makeScale(
conversionFactor,