A standalone Node.js API to create, manipulate, convert & process 3D files.
npm install aspose.3dAspose.3D for Node.js via Java is an extensible and feature rich API that integrates 3D file generation, manipulation, conversion, and processing functions into your own Node.js application.API supports Discreet3DS, WavefrontOBJ, FBX (ASCII, Binary), STL (ASCII, Binary), Universal3D, Collada, glTF, GLB, PLY, DirectX, Google Draco file formats and more. Developers can create, read, convert, modify and control the substance of 3D document formats easily.
js
var aspose = aspose || {};
aspose.threed = require("aspose.3d");
var scene = new aspose.threed.Scene();
var box=new aspose.threed.Box();
scene.getRootNode().createChildNode(box);
scene.save("out.stl");
`
$3
` js
var aspose = aspose || {};
aspose.threed = require("aspose.3d");
var scene = new aspose.threed.Scene();
var plane=new aspose.threed.Plane();
plane.setUp(new aspose.threed.Vector3(1, 1, 3));
scene.getRootNode().createChildNode(plane);
scene.save("ChangePlaneOrientation.obj");
`
$3
` js
var aspose = aspose || {};
aspose.threed = require("aspose.3d");
// Create a scene
var scene = new aspose.threed.Scene();
// Initialize cylinder
var cylinder1 =new aspose.threed.Cylinder(2, 2, 10, 20, 1, false);
// Set OffsetTop
cylinder1.setOffsetTop(new aspose.threed.Vector3(5, 3, 0));
// Create ChildNode
var node1=scene.getRootNode().createChildNode(cylinder1);
node1.getTransform().setTranslation(new aspose.threed.Vector3(10, 0, 0));
// Initialize second cylinder without customized OffsetTop
var cylinder2 =new aspose.threed.Cylinder(2, 2, 10, 20, 1, false);
// Create ChildNode
scene.getRootNode().createChildNode(cylinder2);
// Save
scene.save("CustomizedOffsetTopCylinder.obj");
`
$3
` js
var aspose = aspose || {};
aspose.threed = require("aspose.3d");
// initialize a scene
var scene = new aspose.threed.Scene();
// initialize a Sphere
var sphere=new aspose.threed.Sphere();
// set radius
sphere.setRadius(10);
// add sphere to the scene
scene.getRootNode().createChildNode(sphere);
// save scene
scene.save("sphere.obj");
``