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

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

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

如今,大部分代码 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 的编辑器不仅可以直接生成和编辑代码,还能预览代码执行的效果,非常方便。

相关文章

赋能 AI 智能体搜索:获取大语言模型最佳结果
AI 教程知识
2026年4月18日
0 条评论
小创

赋能 AI 智能体搜索:获取大语言模型最佳结果

MIT CSAIL 与 Asari AI 联合研发 EnCompass 框架,专为解决大语言模型在代码迁移等任务中的错误恢复难题。该框架通过分支点标注机制,将搜索策略与 AI 智能体工作流程解耦,实现自动化的回溯与并行尝试。实测显示可削减 80%的搜索功能实现工作量,准确率提升 15%至 40%,使开发者无需编写冗长回溯逻辑即可高效构建 AI 辅助软件开发系统。

#MIT#AI 编程
阅读全文
Genspark 4.0 创作者的专属龙虾
AI 产品工具
2026年4月18日
0 条评论
小创

Genspark 4.0 创作者的专属龙虾

硅谷 AI 独角兽 Genspark 发布 Workspace 4.0,核心升级 Claw 功能专为创作者打造。它能自动化处理调研、邮件、PPT 等跨步骤杂活,并支持串联跨应用重复操作。新增 Clip Genius、AI Designer 及故事板生成工具,可自动提取视频信息、产出品牌素材与分镜脚本。配合 AI Developer,用户仅需自然语言描述即可搭建网站。该工具旨在让创作者从繁琐幕后工作中解放,专注于结果把控。

#智能体
阅读全文
xAI 将于下周发布 Grok Build 和 Grok CLI
AI 产品工具
2026年4月18日
0 条评论
小创

xAI 将于下周发布 Grok Build 和 Grok CLI

xAI 将于下周发布 Grok Build 和 Grok CLI ,正式进军智能体编程赛道,与 Claude Code 、 OpenAI Codex 等竞争。 Grok 4.3 已向订阅用户开放测试。产品采用本地与远程双轨设计,亮点是 Arena 模式,让多个智能体同场竞争,用户直接挑选最佳结果。此外还有 Grok Computer 桌面客户端和第三方服务连接器生态布局,差异化竞争策略明确。

#Grok#AI 编程
阅读全文
互动讨论

评论区

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

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