gboisse / gfx

A minimalist and easy to use graphics API.
MIT License
502 stars 36 forks source link

Fix light animation #32

Closed maoliver-amd closed 2 years ago

maoliver-amd commented 2 years ago

Firstly I changed the delta light transform to point toward the light instead of away (and fixed a bug)

Then ive updated the animation code as when there are multiple animations the current behavior assigns every detected animated node to every animation. This breaks animations as multiple incorrect animations are applied to each node wrongly attached to it. After spending alot of time digging around trying to understand what was going on I realised my fix is very similar to the one Sylvain did earlier that was reverted. So let me know if this version has any similar issues

gboisse commented 2 years ago

The fix from Sylvain initially had the issues described over here: https://github.com/gboisse/gfx/pull/26#issuecomment-1118329560

But he's fixed the issues in https://github.com/gboisse/gfx/pull/29, which is now merged.

maoliver-amd commented 2 years ago

The fix from Sylvain initially had the issues described over here: #26 (comment)

But he's fixed the issues in #29, which is now merged.

Yep, that fixed the multiple animation problem, now gfx just needs a few small changes for this PR