Closed AlecTroemel closed 1 year ago
It seems to me (without any deeper knowledge) that the camera is Janet's abstract, so you can define get and set methods. I am on the phone now, but I will try to look at it tomorrow morning
I believe cameras are a raylib type, at least it shows up in the core examples https://github.com/raysan5/raylib/blob/master/examples/core/core_smooth_pixelperfect.c#L38
I mean this https://github.com/janet-lang/jaylib/blob/8cf87d8c80a10478fd0a9f2b7142dd68304868b2/src/types.h#L473. There, as you can see, the AT_Camera2D has only its name defined on abstract type. But you can register other methods, as seen in https://github.com/janet-lang/janet/blob/master/examples/numarray/numarray.c#L29, one of them setter and another getter.
:exploding_head: yep that's what I've been looking for how to do! Hopefully I'll have time to explore it later today
changes made!
@pepe I believe I've addressed all the feedback, a re-review would be greatly appreciated!
I will try to check it soon. But from what I see it looks fine.
able to do stuff like this