Show HN: TargetJ – New JavaScript framework that can animate anything (github.com)
I am excited to introduce to you TargetJ, a new JavaScript framework that can animate anything. I have been working on this project for over two years, driven by the complexity of current UI frameworks.
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!
50 comments
[ 3.0 ms ] story [ 125 ms ] threadTargetJ 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.
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!
Integrating just the DOM animation from TargetJ with React is likely not feasible, as the two would conflict.
This is the first real data-point for me on HN for how the LLM rot is slowly spreading to the entirety of the web.
- 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.
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.
To be honest I would tell you that I don't care about "being an ass", but that would be a lie. I want OP to stop developing this nonsense and spend his time elsewhere. Obviously getting some pushback is necessary for that.
There is no way of saying "you completely wasted your time and should delete your project before someone uses it", without "being an ass".
You really don't see any other way to word that same sentiment? you couldn't not be an ass and state plainly that there's an excessive amount of eyecandy for your tastes, and that you feel it gets in the way of communication? The sardonic tone of "I think what I love the most..." doesn't set off your internal "wait, hold on, I'm being an ass and might consider rewording my comment" alarm?
Saying "you completely wasted your time and should delete your project before someone uses it" would be a less ass way to say the same thing, even! It's still ass, but less than what you wrote, imo.
But even then, the project isn't harming anyone else, so who are you to decide what they spend their time on? What have you done to cure cancer today and why haven't you done more? People get to choose what they do and as long as they aren't hurting someone else, it's up to them how they want to use their time.
>You really don't see any other way to word that same sentiment?
The problem with being polite is that the other too easily mistakes the politeness itself for encouragement, even if the comment is entirely negative. Generally ridicule is a good way to get someone to stop, as it makes very clear what you think and discourages continuing. Of course name calling is too easily dismissed and can easily lead to defiance. As discussed before, any kind of politeness is easily ignored or mistaken as positivity.
Chrome mobile BTW.
My 0.02.
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.