AI-Assisted 3D Web Development: Choosing a Workflow by Task Difficulty
This article covers the building blocks of 3D web pages, a simple CSS and JavaScript example for scroll-driven rotation, three AI-assisted workflows ranked by task complexity, and a practical ceramic studio homepage case with quality and maintainability checks.
1. What Makes Up a 3D Web Page
A 3D web page usually consists of five parts: geometry, surface materials, lighting environment, camera, and the bindings between these elements and page interactions. If any part is missing, the page will look flat or be difficult to control.
Geometry
Shape determines the silhouette of the main subject. Simple scenes can be built from basic primitives such as cubes, cylinders, and spheres, while complex objects require mesh models. The main subject on a brand homepage is often a product or a logo. It is advisable to determine its proportions and key dimensions first, then consider details.
Surface Materials
Materials describe how a surface reflects light. Common properties include color, roughness, glossiness, and texture. Take ceramics as an example: a matte body and a glossy glaze need to be handled differently, and fine cracks and bubbles on the glaze can noticeably affect the visual result.
Lighting Environment
Light determines the sense of depth. A common approach is to set a key light to establish light and shadow relationships, then use ambient light and fill light to reduce overly harsh shadows. The light direction should be consistent with other visual elements in the scene; otherwise, viewers will notice the mismatch.
Camera and Interaction
The camera includes the viewing angle, distance, and motion path. By binding the camera position to scroll progress or mouse position, users can “browse” a 3D object through interaction. This is the key difference between a 3D web page and static visual design.
2. Basic Approach to Describing 3D Interaction in Code
The following example uses standard CSS and JavaScript to demonstrate how to map scroll progress to a rotation angle:
<div class="scene"><div class="model"></div></div><style>.scene {perspective: 900px;height: 100vh;overflow: hidden;}.model {width: 240px;height: 320px;margin: 20vh auto;transform-style: preserve-3d;transform: rotateX(-12deg) rotateY(var(--angle, 0deg));}</style><script>window.addEventListener('scroll', () => {const maxScroll = document.body.scrollHeight - window.innerHeight;const progress = maxScroll > 0 ? window.scrollY / maxScroll : 0;document.documentElement.style.setProperty('--angle', `${progress * 360}deg`);});</script>
The logic is simple: scroll progress is a ratio between 0 and 1, and multiplying it by 360 degrees gives the rotation angle. Effects such as camera movement and changes in lighting intensity can use the same mapping approach; you only need to replace the target property with the corresponding value.
3. Choosing Among Three Workflow Types
From lower to higher operational difficulty, workflows can be divided into three types:
- Web-based chat: The lowest barrier to entry, suitable for quickly validating ideas and generating single-page showcases. Changes depend on natural language descriptions, and fine-grained control is limited.
- Document-collaboration workbench: Suitable for tasks that require organizing copy, assets, and page structure at the same time; it is more efficient for organizing multi-page websites.
- Code-level development environment: Used as a desktop application, command-line tool, or editor plug-in. It is suitable for long-term maintenance, item-by-item parameter tuning, and version management. The barrier is higher, but control over final details is the most complete.
Generally speaking, the higher the difficulty, the higher the quality ceiling of the final output. However, this is a general trend, not a guarantee. With simpler workflows, results depend more on the quality of a single generation, while complex requirements often need multiple revision rounds.
4. Practical Workflow: A Small Ceramic Studio Homepage
Step 1: Expand a One-Sentence Requirement into a Site-Building Prompt
Assume the original requirement is only one sentence: “Build a brand homepage for a small ceramic studio with a 3D display.” This description does not contain enough information, so the model can only fill in the gaps on its own. The expanded prompt should cover the following:
- Brand positioning and target audience, such as handmade tableware and custom gifts.
- Page sections, such as hero, works showcase, craft introduction, and contact information.
- Visual style, such as warm tones, generous whitespace, and serif typefaces.
- Description of the 3D object, such as a wheel-thrown vase with a natural glaze.
- Interaction requirements, such as the vase rotating on scroll and the camera moving closer when a section is in view.
- Technical constraints, such as falling back to a static image on mobile and keeping hero load time within a reasonable range.
Step 2: Generate a Scrollable 3D Prototype
The prototype stage focuses on validating whether the structure holds. Checks include: whether the hero subject is clear, whether scroll-triggered motion is coherent, whether each section’s content corresponds to the 3D scene, and whether the layout works at different screen widths.
Step 3: Refine Details with a Reference Screen Recording
A prototype that runs does not mean the details meet the standard. One approach is to record a screen video of the target effect and observe the camera movement speed, highlight positions, and glaze texture segment by segment. Observations should be turned into specific descriptions. For example: “The camera slowly moves closer in the second half of the hero section; the key light comes from the upper left; the glaze crazing is sparse; the overall tone is warm.” The more specific the description, the more targeted later revisions will be.
5. Quality and Maintainability Checks
- Performance: Limit model polygon count and texture size, and disable real-time shadows on low-performance devices.
- Motion preferences: Use the
prefers-reduced-motionmedia query to detect a user’s reduced-motion setting and provide a static alternative view. - Accessibility: 3D content cannot be directly understood by screen readers, so provide accompanying text descriptions and operable navigation entry points.
- Version history: Save a version after each adjustment to camera or lighting parameters, making rollback and comparison easier.
The effect of a 3D web page comes from the combined work of structure, parameters, and interaction. A reliable path is to write the requirements clearly first, validate them with a prototype, and then calibrate each item against a reference effect.
