SpineComponent constructor

SpineComponent(
  1. SkeletonDrawable _drawable, {
  2. bool ownsDrawable = true,
  3. BoundsProvider boundsProvider = const SetupPoseBounds(),
  4. Vector2? position,
  5. Vector2? scale,
  6. double angle = 0.0,
  7. Anchor anchor = Anchor.topLeft,
  8. Iterable<Component>? children,
  9. int? priority,
  10. ComponentKey? key,
})

Implementation

SpineComponent(
  this._drawable, {
  bool ownsDrawable = true,
  BoundsProvider boundsProvider = const SetupPoseBounds(),
  super.position,
  super.scale,
  double super.angle = 0.0,
  Anchor super.anchor = Anchor.topLeft,
  super.children,
  super.priority,
  super.key,
})  : _ownsDrawable = ownsDrawable,
      _boundsProvider = boundsProvider {
  _drawable.update(0);
  _bounds = _boundsProvider.computeBounds(_drawable);
  size = Vector2(_bounds.width, _bounds.height);
}