Ciechan / BCMeshTransformView

Mesh transforms for UIView
MIT License
1.24k stars 126 forks source link

Possible to have transform extend beyond BCMeshTransformView's bounds? #8

Closed seankellycs closed 10 years ago

seankellycs commented 10 years ago

I am currently trying to have my mesh transform 'flex' or bend using bezier curves. I am able to have my 'flex inwards' happen, but if I try to flex the view upwards, it is clipped by the bounds of the view. In looking through the code, I see that contentViewWrapperView has it's clipsToBounds set to YES. Setting this value to NO seems to have the mesh transform not be applied. I was hoping for some insight on why this happens, and if there is a way to allow the mesh transform to not be clipped.

I do not believe this matters, but for clarification I am applying this flex using the animations added by this fork : https://github.com/KevinDoughty/BCMeshTransformView

Ciechan commented 10 years ago

Unfortunately it's impossible. It's because of how the OpenGL frame buffer inside GLKView is setup and used, contentViewWrapperView has nothing to do with it, in fact it has to be masked so that it doesn't cover the GLKView.

With that in mind, it's possible to achieve what you want by simple using larger BCMeshTransformView thus leaving free space around the content. Note that it will require modifying your meshes and math accordingly.

seankellycs commented 10 years ago

Thanks for the feedback, makes sense. This project is invaluable, thanks for all your work you put into this!