TweenNode¶
- class transytion.TweenNode(duration: float, obj: ~typing.Any, targets: dict[str, float], start_vals: dict[str, float] | None = None, ease_func: ~collections.abc.Callable[[float], float] = <function linear>, callback: ~collections.abc.Callable[[], None] = <function TweenNode.<lambda>>, args: tuple[~typing.Any, ...] = (), _progress: float = 0.0)¶
Bases:
objectFundamental building block for Tweens.
Attributes Summary
Methods Summary
callback()Linear tween that returns the thing itself.
finish()If start position is specified (not None), make sure values start from the start.
start()Must also have the original and resulting position to actually tween between those values.
update(dt)Attributes Documentation
- args: tuple[Any, ...] = ()¶
- duration: float = <dataclasses._MISSING_TYPE object>¶
- obj: Any = <dataclasses._MISSING_TYPE object>¶
- progress¶
- start_vals: dict[str, float] | None = None¶
- targets: dict[str, float] = <dataclasses._MISSING_TYPE object>¶
Methods Documentation
- callback()¶
- ease_func() float¶
Linear tween that returns the thing itself.
- finish()¶
- safe_reset_to_start()¶
If start position is specified (not None), make sure values start from the start. Otherwise, start from where they currently are.
- start()¶
Must also have the original and resulting position to actually tween between those values.
- update(dt)¶