<spine-widget> tag allows you to place your Spine animations into a web page.
fit attribute.
fit="fill". Default fit value is fit="contain".
fit="none".
In combination with that, you can use the scale attribute to choose you desired scale.
width, width, height, cover,and scaleDown.
width and height in pixels (without the px unit).
origin center the animation world origin with the center of the HTML element.
x-axis and y-axis respectively.
offset-x and offset-y to move you skeleton left or right by the pixel amount you specify.
identifier to your widget to get it by using the spine.getSpineWidget function.
You can easily access the Skeleton and the AnimationState of your character, and use them as if you were using spine-webgl.
inside mode, but not in origin mode.
debug to true.
spinner="false".
skin and animation attributes.
pages the atlas pages you want to load as a comma concatenated list of indices.
spine.createSpineWidget allows you to create a spine widget.
manual-start="false".
Then it's your responsibility to call start() on the widget.
As usual, just wait on the loadingPromise to act on the skeleton or state.
onScreenFunction is invoked.
start the first time the widget enters the viewport.
That useful in combination with manual-start="true to load assets only when they are into the viewport.
pages="".
update, and the skeleton apply and the skeleton updateWorldTransform functions are not invoked when the widget is off screen.
offscreen=update.
offscreen=pose.
update property of the widget.
In that it's your responsibility to skip the update/apply. You can use the onScreen property for convinience.
clip property to clip everything is outside the html container.
clip attribute.
draggable property to true.