Babs
January 27, 2018, 8:09pm
1
Really like this CSS mask effect that you can see in this pen: https://codepen.io/erikrahm/pen/ywrmH
I see that it requires Jquery but I don’t quite know where to place the CSS.
I can upload images equivalent to, and name them “flesh” and “bone” within Hype itself, but if I did that, I’m not sure how I would adjust the CSS…
Any help would be great!!
I’m not at my Mac right now, but it seems like this effect could be reproduced in Hype. It’s just three main pieces…
Background
circle
Image in circle
So, on click / tap, the circle is moved and the image in the circle is moved too.
I’m not entirely sure, but if the “drag controls timeline” option is used, custom JavaScript or third-party libraries might be unnecessary.
Babs
January 29, 2018, 2:38pm
3
Thanks @Photics , but that would work only if the “drag controls timeline” was set to an animation in a specified line / direction of movement - correct? But the example (and effect I am trying to achieve) shows a freeform drag object under which the image would have to change, in any direction…
MarkHunte
(Mark Hunte)
January 29, 2018, 2:48pm
4
have a look at
Hey guys,
I had a bit of a break trough moment last week and I wanted to share it.
Hype is great, I want to push hype a lot more. One example is masking. You can mask using a group sure, but the group is a square shape, you can’t use custom shapes unless you dig into code. Unless you start using SVG, and if you use SVG you can’t support android(older android). I wanted to find an alternative.
Well hype has background image properties so I thought why not use that.
So i made an action so that…
A quick adaption from above ( just changed the images )
xray.hype.zip (218.8 KB)
Babs
January 29, 2018, 3:14pm
5
Thanks @MarkHunte This looks great!
Photics
January 29, 2018, 11:04pm
6
Problem seems solved. Once again, I’m not at my Mac, but I suspect two drag actions and two timelines would be used… one horizontal, one vertical… to get four-way movement.
h_classen
(Hans-Gerd Claßen)
January 30, 2018, 7:55am
7
css-clippath is one option … as always: read about browsersupport …
example reacts on mousemove and hypedrag
css_clipPath.hype.zip (1.1 MB)
just another approach ...