Ah the magic of trig.
btw - how would you keep the front as the image but have the back of the page be a flat color - white probably to simulate a paper look⦠What do you add or change in your latest to get this effect?
Ah the magic of trig.
btw - how would you keep the front as the image but have the back of the page be a flat color - white probably to simulate a paper look⦠What do you add or change in your latest to get this effect?
The first CoronaColorScale(texture2D(ā¦)) (the earlier return) is the back pixel. Basically, just replace the texture2D () call with vec4(1.)Ā or vec4(1., 1., 1., 1.). White is all ones, just as in Corona itself.
If you donāt want the black border you can just strip the stuff inĀ UPPER_SHADOWS or whatever I called it. (Iām actually thinking I can hoist that out into two or three manually oriented auxiliary rectsāone per edgeāwith their own shader, then just layer the shadow on top of the front page. This would cut out those per-pixel tests for shadows in the effect proper and the shapes could be made a much better fit anyhow.)
By the way, since Iām seeing āreal world useā in action, Iām considering all these things youāre trying for my stable of options.Ā
Actually, since youāve already been running with it (do you have a video or sample, by the way?), maybe Iād be wasting time trying to add my own scene transition support into an eventual plugin. Iām thinking in the end of just exposing some functions like SetNormal (), SetPoint (), and SetRadius () and abstracting away the underlying bits.
Have you considered putting together a suite of scene transitions? It sounds like you must already be playing around with them. Iād like to see how well ārelatedā plugins end up working.
Your post was synchronistic timing as Iād just finished a version of a page curl which is just an animating image across the screen. So I have time to help test and work through a composer ready page curl.
Youāre right, itās been easy to create a transition module. So far, Iāve only required a proper fade to black, a 2.5d card cover book open effect and the page curl. With use of custom effects in the composer transition effectsList, any kind of transition is possible.
Anyway, Iāll PM you some video grabs and a break down of the Composer related code thus farā¦
Iāve added some provisional touch controls.
Itās more straightforward than what I thought would need doing, but seems decent enough. What Iām going for is that the part you grabbed on the side will track the touch (though allowing for a little āwindupā near the right-hand side), but the āhow much to rollā scale factor is a bit off, and currently defeating my attempts to puzzle it out. Also, it can kind of freak out near the corners.Ā (Iām probably doing a math.atan2(0, 0) there.)
Anyhow, Iāll continue trying to nail this down.
UPDATE : The touch controls are nearly there, I think. The early part of the roll is a little off (this is more obvious with some orientations than others), mostly owing to trying to combine a couple kludges. :unsure: A bit too tired to do it the right way, at the moment, but Iāll need to figure it out eventually if I want to be maintain shadow proxies outside the shader, or anything along the same lines.
I still donāt have any great ideas about fixing touch along the right-hand side. Try dragging up and down there to see what I mean.
Any styling recommendations from anybody whoās used one of these before? It seems to make most sense to me to have just a vertical strip at the edge as done here for the touchable region, but obviously one wouldnāt want a translucent rounded rect indicating that part⦠Or can I safely assume ātheyāll know what to doā?
Anyhow, Iāll probably give it a couple daysā rest and then begin trying to package it up.
EDIT : Well, I couldnāt get this out of my head, so I figured out the early parts of the roll. Man, so many sheets full of slightly wrong formulaeā¦
Hi!
I slogged away and now have what I consider a feature-complete version 1.0. In any event, the API is basically in place. A few use cases can be found in main.lua ; theseĀ can be enabled by changing the appropriate
--[[
lines to
---[[
(Iām still uncertain whether the somewhat odd capture results are par for the course with groups or an error on my part.)
As a reminder, the current WIP is here. I think Iāll freeze that once I finally submit this as a plugin, in the not-too-distant future.
Also, while probably not the most exciting reading material, the current documentation can be foundĀ here. This is very much a first draft, which aims above all for accuracy, but could probably stand a few revisions for clarity. Any constructive criticism would be most appreciated!
Bug testing ought to follow fairly soon, though I think Iāll give it a few days, especially since I need to give some other things a little love. The sample I have in mind for the plugin should be equally well-suited for stress-testing the various features.
Known issue : Switching āmodesā while the page is unrolling (after releasing a touch) freezes the page in place. (I have a pretty good idea of the cause.) EDIT: Seems to be fixed.
That is just amazing! I have tested your code and the effect looks awesome. I will dig into the code later but I bet I won“t understand half of it :unsure:
I“m just thinking about how will the effect look when the page is turned back?!?
Seems like this video might have a good sollution:Ā https://www.youtube.com/watch?v=IShu45tqtuk
It would also be possible and maybe easier to āanimateā the whole āturn backā effect like in this video:Ā https://www.youtube.com/watch?v=EVHksX0GdIQ
Thank you so much for doing this SteveĀ
You are my heroĀ :rolleyes:
Good to hear, Tom.
Iāve just uploaded an update of the project and the docs, together with quite a few samples.Ā There were some last-minute interface changes, but now Iām finally pleased with them. I felt it was quite well along, so I filed a plugin submission, too.