npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

3dprintutils

v1.0.0

Published

Convert FBX 3D printing files to STL format

Downloads

20

Readme

3DConvert

A command-line tool for converting 3D models between various formats. This tool uses the Three.js library to load and manipulate 3D models. Lots of new projects are using FBX format, but the world, especially the developing world has STL printers in operation. In a pinch - you may find success in using this utility to port FBX files to STL. Be advised that color instructions and some other features may be lost in the translation.

Your mileage may vary, but I needed to use node --experimental-specifier-resolution=node as a prefix to the script name to make sure the pathing held up during execution.

Installation

  1. Install Node.js from https://nodejs.org/
  2. Clone this repository or download the zip file and extract it to a directory of your choice.
  3. Open a terminal or command prompt in the src directory.
  4. Run npm install to install the required dependencies.

Usage

node 3dconvert.mjs <input_file> [options]

Arguments

  • input_file (required): The path to the input file. The file format is determined by the file extension.
  • options (optional): Additional options to control the conversion process. See below for a list of available options.

Options

  • -o <output_file>: The path to the output file. The file format is determined by the file extension. If this option is not specified, the output will be saved to a file with the same name as the input file, but with a different file extension.
  • -t <output_format>: The format to convert the input file to. Valid formats are stl (STereoLithography) and obj (Wavefront OBJ). If this option is not specified, the output format will be determined by the file extension of the output file.
  • -b <background_color>: The background color of the output file in hexadecimal format (e.g. #ffffff for white). If this option is not specified, the background color will be black.

Examples

Convert an FBX file to an STL file:

node --experimental-specifier-resolution=node 3dconvert.mjs input.fbx -t stl -o output.stl

Convert an OBJ file to an STL file with a white background:

node --experimental-specifier-resolution=node 3dconvert.mjs input.obj -t stl -o output.stl -b #ffffff

License

MIT License. See LICENSE.txt for more information.