- Editado
Manipulating movement, stretch and sprites during runtime
For a client I need to build an animation of a rower in a boat. The animation is just 2 or 3 seconds on repeat. But it is important that the movement of the rower and the length of body parts can be manipulated during runtime.
So the movement of joints and and the stretch of body parts has to be regulated by mathimatical functions. Then I would be able to update the variables inside these functions to manipulate the animation during runtime.
Besides that I also need to highlight muscle groups and energy forces on request. I want to update the sprites to accomplish this.
Can I do this in Spine and how can I manipulate the movement and sprites in the HTML5 Canvas runtime?
You can adjust bone transforms at runtime. You can first use the Spine editor to determine which properties you want to adjust at runtime, then you just get a reference to the bone and set the scale, translation, etc.
Bone
You could also use skin bones and constraints to vary the size of a character. This is better for when you have a fixed number of discrete sizes, whereas adjusting bones can allow you to smoothly interpolate between proportions.
Skins - Spine User Guide: Skin bones
Blog: Spine 3.8 released: Skin bones and constraints
Spine 3.8 features rundown - YouTube
Thanks Nate. It's nice to have some options.