harmonium1729
(1) the more straightforward (but less powerful) option is to use the dynamic bounds for a slider. Here, "a" is set to animate, but the bounds don't let it move if b=0: https://www.desmos.com/calculator/mqhhpso67r
(2) the more general feature that allows for complex scripting behavior is called "actions." Here's an example that uses that, where it's more of a genuine play/pause: https://www.desmos.com/calculator/gzqwx36lo0
It's a beta feature that needs to be enabled, but anyone can turn it on. More here: https://help.desmos.com/hc/en-us/articles/4407725009165-Acti...
If, however, the goal is to more easily edit LaTeX -- especially for folks who are less confident with LaTeX -- I suspect WYSIWYG is frequently a better option. MathQuill (mathquill.com), for example, is a fantastic open-source WISYWIG editor for LaTeX.
Disclosure: we use MathQuill heavily at desmos.com, where I work, and have contributed to its development.
[disclaimer: I work at desmos]
Here's a fun intermediate step (circles instead of hearts), with a few of the numbers parametrized as sliders:
https://www.desmos.com/calculator/irg4qa2s4h
[disclaimer: I work at desmos]