三维模型 obj 转化为 three Json 文件格式

将obj文件或者fbx文件转为为 threejs 对应的json文件。

1. 安装node

2. 下载threejs源文件

https://github.com/mrdoob/three.js

3. cmd 切换到 . hree.jsutilsconverters 目录下,

可以看到 threejs 提供的两个js文件,fbx2three.js  obj2three.js 文件

4. 安装esm

  cmd 中执行 npm install esm 

5. 将obj文件拷贝到目录下,执行命令

node -r  esm obj2three.js ws.obj 

6. 查看对应的json文件。

原文地址:https://www.cnblogs.com/googlegis/p/13839857.html