从 Java Web 应用程序为 WebGL 导出 3D 模型的推荐格式 [英] Recommended format to export 3D models for WebGL from a Java web app

查看:50
本文介绍了从 Java Web 应用程序为 WebGL 导出 3D 模型的推荐格式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个 Web 应用程序,可以在服务器上操作 3D 模型并允许用户查看模型.使用 Java 是 Web 应用程序的硬性要求,但 WebGL 查看器与应用程序的接口方式仍有待实现.

I have a web application that manipulates a 3D model on the server and allows the user to view the model. Using Java is a hard requirement for the web application, but the way the WebGL viewer interfaces with the application is still to be implemented.

将 3D 模型从 Java 导出到 WebGL 中易于使用的模型的推荐格式/方法是什么?您可以假设我在服务器端使用 Java 3D 库,在客户端使用 Three.js.

What is the recommended format/method to export 3D models from Java to something easily usable in WebGL? You can assume I use the Java 3D library on the server side and Three.js on the client side.

推荐答案

我的首选管道是导出为 JSON 格式,然后在我的加载器中转换为 Float32Array.Collada 也可以使用,但因为 Collada 允许以多种不同的方式描述网格之类的东西 Collada 进口商通常很挑剔.

My preferred pipeline is export to JSON format and then convert to Float32Array in my loader. Collada will also work but because Collada allows things like a mesh to be described in many different ways Collada importers are usually finicky.

这篇关于从 Java Web 应用程序为 WebGL 导出 3D 模型的推荐格式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