Turn [the numbers or data I point to] into a 3D infographic with three.js: a small 3D chart that builds itself when it comes into view and shows the details when you point at it. Scene: one bar (or column) per data point on a thin base plate, built from boxes, with soft studio lighting, a light environment map for subtle reflections and soft shadows on the plate. Only use colours from my palette, with the highest value highlighted. The camera looks at the chart from a slightly raised three-quarter angle. Behaviour: when the chart comes into view, the bars grow from zero to their value one after another with a soft ease-out. Pointing at a bar (raycaster) lifts it a little, highlights it and shows its label and value in an HTML tooltip that follows the bar (project the top of the bar to screen coordinates every frame). The whole chart turns a few degrees with the mouse. The labels and values stay in HTML (also as a hidden table for screen readers), never baked into the 3D. Only render while visible, cap the device pixel ratio at 2. With prefers-reduced-motion, show the finished chart without growing. Style: build it in the existing design system of this website. Reuse its colours, fonts, spacing, corner radius and existing classes or components, and don't add new colours or fonts. Use real content from this website for any text or images in the effect (its headings, services and copy), never placeholder text. If the project has no design system yet, ask me for the brand colours and fonts before you start.
Spinning 3D card
A card in 3D, like a ticket or a pass, that slowly turns and that you can grab and spin to see the back.
This is the real effect. Scroll or move your mouse inside the frame to try it.
Turn [the card, ticket or pass I point to] into a spinning 3D card with three.js: it slowly turns, and visitors can grab and spin it to see the back. Object: a thin card with the real outline of the object (for example rounded corners, or the side notches of a ticket), made from a Shape and extruded with a small bevel. The front and back faces get two textures drawn on a canvas at a high resolution (at least 2x the size on screen), with the real content in my fonts. Map the textures with UVs calculated from the shape, so any outline works. Redraw the textures once the web fonts are loaded. Behaviour: by itself the card turns slowly around its vertical axis and floats a little. Dragging rotates it (horizontal drag turns it, with inertia after release). A click without dragging pauses it: the card eases to the nearest face (front or back) so it can be read; another click starts it again. Soft studio lighting with a light environment map for a subtle sheen, a soft contact shadow below. Cap the device pixel ratio at 2, only render while visible. With prefers-reduced-motion, show the front, still. Style: build it in the existing design system of this website. Reuse its colours, fonts, spacing, corner radius and existing classes or components, and don't add new colours or fonts. Use real content from this website for any text or images in the effect (its headings, services and copy), never placeholder text. If the project has no design system yet, ask me for the brand colours and fonts before you start.
What it is
A card in 3D that turns on its own. Grab it to spin it, click it and it stops on the side you want to read.
When it works
When the thing people get is a card: an event ticket, a membership pass, a gift card, a certificate. Holding it in 3D makes it feel real, much more than a flat image of the same card.
Get it right
- Draw the textures at twice the size on screen, otherwise the text looks blurry.
- Wait for the fonts before you draw the text.
- Let a click stop it on a readable side. Spinning text nobody can read is just decoration.
Also called
- 3D flip card
- Draggable 3D card
- Rotating ticket
- Interactive card mockup
More effects.
All effects- 3D and motionPrompt
- 3D and motionPrompt
Add a fly-through words background to [the section I point to]: words and small points of light fly toward the viewer through a calm space scene. Words: take them from this website itself. Read the real topics, services or benefits from the site's pages and headings and use short ones (one or two words each). Never make up placeholder words. Visual: a 2D canvas behind the content. The background looks like space with depth: a base colour, two or three large, soft glows (radial gradients) and a field of tiny static stars, only in colours from my palette, all drawn once to an offscreen canvas and shifted slightly with the mouse for parallax. On top, small points and the words are placed at random positions in 3D space in front of the camera. Every frame they move closer; project them to the screen with a simple perspective divide (screen = centre + position / depth * focal length). Size and opacity grow as they come closer, points leave short streaks. Words use my heading font. When something passes the camera it respawns far away. Behaviour: a calm base speed. The vanishing point follows the mouse a little (eased). Keep it light: no WebGL, no images, device pixel ratio capped at 2, pause when off screen. Put the headline in HTML on top and keep it readable. With prefers-reduced-motion, show a still frame. Style: build it in the existing design system of this website. Reuse its colours, fonts, spacing, corner radius and existing classes or components, and don't add new colours or fonts. Use real content from this website for any text or images in the effect (its headings, services and copy), never placeholder text. If the project has no design system yet, ask me for the brand colours and fonts before you start.
- 3D and motionPrompt
Add a rotating text badge to [the place I point to] (a round seal with text running around a circle that slowly turns). Markup: an inline SVG with a circle path and a <textPath> that follows it. The text is short and repeated to fill the full circle exactly. Calculate the letter spacing or font size so the end meets the start without a gap or overlap. In the middle sits a still centre with a simple icon or a short number. Behaviour: the text ring rotates slowly with a CSS animation (around 20 seconds per turn, linear, infinite) while the centre stays still. On hover the rotation speeds up a little and eases back afterwards (use the Web Animations API playbackRate for a smooth change). Accessibility: the SVG text is aria-hidden and the badge has a real label for screen readers. Make the text come from editable content, not hard-coded in the SVG. With prefers-reduced-motion, it does not rotate. Style: build it in the existing design system of this website. Reuse its colours, fonts, spacing, corner radius and existing classes or components, and don't add new colours or fonts. Use real content from this website for any text or images in the effect (its headings, services and copy), never placeholder text. If the project has no design system yet, ask me for the brand colours and fonts before you start.