SpineComponent constructor
SpineComponent(
- SkeletonDrawable _drawable, {
- bool ownsDrawable = true,
- BoundsProvider boundsProvider = const SetupPoseBounds(),
- Vector2? position,
- Vector2? scale,
- double angle = 0.0,
- Anchor anchor = Anchor.topLeft,
- Iterable<
Component> ? children, - int? priority,
- 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);
}