attach method
Implementation
Object3D attach(Object3D object) {
// adds object as a child of this, while maintaining the object's world transform
updateWorldMatrix(true, false);
m1.setFrom(matrixWorld);
m1.invert();
if (object.parent != null) {
object.parent!.updateWorldMatrix(true, false);
m1.multiply(object.parent!.matrixWorld);
}
object.applyMatrix4(m1);
add(object);
object.updateWorldMatrix(false, false);
return this;
}