clear method

Object3D clear()

Removes all child objects.

Implementation

Object3D clear() {
  for (int i = 0; i < children.length; i++) {
    final object = children[i];

    object.parent = null;

    object.dispatchEvent(_removedEvent);
  }

  children.length = 0;

  return this;
}