52 points · by ahmadwasfi · 2y ago · 47 comments
You can find the interactive documentation at www.targetj.io.
I hope you find it useful for creating great web experiences. If you have any questions about the framework or want to share your thoughts, please leave a comment below. I’m eager to hear from you!
- Super thin fonts on bright background makes the docs very hard to read.
- Inaccurate scrollbar that readjusts every time scrolling hits beyond the scrollbar indicates. E.g https://targetj.io/docs/timeLoop.html
- Make the demos and especially the demos editable.
Targets is specifically not novel, as every animation framework I've used has the same ideas exposed in the same ways (declaratively).
Not trying to insult the project, but there's a lot of crowd here and I'm passionate about performance, simple animations that I don't feel like anyone have quite nailed yet.
Chrome mobile BTW.
TargetJ uses a unified mechanism for both development and animation by creating targets. Each target essentially has two variables: target and actual. When actual does not equal target, TargetJ will update actual until it matches target through iterations controlled by steps and stepIntervals.
For example, to animate an object along its x-axis:
App(new TModel({ x: [300, 20, 50], // Moves x to 300px in 20 steps with 50ms pauses in between html: 'Hello world' })); You can find more examples at: https://targetj.io/examples.
For Performance: - TargetJ optimizes rendering by minimizing DOM manipulations. - TargetJ divides objects automatically into a tree structure, tracking only the branches visible to the user. See examples of infinite scrolling at https://targetj.io/examples/g-Infinite-scrolling.html and infinite zooming at https://targetj.io/examples/h-Infinite-zooming.html.
I am making the site https://targetj.io more mobile-friendly, which will take a few days. In the meantime, it's best to check it on a computer.
Integrating just the DOM animation from TargetJ with React is likely not feasible, as the two would conflict.
That way the implementation could _probably_ get some free performance as the browser could pre-calc some stuff ahead of time, without the need for you to brute force every calc on top of the js engine.
However, I agree that using the Web Animations API could be beneficial when user actions are not involved. This is a great suggestion, and I haven't given it much thought before. I will consider adding a separate API for it using the Web Animations API.
I'll be eagerly waiting what you come up with!
My 0.02.
Someone spend two years on something, something that could be very useful for someone. Your comment kind of shits on all of that without providing anything useful for the creator of this tool, or anyone else.
Of course I do realize that this might be hurtful to the individual who has spent time on this, but that doesn't change my opinion one bit. Animations on the web are already overused, having a framework dedicated to making them even more overused will make websites even worse. I absolutely think that OP should spend his time on something else.