Yes, you can scale the mesh in place by using a transform node as a pivot.
As HiGreg pointed out, scaling is relative to the mesh’s local origin, not necessarily its geometric center. In your example, adding 2 to every vertex coordinate moves the geometry’s local center to (2, 2, 2), but does not move the local origin. Scaling X by 2 therefore also doubles the geometry’s X offset from that origin. The mesh’s position property itself does not change.
Add createTransformNode and setParent to your imports from @babylonjs/lite.
Then replace your final box3.scaling.set(2, 1, 1) line with the following, before registerScene(scene):
const pivot = createTransformNode("box3-pivot", 2, 2.5, 2);
setParent(box3, pivot);
pivot.scaling.set(2, 1, 1);
Here, (2, 2.5, 2) is the box’s center before scaling: the vertex-data offset (2, 2, 2) plus its position (0, 0.5, 0). setParent preserves the mesh’s current world transform, so parenting does not move the box. Scaling the parent then scales the box around that center, keeping the center fixed. Leave box3.scaling at its default (1, 1, 1) for this replacement.
Alternatively, if you control how the mesh is created, keep its vertices centered around (0, 0, 0) and use position to place it. In your example, create box3 with the original positions array instead of newPositions, then use:
box3.position.set(2, 2.5, 2);
box3.scaling.set(2, 1, 1);
This also keeps the box’s center fixed, without needing a parent node.