Offset for Depth?See original GitHub issue
I was wondering if we can set up offset for the degree at type “depth”/“depth_inv”?
As example if I set offsetY to “0.5”: If the image is center of the screen, then it should show 0deg at rotateX. If the image is top of the screen, then rotateX should go in positive value and if its bottom, then it should go to negative value.
<kinesis-container event="scroll"> <kinesis-element :strength="40" type="depth" axis="y" offsetY="0.5"> <img src="https://via.placeholder.com/600x400"/> </kinesis-element> </kinesis-container>
- Created 3 years ago
- Comments:5 (2 by maintainers)
Top GitHub Comments
Thank you for your question. Actually the feature was available but wasn’t active for the
scroll event. I fixed it and created a Codesandbox so you can play around with it and confirm that I understood your issue and that it solves it.
So, to explain instead of
offsetY the prop is called
originY. It might be a bit counter-intuitive. But what it means, basically, is that when
:originY=50, your element will be displayed at its initial (original) state when in the middle of the screen, and the transformations will happen when above or under 50 symetrically.
You’ll need the 1.1.5 version in order to be able to use this fix.
Sure, I may have some ideas which I may create new issue for that. 👍