Apocrypha / Practice
Tam Em. Building a website for a Chinese café
I built a scroll-driven entrance for Tam Em, a café at Moscow’s Khlebozavod. You move through a gate, follow the street and cross the threshold into the dining room, where the menu is within reach. Here is how the scene changed, where the layers failed to align, and what I rebuilt for phones, the menu and Telegram.
From the gate to the dining room
The opening from the desktop website. Scroll the page to walk through the door.
Opening frame shown with reduced motion.

An axonometric view of the scene
Select a layer to bring it forward, see it head-on, and learn how it works in the scene.
From the café’s story to the first prototype

From the café’s story to the red sign
Aram and Olya imagined the café as a small trip to China. A photograph of a Shanghai café helped them describe the interior they wanted. When they visited Shanghai, they found that café on a real street. Their story already moved from an image to a place. I used that movement for the introduction. Guests can browse the menu, get directions or open delivery whenever they need to. The café’s story
On 16 October I began with the old website, the updated logo and the supplied Figma files. In Red Sign, the first desktop concept, the entrance became the focus of the opening screen.

Showing the dining room
In Around a Big Table, I put the dining room on the opening screen. I also tried a window onto the room and close-ups of food and tea. The October prototype developed into a paper theatre built from image planes.
Red gates, red rocks and pine trees followed trials with cream ornament and green foliage. The foreground ridge hid the temple until scrolling brought it into view, then the brand symbols arrived around the logo in arcs. That version went live on 3 November.

From paper theatre to the street
Neighbourhood China was the third October concept for the opening screen. I returned to the idea of entering the actual café from 4 to 7 November. I tested paper theatre, drawn film and diorama on the same route through modern Shanghai. For the drawn scene I moved the café from the right-hand edge to the end of the street. The building became the centre of the perspective and the door anchored the route.
The café supplied the logos, typefaces and ornaments. I used the original vector artwork in the interface and prepared raster scenery for the opening. For the mobile view, for instance, I placed the white shop sign as its own SVG on the fascia behind the gate. That made it possible to place and scale it with the building while preserving the lettering. The scenery and staged images of the founders belong to the website opening. The About page keeps Aram and Olya’s portraits and account of the café separate. For those photos I tried a solid red border and an oval, then went back to a light frame with the brand’s concave corners. The horizontal 4:3 opening gave the surroundings more room.

Giving the menu its own entrance
After reviewing the prototype I dropped the long sequence that assembled a bowl of noodles and the separate bubble-tea promotion. Guests looking for an address or a particular dish gained a direct route. In the header I started with a dropdown, then tried opening the menu choices inline. In the 11 November image, About and Menu move left to make room for three links.
In the 18 November release I moved the food, tea and bar menus into a second row. The links above stay in place as the taller header pushes the page down. The new row spans the navigation from About to Contacts, with Order to the right. Press Menu again or Escape to close the row. Choosing a section on the same page leaves it open. On a phone, the choices appear above the bottom bar.
Building the route from the gate into the room
The scroll position controls the view
On a computer, the introduction has a long section with a sticky stage. I calculate a value from 0 to 1 from the section’s position and its available scrolling distance. That value determines the frame. Stop scrolling and it holds. Scroll up and the same views return in reverse. The wheel scrolls the document in the usual way. Its events schedule a single update for the next browser frame.
Several planes move from the same progress value. The gate grows quickly and moves out of view. The distant city moves more slowly. The street pans and scales so the eye ends up at the door. Three smooth, overlapping ranges carry the movement through the approach and leave a moment to see the fascia. The text and buttons are HTML over the scene. You can open the menu at the start, and the greeting in the dining room offers the same way in.
What the masks reveal
The scene combines cut-out gates, a distant city, a street and façade, near details and a separate room image. The gate opening reveals the city. The door and individual panes of glass have their own masks. The same room appears through these openings, while the mullions and transoms stay in front. The top edge of an early street mask sat a few pixels below the true opening. As the view got closer, a green strip of distant foliage showed above the room. I traced the full opening to remove it, then checked the same room through the door and the storefront windows together.
During testing, a table seemed to sink through the floor as the view approached the door. The room’s projection depended too heavily on the visible doorway rectangle, which changes when the viewport clips it. I gave the room its own projection, anchored to the centre of the door and the floor. It keeps its original proportions and grows just enough to cover the visible openings. Magnification eases at the threshold. The same room fills the screen and the table stays on the floor.
One room seen through three openings


- Table in the left window
- Hosts in the doorway
- Staircase in the right window
The source image and the scene at 42% scroll progress. 10 November 2026.
Why a matching door was insufficient
The street, close façade, storefront and close door are separate images. Aligning them only at the opening compressed the upper storeys as the close image came in. I added matching points along the roof, windows, cornice, sign and threshold. A mesh maps areas between these points from each image to the common façade. The painted door leaves in the close view open at a different angle. I split each leaf into two triangles and aligned its corners to preserve the agreed opening. More detailed images fade in as you approach, once their textures are ready.
Two frames from 10 November show a separate fault at the same 63% scroll position. A limit on the background scale exposed duplicate door leaves and a second threshold underneath the façade. I restored a shared motion for the street, the city and the building, narrowed the edge of the texture reveal, and gave the paving its own plane. It shares the street’s perspective and movement, so a single continuous path leads to the door.
Where the second threshold came from


