etro icon indicating copy to clipboard operation
etro copied to clipboard

Deprecate function properties

Open clabe45 opened this issue 1 year ago • 0 comments

Dynamic properties set to functions are unnecessary. The logic used to calculate function properties can easily be moved to JavaScript getters. Alternatively, these properties can be set to different constant values each frame (e.g., in Layer.render() or Effect.apply()). An onDraw option will later be added to Movie.play() (#230), Movie.stream() (#231) and Movie.record() (#232). The effort of maintaining this type of dynamic property is not worth it, since there is no value-add. In fact, providing many different ways to calculate a property with some custom logic can result in antipatterns and technical debt.

clabe45 avatar Feb 18 '24 23:02 clabe45