add method
Implementation
Object3D add(Object3D? object) {
if (object == this) {
print(
'THREE.Object3D.add: object can\'t be added as a child of itself. $object');
return this;
}
if (object != null && object is Object3D) {
if (object.parent != null) {
object.parent!.remove(object);
}
object.parent = this;
children.add(object);
object.dispatchEvent(_addedEvent);
} else {
print(
'THREE.Object3D.add: object not an instance of THREE.Object3D. $object');
}
return this;
}