- The join between the floor and the paving
- The extra threshold from the distant façade layer
The same part of the façade at 63% scroll progress. 10 November 2026.
From SVG to a single WebGL canvas
An early published version drew the layers and masks with React and SVG. In the 11 November release, I kept the frame calculation and drew its result on a single WebGL canvas. The geometry is prepared in advance. The movement changes positions, opacity and the parts of each image visible through the masks. I compared geometry with the earlier renderer in 936 combinations, then tested the actual scroll and positions at 0, 42, 63 and 100% in the browser.
The gate, mask, distant city and street load first. A queue starts up to two background images at a time and moves details forward as they become relevant. A smaller image previews the dining room while its full texture loads. Offscreen, rendering stops and the queue pauses new background starts. If WebGL is unavailable, a text opening still leads to the menu.
What changed in Telegram
Something sweet
Something good is coming.
Crack open the cookie to find out what fortune has in store.
Demo data
Open a cookie in the Mini App to get a demo code.
This example shows a winning cookie. The guest saves the code from the screen and shows it at the café.
One catalogue with two entry points
Guests open the Mini App to browse the menu, find the café or crack a fortune cookie. Staff use a private chat with the bot to check and redeem the promo code the guest shows them. The demo on the left lets you try both roles with a sample code.
The site and Mini App read from the same catalogue. For Telegram I arranged the navigation into five bottom items, respected the device’s safe areas and connected the host back controls. On 16 November I put the café’s mission and four values into a horizontal strip. A glimpse of the next card shows there is more to read. Buttons, a counter and keyboard controls offer other ways through it.
The directions label wrapped onto two lines and shifted its icon out of alignment with the others. I set aside consistent areas for the icon and label in every item. The text can wrap while the icons stay on one line.
The cookie and the code
The site and Mini App use the same cookie. When it opens, the canvas draws successive frames from an image atlas and the slip appears at the reveal. Its message is interface text. Reduced motion shows the open cookie and message straight away. If the service issues a promotional code, the guest sees it as text and can save it.
The bot tells staff whether the code is valid. Staff select Redeem code, confirm redemption separately and apply the discount at the till. Typing codes was slow during busy periods, so on 18 November I released a separate scanner. Staff open it from the work chat and get the check result there.
Request photos for the nearest visible cards
When I inserted real photo URLs for every measured card at once, Chromium started fetching the entire catalogue. I kept placeholders at the original aspect ratios in the Mini App and limited the real URLs to the visible card and its neighbours. The nearest cards then get URLs sized for their actual width. Already loaded photos stay available when you go forward or back. A category change or search starts a new selection. The tea leaves are measured separately from the cup.
In the 17 November comparison, the first food-card photos transferred 486,572 bytes down from 1,001,072, and the first tea-card photos transferred 403,048 bytes down from 575,880. Those are reductions of 51.4% and 30.0%. The comparison used Chromium at 390 pixels and DPR 3, with an empty cache, a 1.6 Mbps connection and 150 ms of latency. The figures refer to photo bytes in that test. Open the Mini App menu
A separate opening for phones
At widths of 760 pixels or less, the site shows a separate layout. The first mobile changes used the desktop gate layers. I then placed a single street view behind the opening, with the façade and sign in the same perspective. Shrinking that view around its lower edge revealed the skyscrapers and TV tower. The main logo moved above the line about the cuisine and Khlebozavod. The small shop sign stayed on the façade. The menu button is available immediately. On a wide screen with reduced motion enabled, the first frame stays in place and the menu link remains available. Try the opening on the café website
How I checked the releases
Checking the route and the separate views
I checked each change where a guest would use it. For the scene, I went from the gate to the room and back, tried skipping and opened the menu directly. For the cards, I read a description, returned to the photo and changed categories. At narrow widths, I checked the carousel, the page width and clearance above the bottom bar. I tested the Telegram web shell separately from the ordinary mobile site.
I added the map where guests need it, near the contacts. The widget loads as that block approaches the viewport, while Get Directions is available immediately. The order link opens the delivery service.
The home, About and Contact pages serve rendered HTML with separate metadata. The Mini App shell is excluded from indexing. The server returns HTTP 404 for an unknown page. After updates I checked HTTPS responses and compared published file hashes with the release manifest. On 21 November, the home, About and Contact pages and the Mini App returned HTTP 200. The home page served the build checked on 20 November. Contact Tam Em
The opening finishes where the decision begins. The room leads to the menu, the menu leads to a dish description, and directions and delivery have direct entries. That order is what holds the website together. Visit Tam Em









