Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple Drag points + Video #41

Open
omarojo opened this issue Oct 27, 2016 · 5 comments
Open

Multiple Drag points + Video #41

omarojo opened this issue Oct 27, 2016 · 5 comments

Comments

@omarojo
Copy link

omarojo commented Oct 27, 2016

In your demo video you show an image with 4 corners being dragged and morphed.
Is it possible to have more than one drag point to transform the view ? also is it possible to load a video inside instead of an image ?

@hfossli
Copy link
Contributor

hfossli commented Oct 27, 2016

Is it possible to have more than one drag point to transform the view ?

Do you want to have more control points than 4? In the sense that you want more corners? In other words a mesh? In that case you need to do go with a hacky solution (e.g. https://github.com/facebookarchive/spacetime) or you can render your view/layer to a bitmap/image and (e.g. http://ciechanowski.me/blog/2014/05/14/mesh-transforms/).

also is it possible to load a video inside instead of an image ?

It is just a simple CATransform3D which is being applied to the backing layer. So you can do this with webviews, videos, any UIView and CALayer at no performance cost at all!

@hfossli
Copy link
Contributor

hfossli commented Oct 27, 2016

Also, check out this fun project https://github.com/agens-no/AGGeometryKit-POP. Adding dynamics to these control points is interesting.

@omarojo
Copy link
Author

omarojo commented Oct 27, 2016

Thank you for your fast reply @hfossli . Yes Im looking for a mesh because I want to do something similar to this interaction : http://dynamapper.net/how-to-use

Rectangles are fine but when you want to map around irregular objects then you need multiple drag points to make the mesh.. sometimes not only in the corners but also inner.

@hfossli
Copy link
Contributor

hfossli commented Oct 27, 2016

Is this going on app store or can you use private API's? In that case I would guess https://github.com/Ciechan/BCMeshTransformView is the best way to go with regards to video and multiple control points.

Or you could use AGGeometryKit and split the video stream in to as many rectangles as needed – app store friendly, but probably a bit less performant as you would need to split the video and clip each rectangle.

@hfossli
Copy link
Contributor

hfossli commented Jan 10, 2017

Any luck? :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants