io/x3d-deserializer

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

Source:
See:
  • README for supported conversion of X3D entities.
Example
const { deserializer, extension } = require('@jscad/x3d-deserializer')

Methods

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

Source:
See:

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

Parameters:
Name Type Attributes Description
options Object <optional>

options used during deserializing

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

filename of original X3D 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

X3D source data (XML)

Returns:

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

Type
Array | String