如何通过 Gemini 2.5 Pro 实现 3D 应用程序的氛围编程

Gemini 2.5 Pro 内置编辑器支持“氛围编程”:上传蛋糕图片后,用自然语言指令即可生成可交互的 Three.js 3D 蛋糕可视化应用,实时调整颜色、装饰、层数、动画,并同步更新价格估算,所有修改即时预览。

发布于2025年4月30日 08:17
编辑零重力瓦力
评论0
阅读27

如今,大部分代码 IDE 都支持氛围编程(vibe coding)。实际上,如果应用程序的规模不大,完全可以直接使用模型自带的编辑器来操作。比如,可以在 Gemini 2.5 Pro 的内置编辑器中,通过自然语言指令沉浸式地开发一个基于 three.js 的 3D 蛋糕制作应用。

以下是您提供的内容,经过格式整理和翻译后的版本。每段均为英文在上,中文在下 ,方便对照阅读。

🟦 初始要求

上传一张蛋糕的图片,然后输入以下提示语

Based on this design, can you create a 3D interactive cake visualizer in three.js that is configurable?
根据这个设计,你能用 Three.js 创建一个可配置的 3D 交互蛋糕可视化工具吗?

I want to be able to change things like:
我希望可以更改以下内容:

1. color of the cake
蛋糕的颜色

2. the color of the flowers
花朵的颜色

3. the topper of the cake (nothing, star, sphere)
蛋糕顶部装饰(无、星星、球形)

4. whether there is pearl ribbing along the outside of the cake or not
蛋糕外部是否有珠状滚边装饰

5. the placement of the flowers on the cake.
蛋糕上花朵的位置摆放

6. As these things are selected, there should be a price estimator that changes as different options are selected.
当这些选项被选择时,应该有一个价格预估器会随着不同选项的更改而变化。

Also, as the user changes something in the menu, instead of the cake just switching instantly, make it animate! Show the cake layers stacking up quickly, and then have the decorations appear one by one, starting from the bottom. The animation should be pretty quick, and the user should still be able to spin the cake around while it's happening.
此外,当用户在菜单中更改某些内容时,不要让蛋糕立刻切换状态,而是添加动画效果!展示蛋糕层快速堆叠起来的过程,然后从底部开始依次出现装饰。动画应较为迅速,同时用户在动画进行时仍能旋转蛋糕查看各个角度。

🔴 第一次修改

Make sure that the cake color actually changes as I go, and make sure that there are actual flowers. Currently there are none.
请确保当我进行操作时,蛋糕颜色确实会发生变化,并且确保真的有花朵出现。目前还没有花朵。

🟡 第二次修改

Make the cake topper better. Currently it is super small and it needs to be scaled appropriately.
请优化蛋糕顶部装饰。当前太小了,需要适当调整大小。

🟢 第三次修改

1. Make sure the cake topper is sitting on top of the cake.
确保蛋糕顶部装饰确实位于蛋糕顶部。

2. Make the amount of cake layers customizable.
让蛋糕层数可以自定义。

3. Change the estimated price by lowering it by 50% overall.
将整体的价格预估降低 50%。

🔵 第四次修改

The cake topper isn't appearing any more. Make sure it appears on the top of the cake.
蛋糕顶部装饰现在不显示了,请确保它出现在蛋糕顶部。

Gemini 的编辑器不仅可以直接生成和编辑代码,还能预览代码执行的效果,非常方便。

相关文章

如果你还没用过 OpenClaw,2026.5.2 版是一个好起点
AI 产品工具
2026年5月12日
0 条评论
零重力瓦力

如果你还没用过 OpenClaw,2026.5.2 版是一个好起点

OpenClaw 2026.5.2 稳定版发布,核心策略转向“做减法”。xAI Grok 4.3 成为默认模型,赋予智能体实时信息获取能力。架构上,插件与诊断模块外移,实现按需安装,显著降低体积并提升维护效率。Gateway 热路径性能优化修复了 268 个 Bug,大幅改善启动速度与运行稳定性。新增 SDK tools.invoke RPC 接口,打通外部系统调用通道,标志着框架从个人助手向基础设施演进。

#OpenClaw#Grok
阅读全文
Mistral 把编程 Agent 扔进云里
AI 编程开发
2026年5月12日
0 条评论
零重力瓦力

Mistral 把编程 Agent 扔进云里

Mistral 推出 Medium 3.5 开源模型与 Vibe 远程代理,将编程协作从“人机同步”转向“异步委派”。128B 稠密模型以 77.6% 的 SWE-Bench 成绩超越 Claude Sonnet 4,支持自部署。Vibe 允许开发者在云端沙箱并行运行多个任务,自动提交 PR 并通知审查。配合 Le Chat 通用工作模式,该方案适合追求效率的团队及关注数据安全的独立开发者,重新定义了 AI 辅助编码的工作流。

#Mistral#开源模型#AI 编程
阅读全文
文字转 CAD AI 完整指南
AI 产品工具
2026年5月9日
0 条评论
小创

文字转 CAD AI 完整指南

文本转 CAD AI 正重塑工程设计方式:用户通过自然语言描述即可在 60 秒内生成可编辑的三维模型。主流工具如 Zoo 、 AdamCAD 等已实现商业化应用, 2026 年进入生产可用阶段。文章强调输入质量决定输出质量,提供了从设计描述到模型生成的完整工作流,并指出 CAD 工具的价值门槛正从“会操作”转向“会描述”,提示词能力成为工程师的核心竞争力。

#3D 生成
阅读全文
互动讨论

评论区

围绕《如何通过 Gemini 2.5 Pro 实现 3D 应用程序的氛围编程》展开交流,未登录用户可浏览评论,登录后可参与讨论。

评论数
0
登录后参与评论
支持发表观点与回复一级评论,互动后将同步到消息中心。
登录后评论
暂无评论,欢迎成为第一个参与讨论的人。