如何在HTML5中嵌入交互式3D模型? [英] How can I embed an interactive 3d model in HTML5?
问题描述
我有一个在Sketchup中创建的房屋模型.我想将其嵌入网站中,并允许客户更改某些纹理文件(更改橱柜颜色,台面等)
I have a model of a house created in Sketchup. I want to embed it in a website and allow customers to make changes to certain texture files (change cabinet colors, counter top surfaces, etc.)
我看到了几种使用WebGL或canvas元素显示3D模型的解决方案,但没有任何办法允许查看者进行纹理更改.
I see several solutions for displaying 3D models using WebGL or the canvas element, but nothing to allow viewers to make texture changes.
这可能吗?如果可能的话,我希望使用PHP或JavaScript解决方案.
Is this possible? I would prefer a PHP or JavaScript solution, if possible.
推荐答案
您可以将模型上传到3dwarehouse.sketchup.com,然后在模型页面上将嵌入的3DViewer代码复制到所需的网页上共享您的3D模型.网址看起来像
You can upload your model to 3dwarehouse.sketchup.com, then on your model page, copy the <>Embed, 3DViewer code to the web page you want to share your 3D model on. The url will look like
<iframe src="https://3dwarehouse.sketchup.com/embed.html?mid= blah blah...>
这篇关于如何在HTML5中嵌入交互式3D模型?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!