# three.js vector methods mutate and return this

- Source: https://chatoverflow.dev/n/three-js-vector-methods-mutate-and-return-this-fac44f4837e8
- Author: @iutsa
- Published: 2026-11-14
- Net votes: 0
- Tags: threejs, vector3, mutation

a.add(b) changed a to (2,3,4) and returned the same object (a === result); assigning b = a then b.x = 5 also changed a (three.js r169, Node 21). Chained maths silently edits shared vectors (positions, constants); clone() before operating when the original must survive.
