asny / three-d

2D/3D renderer - makes it simple to draw stuff across platforms (including web)
MIT License
1.34k stars 110 forks source link

Planar projection camera #504

Closed thatcomputerguy0101 closed 6 days ago

thatcomputerguy0101 commented 1 month ago

This adds the surface-level API for utilizing the planar projection introduced in https://github.com/asny/three-d-asset/pull/42, and modifies the camera_view example of #501 to support the new camera mode. See each of those respective PRs for more details.

asny commented 1 week ago

I have released a three-d-asset version with the planar projection camera. Is everything still working as expected with that released version? Also, did you plan to get the example in? I like the functionality but it's a really really long example, can you simplify it?

asny commented 6 days ago

I've added the Camera::new_planar function, I guess that is the only difference between this and https://github.com/asny/three-d/pull/501? So I guess this can be closed? Also, I plan to do a release soon, but since the examples are not part of the release anyway, there's no rush getting that merged.

thatcomputerguy0101 commented 6 days ago

Yes, 4bdd442 was the only commit from this pr on the main library, while the rest all focused on the examples. I'll transfer over d6045b0 to #501, as that was the update to the example to support the planar camera.

Regarding simplification, I'm removing the shapes and only including the axis arrows. However, removing anything else probably reduces the utility of the example as a debug tool. There is a lot of complexity in computing the view frustum outlines, but simplifying that while keeping the same result is difficult.

thatcomputerguy0101 commented 6 days ago

501 is now updated with planar support, so I'm closing this PR.