attach method
Object3D
attach(
- Object3D object
inherited
Implementation
Object3D attach(Object3D object) {
// adds object as a child of this, while maintaining the object's world transform
updateWorldMatrix(true, false);
_m1.copy(matrixWorld).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;
}