spin the rack, pull out a postcard and flip it to read the back 💌
@mehdi_made2.6K followers
29,207 views
37 Comments
Comments from the original post on X (Twitter)

@mehdi_made
24 postcards, all painted in code, not a single image. thanks @wcandillon for skia and webgpu 🙏
13 likes

@sorrychandra
This looks cool always I earlier saw a refrigerator app with similar 3d interactions.
2 likes

@heystefan_
instead of clicking "put back" you should be able to flick it back in place :)
2 likes

@mehdi_made
Agree 😅

@DataAnalyt2539
The postcard flip is a nice touch. Are you running the Skia canvas on the UI thread with Reanimated worklets, and how does it hold up on mid-range Android?
2 likes

@mehdi_made
Yep, everything runs in one Reanimated frame worklet on the UI thread. Skia and WebGPU share a single GPU device, and the flip is a real 3D card. On Android it works on a mid-range emulator.

@DataAnalyt2539
Nice, sharing one GPU device between Skia and WebGPU is the part I wouldn't have guessed would work cleanly. Did you have to do anything special to avoid frame drops when the card flip overlaps heavier canvas redraws?
1 like

@mehdi_made
Mostly by keeping the flip away from canvas redraws. The flip is just a rotation in the 3D pass, so nothing gets repainted while it turns. All the postcard art is recorded once at startup. The one heavy step is painting the card you pull at full size, and that's split over two frames: front on one, back on the next.

@DataAnalyt2539
Splitting the big paint over two frames, front then back, is a neat way to keep a single frame from spiking. Recording the art once at startup and just rotating it makes sense too.

@guoyingtao
Love it!
1 like

@imChristyHu
Such a smart idea
1 like

@mehdi_made
😍

@kloss_xyz
beautiful idea and execution
1 like

@mehdi_made
❤️😍

@curiourexplorer
Nice idea
1 like

@mykola_kk
wow, that nice idea
1 like

@YijiaHE1019
love it!
1 like

@AkshayRajp24799
Now that's something different!😬
1 like

@Baaptiiste78
🤯
1 like

@techsferahq
Love it...
1 like










