[Feature Request] Interpolation
I'd want some way to move a box to a new position with a gliding motion, I know that internally the games achieves this by using linear interpolation with frame delta, and that's the exact motion I refer to, This would allow canvas3d animations to be smooth, maybe some way to apply a duration to an action.
With durations, e.g.,
while true do
angle = angle + (math.pi / 4)
box.setPosition(math.cos(angle), math.sin(angle), 10)
sleep(10)
end
moving 45 degrees every 10 seconds, it would interpolate linearly between each action forming a octagon in the movement.
If you're going to interpolate, at least provide easing functions, as purely linear interpolation is generally bad for UX for non-infinite cases
@Lemmmy I'm not trying to ask for linear interpolation specifically, I just want to bring up the topic of interpolation for consideration of easing implementations.
Off the top of my head, Let's assume some API like this: box.ease("type", {position})
like "linear" and "beizer" and other sorts of curves, maybe a function to view types of eases.
This would really be useful for animation without constantly sending coordinate positions, would be especially nice once rotation transform is added.
Perhaps the easing function should be an optional argument at the end of the command it applies to.
box.setPosition(x:number, y:number, [ease:string])