Skip to content

Instantly share code, notes, and snippets.

@aspose-cloud
Last active July 25, 2021 15:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aspose-cloud/4e1d312b4e2076641bc04116254e508a to your computer and use it in GitHub Desktop.
Save aspose-cloud/4e1d312b4e2076641bc04116254e508a to your computer and use it in GitHub Desktop.
GLB to FBX conversion using Node.js
const { ThreeDCloudApi, postConvertByFormatRequest } = require("aspose3dcloud");
// Get your ClientId and ClientSecret from https://dashboard.aspose.cloud (free registration required).
const clientId = "718e4235-8866-4ebe-bff4-f5a14a4b6466";
const secret = "388e864b819d8b067a8b1cb625a2ea8e";
// create ThreeD Cloud API instance
const threeDCloudApi = new ThreeDCloudApi(clientId, secret);
// create ConvertByFormat request object
var req = new postConvertByFormatRequest()
// specify the name of input glb file
req.name = "Wolf-Blender-2.82a.glb";
// file format for resultant file
req.newformat = "ply";
// name of resultant file
req.newfilename = "Wolf-Blender-2.82a.ply";
req.folder = null;
// overrite the file if already exists on cloud storage
req.isOverwrite = true;
req.storage = null;
try {
// perform document conversion operations
return threeDCloudApi.postConvertByFormat(req)
.then((result) => {
// print success message on console
console.log("Successfully converted..");
});
}
catch (e) {
console.log("entering catch block");
console.log(e);
console.log("leaving catch block");
}
This Gist contains code snippets related to conversion of GLB to FBX using <a href="https://products.aspose.cloud/3d/nodejs/">Aspose.3D Cloud SDK for Node.js</a>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment