交互式 3d 网络技术 [英] Interactive 3d Web Technology
问题描述
我想在网页中使用交互式 3D 模型.所需的功能是:
I would like to use interactive 3D models in a web page. The required functionality is:
- 导入定义 & 的 dxf 文件显示一个房间.
- 从 javascript 添加/移动预构建的对象
- 添加/移动从 javascript 投射阴影的灯
- 将房间尺寸返回给 javascript
- 将对象位置返回给 javascript
我可以将 dxf 文件导入任何 WebGL 引擎吗?
Can I import dxf files into any WebGL engine?
我有一个小的重复用户群,所以浏览器安装完全没有问题.我可以使用任何插件技术吗?Java小程序?统一?我可以使用 OpenGL 引擎作为插件吗?java3d小程序怎么样?
I have a small repeat user base so a browser installation is no problem at all. Is there any plugin technology I could use? Java applets? Unity? Can I use an OpenGL engine as a plugin? How about a java3d applet?
我将从台式机开始,但很快需要瞄准平板电脑,并在两年左右的时间内瞄准移动设备.
I will start with desktop but would need to be targeting tablets soon and mobiles in two years or so.
我越来越确信我需要聘请专家来编写此文件,但我想了解这些选项.你能推荐一种合适的技术吗?
I am becoming convinced I will need to hire an expert to write this but I want to understand the options. Can you recommend a suitable technology?
推荐答案
我认为 WebGL 是此应用程序的绝佳选择;您描述的图形功能完全在其能力范围内.不过,我无法评论模型加载,因为我不熟悉 WebGL 引擎.
I think WebGL is an excellent choice for this application; the graphics functions you describe are well within its capabilities. I can't comment on model loading, though, as I'm not familiar with WebGL engines.
然而,移动设备是一个很大的问题.关于您提到的技术:
However, mobile is a big wrinkle. Regarding the techniques you mention:
Android 版 Chrome 和 Firefox 支持 WebGL.在 iOS 上,Mobile Safari 不启用 WebGL,但存在一个实现(严格用于应用内广告),因此将来可能会有更广泛的 WebGL 支持(可能需要自定义Web 视图包装器以启用它).
WebGL is supported in Chrome and Firefox for Android. On iOS, Mobile Safari does not enable WebGL, but an implementation exists (used strictly for in-app ads), so it is likely that there may be broader WebGL support in the future (possibly requiring a custom web view wrapper to enable it).
Android 或 iOS 上的任何浏览器都不支持 Java 小程序.
Java applets are not supported by any browser on either Android or iOS.
Unity 是一个可行的选择;Unity Web Player 浏览器插件允许在网页中嵌入 Unity 内容.但是,对于移动操作系统设备没有这样的插件;Unity 内容可以编译为适用于 iOS 或 Android 的应用程序,但无法在网页中查看.
Unity is a viable choice; the Unity Web Player browser plugin allows embedding Unity content in a web page. However, there is no such plugin for mobile-OS devices; Unity content may be compiled into a application for iOS or Android but it cannot be viewed within a web page.
截至 2014 年 8 月的新闻:Unity 宣布即将推出的 Unity 5 将包括发布到 JavaScript + WebGL(无需插件).假设这按承诺工作,如果您的目标平台具有支持 WebGL 的浏览器,您就可以使用 Unity.
News as of August 2014: Unity has announced that the upcoming Unity 5 will include publishing to JavaScript + WebGL (no plugin required). Assuming this works as promised, you can use Unity if your target platform has a browser with WebGL support.
因此,如果您现在绝对需要包括 iOS 在内的跨平台 3D,现在,Unity 是它的最佳选择,但 WebGL 现在是桌面和 Android 的不错选择,并且可能会在移动设备上进行改进未来,并且是在网页中嵌入 3D 的唯一方法,而不是跨桌面和 Android 的应用.
So, if you absolutely need cross-platform 3D including iOS right now, Unity is where it's at, but WebGL is a good choice for desktop and Android now and likely to improve on mobile in the future, and is the only way to embed 3D in a web page, not an app across desktop and Android.
这篇关于交互式 3d 网络技术的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!