digifabster-model-viewer v0.0.5
3D model viewer
React component for displaing 3D Objects in browsers
Prerequisites
This project requires NodeJS (version 14 or later) and NPM. Node and NPM are really easy to install. To make sure you have them available on your machine, try running the following command.
$ npm -v && node -v
8.5.5
v16.13.2
Getting Started
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
Installation
BEFORE YOU INSTALL: please read the prerequisites
Start with install this package on your project:
$ npm i digifabster-model-viewer
Or if you prefer using Yarn:
$ yarn add digifabster-model-viewer
Usage
Serving the app
$ yarn dev
Building a distribution version
$ yarn build
This task will create a distribution version of the project
inside your local dist/
folder
Serving the distribution version
$ yarn preview
API
ModelViewerComponent
<ModelViewerComponent fileUrl="MyModelFileURL" />
Downloads and displays the model with .stl extension only
Props
fileUrl
Type | Default value |
---|---|
string | '' |
Url string for download the model for viewing
Example:
import { ModelViewerComponent } from "digifabster-model-viewer";
function App() {
return (
<>
<ModelViewerComponent fileUrl="MyModelFileURL" />
</>
);
}
Built With
- Vite
- React
- ThreeJS
- Love
Authors
- Digifabster Inc.