io/amf-deserializer

Deserializer of AMF source data (XML) to JSCAD geometries.

Source:
Example
const { deserializer, extension } = require('@jscad/amf-serializer')

Methods

(static) deserialize(options, input) → {Array|String}

Source:
See:

Deserialize the given AMF source (XML) into either a script or an array of geometry

Parameters:
Name Type Description
options Object

options used during deserializing

Properties
Name Type Attributes Default Description
filename String <optional>
'amf'

filename of original AMF source

output String <optional>
'script'

either 'script' or 'geometry' to set desired output

version String <optional>

version added to the script metadata, default is package version

addMetadata Boolean <optional>
true

toggle injection of metadata at the start of the script

input String

AMF source data (XML)

Returns:

either an array of objects (geometry) or a string (script)

Type
Array | String