1.0.7 • Published 3 years ago

vue-3d-viewer v1.0.7

Weekly downloads
2
License
MIT
Repository
github
Last release
3 years ago

Vue 3D Viewer

status npm tests issues last commit

A Vue 3D file viewer via Three.JS and Unified 3D Loader

Features

  • Offloads parsing to a worker thread
  • Fully reactive to props
  • Moderately customizable with good defaults
  • Relatively fast (Parsing and displaying)

Documentation

File Formats

Check out Unified 3D Loader for a list of supported file types. This package also has a GCODE parser for GCODE file support.

Events

NameArgumentsDescription
doneN/AEmitted when the viewer is done parsing the file
progressnumber (Ranges from 0-100)The progress of the file parsing

Props

NameTypeDescriptionDefault
fileArrayBufferThe raw fileN/A
extensionStringThe file extension (Used to identify the correct parser)N/A
planeObjectThe plane/bed width and height{X: 10, Y:10}
positionObjectThe position of the object{X: 5, Y: 0, Z: -5}
rotationObjectThe rotation of the object (Degrees){X: -90, Y: 0, Z: 180}
scaleObjectThe scale of the object (Some file formats all specify units which will effect scale){X: 0.1, Y: 0.1, Z: 0.1}
themeObjectThe theme (colors) of the viewer.{background: "#dfe4ed", plane: "#586375", primary: "#4287f5", secondary: "#0a2f6b"}
transferBooleanWether or not to transfer the ArrayBuffer to the worker (Prevents duplicating large amounts of memory but empties the ArrayBuffer on the main thread preventing other code from using the ArrayBuffer)true

All props should be fully reactive, so feel free to update them dynamically.

Examples

Reuse

If you're interested in reusing primarily the non-Vue code from this package, you may be interested in the parsers directory and Unified 3D Loader

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0-alpha.1

4 years ago