For the moment can animate object size and color (as special case of sprite "color : r g b a").
Used in D1650: GridBrowser GUI addon
Differential D1702
GUI addon to animate objects proprieties nani on Dec 23 2018, 11:43 PM. Authored by
Details For the moment can animate object size and color (as special case of sprite "color : r g b a"). Used in D1650: GridBrowser GUI addon No test plan.
Diff Detail
Event TimelineThere are a very large number of changes, so older changes are hidden. Show Older Changes Comment Actions Now can modify text color, object sprite color type and size. Added typical animation functionality as delay, duration, hooks, chained animations and such. Planning loops in the future still pending how. Btw, thank you @bb for the review. :) Comment Actions Fixed some object references annoyance. Made sure shared animation settings don't get modified. Comment Actions It seems like you made the diff dependencies wrong around. Comment Actions As elexis mentioned the color animation would in the vanilla game be dead code, thus that shouldn't be there. Ofcourse it could be useful later, so I would propose to implement the system for the size only, but keep it extendable so the color could easily be added when required. Furthermore it would help a lot when there was a simple test case, which uses this object already, something like the gamesetup options panel or so
Comment Actions Not committed but D1703 uses the three of them.
Will try (or you could try the map browser diff D1703 which would show all the possibilities). Thanks for reviewing.
Comment Actions I can't read the last two comments now, so I might repeat things mentioned by bb or say something that was responded to by nani. But I add some comments sooner rather than later: Dead code can be useful to mods, but dead code that is useless code in any case should be nuked (if usage is too hypothetical, in particular if using it would require it to be redesigned or if the unused code is 25% where the other 75% have to be added and thus the 25% are likely wrong) One file per prototype. Encoding code is a bad pattern and it's nnot necessary - one can just specify a JS function x => f(x) instead of specifying some math as a string and parsing the string with logic that supports only few things while adding code to achieve that. We should start with the use case analysis (do we need this to begin with), then the implementation design (if we need this, is it better in JS or C++). Not sure if we need an animation queue rather than just starting immediately upon call. If the code is written well, it doesn't have to add all the complexity to distinguish the property size/color/..., but it would be generic, and receive the property parsing as an argument. For example one function animate: (property, time) => newProperty.
Comment Actions TBH this is too complex and too complicated for my tastes as it's written. I say 'remove stuff'.
I also don't quite understand why you call 'run()' on every tick? Is it because of bullet point #1 above? I'm not _sure_ how generic we need to make "actions", haven't been quite able to understand how these work. We're working with JS, so I'd rather have straightforward code than params for this maybe. |