News for hackers. Stuff that matters.
Re:Show HN: TargetJ – New JavaScript framework that can anim... by Permik on Tuesday July 16, 2024 @06:58AM (#40975345)
It's a shame that the non-composited animations just aren't performant enough to animate on mobile devices.
Re:Show HN: TargetJ – New JavaScript framework that can anim... by Permik on Tuesday July 16, 2024 @07:04AM (#40975382)
Just as a curiosity, have you thought about transforming the target value stepping down to web animations api calls?

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.

Re:Show HN: TargetJ – New JavaScript framework that can anim... by ahmadwasfi on Tuesday July 16, 2024 @09:07AM (#40976199)
Thank you for your feedback. Currently, animations are handled using transform: translate by directly manipulating the styles of elements with JavaScript. I think this offloads the work to the GPU. This approach also gives the ability to animate in response to user actions which could be frequent like scrolling and no fixed time frame is known beforehand.

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.

Re:Show HN: TargetJ – New JavaScript framework that can anim... by ahmadwasfi on Friday July 19, 2024 @12:26PM (#41008129)
Thank you again for the great suggestion! I’ve reflected on it and decided to work on integrating the Web Animations API. Users will be able to choose between using the Web Animations API or more direct DOM manipulation at runtime, selecting their preference in the target itself. Thanks again for the feedback.
Re:Show HN: TargetJ – New JavaScript framework that can anim... by Permik on Sunday July 21, 2024 @09:02AM (#41024780)
No problem! Happy that I could help :)

I'll be eagerly waiting what you come up with!