Skip navigation
spin the rack, pull out a postcard and flip it to read the back 💌
0:00 / 0:23

spin the rack, pull out a postcard and flip it to read the back 💌

Mehdi · Motionary

@mehdi_made2.6K followers

Visit on X
911 likesDownloadOriginal post

29,207 views

spin the rack, pull out a postcard and flip it to read the back 💌 react native + the new skia and webgpu

37 Comments

Comments from the original post on X (Twitter)

  • Mehdi · Motionary's profile picture

    @mehdi_made

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

    13 likes

  • Chandra Shekhar Suthar's profile picture

    @sorrychandra

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

    2 likes

  • Stefan's profile picture

    @heystefan_

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

    2 likes

  • Mehdi · Motionary's profile picture

    @mehdi_made

    Agree 😅

  • Fredrick Otieno's profile picture

    @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 · Motionary's profile picture

    @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.

  • Fredrick Otieno's profile picture

    @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 · Motionary's profile picture

    @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.

  • Fredrick Otieno's profile picture

    @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.

  • starecho's profile picture

    @guoyingtao

    Love it!

    1 like

  • Chrisssty's profile picture

    @imChristyHu

    Such a smart idea

    1 like

  • Mehdi · Motionary's profile picture

    @mehdi_made

    😍

  • klöss's profile picture

    @kloss_xyz

    beautiful idea and execution

    1 like

  • Mehdi · Motionary's profile picture

    @mehdi_made

    ❤️😍

  • Tanvi's profile picture

    @curiourexplorer

    Nice idea

    1 like

  • Mykola K.'s profile picture

    @mykola_kk

    wow, that nice idea

    1 like

  • Yijia HE's profile picture

    @YijiaHE1019

    love it!

    1 like

  • Akshay Pundir's profile picture

    @AkshayRajp24799

    Now that's something different!😬

    1 like

  • 🚀's profile picture

    @Baaptiiste78

    🤯

    1 like

  • TechSfera's profile picture

    @techsferahq

    Love it...

    1 like