以 AI 輔助製作互動式 3D 網頁的兩種實作路徑
An AI-assisted path to an interactive 3D web page
文章比較以 AI 編碼 Agent 和視覺化 3D 建構器製作互動式網頁的兩種路徑,並按客製需求選擇合適做法。編碼流程以 MiniMax Code 為例,建議先整理模型、貼圖與中繼資料,建立資產清單及場景清單,再分階段實作並在瀏覽器檢查載入和互動。視覺建構器較適合場景已確定、互動有限的展示頁;需要自訂互動、響應式版面或系統整合時,編碼路徑較合適。
Use an AI coding agent to organize the available files, turn a plain-language scene description into a working browser prototype, and then refine the interactions visually; you do not need to begin by learning 3D mathematics. The practical starting point is to inventory every model, image, texture, and metadata file before asking the AI to write the page, because an unclear asset structure creates more errors than the initial code does. This is especially useful when you can provide finished artwork or product models but do not know how to import them, position a camera, add controls, or diagnose a blank scene.
The hard part is rarely the single block of code that draws an object on the screen. It is the chain of decisions around it: whether a texture has transparency, whether a model has its own scale and axis conventions, which file belongs to which interaction, and whether the page remains usable on a smaller screen. AI can help with that chain, but it needs a clean project structure and observable acceptance criteria. Otherwise, it may generate a polished page that loads the wrong assets, relies on an unavailable file path, or creates controls that do not match the intended scene.
This article compares two practical routes: an AI-assisted coding workflow built around an organized project, and a visual 3D page builder used when customization is limited. It also gives you a file inventory format, a scene manifest, a review checklist, and clear conditions for choosing between the two. You will finish with an implementable sequence rather than a generic collection of prompts.
Other candidates to compare
Claude accepts uploaded PDF and Word documents for questions and analysis, providing another candidate alongside MiniMax Code. Test extraction and explanations on the uploaded material, and compare that with the local-workspace workflow described here. Check source locations, missing information and consequential conclusions against the originals in either case.
1. Organize the project and build through MiniMax Code
MiniMax Code is a desktop AI agent designed to combine a project workspace, conversation, terminal, browser, and extension capabilities for coding and office assistance. The exact interfaces available to you can depend on the installed version and workspace, and the presence of those surfaces does not automatically mean that every external system or asset is authorised. The practical advantage is that the same workspace can be used to inspect supplied material, implement a code change, run project commands, and examine the browser result without treating an isolated code suggestion as the finished product.
For an interactive 3D page, begin with the material rather than the visual ambition. Suppose you have a product model, several transparent product images, a floor texture, a brand colour file, and notes describing what should rotate on click. Put the source files into a predictable structure before implementation:
-
public/assets/models/for model files -
public/assets/textures/for colour, normal, roughness, and other image maps -
public/assets/images/for interface images and reference views -
src/scene/for scene configuration and interaction logic -
src/ui/for labels, overlays, and controls -
docs/for the asset inventory and decisions that the page must follow Keep the original files untouched. Derived exports, resized textures, generated previews, and conversion output should live in separate directories so that an automated change does not overwrite the source material. The distinction matters because visual agents often make broad edits efficiently; a clear folder hierarchy gives those edits a predictable boundary. Next, create an asset inventory that records more than a filename. A useful row includes the file name, format, dimensions or geometry type, whether transparency is present, scale assumptions, intended role, and any attribution or usage condition supplied with the asset. If the source includes a licence file, keep it in the project and carry its wording into the inventory. This is operational information that must travel with the asset, not an optional document created after the page is published. For example, a compact inventory can use the following structure: | Asset | Role | Constraints to preserve | |---|---|---| |hero-product.glb| Main object | Original orientation; uniform scale | |hero-product.png| Transparent product image | Preserve alpha channel | |floor-grid.webp| Floor texture | Tile horizontally and vertically | |scene-notes.md| Interaction requirements | Rotate on click; camera stays fixed | |asset-licence.txt| Usage conditions | Keep with distribution files | The exact file formats depend on what you already have. The important point is that the AI should treat the inventory as a constraint, not infer meaning from filenames alone. If a model’s scale is unknown, mark it as unknown in the notes instead of allowing the agent to silently choose a value that makes one view appear correct and another view collapse. A scene manifest is the next layer. It converts the scattered source files into a compact description of what the page should assemble. It need not become a complex application configuration; a small JSON object can record the camera, background, objects, positions, scale, rotation, and interaction rules.
{
"scene": "product-explorer",
"camera": {
"position": [0, 1.2, 4.5],
"target": [0, 0.5, 0]
},
"objects": [
{
"asset": "hero-product.glb",
"position": [0, 0, 0],
"scale": 1,
"interaction": "rotate-on-pointer-drag"
}
],
"environment": {
"background": "#f5f5f5",
"floorTexture": "floor-grid.webp"
}
}
This manifest is not a substitute for learning how the scene behaves. It makes the intended result inspectable. When the generated page differs from the manifest, you can identify whether the discrepancy came from asset interpretation, scene configuration, code, or the browser view.
In MiniMax Code, enter a prompt that asks the agent to inventory the supplied model, texture, and metadata files, group them by asset type, and produce a scene manifest without altering the source assets, then review the proposed structure before any scene implementation.
Once the material and scene intent are clear, use the coding workflow in stages rather than requesting a finished experience in one step. The first stage should create a minimal page containing the background, camera, one correctly loaded asset, and no decorative controls. The observable acceptance condition is simple: the asset is visible, centred or intentionally framed, and the console does not report a missing resource. Only then should interaction logic be added.
For the interaction stage, translate the experience into state changes rather than visual descriptions. “Spin the product” is ambiguous. A useful specification says that pointer dragging changes the product’s horizontal rotation, release stops the movement, a keyboard control offers an alternative, and the camera remains fixed. The same specification can cover an accessible control such as a labelled button that resets the object to its initial orientation.
For responsive behaviour, decide which parts must adapt. A full 3D canvas may fill the viewport, while labels and product information can remain in a separate panel that stacks below the scene on a narrow display. If the interaction relies only on dragging, provide a visible alternative when possible. The coding agent can implement the layout, but the acceptance test remains visual: the object must not be cropped, controls must remain reachable, and explanatory text must not overlap the product.
The browser stage is where file paths, loading order, texture settings, and interaction conflicts become visible. Review the page at a normal desktop size and at a narrow viewport. Check the loading state, the initial framing, pointer and keyboard behaviour, and what happens after a reset. If the scene is blank, inspect the network panel and console before changing the camera. A missing texture, an unsupported file path, or an incorrect texture assignment is often a clearer cause than the camera coordinates.
Performance work should follow visible evidence. Large textures and heavy models can affect load time even when the final frame looks correct. Use the browser’s performance tools to identify unusually large resources, then ask the agent to propose a focused optimisation such as resizing oversized images or applying an appropriate model compression workflow. Confirm the current requirements and accepted settings against the relevant library and asset documentation before replacing originals.
This workflow is most suitable when you want custom camera behaviour, product storytelling, data-driven interactions, or a page that must fit an existing design system. It requires a disciplined hand-off between files, scene rules, and code. If you only need a simple object viewer with fixed framing and a few built-in controls, the visual-builder route below may require less implementation effort.
2. Use a visual 3D page builder when customisation is limited
A visual 3D page builder is the second practical route. It places much of the scene construction behind direct manipulation controls rather than requiring you to author camera, loader, and interaction code. The approach can be useful when the central goal is to present a known model, provide a small set of viewpoints, and publish a page without building a custom application around it.
The decisive condition is not whether the page contains a 3D object. It is how much behaviour must exist beyond the builder’s native controls. A fixed product view with preset camera positions, a title, a short description, and a limited hotspot system may fit comfortably. A scene that responds to live application data, uses custom gestures, coordinates with an existing checkout or content system, or needs a distinctive interaction model may exceed what the builder exposes without custom development.
Use the same four comparison axes as in the coding route:
| Decision axis | AI-assisted coding with organised files | Visual 3D page builder |
|---|---|---|
| Asset organisation | You define the inventory, directory layout, and scene manifest | The builder may organise assets internally; verify export and replacement behaviour |
| Interaction depth | Custom camera, input, data, and interface logic | Built-in controls are convenient, while specialised behaviour may require custom code |
| Visual review | Browser review exposes loading and runtime issues | Preview inside the builder is useful, but the published page still needs review |
| Best fit | Bespoke storytelling or integration | A straightforward presentation with known assets and limited interaction |
AI can still assist inside this route. It can help normalise product copy, summarise asset requirements, identify missing names or dimensions in a spreadsheet, draft interaction descriptions, and turn those descriptions into acceptance criteria for the person operating the builder. The AI should not be treated as evidence that the builder supports a particular custom control. Confirm available interactions, supported uploads, export behaviour, and hosting requirements against the current product documentation.
The existing-material angle is especially important here. Prepare the same inventory even if the final editor is visual. It prevents a common mismatch in which a designer places the right object in the scene but the published page uses a different asset or a missing texture variant. Confirm whether the builder preserves transparency, whether it accepts the exact source format, whether textures are embedded or mapped separately, and whether replacing an asset requires a separate export step.
Start with one scene and one interaction. Load the primary object, establish the camera, and add one control that must work on a narrow display. Publish or preview the result using the builder’s supported path, then inspect the loaded assets and the interaction in the browser or device view supported by the service. Only after that baseline is stable should you add hotspots, variants, animation, or additional text overlays.
This route is cheaper than maintaining a custom codebase when the requirement is mainly presentation and the builder covers the required controls. It becomes less attractive when you need repeatable visual changes across a large catalogue, detailed event tracking inside the scene, custom shader work, or deep integration with another product. In those cases, the apparent convenience of the initial editor may be offset by repeated manual adjustments or an eventual extension project.
Selection summary
Choose the AI-assisted coding route when the supplied material is available but the interaction model, responsive layout, or integration still needs design. Its advantage is control over how assets, scene data, and browser behaviour are separated and reviewed. The cost is a more disciplined project structure and a requirement that someone evaluate the generated result in the browser.
Choose the visual-builder route when the object or scene is already decided, the interaction set is narrow, and the main goal is a clear presentation rather than a custom application. It reduces the amount of code you must understand, but only if the current builder covers the required asset formats, controls, export path, and responsive presentation.
A third hybrid can be appropriate: use a visual builder for the initial scene layout, export the scene or asset package, and use an AI coding workflow for the surrounding page, accessibility controls, and custom integration. This is useful only when the builder’s export preserves the scene correctly and the licence for the exported material permits the intended use.
Scope, boundaries, and article length
This article covers two routes for turning supplied files into an interactive browser page. It does not cover advanced 3D mathematics, custom shader authoring, production-level asset pipelines, or the commercial licensing of individual models and textures.
The AI-assisted approach is not automatically the cheaper option. It requires time to organise files, specify the scene, and review the browser output. The visual route is not automatically the more reliable option; imported assets can still be missing, incorrectly scaled, or mapped to the wrong material slot. The reliable choice depends on which of those risks your current tool and project structure can actually control.
Do not begin with a large feature list. Begin with one supplied asset, one measurable browser outcome, and one interaction. If those three elements can be made consistent, the next stage has a stable foundation. If they cannot, the next improvement belongs to asset preparation or scene definition rather than to more elaborate AI-generated code.
來源:DEV Community · dev.to