animator property

  1. @nonVirtual
Animator? get animator

What plays the model's clips on this copy of it (Animator): for an object made by Model.instantiate (or Assets.instantiate) from a model with clips, once it's added; null for any other object, and for a model's parts.

Implementation

@nonVirtual
Animator? get animator {
  if (_animator case final a?) return a;
  if (_described != null) throw _notAdded('it has no animator');
  _engine('its animator can\'t be used');
  final model = _model;
  if (model == null || model.clips.isEmpty) return null;
  return _animator = world.system(_AnimatorWorld.new)._add(this, model);
}