npm promotes metadefinitions

    @jscad/3mf-serializer

    2.1.4 • Public • Published

    @jscad/3mf-serializer

    Serializer of JSCAD geometries to 3MF shapes

    npm version Build Status

    Overview

    This serializer outputs a 'blobable' array of data from one or more JSCAD geometries. Only XML output is supported. The array of data can either be used to create a Blob (new Blob(blobable)), or converted to a Node.js buffer.

    The serialization of the following geometries are possible.

    • serialization of 3D geometry (geom3) to 3MF mesh(s)

    In addition, both color and name attributes are converted to 3MF attributes if found on the JSCAD geometry.

    Table of Contents

    Installation

    npm install @jscad/3mf-serializer
    

    Usage

    const { serialize } = require('@jscad/3mf-serializer')
    
    const rawData = serialize({unit: inch}, geometry)
    
    //in browser (with browserify etc)
    const blob = new Blob(rawData)

    Contribute

    For questions about the API, please contact the User Group

    Please see the README information of the OpenJSCAD.org project for how to submit bug reports or changes.

    Small Note: If editing this README, please conform to the standard-readme specification.

    License

    The MIT License (MIT) (unless specified otherwise)

    Install

    npm i @jscad/3mf-serializer

    DownloadsWeekly Downloads

    25

    Version

    2.1.4

    License

    MIT

    Unpacked Size

    24 kB

    Total Files

    6

    Last publish

    Collaborators

    • z3dev
    • mister-jscad
    • simon_clark